{"repo":"andresribeiro/nsfwjs-docker","free":true,"listed":false,"github":"https://github.com/andresribeiro/nsfwjs-docker","clone":"git clone https://github.com/andresribeiro/nsfwjs-docker.git","description":"High-performance, self-hosted NSFW detection API powered by NSFWJS.","language":"TypeScript","stars":97,"topics":["docker","nsfw","tensorflow","tensorflowjs","typescript","hono","api","computer-vision","content-moderation","docker-image"],"license":"MIT","category":"machine-learning","readme_excerpt":"nsfwjs-docker High-performance, self-hosted NSFW detection API powered by NSFWJS. - Accuracy: 93%; - Latency: 100ms per prediction; - Input: JPEG, PNG, WebP, AVIF, TIFF, GIF (first frame), raw pixel data; - Output: 5-class classification — Neutral, Drawing, Sexy, Hentai, Porn; - Multi-architecture: Supports both x64 and arm64 . - Lightweight: Runs under 350 MB of RAM. Table of Contents - Installation - Usage - Examples - Performance - Build from source - Local development Installation Usage POST the raw image bytes to /classify with Content-Type: application/octet-stream . Example Response: The probability of each category ranges from 0 (lowest) to 1 (highest). Examples Node.js / Browser Python httpie curl Performance This container is built for speed: - SIMD-accelerated image processing — sharp (powered by libvips) handles image decoding and resizing to 224×224 before inference, taking advantage of SIMD instructions on compatible CPUs. - jemalloc allocator — The Docker image links against jemalloc , which reduces fragmentation and improves memory usage under concurrent workloads compared to the glibc allocator. - Model failure safety — If an error occurs during model inference, the underlying TensorFlow tensors are immediately disposed of. This architectural fallback completely prevents CPU memory leaks under any failure condition. - Raw binary transport — The API accepts application/octet-stream instead of multipart form data or base64-encoded JSON. This avoids the overhead","default_branch":null,"files":null,"tree":[],"storefront":"/r/andresribeiro","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/andresribeiro/nsfwjs-docker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}