Skip to content

snowyukischnee/NSFW-Filter-using-Yahoo-Open-NSFW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NSFW Filter using Yahoo Open NSFW

Introduction

This project is a proxy server that block NSFW image by using Yahoo's Open NSFW model
The interface's been writen in C# using .NET framework with Titanium Web Proxy, while the API server's been writen in Javascript by using NodeJS and ExpressJS
The core of the project, Yahoo's Open NSFW model is the core in order to process image that is NSFW or not

Description

Create a proxy server to handle all HTTP request and response in order to block NSFW content
NSFW content divided into 2 following type:

  • Image
  • Website

While websites can be blocked by provide a list of banned sites, images can only be filter by running Open NSFW model, get score and pass score back to the proxy server. Based on that score, proxy server decide allow or not allow this image pass through

Usage

First, install VMware on Windows

Then, download and install Ubuntu 17.xx on VMware in order to host API Server and NSFW core because some libraries requires by NSFW core is not exist on Windows

Next, install Python 2.7

Then, Install Caffe and other package required by Yahoo's Open NSFW on Ubuntu 17.xx on VMware

Tutorial install Caffe on Ubuntu without GPU support, work perfectly fine in Ubuntu 17.xx

Copy all content in the Backend folder to Ubuntu's Desktop, then browse to backend_api folder and install all required packages

$ cd backend_api
$ npm install

And finally, start the API Server

$ npm start

Switch back to Windows, browse into NSFW_ProxyGUI folder, run script db_generate.sql to generate database (Note: this project using MSSQLServer)

Then open NSFW_ProxyGUI.sln file in Visual Studio to open project and run NSFW_ProxyGUI project

Enter API link into section API Server

Example: http://192.168.20.1:3000/upload
192.168.20.1 is your running VM's IP Address that can be obtained using the following command

$ ip addr show

3000 is the port that API Server hosted in. In this project, port 3000 is the default port of API Server
/upload is the path to send POST request with image attached to process

Finally, Press Start

Instructions

Provide proxy information into Proxy section if Windows is running under proxy
Provide API Server into API Server section in order to enable filter images feature
Provide "Blacklist" websites into Blacklist section to block some websites
Change Sensitivity level to change the "sensitive" of the model

Notes

For more further information about this project, please read the code or contact me via email or social network

Requirements

Python 2.7
NodeJS 8+
ExpressJS
VMware
Ubuntu 17.xx
.NET
Caffe
Titanium Web Proxy
Open NSFW

Author

Tuannhse04791

About

NSFW C# Proxy Server using Yahoo Open NSFW as Backend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published