Docker-Powered Self-Hosted NSFW Detection API (NSFWJS under the hood). You can find it on the Docker Hub here.
- ℹ️ Return predictions for
Neutral,Drawing,Sexy,HentaiandPorn - 🎯 Pretty accurate (~93%)
- 🖼️ Supports different image formats
- ⚡ 250ms to make predictions to a single image
docker run -p 3333:3333 -d --name nsfwjs andresribeiroo/nsfwjs:2.0If you are deploying in production, you will probably want to pass the --restart always flag to start the container whenever the server restarts.
POST request to /single/multipart-form sending an image in the content field.
{
"prediction": [
{
"className": "Neutral",
"probability": 0.6371303796768188
},
{
"className": "Drawing",
"probability": 0.3603636920452118
},
{
"className": "Hentai",
"probability": 0.0024505197070538998
},
{
"className": "Sexy",
"probability": 0.00003775714503717609
},
{
"className": "Porn",
"probability": 0.000017730137187754735
}
]
}
POST request to /multiple/multipart-form sending images in the contents field.
{
"predictions": [
[
{
"className": "Neutral",
"probability": 0.6371303796768188
},
{
"className": "Drawing",
"probability": 0.3603636920452118
},
{
"className": "Hentai",
"probability": 0.0024505197070538998
},
{
"className": "Sexy",
"probability": 0.00003775714503717609
},
{
"className": "Porn",
"probability": 0.000017730137187754735
}
],
[
{
"className": "Neutral",
"probability": 0.9498893618583679
},
{
"className": "Drawing",
"probability": 0.04626458138227463
},
{
"className": "Hentai",
"probability": 0.00267870188690722
},
{
"className": "Sexy",
"probability": 0.0008198379655368626
},
{
"className": "Porn",
"probability": 0.0003475486591923982
}
]
]
}