CoolFace
Modelpublic

bluecopa/rf-detr-stamp-signature-detector

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
1likes270downloads
Model Card

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

IDClass
0stamp
1signature
2checkbox_checked
3checkbox_unchecked

Performance

ClassmAP@50mAP@50:95PrecisionRecall
stamp93.2%70.5%96.3%81%
signature95.4%73.9%96.6%81%
checkbox_checked91.8%56.5%90.7%81%
checkbox_unchecked65.7%34.2%43.4%81%
overall86.5%58.8%81.7%81%

Usage

python
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}
}