Image Classification
Transformers
Safetensors
English
image-forensics
image-manipulation-localization
multi-agent
qwen2.5-vl
Instructions to use moindy/MADL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moindy/MADL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="moindy/MADL") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("moindy/MADL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 4,282 Bytes
529e9dd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | ---
license: apache-2.0
base_model: Qwen/Qwen2.5-VL-7B-Instruct
datasets:
- Huang-yating/SID_Set
language:
- en
library_name: transformers
pipeline_tag: image-classification
tags:
- image-forensics
- image-manipulation-localization
- multi-agent
- qwen2.5-vl
---
# MADL model weights
This repository is the weight companion for **MADL: Towards Dependable Image
Forgery Detection via Multi-Agent Forensic Reasoning**. The executable code,
configuration files, and evaluation scripts are distributed in the companion
[GitHub code repository](https://github.com/shannima/MADL).
Model repository: [moindy/MADL](https://huggingface.co/moindy/MADL).
MADL produces one of three image-level labelsβ`real`, `synthetic`, or
`tampered`βand returns a binary localization mask only for locally tampered
images. The release contains the trainable components developed for MADL; it
does not redistribute the Qwen base model or SAM ViT-H.
## Files
| Directory | Component | Purpose |
|---|---|---|
| `agent_a_qwen_lora/` | Agent A LoRA adapter | Adapts Qwen2.5-VL-7B-Instruct to three-class semantic verification and region proposals. |
| `agent_b_dualstream/` | Agent B dual-stream checkpoint | RGB/SRM ConvNeXt-Tiny classifier and continuous manipulation heatmap. |
| `agent_b_visual_ranker/` | Agent B visual-ranker checkpoint | Selects a final SAM candidate using RGB, mask, heatmap, and geometry evidence. |
| `MANIFEST.json` | Integrity manifest | Records the byte size and SHA-256 of every released model artifact. |
The dual-stream release checkpoint contains only the model state, architecture,
class names, and a compact training summary. Optimizer state and local training
paths were intentionally removed. The visual-ranker checkpoint uses the
strict four-field runtime schema required by the companion loader.
## External dependencies
1. Download `Qwen/Qwen2.5-VL-7B-Instruct` through Transformers or the
Hugging Face Hub. PEFT reads this identifier from `adapter_config.json`.
2. Download the official SAM ViT-H checkpoint
`sam_vit_h_4b8939.pth` from Meta's Segment Anything release.
3. Place this repository under the runtime weight root and place SAM at
`external/sam_vit_h_4b8939.pth`, or override the relative paths in the MADL
YAML configuration.
Expected layout:
```text
models/
βββ agent_a_qwen_lora/
βββ agent_b_dualstream/
β βββ madl_agent_b_dualstream_v1.pt
βββ agent_b_visual_ranker/
β βββ madl_agent_b_visual_ranker_v1.pt
βββ external/
βββ sam_vit_h_4b8939.pth
```
Verify the files before inference:
```bash
python scripts/verify_weights.py /path/to/models
```
## Training data and evaluation scope
The released components were trained for the SID-Set task, which distinguishes
authentic, fully synthetic, and locally tampered images and provides masks for
the locally tampered class. The release does not include SID-Set images. Users
must obtain the dataset under its own terms.
## Intended use
The weights are intended for academic research on image forgery detection,
localization, evidence interaction, and multi-agent forensic reasoning. They
are not a substitute for human forensic examination and should not be used as
the sole basis for legal, disciplinary, or content-removal decisions.
## Limitations
- Very small, fragmented, or weak-trace manipulations remain difficult.
- Cross-dataset behavior has not been established by the final manuscript.
- Multiple model calls increase latency and GPU memory requirements.
- The natural-language field is a structured evidence trace; the release does
not claim that it has been independently evaluated as explanation quality.
- Results depend on the exact Qwen, SAM, preprocessing, and threshold versions
documented by the companion code.
## Licenses and attribution
The released MADL code and original weight packaging are provided under
Apache-2.0. Qwen2.5-VL, SAM, SID-Set, and other dependencies retain their own
licenses and terms. The [code README](https://github.com/shannima/MADL#third-party-components)
lists the relevant upstream projects. Dataset-derived use should preserve SID-Set attribution.
|