GithubHelp home page GithubHelp logo

dklive1999 / maps-net Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 4 MB

Paper code: Image tampering localization network based on multi-class attention and progressive subtraction

Python 100.00%
python pytorch image-tampering-detection

maps-net's Introduction

MAPS-Net

Paper code: Image tampering localization network based on multi-class attention and progressive subtraction

Environment

  • Ubuntu18.04
  • Python 3.8
  • PyTorch 1.9.0 + Cuda 11.1
  • Detail python librarys can found in requirements.txt

Dataset

An example of the dataset index file is given as datasets/Casiav2.txt, where each line contains:

 img_path mask_path label
  • 0 represents the authentic and 1 represents the manipulated.
  • For an authentic image, the mask_path is "None".
  • For wild images without mask groundtruth, the index should at least contain "img_path" per line.

For example, each line in txt file should like this:`

  • Authentic image:

    ./Casiav2/authentic/Au_ani_00001.jpg None None 0
    
  • Manipulated image with pre-generated edge mask:

    ./Casiav2/tampered/Tp_D_CND_M_N_ani00018_sec00096_00138.tif ./Casiav2/mask/Tp_D_CND_M_N_ani00018_sec00096_00138_gt.png ./Casiav2/edge/Tp_D_CND_M_N_ani00018_sec00096_00138_gt.png 1
    
  • Manipulated image without pre-generated edge mask:

    ./Casiav2/tampered/Tp_D_CND_M_N_ani00018_sec00096_00138.tif ./Casiav2/mask/Tp_D_CND_M_N_ani00018_sec00096_00138_gt.png None 1
    
  • You should follow the format and generate your own "path file" in a xxxx.txt.

Limits: At this time, the edge mask can only be generated during training and cannot be pre generated. This will be a little bit slow. Since every Epoch you will generate a edge mask for each image, however, they are always the same edge mask. Better choice should be generate the edge mask from the ground truth mask before start training. Script for pre-generate the edge mask will release later.

Training sets

Test sets

Training

  • Please set the train image path in train_base.py, then run train_lanch.py with Python.
  • In the models folder we have provided several working python files, namely "maps_net-xxx.py", please select the .py file you need to run and rename it to "maps_net.py " for proper training. These .py files were also used by us in the ablation experiments.

Evaluation

maps-net's People

Contributors

dklive1999 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

maps-net's Issues

Source of the paper

Thanks for your coding work. The advantages of this model can be seen below. According to the title of the paper you provided, no relevant information was found. I really want to read this paper. Could you please ask the author to provide the source of the paper.

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.