MobileNetV2 NSFW Image Classifier (habenb123/NSFW_Image_detection_model)
A lightweight, high-performance computer vision model for real-time NSFW (Not Safe For Work) and content moderation filtering. Built with MobileNetV2 transfer learning and trained to classify images into five granular safety categories.
Saved in native modern Keras format (.keras), compatible with Keras 3 and TensorFlow 2.16+.
Model Summary
- Repository: habenb123/NSFW_Image_detection_model
- Model File:
nsfw_mobilenet_model.keras - Architecture:
MobileNetV2(Pre-trained on ImageNet, fine-tuned classification head) - Input Resolution:
224 x 224 x 3(RGB) - Output: 5-class probability distribution (
softmax) - Primary Use Case: Automated image moderation for user-generated content (UGC), social media feeds, live chats, and community forums.
Classes & Taxonomy
The model outputs probabilities for 5 categories (indices match output order):
| Index | Class Label | Description | Moderation Default |
|---|---|---|---|
0 | drawings | Safe anime, cartoons, comic art, digital illustrations, and sketches | ✅ Safe |
1 | hentai | Explicit anime, hentai illustrations, or sexualized cartoon art | 🚫 Unsafe (NSFW) |
2 | neutral | Safe, non-sexual everyday photographs and real-world scenes | ✅ Safe |
3 | porn | Explicit adult photographs, nudity, and sexual acts | 🚫 Unsafe (NSFW) |
4 | sexy | Provocative, suggestive, or revealing imagery (swimwear, lingerie, fitness attire) | ⚠️ Sensitive / Borderline |
How to Use
1. Installation
pip install tensorflow keras pillow numpy huggingface_hub