All Projects → RonyAbecidan → ManTraNet-pytorch

RonyAbecidan / ManTraNet-pytorch

Licence: other
Implementation of the famous Image Manipulation\Forgery Detector "ManTraNet" in Pytorch

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ManTraNet-pytorch

casia1groundtruth
Groundtruth images of tampering dataset CASIA 1.0
Stars: ✭ 27 (-42.55%)
Mutual labels:  image-manipulation, forgery, forgery-detection
casia2groundtruth
Groundtruth images of tampering dataset CASIA 2.0
Stars: ✭ 97 (+106.38%)
Mutual labels:  image-manipulation, forgery, forgery-detection
TensorFlow-Autoencoders
Implementations of autoencoder, generative adversarial networks, variational autoencoder and adversarial variational autoencoder
Stars: ✭ 29 (-38.3%)
Mutual labels:  networks, neural
HistoGAN
Reference code for the paper HistoGAN: Controlling Colors of GAN-Generated and Real Images via Color Histograms (CVPR 2021).
Stars: ✭ 158 (+236.17%)
Mutual labels:  image-editing, image-manipulation
HFGI
CVPR 2022 HFGI: High-Fidelity GAN Inversion for Image Attribute Editing
Stars: ✭ 384 (+717.02%)
Mutual labels:  image-editing, image-manipulation
Jspaint
🎨 Classic MS Paint, REVIVED + ✨Extras
Stars: ✭ 5,972 (+12606.38%)
Mutual labels:  image-editing, image-manipulation
Skyline
Anomaly detection
Stars: ✭ 303 (+544.68%)
Mutual labels:  detection, anomaly-detection
tools-generation-detection-synthetic-content
Compilation of the state of the art of tools, articles, forums and links of interest to generate and detect any type of synthetic content using deep learning.
Stars: ✭ 107 (+127.66%)
Mutual labels:  photoshop, detection
hayabusa
Hayabusa (隼) is a sigma-based threat hunting and fast forensics timeline generator for Windows event logs.
Stars: ✭ 908 (+1831.91%)
Mutual labels:  detection, forensics
MindMaps
#ThreatHunting #DFIR #Malware #Detection Mind Maps
Stars: ✭ 224 (+376.6%)
Mutual labels:  detection, forensics
Image recoloring
Image Recoloring Based on Object Color Distributions (Eurographics 2019)
Stars: ✭ 30 (-36.17%)
Mutual labels:  image-editing, image-manipulation
SDEdit
PyTorch implementation for SDEdit: Image Synthesis and Editing with Stochastic Differential Equations
Stars: ✭ 394 (+738.3%)
Mutual labels:  image-editing, image-manipulation
MLExp
arxiv.org/abs/1801.07710v2
Stars: ✭ 32 (-31.91%)
Mutual labels:  networks, neural
prophet
A simple neural net implementation.
Stars: ✭ 40 (-14.89%)
Mutual labels:  neural
VindicateTool
LLMNR/NBNS/mDNS Spoofing Detection Toolkit
Stars: ✭ 40 (-14.89%)
Mutual labels:  detection
KAREN
KAREN: Unifying Hatespeech Detection and Benchmarking
Stars: ✭ 18 (-61.7%)
Mutual labels:  detection
imagekit-angular
Angular SDK for ImageKit.io client side file upload and URL generation
Stars: ✭ 16 (-65.96%)
Mutual labels:  image-manipulation
unsupervised llamas
Code for https://unsupervised-llamas.com
Stars: ✭ 70 (+48.94%)
Mutual labels:  detection
imaditor
Image Editor with a UI creatief with ImGui
Stars: ✭ 24 (-48.94%)
Mutual labels:  image-manipulation
imei
IMEI - ImageMagick Easy Install
Stars: ✭ 126 (+168.09%)
Mutual labels:  image-manipulation

Generic badge Ask Me Anything ! visitors

Who has never met a forged picture on the web ? No one ! Everyday we are constantly facing fake pictures touched up in Photoshop but it is not always easy to detect it.

In this repo, you will find an implementation of ManTraNet, a manipulation tracing network for detection and localization of image forgeries with anomalous features. With this algorithm, you may find if an image has been falsified and even identify suspicious regions. A little example is displayed below.

It's a faifthful replica of the official implementation using however the library Pytorch. To learn more about this network, I suggest you to read the paper that describes it here.

On top of the MantraNet, there is also a file containing pre-trained weights obtained by the authors which is compatible with this pytorch version.

There is a slight discrepancy between the architecture depicted in the paper compared to the real one implemented and shared on the official repo. I put below the real architecture which is implemented here.

Please note that the rest of the README is largely inspired by the original repo.


What is ManTraNet ?

ManTraNet is an end-to-end image forgery detection and localization solution, which means it takes a testing image as input, and predicts pixel-level forgery likelihood map as output. Comparing to existing methods, the proposed ManTraNet has the following advantages:

  • Simplicity: ManTraNet needs no extra pre- and/or post-processing
  • Fast: ManTraNet puts all computations in a single network, and accepts an image of arbitrary size.
  • Robustness: ManTraNet does not rely on working assumptions other than the local manipulation assumption, i.e. some region in a testing image is modified differently from the rest.

Technically speaking, ManTraNet is composed of two sub-networks as shown below:

  • The Image Manipulation Trace Feature Extractor: It's a feature extraction network for the image manipulation classification task, which is sensitive to different manipulation types, and encodes the image manipulation in a patch into a fixed dimension feature vector.

  • The Local Anomaly Detection Network: It's a network that is designed following the intuition that we need to inspect more and more locally our extracted features if we want to be able to detect many kind of forgeries efficiently.

Where are the pre-trained weights coming from ?

  • The authors have first pretrained the Image Manipulation Trace Feature Extractor with an homemade database containing 385 types of forgeries. Unfortunately, their database is not shared publicly. Then, they trained the Anomaly Detector with four types of synthetic data, i.e. copy-move, splicing, removal, and enhancement.

Mantranet results from the composition of these two networks

The pre-trained weights available in this repo are the results of these two trainings achieved by the authors

Remarks : To train ManTraNet you need your own (relevant) datasets.

Dependency

  • Pytorch >= 1.8.1

Demo

One may simply download the repo and play with the provided ipython notebook.

N.B. :

  • Considering that there is some differences between the implementation of common functions between Tensorflow/Keras and Pytorch, some particular methods of Pytorch (like batch normalization or hardsigmoid) are re-implemented here to match perfectly with the original Tensorflow version

  • MantraNet is an architecture difficult to train without GPU/Multi-CPU. Even in "eval" mode, if you want to use it for detecting forgeries in one image it may take some minutes using only your CPU. It depends on the size of your input image.

  • There is also a slightly different version of MantraNet that uses ConvGRU instead of ConvLSTM in the repo. It enables to speed up a bit the training of the MantraNet without losing efficiency.

Citation :

@InProceedings{Wu_2019_CVPR,
author = {Wu, Yue and AbdAlmageed, Wael and Natarajan, Premkumar},
title = {ManTra-Net: Manipulation Tracing Network for Detection and Localization of Image Forgeries With Anomalous Features},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].