Freepik Drops an Open Source NSFW Detector That Hits 98% on Tricky Images
Freepik released an open source NSFW image classifier on Hugging Face with four severity levels, pip packaging, and benchmarks against existing detectors.
Takeaways
- Freepik released nsfw_image_detector, an MIT licensed EVA-02 based NSFW classifier on Hugging Face.
- Outputs four severity levels (neutral, low, medium, high) instead of a binary safe or unsafe flag.
- Reports 97 to 99% accuracy across categories, beating Falconsai and AdamCodd on internal benchmarks.
- Particular strength on AI generated imagery, where Falconsai drops to 35% on low severity content.
- Ships as a pip package with sensitivity selector, or loads via standard transformers pipeline.
- 86.4M parameters, 10 ms per image on an RTX 3090 in bf16 with tensor inputs.
Freepik has released an open source NSFW image classifier that assigns images to four severity levels. The model card provides an 86.4-million-parameter EVA-02 vision transformer, while a separate PyPI package adds threshold-based classification. Both are available under the MIT license.
The release targets moderation pipelines handling photographs and AI-generated images. Freepik positions it as a successor to the widely used Falconsai and AdamCodd classifiers, with finer policy controls and stronger reported results on synthetic imagery.
Four labels expose policy thresholds
The model fine-tunes timm’s EVA-02 checkpoint, which divides an image into patches and processes them with a vision transformer before assigning a class. It returns four ordered labels:
neutrallowmediumhigh
Those labels let each application set a severity threshold. A stock-image marketplace could flag low, medium, and high, while another service could restrict automated blocking to high. The ordinal labels require each operator to define the content and enforcement policy associated with every tier.
Low-severity detection drives the reported lead
Freepik reports the following per-class results against Falconsai and AdamCodd on its internal benchmark:
| Class | Freepik | Falconsai | AdamCodd |
|---|---|---|---|
| High | 99.54% | 97.92% | 98.62% |
| Medium | 97.02% | 78.54% | 91.65% |
| Low | 98.31% | 31.25% | 89.66% |
| Neutral | 99.87% | 99.27% | 98.37% |