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

ID Class
0 stamp
1 signature
2 checkbox_checked
3 checkbox_unchecked

Performance

Class mAP@50 mAP@50:95 Precision Recall
stamp 93.2% 70.5% 96.3% 81%
signature 95.4% 73.9% 96.6% 81%
checkbox_checked 91.8% 56.5% 90.7% 81%
checkbox_unchecked 65.7% 34.2% 43.4% 81%
overall 86.5% 58.8% 81.7% 81%

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}
}
Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support