Sign inSign up

zengdawei/nsfw_restful_api

By zengdawei

•Updated about 5 years ago

图像鉴黄,支持 restful api 鉴黄,精准度达到 93%

Image
3

2.0K

zengdawei/nsfw_restful_api repository overview

上传图片URL,即可鉴黄。

安装步骤:

  1. docker pull zengdawei/nsfw_restful_api:latest
  2. docker run -p 3307:3307 -d zengdawei/nsfw_restful_api

测试: curl --location --request GET 'http://127.0.0.1:3307/api/nsfw/classify?url=https://image.zdw1.cn/img20210720174923.png⁠'

响应: [ { "className": "Drawing", "probability": 0.824431836605072 }, { "className": "Hentai", "probability": 0.16360442340373993 }, { "className": "Neutral", "probability": 0.007620695047080517 }, { "className": "Porn", "probability": 0.004154415801167488 }, { "className": "Sexy", "probability": 0.00018858206749428064 } ]

上传图片后,总共会返回 5 个维度的数值来鉴别该图片的尺度:

  1. 绘画(Drawing)—— 无害的艺术,或艺术绘画;
  2. 变态(Hentai)—— 色情艺术,不适合大多数工作环境;
  3. 中立(Neutral)—— 一般,无害的内容;
  4. 色情(Porn)—— 不雅的内容和行为,通常涉及生殖器;
  5. 性感(Sexy)—— 不合时宜的挑衅内容。

当porn评分超过>=0.6左右,就几乎是一张带有色情性质的图片了。

Tag summary

Content type

Image

Digest

Size

501.7 MB

Last updated

about 5 years ago

docker pull zengdawei/nsfw_restful_api