EfficientDet
EfficientDet pairs an EfficientNet backbone with a repeated bi-directional feature pyramid network (BiFPN) and scales depth, width and resolution together across five sizes. LibreYOLO ships it as an inference-only detector.
- Tasks
- detection
- Sizes
- Install
pip install libreyolo- Support tier
- Inference only, since v. Predict, validate and export only. Training features do not apply.
- Licenses
- Code Apache-2.0, weights Apache-2.0. Commercial use
Install
EfficientDet needs no optional extra. Everything it imports is in the base install.
pip install libreyoloPredict
Weights download from Hugging Face on first use and are cached locally.
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreEfficientDetd0.pt")result = model(SAMPLE_IMAGE, save=True) for box in result.boxes: print(box.cls, box.conf, box.xyxy)libreyolo predict model=LibreEfficientDetd0.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=TrueThe returned Results object is the one every family returns, so swapping in a
different detector is a one line change. EfficientDet decodes anchor-based
candidates and then runs class-wise non-maximum suppression, so conf, iou
and max_det all have a real effect here. See prediction for
sources, streaming and result handling.
Variants
Five sizes, D0 through D4. Each step up pairs a larger EfficientNet backbone with a deeper, wider BiFPN and a deeper prediction head, so parameter count and compute grow together, following the paper's compound-scaling rule.
Validate
val() returns a dictionary of metrics/ keys covering precision, recall,
mAP 50 and mAP 50-95, measured against any dataset in the format you trained on.
from libreyolo import LibreYOLO model = LibreYOLO("LibreEfficientDetd0.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mAP50-95"])print(metrics["metrics/mAP50"])libreyolo val model=LibreEfficientDetd0.pt data=my-dataset.yamlExport
| 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: supported. | Detection to TFLite: not supported | Detection to CoreML: not supported | Detection to Core AI: not supported |
An exported artifact loads back through LibreYOLO() on its file suffix, so a
.onnx or .engine file behaves like a checkpoint and returns the same
Results.
from libreyolo import LibreYOLO model = LibreYOLO("LibreEfficientDetd0.pt")model.export(format="onnx")model.export(format="tensorrt", half=True)libreyolo export model=LibreEfficientDetd0.pt format=onnxlibreyolo export model=LibreEfficientDetd0.pt format=tensorrt half=Truefrom libreyolo import LibreYOLO # The factory routes on the file suffix, so an exported artifact loads# like any checkpoint and returns the same Results object.model = LibreYOLO("LibreEfficientDetd0.onnx")result = model(SAMPLE_IMAGE) print(result.boxes.xyxy)Checkpoints
Every published weight file for this family.
| File | Input (px) | Weights license |
|---|---|---|
| Detection | ||
| LibreEfficientDetd0.pt | apache-2.0 | |
| LibreEfficientDetd1.pt | apache-2.0 | |
| LibreEfficientDetd2.pt | apache-2.0 | |
| LibreEfficientDetd3.pt | apache-2.0 | |
| LibreEfficientDetd4.pt | apache-2.0 | |
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
- EfficientDet, Google Research
- Upstream license
- Apache-2.0
- Upstream source
- github.com/rwightman/efficientdet-pytorch
- LibreYOLO code
- MIT
- Weights
- Apache-2.0, republished at huggingface.co/LibreYOLO
- Interpretation
- Apache-2.0 is a permissive license, so these weights can be used in commercial and closed-source products. It asks you to keep its license text and attribution notices with any copy of the weights you redistribute, and it grants a patent license. It places no obligation on your own application code. LibreYOLO's D0-D4 checkpoints are converted from Google's official TensorFlow-trained release assets through the Apache-2.0 rwightman/efficientdet-pytorch project; those release assets carry no separate per-checkpoint license, so redistribution here rests on Apache-2.0 implied by the releasing project, the same basis rwightman/efficientdet-pytorch itself uses for its own converted weights.
LibreYOLO's D0-D4 checkpoints are converted through the Apache-2.0 rwightman/efficientdet-pytorch project, which itself mirrors the official TensorFlow-trained weights from google/automl without changing learned tensors. No source from the LGPL-licensed zylo117/Yet-Another-EfficientDet-Pytorch project was consulted or used.