-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(traffic_light_classifier): fix zero size roi bug #7608
fix(traffic_light_classifier): fix zero size roi bug #7608
Conversation
@tzhong518 Can I request your review? |
55884b4
to
b04ea9a
Compare
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
b04ea9a
to
82e26cd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7608 +/- ##
==========================================
- Coverage 29.29% 29.29% -0.01%
==========================================
Files 1609 1609
Lines 119415 119421 +6
Branches 51481 51498 +17
==========================================
- Hits 34988 34987 -1
- Misses 75118 75219 +101
+ Partials 9309 9215 -94
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Taekjin LEE <[email protected]>
fix Signed-off-by: Taekjin LEE <[email protected]>
…light indices The code changes in `traffic_light_classifier_node.cpp` modify the way images and backlight indices are added to the respective vectors. Instead of using `push_back`, the code now uses `emplace_back`. This change improves performance and ensures proper object construction. Signed-off-by: Taekjin LEE <[email protected]>
82e26cd
to
021ede7
Compare
Signed-off-by: Taekjin LEE <[email protected]>
perception/autoware_traffic_light_classifier/src/traffic_light_classifier_node.cpp
Outdated
Show resolved
Hide resolved
…sifier_node.cpp Signed-off-by: Taekjin LEE <[email protected]>
Test result |
perception/autoware_traffic_light_classifier/src/traffic_light_classifier_node.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
perception/autoware_traffic_light_classifier/src/traffic_light_classifier_node.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Taekjin LEE <[email protected]>
…ion#7608) * fix: continue to process when input roi size is zero Signed-off-by: Taekjin LEE <[email protected]> * fix: consider when roi size is zero, rois is empty fix Signed-off-by: Taekjin LEE <[email protected]> * fix: use emplace_back instead of push_back for adding images and backlight indices The code changes in `traffic_light_classifier_node.cpp` modify the way images and backlight indices are added to the respective vectors. Instead of using `push_back`, the code now uses `emplace_back`. This change improves performance and ensures proper object construction. Signed-off-by: Taekjin LEE <[email protected]> * refactor: bring back for loop skim and output_msg filling Signed-off-by: Taekjin LEE <[email protected]> * chore: refactor code to handle empty input ROIs in traffic_light_classifier_node.cpp Signed-off-by: Taekjin LEE <[email protected]> * refactor: using index instead of vector length Signed-off-by: Taekjin LEE <[email protected]> --------- Signed-off-by: Taekjin LEE <[email protected]>
…ion#7608) * fix: continue to process when input roi size is zero Signed-off-by: Taekjin LEE <[email protected]> * fix: consider when roi size is zero, rois is empty fix Signed-off-by: Taekjin LEE <[email protected]> * fix: use emplace_back instead of push_back for adding images and backlight indices The code changes in `traffic_light_classifier_node.cpp` modify the way images and backlight indices are added to the respective vectors. Instead of using `push_back`, the code now uses `emplace_back`. This change improves performance and ensures proper object construction. Signed-off-by: Taekjin LEE <[email protected]> * refactor: bring back for loop skim and output_msg filling Signed-off-by: Taekjin LEE <[email protected]> * chore: refactor code to handle empty input ROIs in traffic_light_classifier_node.cpp Signed-off-by: Taekjin LEE <[email protected]> * refactor: using index instead of vector length Signed-off-by: Taekjin LEE <[email protected]> --------- Signed-off-by: Taekjin LEE <[email protected]>
…ion#7608) * fix: continue to process when input roi size is zero Signed-off-by: Taekjin LEE <[email protected]> * fix: consider when roi size is zero, rois is empty fix Signed-off-by: Taekjin LEE <[email protected]> * fix: use emplace_back instead of push_back for adding images and backlight indices The code changes in `traffic_light_classifier_node.cpp` modify the way images and backlight indices are added to the respective vectors. Instead of using `push_back`, the code now uses `emplace_back`. This change improves performance and ensures proper object construction. Signed-off-by: Taekjin LEE <[email protected]> * refactor: bring back for loop skim and output_msg filling Signed-off-by: Taekjin LEE <[email protected]> * chore: refactor code to handle empty input ROIs in traffic_light_classifier_node.cpp Signed-off-by: Taekjin LEE <[email protected]> * refactor: using index instead of vector length Signed-off-by: Taekjin LEE <[email protected]> --------- Signed-off-by: Taekjin LEE <[email protected]>
…ion#7608) * fix: continue to process when input roi size is zero Signed-off-by: Taekjin LEE <[email protected]> * fix: consider when roi size is zero, rois is empty fix Signed-off-by: Taekjin LEE <[email protected]> * fix: use emplace_back instead of push_back for adding images and backlight indices The code changes in `traffic_light_classifier_node.cpp` modify the way images and backlight indices are added to the respective vectors. Instead of using `push_back`, the code now uses `emplace_back`. This change improves performance and ensures proper object construction. Signed-off-by: Taekjin LEE <[email protected]> * refactor: bring back for loop skim and output_msg filling Signed-off-by: Taekjin LEE <[email protected]> * chore: refactor code to handle empty input ROIs in traffic_light_classifier_node.cpp Signed-off-by: Taekjin LEE <[email protected]> * refactor: using index instead of vector length Signed-off-by: Taekjin LEE <[email protected]> --------- Signed-off-by: Taekjin LEE <[email protected]> Signed-off-by: xtk8532704 <[email protected]>
Description
Even the previous fix #7461, similar issue has occurred.
Overall process were reviewed with consideration of zero-size roi and empty roi input.
Tests performed
Tested on a local recompute environment and TIER IV INTERNAL cloud test
Data:TIER IV INTERNAL
Effects on system behavior
Not applicable.
Interface changes
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.