Inference and predictions
June 22, 2026 ยท View on GitHub
Run inference on a validation split and save results for metrics or visualization.
CLI
# Checkpoint/config auto-resolve from experiment-dir when omitted
odet preds --experiment-dir runs/oriented_rcnn/<timestamp> --data-split val
Or from the repo root after training:
make preds
make metrics
Inference-only (skip mAP / analysis):
odet preds --experiment-dir runs/oriented_rcnn/<timestamp> --data-split val --no-diagnostics
Behavior
- Thresholds, NMS, and sliding-window overlap come from
production.*in the experimentconfig.json - Images larger than the model canvas use sliding-window tiling in
save_predictions.py, then merge detections in image space
Output artifacts
Default directory: predictions/<YYYYMMDD_HHMMSS>/ at the repository root (or --output-dir).
| File | When | Contents |
|---|---|---|
predictions.json | Always (inference) | Per-image detections (rboxes, scores, labels) |
analysis_iou0.50.json | With diagnostics (default) | PR/F1 threshold sweep, per-class AP, confusion matrix, best-threshold block |
model_analysis_<timestamp>.md | With diagnostics | Human-readable report: per-class gts/dets/recall/AP, optional per-class best thresholds |
tile_metrics.csv | With --save-tile-metrics-csv | Per-tile precision/recall/F1 for hard-tile oversampling |
visualizations/ | With --save-visualizations | Overlay images |
Per-class best-threshold tables are computed by default. Disable with --no-per-class-threshold-analysis (--per-class-threshold-analysis is kept for backward compatibility).
Recompute metrics only
odet preds --metrics-from-json predictions/<timestamp> --config runs/.../config.json
Re-runs mAP and writes fresh analysis_iou*.json / model_analysis_*.md from an existing predictions.json without re-inference.
See the tools reference on GitHub and Getting Started: Tools.