Important
Although this has been re-licensed to Apache 2.0, this repository is archived and this code is not required. It has been replaced with a much improved C++ based version within the main beholder repository. Please do not use this code in production. It will not scale, it is slow, and memory hungry and has leaks that can't be fixed, only worked around.
- POST an image as raw binary
- Returns JSON:
{"sexy":0,"neutral":0,"porn":0,"drawing":0,"hentai":0}- sexy: Suggestive pictures
- neutral: Safe for work
- Porn: Pornographic images
- Hentai: Hentai images
- Drawing: Safe-for-work drawings
- The score for each is a normalised floating point value between 0 and 1, where 1 is 100% confidence and 0 is 0% confidence.
- Docker
- nsfwjs
- Tensorflow
- @tensorflow/tfjs
- @tensorflow/tfjs-node
- express
- sharp
- ImageMagick
cd server
npm i --legacy-peer-deps
cd ..
docker compose up -d
curl --request POST localhost:6969/ --header 'Content-Type: application/octet-stream' --data-binary @/path/to/image.jpg