I maintain NSFW Sherlock, an open-source image moderation API written in Go. It uses ONNX Runtime and offers HTTP and gRPC interfaces.
You send an image to your own instance and get structured classification results. The service classifies photos and anime, detects explicit regions, and can use Tesseract OCR to check text in images.
Try the CPU Docker image
docker run -e APP_ENV=web -p 127.0.0.1:4000:4000 m1chl/nsfw-sherlock
curl http://localhost:4000/ping
The image includes the models and OCR support, with Linux amd64 and arm64 builds. Binding the port to 127.0.0.1 keeps this first test local to your machine.
Image requests use JSON:
{"base64":"<base64-encoded image>","filename":"image.jpg"}
| Endpoint | Result |
|---|---|
POST /pic/check |
Image and text flags |
POST /pic/labels |
Classification probabilities |
POST /pic/analyze |
Verdict, model scores, detected regions, and timing |
For gRPC, start with APP_ENV=grpc. The protobuf definition describes its methods.
Profiles and limits
The balanced profile is the default. fast uses lighter models for part of the pipeline, while max uses a larger region detector. compat keeps the legacy five-label classifier. The README lists the exact models and settings.
The current backend is ONNX Runtime; older references to TensorFlow do not describe the current engine.
Classification is probabilistic. Scores and model details help applications make their own decisions; they do not guarantee every image will be classified correctly.
NVIDIA CUDA and AMD MIGraphX configuration are documented, but GPU inference has not yet been verified on physical NVIDIA or AMD hardware. The CPU container is the starting point shown here.
The code is AGPL-3.0. Upstream model licenses remain separate.
Source, setup, and API documentation · Docker image
I'd welcome feedback on API integration and which response format is useful in your application. Please do not put private images in public issues.
Prepared with AI assistance from the project's public documentation.
Top comments (0)