File size: 1,825 Bytes
48c9026 f663929 48c9026 455cee5 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 48c9026 f663929 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | ---
license: apache-2.0
tags:
- object-detection
- detr
pipeline_tag: object-detection
datasets:
- biglam/loc_beyond_words
metrics:
- mean_average_precision
---
# opencode-r1 — Object Detection on LOC Beyond Words
Fine-tuned **facebook/detr-resnet-50** (DETR, ResNet-50 backbone, **Apache-2.0**) on the
[`biglam/loc_beyond_words`](https://huggingface.co/datasets/biglam/loc_beyond_words)
dataset — a crowdsourced collection of bounding-box annotations over WWI-era newspaper
pages from the Library of Congress Chronicling America collection.
Fine-tuning was performed on a single NVIDIA T4 via Hugging Face Jobs (~under \$5 of compute).
## Classes (7)
- Photograph
- Illustration
- Map
- Comics/Cartoon
- Editorial Cartoon
- Headline
- Advertisement
## Validation results (COCO-style AP on 712 held-out images)
- **mAP@0.5:0.95** = `0.3062`
- **mAP@0.5** = `0.4356`
Per-class mAP@0.5:
- Photograph: mAP@50 = **0.000**
- Illustration: mAP@50 = **0.000**
- Map: mAP@50 = **0.000**
- Comics/Cartoon: mAP@50 = **0.000**
- Editorial Cartoon: mAP@50 = **0.000**
- Headline: mAP@50 = **0.000**
- Advertisement: mAP@50 = **0.000**
## Usage
```python
from transformers import AutoProcessor, DetrForObjectDetection
import torch
processor = AutoProcessor.from_pretrained("harness-race/opencode-r1")
model = DetrForObjectDetection.from_pretrained("harness-race/opencode-r1")
image = Image.open("page.jpg")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
results = processor.post_process_object_detection(
outputs, threshold=0.5, target_sizes=torch.tensor([image.size[::-1]]))[0]
```
## License & attribution
- Base model `facebook/detr-resnet-50`: **Apache-2.0**
- Dataset `biglam/loc_beyond_words`: **CC0-1.0** (public domain)
- This fine-tuned model: **Apache-2.0**
|