Giter Site home page Giter Site logo

image-copy-move-detection's Introduction

Copy-Move Detection on Digital Image using Python

Old Python 2 version:This repository now host the python 3 version. You can find the old module written with python 2 on this repository.

Description

This is an implementation of python script to detect a copy-move manipulation attack on digital image based on Overlapping Blocks.

This script is implemented with a modification of two algoritms publicated in a scientific journals:

  1. Duplication detection algorithm, taken from Exposing Digital Forgeries by Detecting Duplicated Image Region (old link is dead, go to alternative link); Fast and smooth attack detection algorithm on digital image using principal component analysys, but sensitive to noise and post region duplication process (explained in the paper above)
  2. Robust detection algorithm, taken from Robust Detection of Region-Duplication Forgery in Digital Image; Slower and having rough result attack detection algorithm but are considered robust towards noise and post region duplication process

By modify those algorithm, this script will have a tolerance regarding variety of the input image (i.e. the result will be both smooth and robust, with a trade-off in run time)

This project was used for my Undergraduate Thesis that you can find it in here, but please note that it was written in Indonesian.

Example image

Original image

Original image

Forgered image

Forgered image

Example result after detection

Result image

GUI

GUI screenshoot

Note: This version does not support GUI. If you want to implement it, you can visit the old repo mentioned above for the snippets.

Getting Started

Assuming you already have Python 3.x on your machine:

  • clone this repo
  • create a virtual environment and enter into it
  • run pip3 install -r requirements.txt

Example

from copy_move_detection import detect
detect.detect('assets/', 'dataset_example_blur.png', 'output/', block_size=32)

If blockSize parameter was not given, the default value would be 32 (integer).

You can also see directly at the code.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

I mainly learnt how to do PCA on image using Python from here written by Jan Erik Solem, but the page has been erased. Shortly after knowing the page was gone, I found that the author are now founder & CEO at Mapillary (Hail, and hat tip).

Support

Hi! I got piles email of thanks regarding how this code help them on their affairs or getting their Degree :)

Maintain the repository took time and effort, if you want to support me, please consider Buy Me A Coffee

image-copy-move-detection's People

Contributors

rahmatnazali avatar divyanshu-singh-chauhan avatar

Stargazers

 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.