add nudenet

This commit is contained in:
kev 2020-11-19 15:43:07 +08:00
parent ad3c32b21f
commit 680b27bf6c
3 changed files with 47 additions and 0 deletions

View File

@ -343,6 +343,7 @@ A collection of delicious docker recipes.
- [x] erichough/nfs-server
- [x] luzifer/nginx-sso
- [x] n8nio/n8n
- [x] notaitech/nudenet
- [x] odoo
- [x] osixia/openldap
- [x] kylemanna/openvpn

34
nudenet/README.md Normal file
View File

@ -0,0 +1,34 @@
nudenet
=======
Neural Nets for Nudity Detection and Censoring
```bash
$ docker-compose up -d
$ jq -n --arg img "$(base64 image.jpg)" '.data["image.jpg"]=$img' > data.json
$ cat data.json
{
"data": {
"image.jpg": "<--base64-of-image-->"
}
}
$ http http://localhost:8080/sync < data.json
{
"prediction": {
"image.jpg": {
"safe": 0.0005970880156382918,
"unsafe": 0.9994028806686401
}
},
"success": true
}
$ http http://localhost:8081/sync < data.json
{
"prediction": "{'image.jpg': [{'box': [130, 89, 250, 209], 'score': 0.96751046, 'label': 'FACE_F'}, {'box': [98, 511, 281, 710], 'score': 0.9542637, 'label': 'EXPOSED_BELLY'}, {'box': [75, 356, 191, 474], 'score': 0.90151, 'label': 'EXPOSED_BREAST_F'}, {'box': [201, 357, 315, 474], 'score': 0.89977014, 'label': 'EXPOSED_BREAST_F'}, {'box': [146, 770, 246, 867], 'score': 0.85078907, 'label': 'COVERED_GENITALIA_F'}, {'box': [302, 348, 343, 411], 'score': 0.73944795, 'label': 'EXPOSED_ARMPITS'}, {'box': [52, 349, 91, 410], 'score': 0.703932, 'label': 'EXPOSED_ARMPITS'}]}",
"success": true
}
```

View File

@ -0,0 +1,12 @@
version: "3.8"
services:
classifier:
image: notaitech/nudenet:classifier
ports:
- "8080:8080"
restart: unless-stopped
detector:
image: notaitech/nudenet:detector
ports:
- "8081:8080"
restart: unless-stopped