Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.53 KB

File metadata and controls

56 lines (36 loc) · 1.53 KB

CLIP-based-NSFW-Detector

Input

Please download _vyr_6097Sexy-Push-Up-Bikini-Brasilianisch-Bunt-2.jpg from below url.

https://www.damenmode-quelle.de/fotky421/fotos/_vyr_6097Sexy-Push-Up-Bikini-Brasilianisch-Bunt-2.jpg

This image is used in the official demo.

https://colab.research.google.com/drive/19Acr4grlk5oQws7BHTqNIK-80XGw2u8Z?usp=sharing

Output

  • Estimating NSFW confidence
### Estimating NSFW confidence ###
 NSFW: 99.450

Usage

Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.

For the sample image,

$ python3 clip-based-nsfw-detector.py 

If you want to specify the input image, put the image path after the --input option.

$ python3 clip-based-nsfw-detector.py --input IMAGE_PATH

By adding the --model_type option, you can specify model type which is selected from "ViTB32", "ViTL14". (default is ViTB32)

$ python3 clip-based-nsfw-detector.py --model_type ViTB32

Reference

Framework

Keras

Model Format

ONNX opset = 11

Netron

clip_bin_nsfw.onnx.prototxt
clip_nsfw_b32.onnx.prototxt