nudenet
Lightweight Nudity Detection
What it is and what it does
NudeNet is a Python library for detecting nudity and exposed body parts in images using ONNX-based neural networks. It wraps ultralytics YOLOv8 models (320n at 320x320 or 640m at 640x640 resolution) to classify image regions into categories like FEMALE_GENITALIA_EXPOSED, FACE_FEMALE, BELLY_EXPOSED, and others. The detector returns bounding boxes with confidence scores for each detected region.
The package is designed for content moderation workflows: you can scan individual images or batches, accept file paths or in-memory image objects (numpy arrays, bytes, or file handles), and optionally blur or censor detected regions. A Docker image is also provided for server-side deployment. The 320n model ships with the package by default; larger models can be downloaded separately.
Use it for:
- Content moderation for user-generated image uploads on social platforms or forums.
- Automated filtering of adult content in image galleries or search results.
- Batch processing of large image datasets to identify and flag potentially sensitive material.
- Client-side nudity detection in browser-based applications using the in-browser demo.
- Building a censoring pipeline to blur or redact exposed regions before display or storage.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects nudity in images using lightweight ONNX models, returning bounding boxes and confidence scores for exposed or covered body parts, with optional image censoring.
Yes, if you need lightweight nudity detection. Low install friction, permissive MIT license, active maintenance, and no known vulnerabilities. The 320n model is included by default for quick setup. Trade-off: the maintainer is seeking contributors, so long-term feature development may be limited; verify accuracy on your specific image types before production deployment.
Install
nudenet on PyPI
pip
pip install nudenetuv
uv add nudenetpoetry
poetry add nudenetInstalling nudenet
Before you install
Low friction: pure Python wheel with three runtime dependencies (numpy, onnxruntime, opencv-python-headless). Actively maintained as of June 2026, with 2427 GitHub stars. Maintainer is seeking contributors but the repo remains current.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install nudenet
from nudenet import NudeDetector
detector = NudeDetector()
detections = detector.detect('image.jpg')
print(detections) # Returns list of dicts with 'class', 'score', 'box'
Requires Python 3.6 or later; onnxruntime and opencv-python-headless must be installed (handled by pip).
Verify before relying
- Accuracy and false-positive rates across different image types and lighting conditions.
- Performance characteristics (inference time, memory usage) on typical hardware.
- Whether the 320n model is suitable for production use or if 640m is recommended for better accuracy.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — numpy, onnxruntime, opencv-python-headless |
| Maintenance | actively maintained — 772 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,464/month — #13,583 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nudenet-3.4.2-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
onnxslimOnnxSlim reduces the size and operator count of…
permissive · top 5,000 on PyPI
cnstdDetects text and mathematical formulas in…
permissive · top 15,000 on PyPI
lightlyLightly provides self-supervised learning…
permissive · top 15,000 on PyPI
onnxtrOnnxTR extracts and recognizes text from…
permissive · top 15,000 on PyPI
qrdetDetects and segments QR codes in images using a…
permissive · top 15,000 on PyPI
ultralyticsUltralytics YOLO provides a unified framework…
agpl · top 5,000 on PyPI
lightly-utilsProvides utility functions and helpers for the…
permissive · top 15,000 on PyPI
alibi-detectAlibi Detect provides outlier, adversarial, and…
unclear · top 15,000 on PyPI
rembgRemoves image backgrounds using deep learning…
permissive · top 5,000 on PyPI
yolov5YOLOv5 is a packaged object detection model…
copyleft · top 15,000 on PyPI