Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

AdamCodd
/
vit-base-nsfw-detector

Image Classification
Transformers.js
ONNX
Safetensors
Transformers
vit
nlp
Eval Results (legacy)
Model card Files Files and versions
xet
Community
5

Instructions to use AdamCodd/vit-base-nsfw-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers.js

    How to use AdamCodd/vit-base-nsfw-detector with Transformers.js:

    // npm i @huggingface/transformers
    import { pipeline } from '@huggingface/transformers';
    
    // Allocate pipeline
    const pipe = await pipeline('image-classification', 'AdamCodd/vit-base-nsfw-detector');
  • Transformers

    How to use AdamCodd/vit-base-nsfw-detector with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-classification", model="AdamCodd/vit-base-nsfw-detector")
    pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")
    # Load model directly
    from transformers import AutoImageProcessor, AutoModelForImageClassification
    
    processor = AutoImageProcessor.from_pretrained("AdamCodd/vit-base-nsfw-detector")
    model = AutoModelForImageClassification.from_pretrained("AdamCodd/vit-base-nsfw-detector")
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Model mislabels black and white images as SFW.

1
#7 opened 11 days ago by
justbanana

What's included in the NSFW classification ?

2
#4 opened about 1 year ago by
LDanielBlueway

Predictions not matching when using pipeline vs direct model

2
#3 opened about 1 year ago by
abhishek072

What was the training / eval dataset?

4
#2 opened almost 2 years ago by
wendlerc
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs