Code Monkey home page Code Monkey logo

mosaic's Introduction

Mosaic: Deep Learning Model for Porngraphic Detection

You have just found Mosaic Models.

Mosaic is a high-level neural networks model, written in Python and capable of running on top of keras with Tensorflow backend .

Now, It was developed with a focus on porngraphic detection.

Use Mosaic Models if you need a deep learning Model that:

  • Allows for easy and fast detecting porngraphic.
  • Design and Fine-tune yourself Network (Mosaic-based).
  • Runs seamlessly on CPU and GPU.

Mosaic is compatible with: Keras 2.0.3 Tensorflow 1.1.0 and Python 2.7.


Guiding principles

  • Easy Usage. Just load the model and weights to predict a image.

  • Work with Python.


Inference Usage:

Download the project and run command(Please download weights file from http://pan.baidu.com/s/1i4POGXB to ./model.):

python mosaic_porngraphic_cnn_demo.py the_path_of_image

the_path_of_image is the input image to be detected.

Output is The PORNGRAPHIC probability.

Training Usage:

Prepare training and validtaion images at first:

python mosaic_porngraphic_cnn_train.py the_path_of_training_image the_path_of_validation_image 

the_path_of_training_image is the full path of training image, which should be include two class sub-directories. the_path_of_validation_image is the full path of validation image, which should be include two class sub-directories.

The best model and last model will be saved.


Example:

Run:

python mosaic_porngraphic_cnn_demo.py ./data/test/22.jpg

Output:

Mosaic: detect porngraghic
=====================================

loading weights..........
load OK!

Try to Predict input images:
=====================================
Input image is: ./data/test/22.jpg
The PORNGRAPHIC probability is: 0.000% 

Also, the model gives JSON Output:

following are return values:
{"results_output": {"porngraphic": "2.15399e-08"}, "image_file_output": "null", "results_file_output": "null"}

Models:

Mosaic Model based on Xception in keras:

  • Input: [128,128,3]
  • Entry Flow: [8,8,728]
  • Middle Flow(repeated 8 times): [8,8,728]
  • Exit Flow: [4,4,2048]
  • Output FC: 1

The accuracy in test datasets is up to 96%.


Donate:

If the project could help you, please star it and give us some donations. Donations will be used to fund expenses related to development (e.g. to cover equipment and server maintenance costs), to sponsor bug fixing, feature development.

Wechat Payment WeChat Payment

Paypal Payment Paypal Payment

mosaic's People

Contributors

boozyguo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.