TinyFormer
TinyFormer is a trainable transformer detector with a DINOv3 backbone.
- Tasks
- detection
- Install
pip install libreyolo- Support tier
- Core, since v1.6.0. Core trainable detectors: features follow the flagships in the same release wave.
- Licenses
- Code MIT, weights Apache-2.0; DINOv3 terms. Commercial use
Install
pip install "libreyolo"Predict
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreTinyFormers.pt", device="cpu")result = model(SAMPLE_IMAGE)print(result)Choose a published checkpoint below. The naming distinguishes the VisDrone variants and Objects365-to-COCO variants. Prediction requires a square imgsz; rectangular inputs raise an error.
Train
Training accepts a detection dataset YAML. Omitted epochs, batch, imgsz, lr0 and amp use the family recipe.
Dataset setup describes the required training data.
from libreyolo import LibreYOLO model = LibreYOLO("LibreTinyFormers.pt", device="cpu")# coco8.yaml is a built-in 8-image detection dataset that downloads on first use.# Replace it with the path to your own detection dataset YAML.model.train(data="coco8.yaml", epochs=1, device="cpu", workers=0)Validate
from libreyolo import LibreYOLO model = LibreYOLO("LibreTinyFormers.pt", device="cpu")# coco8.yaml downloads on first use; pass your own detection dataset YAML instead.metrics = model.val(data="coco8.yaml", workers=0)print(metrics)Use the dataset format for this task. Validation explains the dataset requirements and returned metrics.
Export
| Task | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Detection | Detection to ONNX: supported | Detection to TorchScript: supported | Detection to ExecuTorch: supported | Detection to TensorRT: supported | Detection to OpenVINO: supported | Detection to Paddle: not supported | Detection to MNN: not supported | Detection to RKNN: not supported | Detection to ncnn: not supported | Detection to TFLite: not supported | Detection to CoreML: not supported | Detection to Core AI: not supported |
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreTinyFormers.pt", device="cpu")model.export(format="onnx")Export setup lists format dependencies and loading exported artifacts.
Checkpoints
| File | Weights license |
|---|---|
| Detection | |
| LibreTinyFormers.pt | other |
| LibreTinyFormerm.pt | other |
| LibreTinyFormerl.pt | other |
| LibreTinyFormerx.pt | other |
| LibreTinyFormerxl.pt | other |
| LibreTinyFormers-visdrone.pt | other |
| LibreTinyFormerm-visdrone.pt | other |
| LibreTinyFormerl-visdrone.pt | other |
| LibreTinyFormerx-visdrone.pt | other |
| LibreTinyFormerx-obj2coco.pt | other |
| LibreTinyFormerxl-obj2coco.pt | other |
Every file above exists in the LibreYOLO org today and downloads on first use.
Licensing
Check the license on the Hugging Face repository of the specific weights you download. Every checkpoint in the LibreYOLO org carries one, and they are not always the same across a family. That repository is the authoritative source; the summary below describes what applied when this page was last verified.
This is a description of the licenses involved, not legal advice. If the answer matters commercially, read the licenses yourself and take your own counsel.
- Original work
- TinyFormer, TinyFormer authors
- Upstream license
- Apache-2.0; DINOv3 terms
- Upstream source
- github.com/mmpmmpmmpjosh/TinyFormer
- LibreYOLO code
- MIT
- Weights
- Apache-2.0; DINOv3 terms, republished at huggingface.co/LibreYOLO
- Interpretation
- The detector uses Apache-2.0 source and a DINOv3 backbone with its own terms. Check the publisher declarations for the chosen checkpoint.
Citation
@article{hsieh2026tinyformer,
title={TinyFormer: Preserving Tiny Objects in YOLO-DETR Hybrid Real-time Detectors},
author={Hsieh, Jun-Wei and Kao, Meng-Yu and Kurniawan, Ghufron Wahyu and Peng, Kuan-Chuan},
journal={arXiv preprint arXiv:2605.25046},
year={2026}
}Copied from the authors' citation block at raw.githubusercontent.com/mmpmmpmmpjosh/TinyFormer/main/README.md.