diff --git a/README.md b/README.md index 8a87349..0833f3d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/nudenet/README.md b/nudenet/README.md new file mode 100644 index 0000000..f0cdac7 --- /dev/null +++ b/nudenet/README.md @@ -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 +} +``` diff --git a/nudenet/docker-compose.yml b/nudenet/docker-compose.yml new file mode 100644 index 0000000..72256d9 --- /dev/null +++ b/nudenet/docker-compose.yml @@ -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