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

Implementing BEVDet in Autoware #4635

Open
6 of 7 tasks
cyn-liu opened this issue Apr 18, 2024 · 9 comments · May be fixed by autowarefoundation/autoware.universe#7956
Open
6 of 7 tasks

Implementing BEVDet in Autoware #4635

cyn-liu opened this issue Apr 18, 2024 · 9 comments · May be fixed by autowarefoundation/autoware.universe#7956
Assignees
Labels
component:calibration Calibration of sensors and hardware. component:perception Advanced sensor data processing and environment understanding. component:sensing Data acquisition from sensors, drivers, preprocessing.

Comments

@cyn-liu
Copy link

cyn-liu commented Apr 18, 2024

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

BEVDet is a BEV perception algorithm based on panoramic cameras. It unifies multi-view images into the perspective of BEV for 3D object detection task. It is different from the current 3D perception feature of Autoware.
BEVDet code repos

Purpose

Integrating BEVDet into Autoware for 3D object detection based on multi-view images, this task related to Sensing& Perception task.

Possible approaches

BEVDet is a 3D object detection model trained on NuScenes dataset using 6 surround view camera images. The 6 cameras form a 360 degree field of view with overlapping fields of view. When mapping from 2D to 3D, some parameters are required, including camera intrinsic parameters and extrinsic parameters between each camera and ego.
Integrating BEVDet into Autoware involves the placement of 6 cameras and calibration. Convert BEVDet model into ONNX format for deployment in Autoware.

Definition of done

  • The placement of 6 cameras and calibration
  • Convert BEVDet model into ONNX format
  • Deploying BEVDet model on device using TensorRT
  • BEVDet output result adaptation to Autoware topics
@cyn-liu cyn-liu added component:calibration Calibration of sensors and hardware. component:perception Advanced sensor data processing and environment understanding. component:sensing Data acquisition from sensors, drivers, preprocessing. labels Apr 18, 2024
@liuXinGangChina
Copy link

Great,maybe you can make a todo task list first and see what others can take part in

@cyn-liu
Copy link
Author

cyn-liu commented May 21, 2024

We refer to this project and successfully ran it on our own machine.
We use RTX3080 GPU and Trt FP16 inference BEVDet-R50-4DLongterm-Depth model. The mAP and inference speed of BEVDet-R50-4DLongterm-Depth TensorRT version can refer this project link.
The following is the running results on our machine:

v1.mp4

The following is the inference speed on our machine:

v2.mp4

Next, we will modify ROS1 node to ROS2 node based on this project, then, we will use TIER IV's dataset for testing, and we hope that this dataset can provide ROS2 bag format.

Our plan of integrate the BEVDet ROS2 node into Autoware:

  1. define a bevdet_node in Autoware perception module
  2. organize the 3D boxes results into autoware_perception_msgs::msg::DetectedObjects type
  3. input the output result of bevdet_node into the object_merger node and fuse it with the detection results of other models

@cyn-liu
Copy link
Author

cyn-liu commented May 29, 2024

Environment:
CUDA11.3.1
cudnn- linux-x86_64-8.8.1.3_cuda11
TensorRT-8.5.1.7.Linux.x86_64-gnu

@liuXinGangChina
Copy link

Maybe try with AWSIM data

@liuXinGangChina
Copy link

list the cuda env here

@cyn-liu
Copy link
Author

cyn-liu commented Jul 3, 2024

Using the BEVDet model to infer the TIER4 dataset, it was found that the model had poor generalization performance on the TIER4 dataset.

Visualization results on TIER4 data:

(1)
concat_img

tier4_1_bevdet

(2)
concat_img

tier4_2_bevdet

Visualization results on NuScenes data:

concat_img
nusbevdet

@liuXinGangChina
Copy link

Looks like the original pre-trian(based on nuScenes dataset) model‘s generalization on tire4 dataset is not as well as we expected. Obstacles's direction is almost right but the depth of them ge

we plan to close this task once we have the node tested. And creat a new task of "retrain the model" to see whether the new model’s performance on tire4 dataset increase.

@cyn-liu
Copy link
Author

cyn-liu commented Jul 11, 2024

Our plan of integrate the BEVDet ROS2 node into Autoware:

  1. define a bevdet_node in Autoware perception module
  2. organize the 3D boxes results into autoware_perception_msgs::msg::DetectedObjects type
  3. input the output result of bevdet_node into the object_merger node and fuse it with the detection results of other models

Considering that running the BEV 3D detection algorithm based on multi-cameras and the Lidar based 3D detection algorithm simultaneously is too heavy a load. we have decided not to merge the results of BEVDet with the output results of Lidar, but to create a new perception_mode, when perception_mode = camera, launch bevdet_node.

@cyn-liu
Copy link
Author

cyn-liu commented Jul 22, 2024

@xmfcx The PR related this issue has been successfully tested in the newer Autoware docker image.
The environment information of this image:

CUDA==12.3
libnvinfer==8.6.1.6

Note: Outside in docker, I must upgrade to my nvidia GPU driver version to ensure that this driver supports a maximum CUDA version >= 12.3.
nvidia-driver-version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:calibration Calibration of sensors and hardware. component:perception Advanced sensor data processing and environment understanding. component:sensing Data acquisition from sensors, drivers, preprocessing.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants