What is Falconsai NSFW Image Detection?
nsfw_image_detection is a two-label image classifier from Falcons.ai: it looks at a picture and answers normal or nsfw, with a probability for each. It is Google's ViT-Base vision transformer (vit-base-patch16-224-in21k, pre-trained on ImageNet-21k) fine-tuned on a proprietary set of about 80,000 images, and it resizes every input to 224 by 224 pixels. The safetensors weights are about 343 MB.
The model went up on Hugging Face in October 2023 and remains the most downloaded NSFW model there, with about 1.56 million downloads in the past month. The licence is Apache 2.0. The repository also carries a quantised YOLOv9 version of 87 MB for ONNX-style deployment.
Is Falconsai NSFW Image Detection worth it?
nsfw_image_detection is popular because it is easy, not because it is accurate. Three lines of Transformers code load it, a ViT-Base model of about 343 MB runs on a CPU, and the Apache 2.0 licence lets any business ship it. The only accuracy figure its makers publish is 98.04% on their own evaluation split, from the same proprietary 80,000-image set it was trained on; the card describes neither the data nor what counts as nsfw.
Outside numbers are less kind. Freepik, which publishes a rival detector and so has an interest, tested both on four grades of content. Falconsai caught 97.92% of explicit images and correctly passed 99.27% of safe ones, but flagged only 78.54% of medium and 31.25% of mildly suggestive images. On AI-generated pictures it caught 84.00% of explicit ones, against 100.00% for Freepik's model, which led Freepik to advise against it for generated content.
The catch: it answers one question with one threshold. There is no grading of severity, no category for violence or gore, and nothing about minors; an image classifier like this is a filter, not a moderation policy. The repository also holds pickle-format files (pytorch_model.bin, a 687 MB optimizer.pt and the YOLOv9 .pt) next to the safetensors weights; pickle files can run code when loaded, so production systems should load only model.safetensors.
Our take: as a cheap gate that sends obvious cases to a bin and the rest onward, it earns its download count; any platform where mild content matters needs a graded model such as Freepik's or a multimodal safety model such as Llama Guard 4 behind it.
Where it earns its place
A solo developer running a small image-sharing community
Hold back obvious explicit uploads before they appear in the public feed
Run the Transformers pipeline on a CPU worker and quarantine anything scored nsfw for review. No fee, and images never leave the server; expect suggestive images to slip through.
A trust-and-safety engineer at a marketplace with 200,000 listing photos a day
Cut the volume of images a paid moderation model or human reviewer has to see
Use Falconsai as a cheap pre-filter: auto-reject high-confidence nsfw scores, pass high-confidence normal ones, and send the middle band to a graded model. Load only model.safetensors in production.
A machine-learning engineer at an image-generation start-up
Screen generated images before they are shown to users
Treat it as a baseline only: Freepik measured 84.00% recall on explicit AI-generated images, so pair it with a model tested on generated content and keep logs to tune the threshold.
Before you commit
- Setup
- pip install transformers torch pillow, then pipeline("image-classification", model="Falconsai/nsfw_image_detection"); first result in a few minutes, no token or gate.
- Integrations
- Hugging Face Transformers (AutoModelForImageClassification and ViTImageProcessor); a quantised YOLOv9 file with labels for ONNX Runtime; any stack that can run a ViT-Base classifier.
- Data and privacy
- Self-hosted, so images stay on your hardware. Trained on a proprietary dataset of about 80,000 images whose sources and labelling are not published. Apache 2.0 licence.
- Cost at scale
- No licence fee or hosted price; cost is the CPU or GPU time to run a 224-pixel ViT-Base classifier, which is small next to generative or multimodal safety models.
- Limits
- Two labels (normal, nsfw) at 224 by 224 pixels; no severity grading or other harm categories; weak on mild and AI-generated content in Freepik's test; only self-reported accuracy of 98.04%; pickle files in the repository.
What’s good
- Apache 2.0 weights with no gate
- Small ViT-Base model of about 343 MB that runs on a CPU
- Three-line setup with the Transformers pipeline
- Catches 97.92% of explicit images in Freepik's test
What’s not
- Flags only 31.25% of mildly suggestive images in Freepik's test
- Two labels only; no severity levels, violence or other categories
- Training data proprietary and undescribed beyond 80,000 images
- Repository includes pickle files that can execute code when loaded
Best for
Developers who need a free, local first-pass filter for explicit uploads and will route borderline images to a stronger model or a person.
Falconsai NSFW Image Detection alternatives
Falconsai NSFW Image Detection: common questions
- Is Falconsai NSFW Image Detection worth it?
- Falconsai's classifier is the free, fast first pass everyone starts with, and on its own it lets too much mild nudity through to be anyone's last line of defence. We rate it 3.4 out of 5.
- How much does Falconsai NSFW Image Detection cost?
- Free under Apache 2.0, including commercial use. No hosted API from the maker; you pay for your own compute.
- What are the downsides of Falconsai NSFW Image Detection?
- Flags only 31.25% of mildly suggestive images in Freepik's test; two labels only; no severity levels, violence or other categories; training data proprietary and undescribed beyond 80,000 images; repository includes pickle files that can execute code when loaded.
- Who is Falconsai NSFW Image Detection best for?
- Developers who need a free, local first-pass filter for explicit uploads and will route borderline images to a stronger model or a person.
- How much does Falconsai NSFW Image Detection cost for a team or in production?
- No licence fee or hosted price; cost is the CPU or GPU time to run a 224-pixel ViT-Base classifier, which is small next to generative or multimodal safety models.
- Is Falconsai NSFW Image Detection safe for company data?
- Self-hosted, so images stay on your hardware. Trained on a proprietary dataset of about 80,000 images whose sources and labelling are not published. Apache 2.0 licence.
- What are the best Falconsai NSFW Image Detection alternatives?
- The closest alternatives we have reviewed are Llama Guard 4.
Answers checked Nov 21, 2026.