feat(autoware_ml): add t4segmetric#195
Conversation
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
There was a problem hiding this comment.
Pull request overview
Adds a shared 3D segmentation evaluation core (t4_seg_eval) and integrates it into both PTv3 evaluation/test flows and FRNet/MMEngine via a new T4SegMetric, including optional BEV distance-range breakdown and confusion-matrix visualization/logging.
Changes:
- Introduced
autoware_ml.segmentation3d.evaluation.functional.t4_seg_evalwith unified metrics (IoU/acc/precision/recall/F1), confusion matrices, and optional range bucketing. - Added
autoware_ml.segmentation3d.evaluation.metrics.T4SegMetric(MMEngineBaseMetric) wrapping the functional core and logging CM images. - Updated PTv3 evaluator/tester and FRNet configs to use the shared evaluator + distance-range options.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/PTv3/engines/test.py | Switches PTv3 test-time evaluation to t4_seg_eval and adds TensorBoard + CM/range logging. |
| projects/PTv3/engines/hooks/evaluator.py | Refactors PTv3 validation evaluator to t4_seg_eval + range/CM logging. |
| projects/PTv3/configs/semseg-pt-v3m1-0-t4dataset.py | Adds metric_options.distance_ranges for PTv3 runs. |
| projects/FRNet/configs/t4dataset/frnet_1xb8_t4dataset-qt128-seg.py | Uses T4SegMetric with distance ranges and updates hooks config. |
| projects/FRNet/configs/t4dataset/frnet_1xb8_t4dataset-ot128-seg.py | Uses T4SegMetric with distance ranges and updates hooks config. |
| projects/FRNet/configs/nuscenes/frnet_1xb4_nus-seg.py | Updates hooks config to include LoggerHook and save_best='miou'. |
| autoware_ml/segmentation3d/evaluation/functional/t4_seg_eval.py | New unified functional evaluator + plotting/helpers. |
| autoware_ml/segmentation3d/evaluation/metrics/t4_seg_metric.py | New MMEngine metric adapter with optional CM image logging + submission export. |
| autoware_ml/segmentation3d/evaluation/init.py | Exposes evaluation public API (t4_seg_eval, T4SegMetric, helpers). |
| autoware_ml/segmentation3d/evaluation/functional/init.py | Exposes functional helpers. |
| autoware_ml/segmentation3d/evaluation/metrics/init.py | Exposes T4SegMetric. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
autoware_ml/segmentation3d/evaluation/functional/t4_seg_eval.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
…mplicit spconv load Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
…mplicit spconv load Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e45c323055
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…SegMetric Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
…etric Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Summary
Add
T4SegMetric- a unified segmentation evaluation module shared by PTv3 and FRNet. It computes per-class and mean IoU, precision, recall, F1, and optionally BEV distance-range-based metrics with confusion matrix visualization and TensorBoard logging.Change point
t4_seg_evalfunctional core (autoware_ml/segmentation3d/evaluation/functional/t4_seg_eval.py): shared evaluation logic producingSegEvalResult(metrics dict, confusion matrix, per-range CMs). Includesfast_hist,per_class_iou/precision/recall/f1,plot_confusion_matrix, and range-based BEV bucketing.T4SegMetricMMEngine metric (autoware_ml/segmentation3d/evaluation/metrics/t4_seg_metric.py):BaseMetricsubclass wrappingt4_seg_evalfor FRNet runner integration with optional confusion matrix image logging.projects/PTv3/engines/hooks/evaluator.py,projects/PTv3/engines/test.py): replaced inline metric computation witht4_seg_eval, added range-based metric and confusion matrix TensorBoard logging.projects/FRNet/configs/t4dataset/frnet_1xb8_t4dataset-{ot,qt}128-seg.py): switched fromSegMetrictoT4SegMetricwithdistance_ranges.Note
Test performed