A Docker image with nsfwjs, TensorFlow.js and Express server.
- Using Docker Container
docker run -it --rm -p "127.0.0.1:8080:8080" ghcr.io/seanghay/nsfwjs-server:latest
- Using Docker Compose
docker-compose up -d
curl --request POST http://localhost:8080/ \
--header 'Content-Type: multipart/form-data' \
--form 'file=@image.jpg'
an example
[
{
"className": "Neutral",
"probability": 0.7651876211166382
},
{
"className": "Drawing",
"probability": 0.22617404162883759
},
{
"className": "Sexy",
"probability": 0.0067122685723006725
},
{
"className": "P*rn",
"probability": 0.001053938060067594
},
{
"className": "H*ntai",
"probability": 0.000872117409016937
}
]