How gubi/ai-nsfw-image-detection-and-filtering works
This repository provides two local image workflows: pixelate and report NSFW detections, or combine general-object and NSFW detections with image metadata. The filter’s inference, annotation, and report writes are explicit in source. The detector excerpt is partial, so its input wiring and description-generation use are not fully represented.
Main entry points: nsfw_filter.py Filter workflow · image_detector.py Detector workflow · selected Selected images · erax_nsfw_yolo11m.pt NSFW weights
Components 16
NSFW filtering
- Filter workflow
nsfw_filter.py - NSFW YOLO
nsfw_filter.py - Pixelation
nsfw_filter.py - Detection report
training_samples/nsfw_recognized/report.json - Filtered images
training_samples/nsfw_recognized
Image detection
- Detector workflow
image_detector.py - Dual-model detection
image_detector.py - Merge results
image_detector.py - Face age/gender
image_detector.py - Image description
image_detector.py
Models and data
- Selected images
training_samples/selected - YOLO weights
pretrains/yolo11m.pt - NSFW weights
pretrains/erax_nsfw_yolo11m.pt - Collected media
training_samples/collected
Other components
- Operator
- Moondream API
Connections 16
- Operator → Filter workflow: runs
- Filter workflow → NSFW YOLO: loads model
- NSFW YOLO → NSFW weights: loads weights
- Filter workflow → Selected images: reads images
- Filter workflow → Pixelation: annotates detections
- Filter workflow → Detection report: writes report
- Filter workflow → Filtered images: saves images
- Operator → Detector workflow: runs
- Detector workflow → Dual-model detection: invokes
- Dual-model detection → YOLO weights: loads weights
- Dual-model detection → NSFW weights: loads weights
- Dual-model detection → Selected images: reads images
- Detector workflow → Merge results: merges results
- Merge results → Face age/gender: gets demographics
- Detector workflow → Image description
- Image description → Moondream API: queries