I am supervising a programming project whose goal is to detect offensive images on social networks. I would like to have a representative dataset of social network images. It would be best if the dataset were already classified. Otherwise, the classification of a (smallish) dataset could be a part of the project.

I looked around the internet and searched various dataset collections that are freely available, but I haven't been able to find anything appropriate.

What is the best way to get a large social network image dataset these days?

  • $\begingroup$ Recently I have been a part of similar project to classify offensive images for one of a project. I have the model ready and trained. But dataset is not open. May be I can use the model to create a small classified dataset for you. please let me know. $\endgroup$ – P K Jul 8 '19 at 5:41
  • $\begingroup$ Sounds good! Can I contact you directly? My email is zluria@gmail.com. $\endgroup$ – Zur Luria Jul 9 '19 at 6:55
  • $\begingroup$ Aside from your question, isn't this a type of positive-unlabelled classification problem as not offensive is not exactly a category, how are you solving it? as going for a binary classification doesn't seem intuitive to me $\endgroup$ – Itachi Jul 9 '19 at 11:56
  • $\begingroup$ That's true. I think that if I can go over the raw data, I could get a sense of which categories of offensiveness are more common, and then train a classifier to recognize them. $\endgroup$ – Zur Luria Aug 1 '19 at 11:10

Google just released a beta search tool for datasets. This can help you find any kind of datasets you want: https://toolbox.google.com/datasetsearch


Most social networks such as Instagram have Terms of Service prohibiting crawling, scraping, caching or otherwise accessing any content on the Service via automated means, including but not limited to, user profiles and photos, check https://www.kaggle.com/general/23419 for a discussion of the matter.

Likely you will need to scrap it yourself (there are scripts out there doing it for you) but you will not find a ready to download dataset.

  • $\begingroup$ Hmmm... maybe that would be the best practical solution, but I'm not sure that I want to place myself on the wrong side of the law. I guess I could have my students manually scrap a few thousand images to create a small dataset. $\endgroup$ – Zur Luria Jul 9 '19 at 6:55
  • $\begingroup$ @ZurLuria Can be good to teach your students how to scrape data instead of collecting it by hand. It is often a core part of many data science projects. $\endgroup$ – Learning is a mess Jul 9 '19 at 10:55

Not sure if they are relevant, but found various image data set which can be categorized as offensive vs non-offensive image, based upon your selection criterion.

Links are:

  1. https://github.com/EBazarov/nsfw_data_source_urls
  2. https://github.com/alex000kim/nsfw_data_scraper

Both the links categorized thousand's of file as per they characteristics and include URL's of the image.

Based upon your criteria you marked particular text file images as offensive/non-offensive. Just you have to write small code to download these files and set the label accordingly.

  • $\begingroup$ Thank you. Something like this could be a good solution, but I am worried that a collection of porn images on the one hand, and neutral images of objects on the other, is very far from a representative sample of images from social networks. $\endgroup$ – Zur Luria Jul 9 '19 at 6:52
  • $\begingroup$ Also, offensive images aren't necessarily sexual images. If an image contains drugs, violence or other criminal activity, it should also be classified as offensive... $\endgroup$ – Zur Luria Jul 9 '19 at 6:53
  • $\begingroup$ True, but it has n number of categories and based upon your preference you can list offensive/non-offensive image. $\endgroup$ – vipin bansal Jul 9 '19 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.