UniAD icon indicating copy to clipboard operation
UniAD copied to clipboard

map-related rot question

Open lsrrrrrrrrr opened this issue 1 year ago • 1 comments

Thanks for this great work. I am wonder the following reasons for the above flip and rotation in projects/mmdet3d_plugin/datasets/nuscenes_e2e_dataset.py , why these tranforms are needed:

Question 1: semantic_masks, instance_masks, forward_masks, backward_masks = preprocess_map(vectors, self.patch_size, self.canvas_size, self.map_num_classes, self.thickness, self.angle_class) instance_masks = np.rot90(instance_masks, k=-1, axes=(1, 2))

map_mask = obtain_map_info(self.nusc, self.nusc_maps, info, patch_size=self.patch_size, canvas_size=self.canvas_size, layer_names=['lane_divider', 'road_divider']) map_mask = np.flip(map_mask, axis=1) map_mask = np.rot90(map_mask, k=-1, axes=(1, 2)) map_mask = torch.tensor(map_mask.copy())

lsrrrrrrrrr avatar Oct 13 '23 12:10 lsrrrrrrrrr

I was also puzzled with these codes. I think these are required because of mistakes in other codes. Such as, they use ego2global pose to retrieve map vectors, then they need the first np.rot90, but actually here requires lidar2global pose; there is a useless transpose in obtain_map_info, which then requires np.flip and np.rot90 to transpose back....

fishmarch avatar Jun 14 '24 07:06 fishmarch