Skip to content

Web App to check if an image is tampered or not and the corresponding tampered regions

License

Notifications You must be signed in to change notification settings

killer4639/verisimilitudo-codecamp

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn


Logo

Verisimilitudo

An awesome website to detect image tampering. Made with Love by the team challengeCraving for Code.Camp 2.0
Explore the docs »

View Demo · Report Bug · Request Feature

**If the hosted application shows error, please reload or contact below anyone**
Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. License
  6. Contributing
  7. Issues
  8. Contact
  9. Acknowledgements

About The Project

Verisimilitudo Screenshot

Editing a real-world photo through computer software or mobile applications is one of the easiest things one can do today before sharing the doctored image on one’s social networking sites. Although most people do it for fun, it is suspectable if one concealed an object or changed someone’s face within the image. Before questioning the intention behind the editing operations, we need to first identify how and which part of the image has been manipulated. It therefore demands automatic tools for identifying the intrinsic difference between authentic images and tampered images. A great survey on this topic

To address the issue we try to solve the problem in 2 phases :

  1. Detecting whether image has been tampered with or not.
  2. Finding the exact tampered region of an image through various deep learning techniques.
  3. Making a real-world usable product out of the model we generated that can be used by anyone.
  4. This product has scope of being extended to a fully functional product which can be used by security agencies.

A list of commonly used resources that I find helpful are listed in the acknowledgements.

Built With

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • Python 3.7+

  • Make a bucket on Amazon AWS S3 and download the keys. Make sure your bucket is public.

  • Create an .env file with the following keys. (Team Code Camp- Please contact anyone from below contacts for S3 keys if there is a difficulty in using S3 or if you want to test with S3 without making an AWS account)

    export S3_BUCKET=<Bucket Name>
    export S3_SECRET_ACCESS_KEY=<AWSSecretKey>
    export S3_KEY=<AWSAccessKeyId>
    export S3_REGION=<AWS Region>
    export DATABASE_URI= <if you are using any postgresql hosted database then db url>
    
  • Make folder structure of the folder 'models' in the following way after downloading the models from and here and arrange them respectively

models
|--- segmentation
|    ├── model.json
|    └── model_for_json.h5
|     
|--- model.json
|--- model_weights.h5

Installation

  1. Clone the repo

    $ git clone https://github.com/anikashc/verisimilitudo-codecamp.git
    $ cd verisimilitudo-codecamp
    
  2. Activating virtual environment (optional)

    $ python -m venv venv
    $ venv\Scripts\activate
    
  3. Install requirements

    $ pip install -r requirements.txt
    
  4. Run Application

    $ python app.py
    
  5. Issues while running

     If you encounter an issue on your terminal like this
     KeyError: 'DATABASE_URI'
     It is because you don't have any  postresql online hosted database. Use the local one as given. Or uncomment it from scripts/tabledef.py
    
     Images get stored in the assets folder
    

Usage

This video explains how to use the version 2.0 which classifies an image if its fake or real and shows the tampered regions. Let's watch this

The white region represents- Tampering

2021-03-27.21-21-06.mp4

Notebook walkthrough to understand algorithm

Image.Tampering.Deep.Learning.Model.Explanation.mp4

Roadmap

  • Building the model. We have used tensorflow and keras to train and build the model.
  • Creating the web app for actual usability of our idea and not just a script to watch
  • Finally deploying it to heroku which took us more than a day because of our huge slug size and complexity
  • We are still not able to deploy the application which shows the location in the image with tampering because of our increased slug size and the limits of Heroku but we have our Version 1.0 ready :D

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Read our contributing guidelines

Issues

  • After resetting the password if we logout, then it doesn't login with the new credentials. This needs to be looked upon.
  • The compute timing on local machine is slow and hence we can use any cloud service for our model computations which will return a JSON object with image and result. This will also help us to deploy on Heroku with less slug size.
  • Better error handling and unit testing. Eg. error is encountered if without uploading any image, we click predict.
  • Email verification
  • Making it mobile responsive and UI additions.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Acknowledgements

About

Web App to check if an image is tampered or not and the corresponding tampered regions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages