Image NSFW Detection
Image NSFW Detection checks an image for explicit content and returns one label, normal or nsfw, using one of two open ViT image classifiers.
Overview
Image NSFW Detection is a Wiro moderation tool. It runs your image through an NSFW image classifier and returns one word: normal or nsfw. There is no threshold to tune and no score to parse, so an upload filter or a review step can act on the answer directly. It is the image counterpart of Video NSFW Detection and uses the same classifiers.
You choose between two classifiers. Both are Vision Transformer (ViT) models fine-tuned for NSFW detection and published under Apache-2.0.
- nsfw_image_detection by Falconsai is the default. It starts from google/vit-base-patch16-224-in21k and was fine-tuned on about 80,000 images in two classes, normal and nsfw. Falconsai reports an evaluation accuracy of 0.980.
- vit-base-nsfw-detector by AdamCodd starts from google/vit-base-patch16-384 and was fine-tuned on around 25,000 images, drawings and photos included. Its author reports 0.9654 accuracy and 0.9948 AUC, and describes it as deliberately strict: images that show cleavage or a lot of skin are classed as NSFW.
What you can build
- Pre-publish checks on user-uploaded photos, avatars and profile pictures.
- A check after an image generation step that holds images labeled nsfw for review before they are shown.
- Audits of an existing image library that flag files for human review.
- Routing rules that send nsfw images to an age-gated area instead of the main feed.
Inputs
One image in JPG, PNG, WebP, BMP or GIF, either uploaded as a file or given as a public URL, and the classifier to use. For an animated GIF or WebP the first frame is checked. If you do not pick a classifier, nsfw_image_detection runs.
Outputs
A text file with a single label, normal or nsfw. Whichever classifier you pick, the label uses these two words.
Recommended settings
Switch to vit-base-nsfw-detector when revealing clothing should count as NSFW, or when your images include drawings, which were part of its training data.
Limitations
- Two classes only. The result does not say what was found, where in the image it is or how confident the model is.
- One image per run. To check a video, use Video NSFW Detection.
- AdamCodd reports that vit-base-nsfw-detector does worse on AI-generated images, with 0.86 accuracy on them, because its training set contained none.
- Both classifiers make mistakes in both directions: expect some false positives and some missed images.
Safety & compliance
Automated labels are one layer of moderation. Keep a person in the loop for appeals and for decisions that remove content or restrict accounts.
API quick start
Run image-nsfw-detection with a single API call.
{
"model": 183168,
"inputImage": "https://your-cdn.com/input.png"
}curl -X POST "https://api.wiro.ai/v1/Run/wiro/image-nsfw-detection" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_WIRO_API_KEY" \
--data-binary @- <<'JSON'
{
"model": 183168,
"inputImage": "https://your-cdn.com/input.png"
}
JSONOther models you might like
Explore similar image generation models.



