Pretrained Hub (library)
July 11, 2026 · View on GitHub
Manifest-driven downloads from Hugging Face Hub.
- Manifest:
manifest.json—repo_id,revision, and registered assets (slug → hashed filename + metadata). - Default repo:
dl4eo/oriented-det-pretrained(override withORIENTED_DET_HF_REPO_ID). - Local cache directory:
<oriented-det-install>/pretrained/(framework root, not the product repo). Override withORIENTED_DET_PRETRAINED_DIR.
Asset ids (slugs)
Use manifest slugs (not mAP numbers) with hf:// and the CLI:
oriented_rcnn_dota_le90_1xoriented_rcnn_dota_le90_3xrotated_faster_rcnn_dota_le90_1xrotated_faster_rcnn_dota_le90_3xrotated_retinanet_dota_le90_1xrotated_retinanet_dota_le90_3x
On-disk / Hub filenames include a SHA-256[:8] suffix (see tools/publish_checkpoint.py).
Each published weight can have sidecar artifacts beside it in pretrained/: <weight-stem>.json for the exact final run config and <weight-stem>.log for the training log.
Usage
from oriented_det.pretrained import ensure_checkpoint
path = ensure_checkpoint("hf://oriented_rcnn_dota_le90_1x")
odet pretrained download oriented_rcnn_dota_le90_1x
odet pretrained list
Training (tools/train.py) and inference call ensure_checkpoint when checkpoint.load_from_checkpoint points at a registered asset that is missing locally.
Simple inference (odet image-demo, odet preds, deploy/export paths through oriented_det.runtime.checkpoint) prefers the sidecar JSON only when the provided config is that checkpoint's manifest source_recipe. A different user-provided config is kept as-is.
Publishing weights
python tools/publish_checkpoint.py <run_ckpt> pretrained/<basename_without_hash>- Copy
<experiment>/config.jsonandtrain.logtopretrained/<weight-stem>.jsonand.log - Update
manifest.json(filename,sha256,source_recipe,eval_map50, …).eval_map50is mAP50 fromodet predson val tiles (same protocol asmake eval-val), notcompute_map_finalfrom training — see pretrained/README.md. - Upload:
make upload-pretrained(.pthplus sidecar.json/.logwhen present)
See also pretrained/README.md at the repository root.