lm3_archival_detector__yolo26x_det_1280
YOLO26x object detector for archival (non-plant) elements on herbarium specimen sheets. Default archival_detector model in LeafMachine3 >= 3.0.0.
LM3 metadata
| Field | Value |
|---|---|
| LM3 action | archival_detector |
| LM3_default_model | true |
| LM3_version | 3.0.0 (minimum supported; later releases remain compatible) |
| Model key | yolo26x_det_1280 |
| Architecture | YOLO26x detect, end-to-end (NMS-free) |
| Base weights | yolo26x.pt (Ultralytics, AGPL-3.0) |
| Input size | 1280 letterbox, RGB |
| Classes (9) | Ruler, Barcode, Colorcard, Label, Map, Envelope, Photo, Attached Item, Weights |
| Trained | 2026-11-11 |
| Iteration | 2 |
Files
| Folder | File | Use |
|---|---|---|
pytorch/ | best.pt | Ultralytics, retraining |
onnx/ | model.onnx | LM3 default runtime (onnxruntime) |
coreml_fp32/ | model.mlpackage/, model.json | LM3 on macOS: Core ML on the Apple GPU, float32 |
torchscript/ | model.torchscript | libtorch |
openvino/ | model_openvino_model/ | Intel CPU/iGPU |
docs/ | overlay_*.jpg | inference examples (see Examples) |
SHA-256 of every file is in manifest.json.
Training data
Dataset LM3_Archival, built 2026-06-26 from 67 Labelbox projects, 8,470 images, frozen 80/10/10 split (salt lm3, class hash 53ab3cec0180). Images and labels are not distributed.
| Split | Images | Ruler | Barcode | Colorcard | Label | Map | Envelope | Photo | Attached Item | Weights |
|---|---|---|---|---|---|---|---|---|---|---|
| train | 6,778 | 11,146 | 10,181 | 6,828 | 47,009 | 249 | 2,696 | 46 | 767 | 522 |
| val | 817 | 1,320 | 1,758 | 860 | 6,281 | 30 | 336 | 7 | 99 | 49 |
| test | 875 | 1,421 | 1,257 | 928 | 6,251 | 20 | 376 | 8 | 77 | 50 |
Training
300 epochs, no early stopping, cosine LR, batch auto, close_mosaic=30, cls_pw=0.5 for class imbalance. Weights from the final epoch (300). Augmentation: hsv 0.015/0.7/0.4, degrees 15, translate 0.1, scale 0.5, shear 2, perspective 0.0005, flipud 0.5, fliplr 0.5, mosaic 1.0, mixup 0.15, erasing 0.4, randaugment.
Evaluation
| Split | mAP50 | mAP50-95 | Precision | Recall |
|---|---|---|---|---|
| val | 0.973 | 0.797 | 0.955 | 0.947 |
| test | 0.953 | 0.767 | 0.945 | 0.920 |
Test AP50 per class: Ruler 0.992, Barcode 0.994, Colorcard 0.985, Label 0.959, Map 0.995, Envelope 0.985, Photo 0.982, Attached Item 0.900, Weights 0.788.
Examples
Inference examples: this model's detections drawn on LeafMachine3 working images (1280-side input frame, shown at 1600 px). Translucent fill and border per class, label = class and confidence; not from the evaluation splits. Full-size images are in docs/.
Use in LeafMachine3
First pipeline stage (archival_detector, no dependencies). Runs the ONNX export at 1280 with conf=0.25, iou=0.6, max_det=100, suppresses same-class duplicate boxes, and saves one crop per detection. Downstream consumers: ruler_classifier, ruler_cf (conversion factor), and the Reporter overlays.
On macOS, LM3 runs coreml_fp32/ with Core ML on the Apple GPU instead; its output matches this ONNX model to float32 rounding.
from huggingface_hub import hf_hub_download
path = hf_hub_download("phyloforfun/lm3_archival_detector__yolo26x_det_1280", "onnx/model.onnx")
Citation
Weaver, W. N. (2026) LeafMachine3. https://leafmachine.org