tmplink / nsfw_detector

Solution for checking if images contain NSFW content, based on Docker.
Apache License 2.0
145 stars 7 forks source link

NSFW Detector

中文指南 | 日本語ガイド

Introduction

This is an NSFW content detector based on Falconsai/nsfw_image_detection.
Model: google/vit-base-patch16-224-in21k

Compared to other common NSFW detectors, this detector has the following advantages:

Performance Requirements

Running this model requires up to 2GB of memory. No GPU support is needed.
When handling a large number of requests simultaneously, more memory may be required.

Supported File Types

This detector supports checking the following file types:

Quick Start

Start the API Server

docker run -d -p 3333:3333 --name nsfw-detector vxlink/nsfw_detector:latest

Use the API for Content Checking

# Detect images
curl -X POST -F "file=@/path/to/image.jpg" http://localhost:3333/check
# Detect PDF files
curl -X POST -F "file=@/path/to/file.pdf" http://localhost:3333/pdf

Public API

If you just want to try it out or don't want to deploy it yourself, you can use the public API service provided by vx.link.

# Detect images
curl -X POST -F "file=@/path/to/image.jpg" https://vx.link/public/nsfw
# Detect PDF files
curl -X POST -F "file=@/path/to/file.pdf" https://vx.link/public/nsfw

License

This project is open-source under the Apache 2.0 license.