Views
No views yet


erax-anti-nsfw-yolo11n-v1.1.pt (5.45 MB)erax-anti-nsfw-yolo11s-v1.1.pt (40.5 MB)erax-anti-nsfw-yolo11m-v1.1.pt (19.2 MB)| Format | Model | Metrics/mAP50-95(B) | GPU | CPU | ||
|---|---|---|---|---|---|---|
| Inference time (ms/im) | FPS | Inference time (ms/im) | FPS | |||
| PyTorch | erax-anti-nsfw-yolo11n-v1.1.pt | 0.438 | 3.500 | 286 | 27.900 | 36 |
| erax-anti-nsfw-yolo11s-v1.1.pt | 0.453 | 7.000 | 143 | 71.000 | 14 | |
| erax-anti-nsfw-yolo11m-v1.1.pt | 0.467 | 16.500 | 61 | 206.600 | 5 | |
| TorchScript | erax-anti-nsfw-yolo11n-v1.1.torchscript | 0.435 | 3.700 | 270 | 38.500 | 26 |
| erax-anti-nsfw-yolo11s-v1.1.torchscript | 0.449 | 8.100 | 123 | 108.500 | 9 | |
| erax-anti-nsfw-yolo11m-v1.1.torchscript | 0.463 | 20.300 | 49 | 394.900 | 3 | |
| ONNX | erax-anti-nsfw-yolo11n-v1.1.onnx | 0.435 | - | - | 28.300 | 35 |
| erax-anti-nsfw-yolo11s-v1.1.onnx | 0.449 | - | - | 59.800 | 17 | |
| erax-anti-nsfw-yolo11m-v1.1.onnx | 0.463 | - | - | 157.800 | 6 | |
| OpenVINO | erax-anti-nsfw-yolo11n-v1.1_openvino_model | 0.435 | 13.900 | 72 | 15.900 | 63 |
| erax-anti-nsfw-yolo11s-v1.1_openvino_model | 0.449 | 72.300 | 14 | 40.800 | 25 | |
| erax-anti-nsfw-yolo11m-v1.1_openvino_model | 0.463 | 245.900 | 4 | 121.700 | 8 | |
| TensorRT | erax-anti-nsfw-yolo11n-v1.1.engine | 0.435 | 3.500 | 286 | - | - |
| erax-anti-nsfw-yolo11s-v1.1.engine | 0.449 | 6.800 | 147 | - | - | |
| erax-anti-nsfw-yolo11m-v1.1.engine | 0.463 | 15.700 | 64 | - | - | |
| PaddlePaddle | erax-anti-nsfw-yolo11n-v1.1_paddle_model | 0.435 | 214.700 | 5 | 136.200 | 7 |
| erax-anti-nsfw-yolo11s-v1.1_paddle_model | 0.449 | 517.700 | 2 | 234.600 | 4 | |
| erax-anti-nsfw-yolo11m-v1.1_paddle_model | 0.463 | 887.000 | 1 | 506.300 | 2 | |
| MNN | erax-anti-nsfw-yolo11n-v1.1.mnn | 0.435 | 55.800 | 18 | 59.300 | 17 |
| erax-anti-nsfw-yolo11s-v1.1.mnn | 0.449 | 147.600 | 7 | 146.300 | 7 | |
| erax-anti-nsfw-yolo11m-v1.1.mnn | 0.463 | 378.500 | 3 | 380.700 | 3 | |
| NCNN | erax-anti-nsfw-yolo11n-v1.1_ncnn_model | 0.435 | 57.100 | 18 | 61.100 | 16 |
| erax-anti-nsfw-yolo11s-v1.1_ncnn_model | 0.449 | 141.200 | 7 | 137.200 | 7 | |
| erax-anti-nsfw-yolo11m-v1.1_ncnn_model | 0.463 | 375.500 | 3 | 367.400 | 3 |


pip install ultralytics supervision huggingface-hub1from huggingface_hub import snapshot_download
2snapshot_download(repo_id="erax-ai/EraX-Anti-NSFW-V1.1", local_dir="./", force_download=True)1from ultralytics import YOLO
2from PIL import Image
3import supervision as sv
4import numpy as np
5
6IOU_THRESHOLD = 0.3
7CONFIDENCE_THRESHOLD = 0.2
8
9# pretrained_path = "erax-anti-nsfw-yolo11m-v1.1.pt"
10# pretrained_path = "erax-anti-nsfw-yolo11s-v1.1.pt"
11pretrained_path = "erax-anti-nsfw-yolo11n-v1.1.pt"
12
13image_path_list = ["test_images/img_1.jpg", "test_images/img_2.jpg"]
14
15model = YOLO(pretrained_path)
16results = model(image_path_list,
17 conf=CONFIDENCE_THRESHOLD,
18 iou=IOU_THRESHOLD
19 )
20
21
22for result in results:
23 annotated_image = result.orig_img.copy()
24 h, w = annotated_image.shape[:2]
25 anchor = h if h > w else w
26
27 detections = sv.Detections.from_ultralytics(result)
28 label_annotator = sv.LabelAnnotator(text_color=sv.Color.BLACK,
29 text_position=sv.Position.CENTER,
30 text_scale=anchor/1700)
31
32 pixelate_annotator = sv.PixelateAnnotator(pixel_size=anchor/50)
33
34 annotated_image = pixelate_annotator.annotate(
35 scene=annotated_image.copy(),
36 detections=detections
37 )
38
39
40 annotated_image = label_annotator.annotate(
41 annotated_image,
42 detections=detections
43 )
44
45
46 sv.plot_image(annotated_image, size=(10, 10))







1@article{EraX-Anti-NSFW-V1.1,
2 author = {Lê Chí Tài and
3 Phạm Đình Thục and
4 Mr. Nguyễn Anh Nguyên and
5 Đoàn Thành Khang and
6 Mr. Trần Hải Khương and
7 Mr. Trương Công Đức and
8 Phan Nguyễn Tuấn Kha and
9 Phạm Huỳnh Nhật},
10 title = {EraX-Anti-NSFW-V1.1: A Highly Efficient Model for NSFW Detection},
11 organization={EraX JS Company},
12 year={2024},
13 url={https://huggingface.co/erax-ai/EraX-Anti-NSFW-V1.1}
14}