Downloads · 30 days
20
9% of all-time downloads
salmanzaman777/image-forgery-m3
image-forgery-m3 is a image classification model from salmanzaman777. Use it when you need a label for an image. It is set up for keras. The card lists the license as mit.
Binary classifier that flags tampered images. Two-branch Keras model:
Downloads · 30 days
20
9% of all-time downloads
All-time downloads
223
Public
Repo size
103 MB
Likes
0
Public
Click a slice to open those files.
.keras103 MB · 100%
From the Hugging Face model README
Binary classifier that flags tampered images. Two-branch Keras model:
Output is the probability the image is forged (label 1); threshold 0.5.
Two tensors in order [rgb, ela], each (224, 224, 3), float32 normalized to
[0, 1] (no ResNet preprocess_input). See the Space's app.py for the exact
preprocessing.
from huggingface_hub import hf_hub_download
import tensorflow as tf
path = hf_hub_download("salmanzaman777/image-forgery-m3", "M3_best.keras", revision="v1")
model = tf.keras.models.load_model(path)
prob = model.predict([rgb, ela])[0][0] # >0.5 => forged
CASIA v2 (authentic + tampered), 70/15/15 stratified split, class-weighted loss.
Research demo, not a forensic tool. Trained on CASIA v2 artifacts; performance degrades on out-of-distribution sources, heavy re-compression, or screenshots.