πŸ”ž Is It NSFW? AI Moderator (ResNet-18)

is-it-nsfw_ai-moderator is a high-precision, lightweight image classification model designed for real-time content moderation. Based on the ResNet-18 architecture, it provides an exceptional balance between inference speed and detection accuracy.

Open in Spaces

πŸš€ Key Highlights

  • Accuracy: 99.44% on validation sets.
  • Optimized for Speed: Runs flawlessly on consumer-grade hardware (tested on GTX 1060).
  • Fine-tuned for Reality: Unlike many models, this one has been specifically fine-tuned to reduce false positives on "tricky" SFW content (fashion, illustrations, complex lighting) while maintaining zero tolerance for explicit content.

πŸ“Š Evaluation Results

Metric Value
Accuracy 99.44%
Eval Loss 0.0278

πŸ’» How to Use (Python)

from transformers import AutoImageProcessor, AutoModelForImageClassification
import torch
from PIL import Image

model_id = "najicreator90856/is-it-nsfw_ai-moderator"
processor = AutoImageProcessor.from_pretrained(model_id)
model = AutoModelForImageClassification.from_pretrained(model_id)

def predict(image_path):
    image = Image.open(image_path).convert("RGB")
    inputs = processor(images=image, return_tensors="pt")
    with torch.no_grad():
        logits = model(**inputs).logits
    
    predicted_label = logits.argmax(-1).item()
    return model.config.id2label[predicted_label]

# print(predict("your_image.jpg"))

β˜• Support & Donations

If you find this model useful for your messenger, community, or commercial project, please consider supporting the development. Your donations help pay for the compute power needed to keep this project alive and updated.

πŸ’³ Standard Donations

πŸͺ™ Crypto Support

Asset Network Address
USDT TON UQDcC3o7u4LS07pr-cQI-Gxx3hPjXKrRrNQdGBj0WV7SADe3
USDT SOL 77EtoHbBaoTowoQ7sR48k8QhuSHjWUnRjouFh1juCkiA
USDT TRON (TRC20) TLB4ZqS6HG1jkgyHNuQWtbhj4o4ypbn3p8
USDT/ETH ERC20 0x1e838c1f4c7580bb2f34703f9e9b0af1b1ae92fd
BTC Bitcoin 12AJT86N1V1D4g2Ee9PWBJG2z8DoHpjHbQ
ETH Ethereum 0x1e838c1f4c7580bb2f34703f9e9b0af1b1ae92fd

Disclaimer: This model is for moderation and safety purposes. Users must comply with local laws and regulations regarding the handling of sensitive content.

Downloads last month
29
Safetensors
Model size
11.2M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using najicreator90856/is-it-nsfw_ai-moderator 1