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

Investigate lidar_apollo_segmentation_tvm detection quality #1988

Closed
6 tasks done
ambroise-arm opened this issue Sep 29, 2022 · 8 comments · Fixed by #2185
Closed
6 tasks done

Investigate lidar_apollo_segmentation_tvm detection quality #1988

ambroise-arm opened this issue Sep 29, 2022 · 8 comments · Fixed by #2185
Assignees
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) type:new-feature New functionalities or additions, feature requests.

Comments

@ambroise-arm
Copy link
Contributor

ambroise-arm commented Sep 29, 2022

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

Description

I have tested the TVM package replacing the TRT package in the rosbag demo as part of the PR: #1181 (comment). And the quality of the detection wasn't as good as the detection from the TRT package, at least visually. Some cars were not detected, the lines and circles which indicate the velocity (or planned trajectory, I'm not sure) were wrong, at least on parked vehicles. And the type of detected vehicles might be wrong, it would need to be checked.

Purpose

Get the detection quality of the TVM package on par with the TRT package.

Possible approaches

There are multiple possible causes for the difference:

  • The TVM version of the package is derived from an old version from TierIV; I expect the TRT version in this repository is more recent
  • The neural network may have been updated since then; trained differently/better
  • The port may have introduced issues/bugs
  • The parameters may not be correct or not all there

Definition of done

  • confirm and document the issue
  • find the cause(s)
  • update the lidar_apollo_segmentation_tvm* packages and/or the neural network in use, depending on what is necessary
@ambroise-arm ambroise-arm added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Sep 29, 2022
@BonoloAWF BonoloAWF added the type:new-feature New functionalities or additions, feature requests. label Sep 30, 2022
@angry-crab angry-crab self-assigned this Oct 11, 2022
@angry-crab
Copy link
Contributor

#1880 has to be merge first.

@angry-crab
Copy link
Contributor

angry-crab commented Oct 17, 2022

err
err_2

Issue confirmed. There are quite a lot of false positive detections. This is the output of detected_object_feature_remover. And it seems that all of the objects are removed by other filters.

@angry-crab
Copy link
Contributor

angry-crab commented Oct 17, 2022

According to @yukkysaito san, the weights have been update.
@ambroise-arm I see that the current pipeline only supports onnx files. However, lidar_apollo_segmentation is using caffe model. Are we planning to support other types of model in the future? Or shall we convert it to onnx format?

@angry-crab
Copy link
Contributor

Converting to onnx format seems better since caffe operations are not fully supported and will probably be removed in the near future.
https://discuss.tvm.apache.org/t/caffe2-frontend-support-is-being-dropped-to-unblock-pytorch-update/12442

@ambroise-arm
Copy link
Contributor Author

@angry-crab I don't think the Autoware pipeline for tvm only supports onnx, and other formats could be used. It is really down to what TVM supports. If caffe support is dropped in TVM, then I agree that it can't be used as is and needs to be converted.

@angry-crab
Copy link
Contributor

To convert caffe models into onnx, this might be a good choise.
https://hub.docker.com/_/microsoft-windowscamerateam-onnxconverter

@ambroise-arm
Copy link
Contributor Author

I couldn't convert the current caffemodel files with the microsoft tool, it complains about the "Slice" layer.
I've also tried to use small tools like https://github.com/asiryan/caffe2onnx, which clains to support "Slice", but there is a "Silence" layer in the network that isn't supported.

@angry-crab
Copy link
Contributor

angry-crab commented Oct 31, 2022

I couldn't convert the current caffemodel files with the microsoft tool, it complains about the "Slice" layer. I've also tried to use small tools like https://github.com/asiryan/caffe2onnx, which clains to support "Slice", but there is a "Silence" layer in the network that isn't supported.

apollo

apollo_tvm_2

I got it work using the converted model. It looks good. caffemodel file contains weights while prototxt file describes the structure of network, which does not have Slice and Silence layers.

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) type:new-feature New functionalities or additions, feature requests.
Projects
None yet
3 participants