feat(FRNet): apply softmax & fix dataset path#199
Conversation
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR updates the FRNet deployment pipeline to output per-class probabilities (via softmax) across Torch/ONNX/TensorRT backends, and adjusts the T4 dataset GT mask path handling to work with paths stored relative to the workspace root.
Changes:
- Wrap the PyTorch model with an
ExportModelthat returnssoftmax(seg_logit)and use it for ONNX export and Torch inference. - Rename deployment output from
seg_logittopred_probsacross deploy configs and TensorRT runtime wrapper. - Fix T4 dataset semantic mask path handling by no longer blindly joining
dataset_dirand instead resolving via existence checks.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/FRNet/deploy/trt_model.py | Switch TRT expected output tensor name to pred_probs and document probability output. |
| projects/FRNet/deploy/torch_model.py | Add ExportModel wrapper to expose probability output and update Torch inference. |
| projects/FRNet/deploy/postprocessing.py | Update docs to reflect probability-based postprocessing. |
| projects/FRNet/deploy/onnx_model.py | Update docs to reflect probability output from ONNX Runtime. |
| projects/FRNet/deploy/main.py | Export ONNX from torch_model.export_model instead of the raw model. |
| projects/FRNet/deploy/dataset.py | Adjust T4 mask path handling to avoid incorrect dataset_dir joins. |
| projects/FRNet/configs/deploy/t4dataset/frnet_tensorrt_dynamic.py | Rename ONNX/TRT output to pred_probs and update dynamic axes/config entries. |
| projects/FRNet/configs/deploy/nuscenes/frnet_tensorrt_dynamic.py | Rename ONNX/TRT output to pred_probs and update dynamic axes/config entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/FRNet/configs/deploy/t4dataset/frnet_tensorrt_dynamic.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbe14f5adb
ℹ️ 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".
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
KSeangTan
left a comment
There was a problem hiding this comment.
LGTM overall, please resolve the comments and merge afterwards
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Signed-off-by: Amadeusz Szymko <amadeusz.szymko.2@tier4.jp>
Summary
Apply softmax and deploy FRNet model with probabilities output as we do in PTv3.
Additionally fix the dataset path for test in deployment script.