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:

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


Guiding principles


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:

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