Skip to content
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

feat(image_projection_based_fusion): add objects filter by rois #4546

Merged
merged 17 commits into from
Aug 9, 2023

Conversation

yukke42
Copy link
Contributor

@yukke42 yukke42 commented Aug 7, 2023

Description

summary

  • change passthrough_lower_bound_probability_threshold can be used for each class
  • add this pakcage after centerpoint or pointpainting to filter false positives, especially for pedestrian.

including #4057

behavior

  • bounding box on image
    • blue ... projected DetectedObjects from centerpoint
    • red ... RoIs from YOLOX
  • bounding box on bev
    • blue ... output objects from this package
    • yellow ... false positives filtered out by this package

to show an image on screenshot, please change debug_mode=true on roi_detected_object_fusion.launch.xml

image

trust_distances

If the distance of obejct is greater than the threshold (50.0m for pedestrian), it's not discared by this package.

In the screenshot below, a pedestrian is filtered by this pacakge since YOLOX can not detect it even though pointpainting can detect it correctly. After adding trust distance, it cloud be output correctly from this package.

image

Related links

Tests performed

Notes for reviewers

Interface changes

Effects on system behavior

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Summary by CodeRabbit

Release Notes:

  • New Feature: Modified the signature of generateDetectedObjectRoIs and fuseObjectsOnImage functions to accept a DetectedObjects message instead of a vector of DetectedObject objects.
  • New Feature: Added a new member variable can_assign_matrix of type Eigen::MatrixXi.
  • New Feature: Modified member variables passthrough_object_flags_, fused_object_flags_, and ignored_object_flags_ to be maps with int64_t keys instead of vectors.
  • New Feature: Added a new argument param_path with a default value to the launch file.
  • New Feature: Included several new parameters for rois, camera info, and images in the launch file.
  • New Feature: The roi_detected_object_fusion_node now reads parameters from the launch file.
  • New Feature: Set the debug_mode parameter to true by default.
  • Chore: Added a new dependency on object_recognition_utils in the package manifest file.

"With new signatures and maps so grand,
Parameters and dependencies expand.
Launch files read, debug mode set,
A fusion of features, no regrets."

@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Aug 7, 2023
@yukke42 yukke42 changed the title Add object filter feat(image_projection_based_fusion): add objects filter by rois Aug 7, 2023
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Image description CodeRabbit

Walkthrough

The changes include modifications to the node.hpp file in the image_projection_based_fusion package, where the signature of two functions has been modified to accept a new message type. Additionally, new member variables have been added and existing ones have been modified to use maps instead of vectors. The launch/roi_detected_object_fusion.launch.xml file now includes new parameters and a default value for an argument. It also sets the debug_mode parameter to true by default. Finally, the package.xml file adds a new dependency on object_recognition_utils.

Changes

File Summary
perception/image_projection_based_fusion/include/image_projection_based_fusion/roi_detected_object_fusion/node.hpp - Added #include for a new message type.
- Modified function signatures to accept a DetectedObjects message instead of a vector of DetectedObject objects.
- Added a new member variable can_assign_matrix of type Eigen::MatrixXi.
- Modified member variables to be maps with int64_t keys instead of vectors.
perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml - Added a new argument param_path with a default value.
- Included several new parameters for rois, camera info, and images.
- Modified the roi_detected_object_fusion_node to read these parameters from the launch file.
- Set the debug_mode parameter to true by default.
perception/image_projection_based_fusion/package.xml - Added a new dependency on object_recognition_utils.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 9ad6493 and d2dffe6 commits.
Files selected (4)
  • perception/image_projection_based_fusion/include/image_projection_based_fusion/roi_detected_object_fusion/node.hpp (3)
  • perception/image_projection_based_fusion/launch/roi_detected_object_fusion.launch.xml (2)
  • perception/image_projection_based_fusion/package.xml (1)
  • perception/image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp (10)
Files ignored due to filter (1)
  • perception/image_projection_based_fusion/config/roi_detected_object_fusion.param.yaml
Files not summarized due to errors (1)
  • perception/image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp (diff tokens exceeds limit)
Files skipped from review due to trivial changes (1)
  • perception/image_projection_based_fusion/package.xml
Review comments generated (10)
  • Review: 9
  • LGTM: 1

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@yukke42 yukke42 marked this pull request as ready for review August 8, 2023 02:50
@yukke42 yukke42 requested a review from yukkysaito as a code owner August 8, 2023 02:50
@yukke42
Copy link
Contributor Author

yukke42 commented Aug 8, 2023

I want to merge PR ASAP, so it's opened now. But I need to tune params.
This PR conflicts with main branch because it depends on #4057.

@yukke42 yukke42 requested a review from tzhong518 August 8, 2023 02:51
@yukke42 yukke42 requested review from miursh and YoshiRi as code owners August 8, 2023 02:59
@github-actions github-actions bot added component:launch Launch files, scripts and initialization tools. (auto-assigned) type:documentation Creating or refining documentation. (auto-assigned) labels Aug 8, 2023
@yukke42 yukke42 force-pushed the add-object-filter branch from b7ceaae to db6fcb6 Compare August 8, 2023 04:15
Copy link
Contributor

@miursh miursh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miursh miursh added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 8, 2023
yukke42 and others added 8 commits August 9, 2023 04:18
Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

style(pre-commit): autofix

update

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

style(pre-commit): autofix
Signed-off-by: yukke42 <yukke42@users.noreply.github.com>
Signed-off-by: yukke42 <yukke42@users.noreply.github.com>
Signed-off-by: yukke42 <yukke42@users.noreply.github.com>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
@yukke42 yukke42 force-pushed the add-object-filter branch from 2d8cb9d to dbb6058 Compare August 8, 2023 19:19
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
@yukke42 yukke42 force-pushed the add-object-filter branch from c2eef28 to e27c1a8 Compare August 8, 2023 19:22
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.05% ⚠️

Comparison is base (7502305) 14.81% compared to head (4d68604) 14.76%.
Report is 7 commits behind head on main.

❗ Current head 4d68604 differs from pull request most recent head a5b84aa. Consider uploading reports for the commit a5b84aa to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4546      +/-   ##
==========================================
- Coverage   14.81%   14.76%   -0.05%     
==========================================
  Files        1527     1532       +5     
  Lines      105671   105973     +302     
  Branches    32100    32100              
==========================================
- Hits        15650    15649       -1     
- Misses      72943    73245     +302     
- Partials    17078    17079       +1     
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 14.81% <ø> (+<0.01%) ⬆️ Carriedforward from a4dec61

*This pull request uses carry forward flags. Click here to find out more.

Files Changed Coverage Δ
...n_based_fusion/roi_detected_object_fusion/node.hpp 0.00% <ø> (ø)
...sed_fusion/src/roi_detected_object_fusion/node.cpp 0.00% <0.00%> (ø)

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
yukke42 and others added 3 commits August 9, 2023 16:51
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
@yukke42
Copy link
Contributor Author

yukke42 commented Aug 9, 2023

I have added thrust_distance and updated description.

yukke42 and others added 2 commits August 9, 2023 19:49
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
…bject_fusion.param.yaml

Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>
Copy link
Contributor

@miursh miursh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@yukkysaito yukkysaito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yukke42 yukke42 merged commit 9a2e27e into autowarefoundation:main Aug 9, 2023
@yukke42 yukke42 deleted the add-object-filter branch August 9, 2023 14:27
yukke42 added a commit to tier4/autoware.universe that referenced this pull request Aug 9, 2023
…warefoundation#4546)

* tmp

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

style(pre-commit): autofix

update

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

style(pre-commit): autofix

* fix: fix association bug

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

* feat: add prob_threshold for each class

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

* feat: use class label association between roi and object

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

* feat: add to tier4_perception_launch

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* chore: disable debug_mode

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* docs: update params

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* fix: apply suggestion

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* chore: update prob_thresholds of bicycle

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* feat: add thresut_distance for each class

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* docs: add thrust_distances

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* style(pre-commit): autofix

* chore: remove unnecessary variable

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* chore: rename to trust

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* style(pre-commit): autofix

* chore: add param

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* Update perception/image_projection_based_fusion/config/roi_detected_object_fusion.param.yaml

Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>

---------

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>
LeoDriveProject pushed a commit to leo-drive/autoware.universe.golf that referenced this pull request Aug 16, 2023
…warefoundation#4546)

* tmp

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

style(pre-commit): autofix

update

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

style(pre-commit): autofix

* fix: fix association bug

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

* feat: add prob_threshold for each class

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

* feat: use class label association between roi and object

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>

* feat: add to tier4_perception_launch

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* chore: disable debug_mode

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* docs: update params

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* fix: apply suggestion

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* chore: update prob_thresholds of bicycle

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* feat: add thresut_distance for each class

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* docs: add thrust_distances

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* style(pre-commit): autofix

* chore: remove unnecessary variable

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* chore: rename to trust

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* style(pre-commit): autofix

* chore: add param

Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>

* Update perception/image_projection_based_fusion/config/roi_detected_object_fusion.param.yaml

Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>

---------

Signed-off-by: yukke42 <yukke42@users.noreply.github.com>
Signed-off-by: yukke42 <yusuke.muramatsu@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:launch Launch files, scripts and initialization tools. (auto-assigned) component:perception Advanced sensor data processing and environment understanding. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants