detr-resnet-50_nls-chapbooks

A DETR model fine-tuned to detect printed illustrations on chapbook pages, trained on the biglam/nls_chapbook_illustrations dataset (illustration bounding boxes from National Library of Scotland chapbook scans). Single-class output: early_printed_illustration.

For new projects, consider small-models-for-glam/historic-newspaper-illustrations-yolov11 — a more recent YOLO-based illustration detector, faster at inference. This DETR model is kept for reproducibility and for the chapbook-specific use case it was trained on.

Usage

from transformers import pipeline

pipe = pipeline(
    "object-detection",
    model="small-models-for-glam/detr-resnet-50_nls-chapbooks",
)

pipe("https://huggingface.co/small-models-for-glam/detr-resnet-50_nls-chapbooks/resolve/main/Chapbook_Jack_the_Giant_Killer.jpg")
# [{'box': {'xmax': 290, 'xmin': 70, 'ymax': 510, 'ymin': 261},
#   'label': 'early_printed_illustration',
#   'score': 0.998}]

Training

Fine-tuned from facebook/detr-resnet-50 for 10 epochs (lr=1e-4, batch_size=8, Adam, linear LR schedule).

Framework versions

  • Transformers 4.20.1
  • Pytorch 1.12.0+cu113
  • Datasets 2.3.2
  • Tokenizers 0.12.1

Example image credits


Part of the small-models-for-glam collection.

Downloads last month
27
Safetensors
Model size
41.6M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for small-models-for-glam/detr-resnet-50_nls-chapbooks

Finetuned
(798)
this model

Dataset used to train small-models-for-glam/detr-resnet-50_nls-chapbooks