infinitered/nsfwjs
A JavaScript library that classifies images as NSFW or safe using a TensorFlow.js model running client-side.

Velocity · 7d
+3.3
★ / day
Trend
→steady
star history
NSFWJS loads a pre-trained image classification model via TensorFlow.js and runs inference entirely in the user’s browser. It classifies images into NSFW and safe categories with stated ~90-93% accuracy depending on model size. The library exposes a simple API to load the model, classify images, and cache results, targeting use cases like content moderation in web applications without server-side processing.