Skip to content

Commit

Permalink
update to support different roi_size(perception range)
Browse files Browse the repository at this point in the history
  • Loading branch information
woodfrog committed May 15, 2024
1 parent 4f19829 commit d3077ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 2 additions & 3 deletions plugin/datasets/map_utils/av2map_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ def get_map_geom(self,
log_id: str,
e2g_translation: NDArray,
e2g_rotation: NDArray,
pc_range=[-30.0, -15.0, -5.0, 30.0, 15.0, 3.0],
polygon_ped=True) -> Dict[str, List[Union[LineString, Polygon]]]:
''' Extract geometries given `log_id` and ego pose.
Expand All @@ -410,8 +409,8 @@ def get_map_geom(self,

avm = self.id2map[log_id]

patch_h = pc_range[4]-pc_range[1]
patch_w = pc_range[3]-pc_range[0]
patch_h = self.roi_size[1]
patch_w = self.roi_size[0]
patch_size = (patch_h, patch_w)
map_pose = e2g_translation[:2]
rotation = Quaternion._from_matrix(e2g_rotation)
Expand Down
8 changes: 7 additions & 1 deletion tools/tracking/calculate_cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,13 @@ def main():
roi_size = torch.tensor(cfg.roi_size).numpy()
origin = torch.tensor(cfg.pc_range[:2]).numpy()

thresholds_list = [0.5,1.0,1.5]
if roi_size[0] == 60:
thresholds_list = [0.5,1.0,1.5]
elif roi_size[0] == 100:
thresholds_list = [1.0, 1.5, 2.0]
else:
raise ValueError('roi size {} not supported, check again...'.format(roi_size))

if 'newsplit' in args.result_path:
gts = get_gts(dataset,new_split=True)
else:
Expand Down

0 comments on commit d3077ac

Please sign in to comment.