Instructions to use small-models-for-glam/detr-resnet-50_nls-chapbooks with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use small-models-for-glam/detr-resnet-50_nls-chapbooks with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="small-models-for-glam/detr-resnet-50_nls-chapbooks")# Load model directly from transformers import AutoImageProcessor, AutoModelForObjectDetection processor = AutoImageProcessor.from_pretrained("small-models-for-glam/detr-resnet-50_nls-chapbooks") model = AutoModelForObjectDetection.from_pretrained("small-models-for-glam/detr-resnet-50_nls-chapbooks") - Notebooks
- Google Colab
- Kaggle
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
Model tree for small-models-for-glam/detr-resnet-50_nls-chapbooks
Base model
facebook/detr-resnet-50