返回模型
说明文档
NudeNet ONNX 模型
概述
本仓库为 NudeNet 目标检测系统提供了优化的 ONNX 模型,该系统最初由 notAI-tech 开发。这些模型专为使用基于 YOLOv8 架构进行高效裸露检测而设计,并针对 NSFW 内容识别进行了专门训练。这些 ONNX 格式的模型实现了跨平台兼容性,并可在各种硬件后端上加速推理。
该实现包含两个关键组件:一个用于生成初始边界框提案的 YOLOv8 检测模型(320n.onnx),以及一个用于后处理和过滤重复检测的非极大值抑制模块(nms-yolov8.onnx)。该系统可以识别 18 种不同的解剖区域和着装状态,包括高精度的暴露和遮盖的身体部位。
通过模型量化和 ONNX Runtime 集成优化了性能,在保持检测准确性的同时,比原始实现提供了显著的加速提升。模型在 320x320 输入分辨率下运行,并支持可配置的检测阈值,以便根据特定应用需求平衡精确率和召回率。
使用方法
安装
pip install onnxruntime>=1.18.0
# 对于 GPU 加速(可选):
# pip install onnxruntime-gpu>=1.18.0
pip install dghs-imgutils
基本检测
from imgutils.detect.nudenet import detect_with_nudenet
from PIL import Image
# 加载并处理图像
image = Image.open('your_image.jpg')
detections = detect_with_nudenet(
image,
topk=100,
iou_threshold=0.45,
score_threshold=0.25
)
# 处理结果
for bbox, label, confidence in detections:
x1, y1, x2, y2 = bbox
print(f"检测到 {label},置信度 {confidence:.3f},位置 [{x1:.1f}, {y1:.1f}, {x2:.1f}, {y2:.1f}]")
原始内容
notAI-tech/NudeNet 的 ONNX 模型。
标签定义
以下是 NudeNet 检测模型中标签的详细列表及其各自的含义:
| 标签 | 描述 |
|---|---|
| FEMALE_GENITALIA_COVERED | 检测图像中被遮盖的女性生殖器。 |
| FACE_FEMALE | 检测图像中女性的面部。 |
| BUTTOCKS_EXPOSED | 检测图像中暴露的臀部。 |
| FEMALE_BREAST_EXPOSED | 检测图像中暴露的女性乳房。 |
| FEMALE_GENITALIA_EXPOSED | 检测图像中暴露的女性生殖器。 |
| MALE_BREAST_EXPOSED | 检测图像中暴露的男性乳房。 |
| ANUS_EXPOSED | 检测图像中暴露的肛门。 |
| FEET_EXPOSED | 检测图像中暴露的脚部。 |
| BELLY_COVERED | 检测图像中被遮盖的腹部。 |
| FEET_COVERED | 检测图像中被遮盖的脚部。 |
| ARMPITS_COVERED | 检测图像中被遮盖的腋下。 |
| ARMPITS_EXPOSED | 检测图像中暴露的腋下。 |
| FACE_MALE | 检测图像中男性的面部。 |
| BELLY_EXPOSED | 检测图像中暴露的腹部。 |
| MALE_GENITALIA_EXPOSED | 检测图像中暴露的男性生殖器。 |
| ANUS_COVERED | 检测图像中被遮盖的肛门。 |
| FEMALE_BREAST_COVERED | 检测图像中被遮盖的女性乳房。 |
| BUTTOCKS_COVERED | 检测图像中被遮盖的臀部。 |
引用
@misc{nudenet_onnx,
title = {{NudeNet ONNX Models}},
author = {deepghs and notAI-tech},
howpublished = {\url{https://huggingface.co/deepghs/nudenet_onnx}},
year = {2023},
note = {Optimized ONNX models for the NudeNet object detection system, providing efficient nudity detection with YOLOv8 architecture},
abstract = {This repository provides optimized ONNX models for the NudeNet object detection system, originally developed by notAI-tech. The models are designed for efficient nudity detection in images using a YOLOv8-based architecture with specialized training for NSFW content recognition. These ONNX-format models enable cross-platform compatibility and accelerated inference across various hardware backends. The implementation includes two key components: a YOLOv8 detection model for generating initial bounding box proposals and a non-maximum suppression module for post-processing and filtering duplicate detections.},
keywords = {object-detection, onnx, yolov8, nsfw-detection}
}
deepghs/nudenet_onnx
作者 deepghs
object-detection
onnxruntime
↓ 0
♥ 5
创建时间: 2024-09-11 05:43:07+00:00
更新时间: 2025-11-17 12:39:11+00:00
在 Hugging Face 上查看文件 (4)
.gitattributes
320n.onnx
ONNX
README.md
nms-yolov8.onnx
ONNX