Downloads · 30 days
12
13% of all-time downloads
Sci-fi-vy/Mature-Content-Detection
Mature-Content-Detection is a image classification model from Sci-fi-vy. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
12
13% of all-time downloads
All-time downloads
92
Public
Parameters
92.9M
2.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1.4 GB · 55%
From the Hugging Face model README

Mature-Content-Detection is an image classification vision-language encoder model fine-tuned from google/siglip2-base-patch16-224 for a single-label classification task. It is designed to classify images into various mature or neutral content categories using the SiglipForImageClassification architecture.
[!Note] Use this model to support positive, safe, and respectful digital spaces. Misuse is strongly discouraged and may violate platform or regional policies. This model doesn't generate any unsafe content, as it is a classification model and does not fall under the category of models not suitable for all audiences.
[!Important] Neutral = Safe / Normal
Classification Report:
precision recall f1-score support
Anime Picture 0.8130 0.8066 0.8098 5600
Hentai 0.8317 0.8134 0.8224 4180
Neutral 0.8344 0.7785 0.8055 5503
Pornography 0.9161 0.8464 0.8799 5600
Enticing or Sensual 0.7699 0.8979 0.8290 5600
accuracy 0.8296 26483
macro avg 0.8330 0.8286 0.8293 26483
weighted avg 0.8331 0.8296 0.8298 26483

The model categorizes images into five classes:
!pip install -q transformers torch pillow gradio
import gradio as gr
from transformers import AutoImageProcessor
from transformers import SiglipForImageClassification
from transformers.image_utils import load_image
from PIL import Image
import torch
# Load model and processor
model_name = "Sci-fi-vy/Mature-Content-Detection"
model = SiglipForImageClassification.from_pretrained(model_name)
processor = AutoImageProcessor.from_pretrained(model_name)
# Updated labels
labels = {
"0": "Anime Picture",
"1": "Hentai",
"2": "Neutral",
"3": "Pornography",
"4": "Enticing or Sensual"
}
def mature_content_detection(image):
"""Predicts the type of content in the image."""
image = Image.fromarray(image).convert("RGB")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probs = torch.nn.functional.softmax(logits, dim=1).squeeze().tolist()
predictions = {labels[str(i)]: round(probs[i], 3) for i in range(len(probs))}
return predictions
# Create Gradio interface
iface = gr.Interface(
fn=mature_content_detection,
inputs=gr.Image(type="numpy"),
outputs=gr.Label(label="Prediction Scores"),
title="Mature Content Detection",
description="Upload an image to classify whether it contains anime, hentai, neutral, pornographic, or enticing/sensual content."
)
# Launch the app
if __name__ == "__main__":
iface.launch()
The Mature-Content-Detection model is a computer vision classifier designed to detect and categorize adult-themed and anime-based content. It supports responsible content moderation and filtering across digital platforms. To ensure the ethical and intended use of the model, please follow the guidelines below:
This model was built to help create safer digital ecosystems. Do not misuse it for exploitation, surveillance without consent, or personal gain at the expense of others. By using this model, you agree to act responsibly and ethically, keeping safety and privacy a top priority.
| Screenshot 1 | Screenshot 2 | Screenshot 3 |
|---|---|---|
![]() | ![]() | ![]() |
| Screenshot 4 | Screenshot 5 | Screenshot 6 |
|---|---|---|
![]() | ![]() | ![]() |
| Screenshot 7 |
|---|
![]() |
The Mature-Content-Detection model is designed to classify visual content for moderation and filtering purposes. Potential use cases include: