500px / legacy-api-documentation

This is the 500px API documentation.
22 stars 9 forks source link

Issues with NSFW tag #239

Open Dinchy87 opened 7 years ago

Dinchy87 commented 7 years ago

I am using the API for my app and users report that even if i have added the NSFW option to my app they still see a lot of NSFW content. I call this to get the most popular picture in the category and i get a lot of times (for me normal portrait/body photographs) almost nudes that should clearly be classified as NSFW as NSFW means for me not save for work and this means any kind of nudity, sex, violance and so on.

This is the call: https://api.500px.com/v1/photos?feature=popular&image_size=2048&consumer_key=YOURKEY

then i get this response:

"{"current_page":1,"total_pages":1000,"total_items":50264,"photos":[{"id":222061079,"user_id":1354419,"name":"Magalie","description":null,"camera":"Canon EOS 5D Mark II","lens":"EF135mm f/2L USM","focal_length":"135","iso":"100","shutter_speed":"1/800","aperture":"2","times_viewed":15061,"rating":99.8,"status":1,"created_at":"2017-08-01T06:28:51-04:00","category":14,"location":null,"latitude":null,"longitude":null,"taken_at":"2017-07-30T14:39:24-04:00","hi_res_uploaded":0,"for_sale":false,"width":800,"height":1200,"votes_count":1516,"favorites_count":0,"comments_count":8,"nsfw":false, ..."

...where it say at the end nsfw false?! But there is some kind of nudity in the picture itself. Can this be fixed somehow?! Here is the link to the picture - "https://drscdn.500px.org/photo/222061079/m%3D2048_k%3D1_a%3D1/v2?client_application_id=26095&webp=true&sig=4acd4397da2163890b6bb1e3aa2ab5b2093830d7f7c8127f9ab7c2b8ec397dcf" where you can see what i mean. This picture is almost nothing what comes there with nsfw:false instead of true.

And my second question is at the end of this respond i see "filter", is there an option so i can filter tags or pictures with nudity, people, or something like that?

I see on the original page where the picture is posted it has tags like "nude, implied nude, girl, nudity". How is this not marked as NSFW, and such pictures are never rated as NSFW, why?

Dinchy87 commented 7 years ago

I found a workaround that works for me. There is this &tags=1 if ad this to the urls you will have tags in the response, then i just filter out the most used tags for nudity like nude, implied nudity, sexy, and even girl or something like this. This minimizes the chance of getting any nude or sexual content in my app.

snorrelo commented 6 years ago

I've had the same experience while using the api to get images for my screensavers, and some experimenting with machine learning. Hopefully, it will get better now with the new and stricter policy for nsfw tagging. But it probably still will be community driven with photographers marking them themselves and viewers reporting photos as nsfw.

I've looked at the nsfw tag and looks like it's only set for about half of the more explicit photos, and only about 10% of photos I'd be embarrassed about showing up on my screensaver at work.

Looking at metadata I've collected about the top 500 popular pictures for a while, I just extracted the tags and how many photos that used the tag I had considered sfw or not : https://gist.github.com/snorrelo/7e764a270202ee4462f58b16ee96b799

You can probably use the list to enhance your filtering, but let's hope the nsfw-tagging gets better now after the changes they are working on.

Dinchy87 commented 6 years ago

Thanks, the tag list you made is really good, i have some of the words there to filter the pictures in my requests but recently it got even worse, the tags get returned wrong in JSON and i got a lot of serialization errors because of this. Changed now the method a little bit so it just works but still NSFW is a pain. I also hope it will get better because there where recently some really nude women on 500px.com/popular without any NSFW tag and i too use this API for a screensaver/wallpaper app.