TensorFlow rewrite of Yahoo's Open NSFW classifier
Top 68.9% on sourcepulse
This repository provides a TensorFlow implementation of Yahoo's Open NSFW Classifier, enabling developers and researchers to integrate NSFW content detection into their applications. It offers a direct port of Caffe weights and includes tools for model export to various TensorFlow formats for deployment.
How It Works
The project translates Yahoo's original Caffe model weights into a TensorFlow-compatible format (.npy
). It leverages TensorFlow 1.x for model execution, offering flexibility in image loading (replicating Yahoo's original or using TensorFlow exclusively) and input types (raw tensor or base64 encoded JPEG). This approach allows for easier integration into existing TensorFlow pipelines and deployment across different platforms.
Quick Start & Requirements
python classify_nsfw.py -m data/open_nsfw-weights.npy test.jpg
Highlighted Details
yahoo
and tensorflow
) to potentially replicate original results or reduce dependencies.Maintenance & Community
No specific community channels or active maintenance signals are evident in the README.
Licensing & Compatibility
The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The project is tested with TensorFlow 1.x, which is now legacy. The TFLite export has limitations with the base64_jpeg
input type due to missing TensorFlow operations in the standard runtime. Only JPEG images are supported.
4 years ago
1 week