Skip to main content

Lightweight Nudity Detection

Project description

NudeNet: lightweight Nudity detection

https://nudenet.notai.tech/ in-browser demo (the detector is run client side, i.e: in your browser, images are not sent to a server)

pip install --upgrade nudenet
from nudenet import NudeDetector
nude_detector = NudeDetector()
nude_detector.detect('image.jpg') # Returns list of detections
detection_example = [
 {'class': 'BELLY_EXPOSED',
  'score': 0.799403190612793,
  'box': [64, 182, 49, 51]},
 {'class': 'FACE_FEMALE',
  'score': 0.7881264686584473,
  'box': [82, 66, 36, 43]},
 ]
all_labels = [
    "FEMALE_GENITALIA_COVERED",
    "FACE_FEMALE",
    "BUTTOCKS_EXPOSED",
    "FEMALE_BREAST_EXPOSED",
    "FEMALE_GENITALIA_EXPOSED",
    "MALE_BREAST_EXPOSED",
    "ANUS_EXPOSED",
    "FEET_EXPOSED",
    "BELLY_COVERED",
    "FEET_COVERED",
    "ARMPITS_COVERED",
    "ARMPITS_EXPOSED",
    "FACE_MALE",
    "BELLY_EXPOSED",
    "MALE_GENITALIA_EXPOSED",
    "ANUS_COVERED",
    "FEMALE_BREAST_COVERED",
    "BUTTOCKS_COVERED",
]

Docker

docker run -it -p8080:8080 ghcr.io/notai-tech/nudenet:latest
curl -F f1=@"images.jpeg" "http://localhost:8080/infer"

{"prediction": [[{"class": "BELLY_EXPOSED", "score": 0.8511635065078735, "box": [71, 182, 31, 50]}, {"class": "FACE_FEMALE", "score": 0.8033977150917053, "box": [83, 69, 21, 37]}, {"class": "FEMALE_BREAST_EXPOSED", "score": 0.7963727712631226, "box": [85, 137, 24, 38]}, {"class": "FEMALE_BREAST_EXPOSED", "score": 0.7709134817123413, "box": [63, 136, 20, 37]}, {"class": "ARMPITS_EXPOSED", "score": 0.7005534172058105, "box": [60, 127, 10, 20]}, {"class": "FEMALE_GENITALIA_EXPOSED", "score": 0.6804671287536621, "box": [81, 241, 14, 24]}]], "success": true}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nudenet-3.0.8.tar.gz (10.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nudenet-3.0.8-py3-none-any.whl (10.6 MB view details)

Uploaded Python 3

File details

Details for the file nudenet-3.0.8.tar.gz.

File metadata

  • Download URL: nudenet-3.0.8.tar.gz
  • Upload date:
  • Size: 10.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for nudenet-3.0.8.tar.gz
Algorithm Hash digest
SHA256 aa902bbc51dce98c92873916da4836d5979604188d6a8d6ad5db0af3cccad47c
MD5 e439f6d1923e5b351121033411b3cdcf
BLAKE2b-256 0845b9df22bc00e33b23fc824de20ac431b7265e330585cd5889b3593d456b2d

See more details on using hashes here.

File details

Details for the file nudenet-3.0.8-py3-none-any.whl.

File metadata

  • Download URL: nudenet-3.0.8-py3-none-any.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for nudenet-3.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e36e30bab3fb02d928190285794f6b759c034ce6bd4d19811b10095c8e52366e
MD5 8cba446cba79f87286b91835c001a639
BLAKE2b-256 fa7fa72c8a36a338f7e30fd564d982ca8154859a69602ca1c0d5c500c4de2e16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page