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(traffic_light_classifier): update classifier model #2820

Merged
merged 11 commits into from
Feb 16, 2023

Conversation

wep21
Copy link
Contributor

@wep21 wep21 commented Feb 6, 2023

Description

Related links

Tests performed

Notes for reviewers

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.

@wep21 wep21 requested review from yukkysaito and a team as code owners February 6, 2023 21:42
@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Feb 6, 2023
@wep21
Copy link
Contributor Author

wep21 commented Feb 6, 2023

new model

ros2 run traffic_light_classifier single_image_debug_inference --ros-args -p image_path:=/home/daisuke/Downloads/sample.jpg -p classifier_type:=1 -p label_file_path:=/home/daisuke/Downloads/lamp_labels.txt -p model_file_path:=/home/daisuke/Downloads/end2end.onnx -p input_name:=input -p output_name:=output

image

@wep21
Copy link
Contributor Author

wep21 commented Feb 6, 2023

old model

ros2 run traffic_light_classifier single_image_debug_inference --ros-args -p image_path:=/home/daisuke/Downloads/sample.jpg -p classifier_type:=1 -p label_file_path:=src/universe/autoware.universe/perception/traffic_light_classifier/data/lamp_labels.txt -p model_file_path:=src/universe/autoware.universe/perception/traffic_light_classifier/data/traffic_light_classifier_mobilenetv2.onnx -p input_name:=input_0 -p output_name:=output_0 -p apply_softmax:=true

image

@wep21 wep21 force-pushed the feature/update-tlr-classifier branch 2 times, most recently from a0d54e0 to ae132b4 Compare February 6, 2023 21:50
@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Base: 11.79% // Head: 11.79% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (05227b8) compared to base (476afcb).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2820   +/-   ##
=======================================
  Coverage   11.79%   11.79%           
=======================================
  Files        1320     1320           
  Lines       92373    92366    -7     
  Branches    24794    24794           
=======================================
  Hits        10899    10899           
+ Misses      70115    70108    -7     
  Partials    11359    11359           
Flag Coverage Δ *Carryforward flag
differential 0.00% <ø> (?)
total 11.79% <ø> (+<0.01%) ⬆️ Carriedforward from 658b434

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

Impacted Files Coverage Δ
...nclude/traffic_light_classifier/cnn_classifier.hpp 0.00% <ø> (ø)
...on/traffic_light_classifier/src/cnn_classifier.cpp 0.00% <ø> (ø)
...tion/traffic_light_classifier/utils/trt_common.cpp 0.00% <ø> (ø)
...tion/traffic_light_classifier/utils/trt_common.hpp 0.00% <ø> (ø)
...erception/traffic_light_classifier/src/nodelet.cpp 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@xmfcx xmfcx requested a review from kaancolak February 7, 2023 08:58
@wep21 wep21 force-pushed the feature/update-tlr-classifier branch from eb91252 to b748a82 Compare February 7, 2023 10:56
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
please get approval from @xmfcx @kaancolak

@wep21
Copy link
Contributor Author

wep21 commented Feb 8, 2023

I added some fixes to support arrow signals.
image

@wep21
Copy link
Contributor Author

wep21 commented Feb 14, 2023

@xmfcx @kaancolak friendly ping

Copy link
Contributor

@kaancolak kaancolak left a comment

Choose a reason for hiding this comment

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

Hi Daisuke-san, sorry for the delay. LGTM, I just left a simple comment.

@@ -39,10 +39,13 @@ CNNClassifier::CNNClassifier(rclcpp::Node * node_ptr) : node_ptr_(node_ptr)
input_c_ = node_ptr_->declare_parameter("input_c", 3);
input_h_ = node_ptr_->declare_parameter("input_h", 224);
input_w_ = node_ptr_->declare_parameter("input_w", 224);
auto input_name = node_ptr_->declare_parameter("input_name", "input_0");
auto output_name = node_ptr_->declare_parameter("output_name", "output_0");
apply_softmax_ = node_ptr_->declare_parameter("apply_softmax", false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be helpful to also declare std and mean here? for people who use their custom-trained models

like this Pr : #2794

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think so. We can merge the PR after merging this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, ı would like to add, really loved this single inference debug tool, really useful for users, thanks for it :)

wep21 added 8 commits February 16, 2023 22:28
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
wep21 added 2 commits February 16, 2023 22:28
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
@wep21 wep21 force-pushed the feature/update-tlr-classifier branch from b484e97 to 658b434 Compare February 16, 2023 13:28
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
@wep21 wep21 force-pushed the feature/update-tlr-classifier branch from 3234900 to 05227b8 Compare February 16, 2023 14:11
@wep21 wep21 enabled auto-merge (squash) February 16, 2023 14:15
@wep21 wep21 merged commit 0dc2247 into main Feb 16, 2023
@wep21 wep21 deleted the feature/update-tlr-classifier branch February 16, 2023 14:22
nabetetsu pushed a commit to xygyo77/autoware.universe that referenced this pull request Mar 1, 2023
…dation#2820)

* feat: update traffic light classifier

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* remove unused file

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* remove unused header

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* add variable to apply softmax

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* update visualization

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* apply pre-commit

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* add debug term

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* change default parameter

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* fix debug node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* change default node name

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* change default

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

---------

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
1222-takeshi pushed a commit to 1222-takeshi/autoware.universe that referenced this pull request Mar 6, 2023
…dation#2820)

* feat: update traffic light classifier

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* remove unused file

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* remove unused header

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* add variable to apply softmax

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* update visualization

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* apply pre-commit

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* add debug term

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* change default parameter

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* fix debug node

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* change default node name

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* change default

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

---------

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants