SAVRN
Search Contact SAVRN

Open-weight model · Image classification

nsfw_image_detector

by Freepik Freepik/nsfw_image_detector

This model is a vision transformer based on the EVA architecture, fine-tuned for NSFW content classification. It has been trained to detect four categories (neutral, low, medium, high) of visual content using 100,000 synthetically labeled images.

Parameters86M
Context
Weights172.7 MB
Licensemit
AccessOpen weights
Monthly Downloads345.9k

Runs On

What it takes to serve nsfw_image_detector (86M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

SAVRN's Notes on nsfw_image_detector

Put this in front of an image pipeline and let it sort what comes through. The 86M parameter EVA vision transformer was fine-tuned on 100,000 synthetically labeled images to place a picture in one of four bands, neutral, low, medium or high. At 16-bit the weights take 0.2 GB, so it never earns a GPU of its own; the cheapest slot is one MI300X with 192 GB at $1.85 per hour on-demand, and it rides alongside whatever larger model already holds that card.

MIT permits commercial use, modification and redistribution as long as the copyright and permission notices travel with it, so a moderation service can ship it with little legal friction. Before committing, note that it derives from the timm eva02_base_patch14_448 checkpoint, so the input side follows that base, and that the last update was May 9, 2025, a month after the April 10, 2025 release. Stored precision is bfloat16.

Model Card

By Freepik, published under mit, revision 15b85477e4fd.

EVA-based Fast NSFW Image Classifier

Table of Contents

  • Model Description
  • Try it Online!
  • Model Performance Comparison
  • Global Performance
  • Accuracy by AI Content
    • AI-Generated Content
    • Non-AI-Generated Content
  • Usage
  • Quick Start via pip
  • Quick Start with Pipeline
  • Avoid installation of pip dependency
  • Training
  • Speed and Memory Metrics

Model Description

This model is a vision transformer based on the EVA architecture, fine-tuned for NSFW content classification. It has been trained to detect four categories (neutral, low, medium, high) of visual content using 100,000 synthetically labeled images.

The model can be used as a binary (true/false) classifier if desired, or you can obtain the full output probabilities.. It outperforms other excellent publicly available models such as Falconsai/nsfw_image_detection or AdamCodd/vit-base-nsfw-detector in our internal benchmarks adding the enrichment of being able to select the NSFW level that suits your use case.

Try it Online!

Read the full model card (1,425 words)

Configuration

Architecture
TimmWrapperForImageClassification
Stored precision
bfloat16
Model type
timm_wrapper

Identity and Version

Repository
Freepik/nsfw_image_detector
Publisher
Freepik
Task
Image classification
Modality
Image
Library
transformers
Parameters
86M parameters
Languages
Not stated by the source
Revision
15b85477e4fd2000db76ae9aae0f89a72f95e2e3
First published
2025-04-10
Last updated
2025-05-09

Files and Weights

5 files, 172.7 MB in total. The weights are 1 file totalling 172.7 MB in safetensors.

Weights1 file · 172.7 MB
Configuration1 file · 989 B
Documentation1 file · 12.7 KB
Repository2 files · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights172.7 MB 024a9d4818fa
config.jsonConfiguration989 B
README.mdDocumentation12.7 KB
.gitattributesRepository1.5 KB
.gitignoreRepository7 B

License and Download

License
mit
Access
Open weights, no gate
Download size
172.7 MB
Download from Freepik

Released by Freepik through its official repository on Hugging Face. Read the license.

Built From

  • Derived from timm/eva02_base_patch14_448.mim_in22k_ft_in22k_in1k
  • Described by arXiv:2303.11331

Memory Requirements

PrecisionWeights in memory
As published172.7 MB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Compare nsfw_image_detector

Questions About nsfw_image_detector

How much GPU memory does nsfw_image_detector need?

About 0.2 GB at 16-bit and 0.1 GB at 4-bit: the weights (86M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run nsfw_image_detector on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use nsfw_image_detector commercially?

Yes. nsfw_image_detector is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

Model · Image classification

vit-base-patch16-224

Google

Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) at resolution 224x224, and fine-tuned on ImageNet 2012 (1 million images, 1,000 classes) at resolution 224x224. It was introduced in the paper An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale by Dosovitskiy et al. and first released in this repository. However, the weights were converted from the timm repository by Ross Wightman, who already converted the weights from JAX to PyTorch. Credits go to him. Disclaimer: The team releasing ViT did not write a model card for this model so this model card has been written by the Hugging Face team. The Vision Transformer (ViT) is a…

Open weights apache-2.0 87M parameters transformers

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k by paper authors and (re) fine-tuned on ImageNet-1k with additional augmentation and regularization by Ross Wightman. - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 Explore the dataset and runtime metrics of this model in timm model results.

Open weights apache-2.0 87M parameters timm

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k (with additional augmentation and regularization) in JAX by paper authors, ported to PyTorch by Ross Wightman. - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 Explore the dataset and runtime metrics of this model in timm model results.

Open weights apache-2.0 87M parameters timm

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k by paper authors and (re) fine-tuned on ImageNet-1k with additional augmentation and regularization by Ross Wightman. - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 Explore the dataset and runtime metrics of this model in timm model results.

Open weights apache-2.0 87M parameters timm

Model · Image classification

vit-base-nsfw-detector

AdamCodd

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…

Open weights apache-2.0 86M parameters transformers.js

A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k (with additional augmentation and regularization) in JAX by paper authors, ported to PyTorch by Ross Wightman. - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 Explore the dataset and runtime metrics of this model in timm model results.

Open weights apache-2.0 87M parameters timm