AdamCodd/vit-base-nsfw-detector

image-classification model by AdamCodd

Open original source ↗

From the publisher

Model card & documentation

Source preview

Read the publisher’s intended use, setup instructions, evaluations and limitations. The original model card is the source of truth.

This model is a fine-tuned version of vit-base-patch16-384 on around 25000 images (drawings, photos...). It achieves the following results on the evaluation set: New [07/30]: I created a new ViT model specifically to detect NSFW/SFW images for stable diffusion usage (read the disclaimer below for the reason): AdamCodd/vit-nsfw-stable-diffusion. Disclaimer: This model wasn't made with generative images in mind! There is no generated image in the dataset used here, and it performs significantly worse on generative images, which will require another ViT model specifically trained on generative images. Here are the model's actual scores for generative images to give you an idea: The Vision Transformer (ViT) is a transformer encoder model (BERT-like) pretrained on a large collection of images in a supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. Next, the model was fine-tuned on ImageNet (also referred to as ILSVRC2012), a dataset comprising 1 million images and 1,000…

AdamCodd/vit-base-nsfw-detector on Hugging Face A short preview, not the full document.

Read the full model card ↗ · Preview checked 2026-10-30T18:37:02.054Z

Inside the original model card — Document outline
  1. vit-base-nsfw-detector
  2. Model description
  3. Intended uses & limitations
  4. Training and evaluation data
  5. Training procedure
  6. Training hyperparameters
  7. Training results
  8. Framework versions

Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.

Documentation belongs to its respective authors. Reported project/model license: apache-2.0. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.

Model overview

AdamCodd/vit-base-nsfw-detector is a image-classification model repository published by AdamCodd on Hugging Face. The source reports the transformers.js library.

This page summarizes Hub metadata. For intended use, training data, evaluation results and limitations, consult the original model card.

Model facts

Task
image-classification
Library
transformers.js
Recent downloads (30 days)
711,559
Cumulative likes
91
Hugging Face trending score
0
Reported safetensors parameters
86,092,034
Architecture
ViTForImageClassification
License
apache-2.0
Access
Not gated by Hugging Face
Created
2024-01-03T20:10:17.000Z
Last modified
2024-12-03T14:14:31.000Z

Compatibility and lineage

Language coverage was not reported.

Reported base models: google/vit-base-patch16-384

Parameter count is not a RAM/VRAM requirement. Check precision, quantization, context length and runtime compatibility in the model card; no hardware or API-cost claim is inferred here.

Use and evaluate

Check license terms and access requirements first. Review the model card’s documented loading instructions, evaluations and safety limitations. Benchmark scores are not imported by this directory, and popularity is not an accuracy ranking.

No model weights are downloaded or executed by AltAPIs. Never enable remote model code without reviewing it.

Model card and usage instructions

Model files and configuration

Community discussion

Source and freshness

Source: Hugging Face Hub. Metadata observed 2026-11-01T06:54:32.747Z. Daily imports are snapshots, not real-time monitoring.

Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.

Open original source

Related models

google/vit-base-patch16-224

timm/mobilenetv3_small_100.lamb_in1k

prithivMLmods/Gender-Classifier-Mini

timm/tf_efficientnetv2_s.in21k_ft_in1k

timm/resnet18.a1_in1k

Falconsai/nsfw_image_detection