- ℹ️ Return predictions for
Neutral,Drawing,Sexy,HentaiandPorn - 🎯 Pretty accurate (~93%)
- 🖼️ Supports different image formats
- ⚡ 250ms to make predictions to a single image
A Docker REST API for NSFW detection with NSFWJS. Hard-fork of andresribeiro/nsfwjs-docker, which has the following goals:
- More standard tooling (npm instead of pnpm, no git hooks, tsc instead of swc)
- Slimmer deployment image + repo (models not in repo, more stages in docker build)
docker run -p 8080:8080 -d --name nsfwjs ghcr.io/holzmaster/nsfwjs:latestIf 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 /classify sending an image in the content field:
curl -XPOST -F "content=@/path/to/file" http://localhost:8080/classifyExample result:
{
"prediction": {
"neutral": 0.9992233514785767,
"drawing": 0.0006749277818016708,
"porn": 0.00004637416350306012,
"sexy": 0.000037574754969682544,
"hentai": 0.000017801607100409456
}
}