bluecopa/rf-detr-stamp-signature-detector
1270
RF-DETR Stamp/Signature/Checkbox Detector
A fine-tuned RF-DETR model for detecting stamps, signatures, and checkboxes in document images.
Model Details
- Base Model: RF-DETR Base (DINOv2 backbone)
- Training: 30 epochs on 8x NVIDIA H100 80GB
- Dataset: ~9,400 images (merged from multiple sources)
- License: Apache 2.0
Classes
Performance
Usage
from rfdetr import RFDETRBase
from PIL import Image
# Load model
model = RFDETRBase()
model.load("path/to/checkpoint_best_ema.pth")
# Run inference
image = Image.open("document.png")
detections = model.predict(image, threshold=0.5)
for det in detections:
print(f"Class: {det['class']}, Confidence: {det['confidence']:.2f}, Box: {det['bbox']}")Training Details
- Batch size: 32 per GPU (256 effective)
- Learning rate: 4e-4
- Optimizer: AdamW
- Resolution: 560px
Limitations
- checkbox_unchecked detection is weaker (65.7% mAP) due to low visual distinctiveness
- Best suited for stamps and signatures in document images
Citation
@misc{bluecopa-stamp-detector,
title={RF-DETR Stamp/Signature Detector},
author={BlueCopa},
year={2024},
publisher={HuggingFace}
}