davanstrien / archival-index-card-detector

huggingface.co
Total runs: 21
24-hour runs: 0
7-day runs: 9
30-day runs: 9
Model's Last Updated: February 02 2026
object-detection

Introduction of archival-index-card-detector

Model Details of archival-index-card-detector

Archival Index Card Detector

A YOLO26n model trained to detect index cards in digitized archival document scans.

Model Description

This model detects index cards in scanned archival documents, returning bounding box coordinates for each detected card. It was trained specifically on historical library index cards from the National Library of Scotland's Advocates Library collection.

Single class: index_card

Performance
Metric Value
mAP@50 99.3%
mAP@50-95 99.1%
Precision 99.9%
Recall 98.9%

Trained on 905 images over 85 epochs.

How It Was Made

This model was built through an iterative loop using Claude Code to build tooling and UV scripts on HF Jobs for inference.

The Iterative Process
Version Images mAP@50-95 What happened
v1 100 94.4% SAM3 bootstrap → manual correction → train
v2 297 95.5% Run v1 on new images → correct outputs → retrain
v3 905 99.2% Run v2 on more images → correct → retrain
Step by Step
  1. Zero-shot bootstrap with SAM3 : Ran SAM3 via a UV script on HF Jobs to get initial bounding box predictions on ~100 archival images. Result: only 31% true positive rate (many false positives on backs of cards).

  2. Claude Code built annotation tooling : Asked Claude Code to build an HTML bounding box editor for correcting the SAM3 outputs. It created a simple tool to visualize images, adjust boxes, and export corrected annotations.

  3. Manual correction : Used the bbox editor to correct annotations - removing false positives from versos (card backs) and adjusting box coordinates.

  4. Train v1 : Fine-tuned YOLO26n on the corrected 100 images → 94.4% mAP@50-95.

  5. Expand with model predictions : Claude Code built scripts to run the trained model on new images from HF Hub, outputting predictions in the same format as SAM3 for the bbox editor.

  6. Correct and retrain : Loaded model predictions into the editor, corrected errors, merged with existing annotations, retrained → v2 (95.5%) → v3 (99.2%).

The Pattern

AI bootstraps → Claude builds tooling → human corrects → model improves → repeat

This workflow is useful when you have domain-specific detection needs but no labeled training data. The key insight: use AI (SAM3/previous model) to generate candidate annotations, then spend human time correcting rather than creating from scratch .

Usage
from ultralytics import YOLO

# Load the model
model = YOLO("davanstrien/archival-index-card-detector")

# Run inference
results = model.predict("scan.jpg")

# Get bounding boxes
for result in results:
    boxes = result.boxes
    for box in boxes:
        x1, y1, x2, y2 = box.xyxy[0].tolist()
        confidence = box.conf[0].item()
        print(f"Index card detected at ({x1:.0f}, {y1:.0f}, {x2:.0f}, {y2:.0f}) with confidence {confidence:.2f}")
Cropping detected cards
from ultralytics import YOLO
from PIL import Image

model = YOLO("davanstrien/archival-index-card-detector")
image = Image.open("scan.jpg")
results = model.predict(image)

for i, box in enumerate(results[0].boxes):
    x1, y1, x2, y2 = box.xyxy[0].tolist()
    # Add padding (10%)
    w, h = x2 - x1, y2 - y1
    pad = 0.1
    x1 = max(0, x1 - w * pad)
    y1 = max(0, y1 - h * pad)
    x2 = min(image.width, x2 + w * pad)
    y2 = min(image.height, y2 + h * pad)

    cropped = image.crop((x1, y1, x2, y2))
    cropped.save(f"card_{i}.jpg")
Limitations
  • Specific card style : Trained on NLS Advocates Library index cards (typed, early-mid 20th century). May need fine-tuning for different card formats, handwritten cards, or cards from other collections
  • Scan quality : Best results on high-quality scans; may struggle with very low resolution or heavily degraded images
  • Single class : Only detects "index card" - does not distinguish between different card types or sections within cards
Training Details
  • Base model : YOLO26n (ultralytics)
  • Training images : 905 (including ~50% negative examples)
  • Epochs : 85
  • Hardware : Apple M1 Pro (MPS)
  • Framework : ultralytics
  • Development : Claude Code for tooling and scripts
  • Initial labels : SAM3 UV script on HF Jobs
Use Cases
  • Automatically locating index cards in digitized card catalog collections
  • Pre-processing step for OCR or metadata extraction pipelines
  • Quality control for digitization projects (detecting missed cards, versos, etc.)
Citation

If you use this model, please cite:

@misc{vanstrien2026indexcard,
  author = {van Strien, Daniel},
  title = {Archival Index Card Detector},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/davanstrien/archival-index-card-detector}
}
License

This model is released under the AGPL-3.0 license (required by the YOLO26 base model license).

Runs of davanstrien archival-index-card-detector on huggingface.co

21
Total runs
0
24-hour runs
9
3-day runs
9
7-day runs
9
30-day runs

More Information About archival-index-card-detector huggingface.co Model

More archival-index-card-detector license Visit here:

https://choosealicense.com/licenses/agpl-3.0

archival-index-card-detector huggingface.co

archival-index-card-detector huggingface.co is an AI model on huggingface.co that provides archival-index-card-detector's model effect (), which can be used instantly with this davanstrien archival-index-card-detector model. huggingface.co supports a free trial of the archival-index-card-detector model, and also provides paid use of the archival-index-card-detector. Support call archival-index-card-detector model through api, including Node.js, Python, http.

archival-index-card-detector huggingface.co Url

https://huggingface.co/davanstrien/archival-index-card-detector

davanstrien archival-index-card-detector online free

archival-index-card-detector huggingface.co is an online trial and call api platform, which integrates archival-index-card-detector's modeling effects, including api services, and provides a free online trial of archival-index-card-detector, you can try archival-index-card-detector online for free by clicking the link below.

davanstrien archival-index-card-detector online free url in huggingface.co:

https://huggingface.co/davanstrien/archival-index-card-detector

archival-index-card-detector install

archival-index-card-detector is an open source model from GitHub that offers a free installation service, and any user can find archival-index-card-detector on GitHub to install. At the same time, huggingface.co provides the effect of archival-index-card-detector install, users can directly use archival-index-card-detector installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

archival-index-card-detector install url in huggingface.co:

https://huggingface.co/davanstrien/archival-index-card-detector

Url of archival-index-card-detector

archival-index-card-detector huggingface.co Url

Provider of archival-index-card-detector huggingface.co

davanstrien
ORGANIZATIONS

Other API from davanstrien

huggingface.co

Total runs: 17
Run Growth: 11
Growth Rate: 64.71%
Updated:September 24 2024