ankitkumar-13/ManTraNet-Image-Forgery-Detection
0
ManTra-Net: Image Forgery Detection & Localization
 
Overview
ManTra-Net (Manipulation Tracing Network) is an end-to-end image forgery detection and localization model published at CVPR 2019. It takes any image as input and produces a pixel-level forgery likelihood map.
Architecture
ManTraNet is composed of two sub-networks:
- Image Manipulation Trace Feature Extractor — trained on 385 manipulation classes, sensitive to different forgery types
- Local Anomaly Detection Network — compares local features against regional averages to detect anomalous regions
Supported Forgery Types
- ✂️ Copy-move
- 🔀 Splicing
- 🗑️ Object removal
- 🎨 Enhancement / color manipulation
Pretrained Models
API Usage
This Space exposes a full REST API via Gradio:
Python (gradio_client)
from gradio_client import Client
client = Client("ankitkumar-13/ManTraNet-Image-Forgery-Detection")
result = client.predict(
image="path/to/image.jpg",
model_choice="Ptrain4 — Best (copy-move, splicing, removal, enhancement)",
api_name="/predict"
)
# Returns: (heatmap_image, overlay_image, stats_markdown)
heatmap_path, overlay_path, stats = resultcURL (base64 image)
# Convert image to base64 first
B64=$(base64 -w 0 your_image.jpg)
curl -X POST \
https://ankitkumar-13-mantranet-image-forgery-detection.hf.space/run/predict \
-H 'Content-Type: application/json' \
-d "{\"data\": [\"data:image/jpeg;base64,${B64}\", \"Ptrain4 — Best (copy-move, splicing, removal, enhancement)\"]}"JavaScript (fetch)
const formData = new FormData();
formData.append('file', fileInput.files[0]);
// Upload file first
const uploadResp = await fetch(
'https://ankitkumar-13-mantranet-image-forgery-detection.hf.space/upload',
{ method: 'POST', body: formData }
);
const { files } = await uploadResp.json();
// Run prediction
const resp = await fetch(
'https://ankitkumar-13-mantranet-image-forgery-detection.hf.space/run/predict',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
data: [{ path: files[0] }, "Ptrain4 — Best (copy-move, splicing, removal, enhancement)"]
})
}
);
const result = await resp.json();Citation
@inproceedings{Wu2019ManTraNet,
title={ManTra-Net: Manipulation Tracing Network For Detection And Localization of Image Forgeries With Anomalous Features},
author={Yue Wu, Wael AbdAlmageed, and Premkumar Natarajan},
booktitle={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2019}
}License
This software is made available for academic or non-commercial purposes only. For commercial licensing, contact USC Stevens Institute for Innovation.
