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 image segmentation_pointcloud_fusion for pointcloud filter #5562

Merged

Conversation

badai-nguyen
Copy link
Contributor

@badai-nguyen badai-nguyen commented Nov 13, 2023

Description

This PR to add a fusion node of pointcloud with image segmentation mask which is output from some kind of 2D detection model such as model to be added by #5553.
The fusion result could be used to filter the unnecessary pointcloud for autonomous driving which is discussed at #5594

One of the idea for node use
image

Related links

TIER IV INTERNAL LINK

Tests performed

Testing filter using front camera semantic segmentation:

  • Green pointcloud (input): /perception/object_recognition/detection/pointcloud_map_filtered/pointcloud
  • Pink pointcloud (output): /perception/object_recognition/detection/image_segmentation_filtered/pointcloud (note that it also covers the input green pointcloud)
semantic_segmentation_based_filter_01d060d9-8d25-45e0-b45e-9fd7201ac27b_2023-05-26-11-18-34_p0900_0_.webm

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.

@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) labels Nov 13, 2023
@badai-nguyen badai-nguyen added the tag:deploy-docs Mark for deploy-docs action generation. (used-by-ci) label Nov 21, 2023
@badai-nguyen badai-nguyen marked this pull request as ready for review November 21, 2023 02:36
@yukkysaito
Copy link
Contributor

Can you share the video and debugging screen with us?

Signed-off-by: badai-nguyen <[email protected]>
@badai-nguyen
Copy link
Contributor Author

Can you share the video and debugging screen with us?

@yukkysaito I have added the debug video in test performed. could you please check it.

Signed-off-by: badai-nguyen <[email protected]>
@yukkysaito
Copy link
Contributor

yukkysaito commented Nov 22, 2023

Good 👍
Does this launch by default?

@badai-nguyen
Copy link
Contributor Author

badai-nguyen commented Nov 22, 2023

Does this launch by default?

@yukkysaito Not yet.
image

Since the yolox-s semseg header was trained only on public dataset and need more time for the further improvement so I would to keep this new feature out of default. I hope can merge this feature so we can test autoware for some specific enviroments or weather condition and see how good it works first.

@github-actions github-actions bot removed the component:launch Launch files, scripts and initialization tools. (auto-assigned) label Dec 26, 2023
@badai-nguyen
Copy link
Contributor Author

@yukkysaito As I dicussed with @miursh, since the semseg yolox model is still being improved by @dan-dnn, so I would like to merge the image_pointcloud fusion node first as preparation. The pointcloud filter and perception pipeline change will be considered and updated later when the semseg yolox is ready.
I removed the change of tier4_perception_launch from this PR so could you review this again?

@badai-nguyen badai-nguyen added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 26, 2023
Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Attention: 67 lines in your changes are missing coverage. Please review.

Comparison is base (1d6e7e8) 15.28% compared to head (ef36ead) 15.28%.
Report is 66 commits behind head on main.

Files Patch % Lines
...fusion/src/segmentation_pointcloud_fusion/node.cpp 0.00% 52 Missing ⚠️
.../image_projection_based_fusion/src/fusion_node.cpp 0.00% 12 Missing ⚠️
...ction_based_fusion/src/roi_cluster_fusion/node.cpp 0.00% 1 Missing ⚠️
...sed_fusion/src/roi_detected_object_fusion/node.cpp 0.00% 1 Missing ⚠️
...on_based_fusion/src/roi_pointcloud_fusion/node.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5562      +/-   ##
==========================================
- Coverage   15.28%   15.28%   -0.01%     
==========================================
  Files        1750     1751       +1     
  Lines      120568   120620      +52     
  Branches    36781    36781              
==========================================
  Hits        18434    18434              
- Misses      81469    81521      +52     
  Partials    20665    20665              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 15.29% <ø> (+<0.01%) ⬆️ Carriedforward from 4c0f353

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

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

Copy link
Contributor

@YoshiRi YoshiRi left a comment

Choose a reason for hiding this comment

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

LGTM in code grammar, but I did not check if it works in real data.

}
}

pcl::toROSMsg(output_cloud, output_pointcloud_msg);
Copy link
Contributor

Choose a reason for hiding this comment

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

[imo]
Just some comments; not required to change now.
Since we don't use the PCL method, is it possible not to use PCL?
Converting ROS messages to PCL (and vice versa) incurs a significant computational cost, so we should try to avoid it.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can access each point in directly ros message like this.

- The pointclouds are projected onto the semantic/instance segmentation mask image which is the output from 2D segmentation neural network.
- The pointclouds are belong to segment such as road, sidewalk, building, vegetation, sky ... are considered as less important points for autonomous driving and could be removed.

![segmentation_pointcloud_fusion_image](./images/segmentation_pointcloud_fusion.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

[Q]
The image file has not been committed?

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 with a few comments

@miursh miursh enabled auto-merge (squash) January 9, 2024 16:46
@miursh miursh merged commit 39e9acc into autowarefoundation:main Jan 9, 2024
26 of 31 checks passed
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 26, 2024
…d_fusion for pointcloud filter (autowarefoundation#5562)

* fix: roiCallback for Image

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter bugfix

Signed-off-by: badai-nguyen <[email protected]>

* fix: segmentation poincloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: add option in launch file

Signed-off-by: badai-nguyen <[email protected]>

* chore: refactor

Signed-off-by: badai-nguyen <[email protected]>

* docs: update docs

Signed-off-by: badai-nguyen <[email protected]>

* fix: roi_pointcloud_fusion with new template

Signed-off-by: badai-nguyen <[email protected]>

* fix: add param of selectable semantic id

Signed-off-by: badai-nguyen <[email protected]>

* chore: typo

Signed-off-by: badai-nguyen <[email protected]>

* fix: launch file

Signed-off-by: badai-nguyen <[email protected]>

* Revert "fix: launch file"

This reverts commit 5dfa160.

* fix: reverse perception launcher

Signed-off-by: badai-nguyen <[email protected]>

* style(pre-commit): autofix

* Update perception/image_projection_based_fusion/src/segmentation_pointcloud_fusion/node.cpp

Co-authored-by: Yoshi Ri <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: badai-nguyen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yoshi Ri <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…d_fusion for pointcloud filter (autowarefoundation#5562)

* fix: roiCallback for Image

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter bugfix

Signed-off-by: badai-nguyen <[email protected]>

* fix: segmentation poincloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: add option in launch file

Signed-off-by: badai-nguyen <[email protected]>

* chore: refactor

Signed-off-by: badai-nguyen <[email protected]>

* docs: update docs

Signed-off-by: badai-nguyen <[email protected]>

* fix: roi_pointcloud_fusion with new template

Signed-off-by: badai-nguyen <[email protected]>

* fix: add param of selectable semantic id

Signed-off-by: badai-nguyen <[email protected]>

* chore: typo

Signed-off-by: badai-nguyen <[email protected]>

* fix: launch file

Signed-off-by: badai-nguyen <[email protected]>

* Revert "fix: launch file"

This reverts commit 5dfa160.

* fix: reverse perception launcher

Signed-off-by: badai-nguyen <[email protected]>

* style(pre-commit): autofix

* Update perception/image_projection_based_fusion/src/segmentation_pointcloud_fusion/node.cpp

Co-authored-by: Yoshi Ri <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: badai-nguyen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yoshi Ri <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…d_fusion for pointcloud filter (autowarefoundation#5562)

* fix: roiCallback for Image

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter bugfix

Signed-off-by: badai-nguyen <[email protected]>

* fix: segmentation poincloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: add option in launch file

Signed-off-by: badai-nguyen <[email protected]>

* chore: refactor

Signed-off-by: badai-nguyen <[email protected]>

* docs: update docs

Signed-off-by: badai-nguyen <[email protected]>

* fix: roi_pointcloud_fusion with new template

Signed-off-by: badai-nguyen <[email protected]>

* fix: add param of selectable semantic id

Signed-off-by: badai-nguyen <[email protected]>

* chore: typo

Signed-off-by: badai-nguyen <[email protected]>

* fix: launch file

Signed-off-by: badai-nguyen <[email protected]>

* Revert "fix: launch file"

This reverts commit 5dfa160.

* fix: reverse perception launcher

Signed-off-by: badai-nguyen <[email protected]>

* style(pre-commit): autofix

* Update perception/image_projection_based_fusion/src/segmentation_pointcloud_fusion/node.cpp

Co-authored-by: Yoshi Ri <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: badai-nguyen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yoshi Ri <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…d_fusion for pointcloud filter (autowarefoundation#5562)

* fix: roiCallback for Image

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: pointcloud filter bugfix

Signed-off-by: badai-nguyen <[email protected]>

* fix: segmentation poincloud filter

Signed-off-by: badai-nguyen <[email protected]>

* fix: add option in launch file

Signed-off-by: badai-nguyen <[email protected]>

* chore: refactor

Signed-off-by: badai-nguyen <[email protected]>

* docs: update docs

Signed-off-by: badai-nguyen <[email protected]>

* fix: roi_pointcloud_fusion with new template

Signed-off-by: badai-nguyen <[email protected]>

* fix: add param of selectable semantic id

Signed-off-by: badai-nguyen <[email protected]>

* chore: typo

Signed-off-by: badai-nguyen <[email protected]>

* fix: launch file

Signed-off-by: badai-nguyen <[email protected]>

* Revert "fix: launch file"

This reverts commit 5dfa160.

* fix: reverse perception launcher

Signed-off-by: badai-nguyen <[email protected]>

* style(pre-commit): autofix

* Update perception/image_projection_based_fusion/src/segmentation_pointcloud_fusion/node.cpp

Co-authored-by: Yoshi Ri <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: badai-nguyen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yoshi Ri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:deploy-docs Mark for deploy-docs action generation. (used-by-ci) tag: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
Development

Successfully merging this pull request may close these issues.

4 participants