tensorflow-open_nsfw  by mdietrichstein

TensorFlow rewrite of Yahoo's Open NSFW classifier

created 8 years ago
442 stars

Top 68.9% on sourcepulse

GitHubView on GitHub
Project Summary

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

  • Install/run: python classify_nsfw.py -m data/open_nsfw-weights.npy test.jpg
  • Prerequisites: Python 3.6, TensorFlow 1.12. Only JPEG images are supported.
  • Links: Official Docs

Highlighted Details

  • Supports exporting the model to TensorFlow SavedModel, TFLite, and frozen graph formats for deployment.
  • Includes utilities for generating prediction requests for Google Cloud ML Engine or TensorFlow Serving.
  • Offers two image loading mechanisms (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.

Health Check
Last commit

4 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Eric Zhang Eric Zhang(Founding Engineer at Modal), and
5 more.

flux by black-forest-labs

0.4%
24k
Inference code for FLUX image generation & editing models
created 1 year ago
updated 3 days ago
Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google), Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), and
45 more.

tensorflow by tensorflow

0.1%
191k
Open-source ML framework
created 9 years ago
updated 5 hours ago
Feedback? Help us improve.