Skip to content

Akalanka-1996/image_splicing_detection

Repository files navigation

image_splicing_detection

This is a complementary approach to detect spliced images that are widely created and used in the modern-day context. This program takes an image (JPG or PNG) and gives an output stating whether the uploaded image is spliced or not.

Installation

To install this on your local machine, please execute following commands.

$ git clone https://github.com/Akalanka-1996/image_splicing_detection
$ cd image_splicing_detection

In order to run this application, it is mandatory to have installed python and node in your system.

To run the server.js file, please execute following command.

$ node server.js

Execute following command to run the python file.

$ python prediction.py

Then go to the localhost:8080 and upload an image (JPG or PNG) through the form. When you click the submit button, the respective result for a particular image will be displayed.

If the uploaded image is an authentic one, the result wolud be as follows.



The result of a spliced image would be like follows.



Model building

Convolutional Neural Networks (CNN) has been used to build the model. Here, we have two convolutional layers and one max-pooling layer. We defined an early stop and the trained model is saved in h5 format.

Dataset

CASIA 1 is used to train this model. It has an ample amount of both spliced and authentic images.

Flask API

In order to handle requests and responses between front-end and the back-end, a flask API was built. User uploads an image through web interface and the uploaded image will be sent to the back-end in binary format. The saved model in h5 format is loaded into the flask application. The result of a particular image will be sent beck to the front-end and displayed to the user.

About

A method developed using CNN to detect spliced images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages