An ensemble of Neural Nets for Nudity Detection and Censoring
Project description
NudeNet: An ensemble of Neural Nets for Nudity Detection and Censoring
Pre-trained models available at https://github.com/bedapudi6788/NudeNet-models/
Uncensored version of the following image can be found at https://i.imgur.com/rga6845.jpg (NSFW)
Classification Classes
nude -> image contains nudity
safe -> image doesn't contain nudity
Detection Classes
BELLY -> exposed belly (both male and female)
BUTTOCKS -> exposed buttocks (both male and female)
F_BREAST -> exposed female breast
F_GENITALIA -> exposed female genitalia
M_GENETALIA -> exposed male genetalia
M_BREAST -> exposed male breast
Insallation
pip install nudenet
or
pip install git+https://github.com/bedapudi6788/NudeNet
Classifier Usage
from nudenet import NudeClassifier
classifier = NudeClassifier('classifier_checkpoint_path')
classifier.classify('path_to_nude_image')
# {'path_to_nude_image': {'safe': 5.8822202e-08, 'nude': 1.0}}
Detector Usage
from nudenet import NudeDetector
detector = NudeDetector('detector_checkpoint_path')
# Performing detection
detector.detect('path_to_nude_image')
# [{'box': [352, 688, 550, 858], 'score': 0.9603578, 'label': 'BELLY'}, {'box': [507, 896, 586, 1055], 'score': 0.94103414, 'label': 'F_GENITALIA'}, {'box': [221, 467, 552, 650], 'score': 0.8011624, 'label': 'F_BREAST'}, {'box': [359, 464, 543, 626], 'score': 0.6324697, 'label': 'F_BREAST'}]
# Censoring an image
detector.censor('path_to_nude_image', out_path='censored_image_path', visualize=False)
#To Do:
- Improve Documentation for the functions. (Right now user has to see the function definition to understand all the params)
- Convert these models into tflite, tfjs and create another repo that used tfjs to perform in browser detection and censor.
Note: Entire credit for collecting the object recognition dataset goes to http://www.cti-community.net/ (NSFW). The link for their api and the discord are as follows API here: http://pury.fi/ Discord: https://discord.gg/k4qM4Jh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file NudeNet-1.0.4.tar.gz.
File metadata
- Download URL: NudeNet-1.0.4.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72bed91a7fbb0e977f94c43686dda84a68bcebab97447b8049a8223679ac43a2
|
|
| MD5 |
d5c79b9473dee5c43e538be6cc43e94e
|
|
| BLAKE2b-256 |
1ea10e60914f8cf900a148af01eaf1b9bd166fff5a1b41d1307f701739d6afa8
|
File details
Details for the file NudeNet-1.0.4-py2.py3-none-any.whl.
File metadata
- Download URL: NudeNet-1.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a131b79a0a0ab6f573512cee6da5033dff8e1887f97a5a3b8e58a4fb46f1d947
|
|
| MD5 |
02689ad607c825d771c75c24a9c38f13
|
|
| BLAKE2b-256 |
23049183baf731ab4408d940b21e70c71308f1e9bc9fe7a780790f83c526ae2d
|