https://github.com/seanghay/nsfwjs-server
An image with nsfwjs, TensorFlow.js and Express server.
https://github.com/seanghay/nsfwjs-server
docker nsfw nsfw-detection nsfwjs
Last synced: 5 months ago
JSON representation
An image with nsfwjs, TensorFlow.js and Express server.
- Host: GitHub
- URL: https://github.com/seanghay/nsfwjs-server
- Owner: seanghay
- License: apache-2.0
- Created: 2021-11-29T09:56:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T10:42:53.000Z (almost 2 years ago)
- Last Synced: 2023-05-22T11:33:12.849Z (almost 2 years ago)
- Topics: docker, nsfw, nsfw-detection, nsfwjs
- Language: JavaScript
- Homepage:
- Size: 53.7 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NSFW detection
A Docker image with [nsfwjs](https://github.com/infinitered/nsfwjs), TensorFlow.js and Express server.
## Run the server
1. Using Docker Container
```sh
docker run -it --rm -p "127.0.0.1:8080:8080" ghcr.io/seanghay/nsfwjs-server:latest
```2. Using Docker Compose
```sh
docker-compose up -d
```### Request
```shell
curl --request POST http://localhost:8080/ \
--header 'Content-Type: multipart/form-data' \
--form '[email protected]'
```### Response
> an example
```json
[
{
"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
}
]
```