Portrait NSFW Classification Model
Detects and classifies NSFW (Not Safe For Work) content in human portrait images.
This model identifies people in an image, analyzes the relevant regions, and assigns a risk level based on the presence of potentially inappropriate or explicit content.
🚀 Inputs
| input | type | default | description |
|---|---|---|---|
image |
file | required | Input image. |
expand |
float | 0.2 |
Person bounding box expansion ratio to include more contextual information around detected individuals. |
conf |
float | 0.5 |
Confidence threshold for person detection using YOLO. |
📤 Output
The model returns a risk_level indicating the NSFW risk classification of the input image.
Possible risk_level values:
| risk_level | Meaning |
|---|---|
normal |
Normal or low-risk content. |
suggestive |
Revealing clothing, swimwear (e.g., bikini), or sexually suggestive content without explicit nudity. |
explicit |
Full nudity, visible sexual organs, or explicit sexual content. |
Notes
- The final
risk_levelis determined based on detected persons in the image - If multiple people are present, the highest risk level is returned
- Results are probabilistic and may not be 100% accurate
🧠 How It Works
- Detects human subjects in the image using a YOLO-based model
- Expands bounding boxes using the
expandparameter to capture additional context - Crops detected regions and feeds them into an NSFW classification model
- Aggregates predictions across all detected persons
- Outputs the highest risk level as the final result
⚙️ Parameters Guide
-
expand -
Higher values include more surrounding context (useful for borderline cases)
-
Too large values may introduce background noise
-
conf -
Lower values detect more people but may increase false positives
- Higher values are stricter but may miss small or partially visible persons
📌 Use Cases
- Content moderation systems
- Social media safety filtering
- Image dataset cleaning
- Automated compliance pipelines
⚠️ Limitations
- May produce false positives or false negatives
- Performance depends on quality of person detection
- Not suitable for images without human subjects
- Cultural/contextual sensitivity may vary
⚠️ Disclaimer
This model is intended as an assistive tool for content moderation. It should not be used as the sole basis for making critical or legal decisions.