YOLO26s NSFW & Human Anatomy Object Detection Model V2 (19 Classes)
[!CAUTION]
⚠️ Sensitive Content Warning - 18+ Only
This repository contains a model taxonomy for detecting sensitive human anatomy for research, dataset annotation, and safety-tooling purposes only. Access is restricted to users 18 years and older. This model is intended to build privacy filters and annotation tools, not to create or distribute explicit content.
YOLO26s NSFW V2 (yolo26s-nsfw_v2.pt / yolo26s-nsfw_v2.onnx) is an open-weights, high-throughput Object Detection and Spatial Feature Localization Model built upon the modern Ultralytics YOLO26s architecture.
The model is designed to detect, localize, and classify 19 distinct human anatomical categories covering facial identity, neutral body parts, and sensitive regions (covered/exposed), providing three core output primitives for every detection:
- Category Label & Class ID (
0to18) - Bounding Box Coordinates (
[x1, y1, x2, y2]or normalized[cx, cy, w, h]) - Detection Confidence Score (
0.00to1.00)
[!NOTE]
📌 Model Scope & Intended Role
This model is strictly a per-box object detector, NOT an automated censorship engine or a safety-rating judge.
- It does NOT compute an overall binary "Safe / Not Safe" decision for an image.
- It does NOT decide platform policy or enforce automatic censorship rules on its own.
- Instead, it provides fine-grained localized spatial detections that developers and researchers can use to inspect images, automate dataset pre-labeling (e.g., in X-AnyLabeling or CVAT), or build custom downstream privacy/moderation pipelines.
📋 Model Details
- Model Type: Object Detection (Ultralytics YOLO26s)
- Task:
detect - Input Resolution:
640x640(supports 768/960 for higher accuracy on small regions) - Number of Classes: 19 Classes (IDs
0through18) - Weights File:
yolo26s-nsfw_v2.pt(9.47M params, 20.8 GFLOPs, 120 fused layers, 19.4 MB) | ONNX:yolo26s-nsfw_v2.onnx - Training Epochs: 30 epochs (Stage 2 fine-tune). Base checkpoint (
dump) was pretrained for 48 epochs on Stage 1. - Training Hardware: NVIDIA GeForce RTX 4060 (8GB VRAM) with AMP FP16
- Dataset Pipeline:
- Stage 1 (pretrain →
dump): 84k auto-labeled images (noisy pseudo-labels), monitored with 3.3k human-verified clean split — 48 epochs - Stage 2 (fine-tune → this
v2): initialized from Stage 1, fine-tuned on 3.3k human-verified clean images, validated on 370-image clean split — 30 epochs - Final test set: 411 images unseen by all versions (2,579 instances, incl. 50 background/negative) — used for comparison below
- Stage 1 (pretrain →
🏷️ Class Definitions (19 Categories)
The model localizes facial identity, neutral body parts, and sensitive regions.
| Class ID | Class Name | Category Group | Description |
|---|---|---|---|
0 | FEMALE_GENITALIA_COVERED | Covered Sensitive | Covered intimate area - female, lower torso |
1 | FACE_FEMALE | Facial Identity | Female face |
2 | BUTTOCKS_EXPOSED | Exposed Sensitive | Exposed gluteal region |
3 | FEMALE_BREAST_EXPOSED | Exposed Sensitive | Exposed chest area - female |
4 | FEMALE_GENITALIA_EXPOSED | Exposed Sensitive | Exposed intimate area - female |
5 | MALE_BREAST_EXPOSED | Exposed Sensitive | Exposed chest area - male |
6 | ANUS_EXPOSED | Exposed Sensitive | Exposed intimate area - anal |
7 | FEET_EXPOSED | Neutral Body Part | Bare feet |
8 | BELLY_COVERED | Neutral Body Part | Covered midsection / abdomen |
9 | FEET_COVERED | Neutral Body Part | Feet covered by footwear |
10 | ARMPITS_COVERED | Neutral Body Part | Covered underarm area |
11 | ARMPITS_EXPOSED | Neutral Body Part | Exposed underarm area |
12 | FACE_MALE | Facial Identity | Male face |
13 | BELLY_EXPOSED | Neutral Body Part | Exposed midsection / abdomen |
14 | MALE_GENITALIA_EXPOSED | Exposed Sensitive | Exposed intimate area - male |
15 | ANUS_COVERED | Covered Sensitive | Covered intimate area - anal |
16 | FEMALE_BREAST_COVERED | Covered Sensitive | Covered chest area - female |
17 | BUTTOCKS_COVERED | Covered Sensitive | Covered gluteal region |
18 | HAND | Neutral Body Part | Human hand / fingers |
📊 Evaluation & Benchmark Performance
Benchmark generated 2026-09-29 on held-out validation split (data_ft.yaml, imgsz=640, batch=16, device=0).
1. Overall Performance — V2 vs Earlier Internal Iterations
| Model | Params (M) | Size (MB) | mAP@50 | mAP@50-95 | Precision | Recall | F1-Score | Latency (ms) | FPS |
|---|---|---|---|---|---|---|---|---|---|
| yolo26s-nsfw_v1.3 | 9.47M | 57.5 MB | 0.7481 | 0.6251 | 0.7854 | 0.7551 | 0.7700 | 5.2 | 193.7 |
| yolo26s-nsfw_dump | 9.47M | 57.5 MB | 0.8342 | 0.5970 | 0.8451 | 0.7582 | 0.7993 | 4.4 | 229.3 |
| yolo26s-nsfw_v2 (this model) | 9.47M | 19.4 MB | 0.8988 | 0.7522 | 0.8954 | 0.8484 | 0.8713 | 4.2 | 235.3 |
V2 improves over v1.3 by +15.1 points mAP@50 and +12.7 points mAP@50-95, while also being ~3× smaller and faster.
ℹ️ Note on comparison validity: the three checkpoints are not a strict controlled ablation — each used a different upstream pretrain and amount of fine-tuning data. Gains come from both more pretrain data (46k → 84k) and more fine-tune data (500 → 3,300 images). All three were evaluated on the same untouched 411-image test set.
2. Per-Class AP@50 Breakdown
| Class Name | v1.3 | dump | v2 (this model) |
|---|---|---|---|
ANUS_COVERED | 0.1021 | 0.5942 | 0.7345 |
ANUS_EXPOSED | 0.8592 | 0.8882 | 0.9503 |
ARMPITS_COVERED | 0.0179 | 0.9285 | 0.9690 |
ARMPITS_EXPOSED | 0.2489 | 0.8733 | 0.9529 |
BELLY_COVERED | 0.5305 | 0.5488 | 0.7502 |
BELLY_EXPOSED | 0.9573 | 0.9443 | 0.9913 |
BUTTOCKS_COVERED | 0.7399 | 0.8085 | 0.8866 |
BUTTOCKS_EXPOSED | 0.8516 | 0.8736 | 0.9070 |
FACE_FEMALE | 0.9848 | 0.9715 | 0.9760 |
FACE_MALE | 0.7879 | 0.6971 | 0.8120 |
FEET_COVERED | 0.9648 | 0.9771 | 0.9908 |
FEET_EXPOSED | 0.9235 | 0.9421 | 0.9658 |
FEMALE_BREAST_COVERED | 0.9113 | 0.9162 | 0.9739 |
FEMALE_BREAST_EXPOSED | 0.9688 | 0.9596 | 0.9748 |
FEMALE_GENITALIA_COVERED | 0.7283 | 0.7694 | 0.9115 |
FEMALE_GENITALIA_EXPOSED | 0.9861 | 0.9820 | 0.9887 |
HAND | 0.9469 | 0.9639 | 0.9754 |
MALE_BREAST_EXPOSED | 0.8935 | 0.5058 | 0.5844 |
MALE_GENITALIA_EXPOSED | 0.8108 | 0.7060 | 0.7815 |
⚠️ Known limitation:
MALE_BREAST_EXPOSEDandMALE_GENITALIA_EXPOSEDregress in v2 vs v1.3, likely due to class imbalance in clean set. Consider this for male-inclusive use cases.
3. Latency Decomposition
| Model | Pre-process (ms) | Inference (ms) | Post-process (ms) | Total Latency (ms) | FPS |
|---|---|---|---|---|---|
| yolo26s-nsfw_v1.3 | 0.72 | 3.81 | 0.63 | 5.16 | 193.7 |
| yolo26s-nsfw_dump | 0.71 | 3.04 | 0.61 | 4.36 | 229.3 |
| yolo26s-nsfw_v2 | 0.76 | 2.87 | 0.63 | 4.25 | 235.3 |
💻 Quick Start & Python Usage
Installation
pip install ultralytics torch opencv-python
1. Extracting Detections (Label, BBox, Confidence)
from ultralytics import YOLO
model = YOLO("yolo26s-nsfw_v2.pt")
results = model.predict(
source="path/to/image.jpg",
conf=0.30,
iou=0.45,
device=0,
imgsz=640
)
for res in results:
for box in res.boxes:
cls_id = int(box.cls[0].item())
cls_name = res.names[cls_id]
conf_score = float(box.conf[0].item())
x1, y1, x2, y2 = map(int, box.xyxy[0].tolist())
print(f"Class: {cls_name:<25} | ID: {cls_id:>2} | Score: {conf_score:.1%} | BBox: [{x1}, {y1}, {x2}, {y2}]")
res.save("annotated_output.jpg")
2. Example: Export to YOLO TXT Format
for res in results:
for box in res.boxes:
cls_id = int(box.cls[0].item())
cx, cy, bw, bh = box.xywhn[0].tolist()
print(f"YOLO annotation: {cls_id} {cx:.6f} {cy:.6f} {bw:.6f} {bh:.6f}")
3. Example: User-Defined Selective Redaction
import cv2
img = cv2.imread("input.jpg")
results = model.predict(img, conf=0.30)
# User-defined policy: select which class IDs to redact
# Example uses IDs 2,3,4,6,14 - see class table above for mapping
REDACT_IDS = {2, 3, 4, 6, 14}
for box in results[0].boxes:
cls_id = int(box.cls[0].item())
if cls_id in REDACT_IDS:
x1, y1, x2, y2 = map(int, box.xyxy[0].tolist())
roi = img[y1:y2, x1:x2]
if roi.size > 0:
img[y1:y2, x1:x2] = cv2.GaussianBlur(roi, (51, 51), 30)
cv2.imwrite("redacted_output.jpg", img)
⚖️ Ethical Use, Legal Compliance & Safety Policy
[!CAUTION]
Strict Prohibition: Zero-Tolerance Policy on CSAM / CSAC
This model MUST NOT be used for creating, processing, indexing, or distributing Child Sexual Abuse Material (CSAM) or any content depicting underage individuals. Any such usage is strictly prohibited, illegal, and will be reported to appropriate authorities (e.g., NCMEC, Interpol).
- Intended Use Cases:
- Academic research in computer vision and spatial feature localization
- Assisting annotators with automated pre-labeling (Auto-Labeling)
- Building opt-in client-side privacy filters and personal photo organization tools (e.g., Immich, Nextcloud)
- Non-Consensual Imagery (NCII):
- Strictly prohibited from use in creation of non-consensual deepfakes or harassment material.
- Data Protection & Legal Compliance:
- Users bear sole responsibility for compliance with regional privacy regulations (PDPA, GDPR, CCPA).
👥 Credits & Acknowledgments
- Model Training & Maintenance: Pakaho-q1
- Base Architecture: Ultralytics YOLO
- Class Scheme Reference: NudeNet by notAI-tech (taxonomy reference only)
- Media Ingestion Tools: Immich
- Acceleration Stack: NVIDIA TensorRT & ONNX Runtime
📄 License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0), consistent with the Ultralytics licensing framework.