I'm trying to implement software which automatically detects nude images. Hoping to do this through openCV. What do you think of the possibility and the best algorithm that can be used? Any examples would be highly appreciated.
Asked
Active
Viewed 1.1k times
6
-
1I expect a large market for this software – rene Mar 02 '11 at 14:24
-
3http://scholar.google.com/scholar?q=nude+image+detection&hl=en&btnG=Search&as_sdt=1,15&as_sdtp=on – Jacob Mar 02 '11 at 14:25
-
1When is an image "nude" ? :-) – marc_s Mar 02 '11 at 14:27
-
Try searching for "object categorization" and "bag of words". – carnieri Mar 02 '11 at 15:33
-
1Possible duplicate of [How to block uploads of nude images?](http://stackoverflow.com/questions/2365313) or [What is the best way to programatically detect porn images?](http://stackoverflow.com/questions/713247) – hippietrail Oct 22 '12 at 19:54
-
possible duplicate of [What is the best way to programatically detect porn images?](http://stackoverflow.com/questions/713247/what-is-the-best-way-to-programatically-detect-porn-images) – Tikhon Jelvis May 07 '13 at 07:32
-
A combination of skin detection, nipple and genitalia detection and face detection used to be the norm. However, deep neural networks are taking over. – Totoro Jul 04 '17 at 20:42
3 Answers
4
Depending on how accurate it needs to be you could just define a reasonable colour space that covers flesh tones, and then have some % threshold whereby if the flesh tone pixel count exceeds this % threshold then it may well be a nude image.

Paul R
- 208,748
- 37
- 389
- 560
-
-
1@nikie: true - it would find anything with a large proportion of flesh tone pixels, so maybe this wouldn't be sufficiently selective for the OP's requirements - it could however be used to distinguish between pictures of clothed/nude people. – Paul R Mar 02 '11 at 15:18
-
Thank you very much. I was also searching on the same algorithem, along with that skin colour detection can we implement another process to detect some other feature (such as face detection) ? Otherwise I think it will not be much accurete isn't it? – Duminda Mar 02 '11 at 17:40
2
Have you considered a neural-network approach? What you're asking for sounds like a machine-learning application.

Warren P
- 65,725
- 40
- 181
- 316
-
Thank You. I'm just trying to implement an application that filters uploading images for presense of nudity in them. The data will captured and processed before routed through the router. If possible trying to process downloding images also. – Duminda Mar 02 '11 at 17:31
-
1trouble is that you would need a large training set. Where are you going to get a sufficiently large set of nude images in machine readable format ? – Martin Beckett Apr 26 '11 at 16:11
-
5Ha. This is the internet. problem solved. :-) But try explaining the large database to your employer. – Warren P Apr 26 '11 at 16:41