Add model card with description, usage, and benchmarks
Browse files
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- document-forgery-detection
|
| 6 |
+
- tampering-detection
|
| 7 |
+
- image-manipulation
|
| 8 |
+
- vision-transformer
|
| 9 |
+
- lora
|
| 10 |
+
pipeline_tag: image-segmentation
|
| 11 |
+
datasets:
|
| 12 |
+
- DocTamperV1
|
| 13 |
+
metrics:
|
| 14 |
+
- f1
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# SEED — Simple & Efficient Expert Detector
|
| 18 |
+
|
| 19 |
+
**SEED** (Simple & Efficient Expert Detector) is a lightweight vision transformer model for document forgery detection. It localizes tampered regions in document images and classifies images as real or forged.
|
| 20 |
+
|
| 21 |
+
## Architecture
|
| 22 |
+
|
| 23 |
+
| Component | Detail |
|
| 24 |
+
|-----------|--------|
|
| 25 |
+
| Backbone | [DINOv3 ViT-L/16](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m) |
|
| 26 |
+
| Finetuning | LoRA (rank=1, attention + MLP) |
|
| 27 |
+
| Queries | 1 mask query |
|
| 28 |
+
| Decoder blocks | 4 |
|
| 29 |
+
| Input size | 512 × 512 |
|
| 30 |
+
| Parameters | ~304M (only ~1M trainable with LoRA) |
|
| 31 |
+
|
| 32 |
+
## Usage
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from model.hf_wrapper import EoMTForTamperingDetection
|
| 36 |
+
|
| 37 |
+
model = EoMTForTamperingDetection.from_pretrained("Jason37437/SEED")
|
| 38 |
+
model.eval()
|
| 39 |
+
|
| 40 |
+
# The model outputs:
|
| 41 |
+
# - mask_logits: per-query segmentation masks
|
| 42 |
+
# - class_logits: per-query foreground/background scores
|
| 43 |
+
# - image_logits: image-level real vs forged classification
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
## Performance
|
| 47 |
+
|
| 48 |
+
Evaluated on 1,000 samples per dataset at 512×512:
|
| 49 |
+
|
| 50 |
+
### Detection (image-level F1)
|
| 51 |
+
| Dataset | F1 | Accuracy | Precision | Recall |
|
| 52 |
+
|---------|-----|----------|-----------|--------|
|
| 53 |
+
| T-SROIE | 0.88 | 0.88 | 0.90 | 0.86 |
|
| 54 |
+
| Tampered-IC13 | 0.91 | 0.95 | 0.98 | 0.86 |
|
| 55 |
+
| RealTextManipulation | 0.36 | 0.63 | 0.49 | 0.28 |
|
| 56 |
+
| OSTF | 0.57 | 0.92 | 0.56 | 0.58 |
|
| 57 |
+
|
| 58 |
+
### Localization (pixel-level F1)
|
| 59 |
+
| Dataset | F1 |
|
| 60 |
+
|---------|-----|
|
| 61 |
+
| T-SROIE | 0.39 |
|
| 62 |
+
| Tampered-IC13 | 0.26 |
|
| 63 |
+
| RealTextManipulation | 0.04 |
|
| 64 |
+
| OSTF | 0.05 |
|
| 65 |
+
|
| 66 |
+
> **Note:** This is a lightweight LoRA rank-1 model trained for 5,000 steps. Higher localization performance can be achieved with larger LoRA ranks and longer training.
|
| 67 |
+
|
| 68 |
+
## Citation
|
| 69 |
+
|
| 70 |
+
```bibtex
|
| 71 |
+
@software{seed2025,
|
| 72 |
+
title={SEED: Simple & Efficient Expert Detector for Document Forgery},
|
| 73 |
+
author={Mobile Perception Systems Lab, TU/e},
|
| 74 |
+
year={2025},
|
| 75 |
+
url={https://huggingface.co/Jason37437/SEED}
|
| 76 |
+
}
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
## License
|
| 80 |
+
|
| 81 |
+
MIT License.
|