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.
Upstream
TinyFormer by TinyFormer authors, Apache-2.0; DINOv3 terms. Paper, source
Licenses
Code MIT, weights Apache-2.0; DINOv3 terms. Commercial use

Install

bash
pip install "libreyolo"

Predict

Python
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.

Python
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

Python
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

TaskONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
DetectionDetection to ONNX: supportedDetection to TorchScript: supportedDetection to ExecuTorch: supportedDetection to TensorRT: supportedDetection to OpenVINO: supportedDetection to Paddle: not supportedDetection to MNN: not supportedDetection to RKNN: not supportedDetection to ncnn: not supportedDetection to TFLite: not supportedDetection to CoreML: not supportedDetection to Core AI: not supported
Python
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

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
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.

Verified against LibreYOLO v1.6.0. Support tables, checkpoints and benchmark numbers on this page are generated from the released library and the published weights, not written by hand.