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

Add support for multi-modal NuScenes Detection #1339

Merged
merged 9 commits into from
May 13, 2023

Conversation

chenshi3
Copy link
Contributor

@chenshi3 chenshi3 commented May 9, 2023

Hi,

I'm submitting a pull request to add support for multi-modal detection on the NuScenes dataset. This PR consists of four main components:
(1) Support for the TransFusion-Lidar head.
(2) Implementation of the fade strategy, which disables data augmentations in the last several epochs during training.
(3) Support for the multi-modal NuScenes dataset, including data processing and dataset usage.
(4) Introduction of the multi-modal detector BEVFusion, including support for image backbones, LSS Transform, and Bev pooling.

Best regards,
Chen Shi

@@ -23,6 +24,18 @@ def __init__(self, root_path, augmentor_configs, class_names, logger=None):
cur_augmentor = getattr(self, cur_cfg.NAME)(config=cur_cfg)
self.data_augmentor_queue.append(cur_augmentor)

def disableAugmentation(self, augmentor_configs):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I will be better to use disable_augmentation as the function name to keep the naming style consistent along pcdet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will adjust the function name.

@@ -130,6 +131,30 @@ def __getitem__(self, index):
"""
raise NotImplementedError

def set_lidar_aug_matrix(self, data_dict):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it will be better to move this function to data_augmentor.py and call it after forward all data augmentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function set_lidar_aug_matrix needs to be called during testing and identity matrix is generated, so it may not be appropriate to move it data_augmentor.py.

@@ -137,6 +181,60 @@ def __getitem__(self, index):
'gt_names': info['gt_names'] if mask is None else info['gt_names'][mask],
'gt_boxes': info['gt_boxes'] if mask is None else info['gt_boxes'][mask]
})
if self.use_camera:
Copy link
Collaborator

Choose a reason for hiding this comment

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

It will be better to add a new function to include all following added codes. I think this will make __getitem__ easier to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will define a function called load_camera_info to include these codes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Get it. Thanks a lot for your contribution. I think after the following adjustment, we can merge this PR. I will make sure with shaoshuai @sshaoshuai.

@jihanyang
Copy link
Collaborator

Great. @sshaoshuai will have a final check and then merge it.

Copy link
Collaborator

@sshaoshuai sshaoshuai left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@sshaoshuai sshaoshuai merged commit 02ac3e1 into open-mmlab:master May 13, 2023
@Galaxy-ZRX
Copy link

Hi @chenshi3 , thank you very much for your work on supporting TransFusion! May I ask if it's possible to train TransFusion-Lidar model with earlier version of pcdet? Could you please give me some hints on how should I change the related codes? (I am not sure if it's enough to just add the transfusion-lidar head and other model-related codes, or should I also modify other parts to support it?)

@lacie-life
Copy link

Hi @chenshi3, thank you very much for your contribution. However, I have a question about the data augmentation. In the config file, rotation and scale augmentations are applied to the point cloud. However, this augmentation alone has nothing to do with the image being augmented in the next step. Can you explain this? Does it affect the efficiency of the model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants