Skip to content

v0.9.0

Latest

Choose a tag to compare

@rfonod rfonod released this 09 Jun 21:37
776d67f

🔧 CLI/Config Overhaul, Progress Bars & Bug Fixes

This release delivers a major overhaul of the CLI/config integration, making every pipeline preference expressible directly in a YAML config file without repeated command-line flags. It also adds color-coded progress bars across all pipeline stages, a new dual-plot mode for segmentation overlays, expanded CLI options, and a set of targeted bug fixes and robustness improvements.


✨ New Features

Color-coded progress bars across all pipeline stages: Each stage now has a distinct terminal color — yellow (detect_track_stabilize.py), cyan (georeference.py), green (visualize.py), magenta (plot.py). All bars are terminal-width-aware, show per-stage postfix labels while executing, and display done on completion.

Dual segmentation overlay plots: --segmentations in plot.py now produces both a plain-orthophoto trajectory plot and a segmentation overlay plot side by side. The two output paths are resolved independently.

New CLI flags — detect_track_stabilize.py: Added --conf / -co (detection confidence threshold) and --classes / -cls (vehicle class filter), previously only settable via config.

New CLI flags — visualize.py: Added --show-conf, --show-lanes, --show-class-names, --hide-labels, --hide-tracks, --hide-speed, --speed-unit, --class-filter, --cut-frame-left, --cut-frame-right — all backfilling from config when not specified.

--segmentation-folder / -osf for plot.py: Custom segmentation folder paths are now accepted directly by plot.py and wired through batch_process.py, so batch runs respect non-default segmentation locations.

ONNX export dependency group: Added an [export] optional dependency group in pyproject.toml (pip install -e '.[export]') for ONNX model export, cleanly separated from core and dev dependencies.


🔧 Improvements

CLI / Config integration overhaul: All overridable CLI flags now default to None and backfill from the active config after loading. Boolean flags converted to --flag / --no-flag pairs (BooleanOptionalAction). The visualization: and plotting: sections are extended in all main configs to cover every formerly CLI-only flag. A new processing: section is added to all main configs and cfg/georef/default.yaml gains ref_frame, use_master, recompute, and geo_source. The georef config is restructured into transformation, matching, filtering, and processing sections. All YAML files updated with units, value ranges, and CLI cross-references in comments.

batch_process.py API simplification: Removed the --plot / -pl flag — plotting now runs automatically when save or show is enabled via config or CLI. Config defaults changed to save: true / show: false across all preset configs so the pipeline saves output by default.

tools/viz_segmentations.py refactor: Full rewrite with positional CLI arguments, structured logging, removed shapely dependency, and extracted _draw_lanes, _draw_sections, and _poly_center helpers. Gracefully skips on missing CSV or unreadable image.

--help output restructured: All five scripts now use argument groups that mirror their docstring section structure, making --help output much easier to navigate.


🐛 Bug Fixes

detect_track_stabilize.py: Use properly shaped empty arrays (0, 12) / (0, 10) on error or empty results instead of [[]]; fix FPS logging to use actual processed frame count; guard remove_short_tracks against empty input.

georeference.py: Add sys.exit(1) after all critical-level errors; fix compute_homography to always return a 3-tuple (was returning 2 in early-exit paths); add null check for homography/inliers from cv2.findHomography; release video capture before exit on FPS failure; fix **config unpackings passing extra keys to functions with fixed signatures.

plot.py: Fix class-distribution bar label positions to use actual plot order rather than class index; fix typo acclerationacceleration in output filename; drop redundant skiprows=0 from pd.read_csv.

visualize.py: Initialize ref_frame to None before the frame loop; guard viz mode 2 against unset ref_frame; reshape 1D transforms array for single-frame videos; improve legacy-CSV Frame_ID reconstruction using per-timestamp mapping; degrade gracefully when neither Frame_Number nor Timestamp column is present.

Config files: Resolve inconsistencies and misleading statements across all preset and sub-configs; sync all ultralytics and tracker YAML configs with upstream schema (rename boxesshow_boxes, remove deprecated save_hybrid and label_smoothing).


📦 Dependency & Metadata Updates

  • ultralytics: relaxed pin from ==8.0.209 to >=8.4.40,<9.0 (first version with PyTorch 2.6 compatibility fix and all config params used by geo-trax)
  • Python: relaxed from >=3.10 to >=3.9; added Python 3.9 and 3.13 classifiers
  • Poetry / uv: added [tool.poetry] with package-mode = false; uv and Poetry install commands added to README
  • Version updated to 0.9.0 in pyproject.toml, CITATION.cff, and README.md

Full Changelog: v0.8.0...v0.9.0