Skip to content

Commit

Permalink
[Refactor] Main code modification for coordinate system refactor (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
yezhen17 committed Aug 11, 2021
1 parent 90e6378 commit 46d420f
Show file tree
Hide file tree
Showing 97 changed files with 2,101 additions and 1,143 deletions.
1 change: 1 addition & 0 deletions configs/_base_/models/fcos3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
pred_attrs=True,
pred_velo=True,
dir_offset=0.7854, # pi/4
dir_limit_offset=0,
strides=[8, 16, 32, 64, 128],
group_reg_dims=(2, 1, 3, 1, 2), # offset, depth, size, rot, velo
cls_branch=(256, ),
Expand Down
7 changes: 3 additions & 4 deletions configs/_base_/models/hv_pointpillars_fpn_nus.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
ranges=[[-50, -50, -1.8, 50, 50, -1.8]],
scales=[1, 2, 4],
sizes=[
[0.8660, 2.5981, 1.], # 1.5/sqrt(3)
[0.5774, 1.7321, 1.], # 1/sqrt(3)
[2.5981, 0.8660, 1.], # 1.5 / sqrt(3)
[1.7321, 0.5774, 1.], # 1 / sqrt(3)
[1., 1., 1.],
[0.4, 0.4, 1],
],
Expand All @@ -59,8 +59,7 @@
reshape_out=True),
assigner_per_size=False,
diff_rad_by_sin=True,
dir_offset=0.7854, # pi/4
dir_limit_offset=0,
dir_offset=-0.7854, # -pi / 4
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=9),
loss_cls=dict(
type='FocalLoss',
Expand Down
2 changes: 1 addition & 1 deletion configs/_base_/models/hv_pointpillars_secfpn_kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
[0, -39.68, -0.6, 70.4, 39.68, -0.6],
[0, -39.68, -1.78, 70.4, 39.68, -1.78],
],
sizes=[[0.6, 0.8, 1.73], [0.6, 1.76, 1.73], [1.6, 3.9, 1.56]],
sizes=[[0.8, 0.6, 1.73], [1.76, 0.6, 1.73], [3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
Expand Down
9 changes: 4 additions & 5 deletions configs/_base_/models/hv_pointpillars_secfpn_waymo.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@
[-74.88, -74.88, -0.1188, 74.88, 74.88, -0.1188],
[-74.88, -74.88, 0, 74.88, 74.88, 0]],
sizes=[
[2.08, 4.73, 1.77], # car
[0.84, 1.81, 1.77], # cyclist
[0.84, 0.91, 1.74] # pedestrian
[4.73, 2.08, 1.77], # car
[1.81, 0.84, 1.77], # cyclist
[0.91, 0.84, 1.74] # pedestrian
],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
dir_offset=0.7854, # pi/4
dir_limit_offset=0,
dir_offset=-0.7854, # -pi / 4
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7),
loss_cls=dict(
type='FocalLoss',
Expand Down
2 changes: 1 addition & 1 deletion configs/_base_/models/hv_second_secfpn_kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -1.78, 70.4, 40.0, -1.78],
],
sizes=[[0.6, 0.8, 1.73], [0.6, 1.76, 1.73], [1.6, 3.9, 1.56]],
sizes=[[0.8, 0.6, 1.73], [1.76, 0.6, 1.73], [3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
Expand Down
9 changes: 4 additions & 5 deletions configs/_base_/models/hv_second_secfpn_waymo.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@
[-76.8, -51.2, 0, 76.8, 51.2, 0],
[-76.8, -51.2, -0.1188, 76.8, 51.2, -0.1188]],
sizes=[
[2.08, 4.73, 1.77], # car
[0.84, 0.91, 1.74], # pedestrian
[0.84, 1.81, 1.77] # cyclist
[4.73, 2.08, 1.77], # car
[0.91, 0.84, 1.74], # pedestrian
[1.81, 0.84, 1.77] # cyclist
],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
dir_offset=0.7854, # pi/4
dir_limit_offset=0,
dir_offset=-0.7854, # -pi / 4
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7),
loss_cls=dict(
type='FocalLoss',
Expand Down
2 changes: 1 addition & 1 deletion configs/_base_/models/parta2.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
ranges=[[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -1.78, 70.4, 40.0, -1.78]],
sizes=[[0.6, 0.8, 1.73], [0.6, 1.76, 1.73], [1.6, 3.9, 1.56]],
sizes=[[0.8, 0.6, 1.73], [1.76, 0.6, 1.73], [3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
ranges=[[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -1.78, 70.4, 40.0, -1.78]],
sizes=[[0.6, 0.8, 1.73], [0.6, 1.76, 1.73], [1.6, 3.9, 1.56]],
sizes=[[0.8, 0.6, 1.73], [1.76, 0.6, 1.73], [3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
anchor_generator=dict(
type='Anchor3DRangeGenerator',
ranges=[[0, -39.68, -1.78, 69.12, 39.68, -1.78]],
sizes=[[1.6, 3.9, 1.56]],
sizes=[[3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=True),
diff_rad_by_sin=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -1.78, 70.4, 40.0, -1.78],
],
sizes=[[0.6, 0.8, 1.73], [0.6, 1.76, 1.73], [1.6, 3.9, 1.56]],
sizes=[[0.8, 0.6, 1.73], [1.76, 0.6, 1.73], [3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -1.78, 70.4, 40.0, -1.78],
],
sizes=[[0.6, 0.8, 1.73], [0.6, 1.76, 1.73], [1.6, 3.9, 1.56]],
sizes=[[0.8, 0.6, 1.73], [1.76, 0.6, 1.73], [3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False),
diff_rad_by_sin=True,
Expand Down
7 changes: 3 additions & 4 deletions configs/free_anchor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ model = dict(
ranges=[[-50, -50, -1.8, 50, 50, -1.8]],
scales=[1, 2, 4],
sizes=[
[0.8660, 2.5981, 1.], # 1.5/sqrt(3)
[0.5774, 1.7321, 1.], # 1/sqrt(3)
[2.5981, 0.8660, 1.], # 1.5 / sqrt(3)
[1.7321, 0.5774, 1.], # 1 / sqrt(3)
[1., 1., 1.],
[0.4, 0.4, 1],
],
Expand All @@ -59,8 +59,7 @@ model = dict(
reshape_out=True),
assigner_per_size=False,
diff_rad_by_sin=True,
dir_offset=0.7854, # pi/4
dir_limit_offset=0,
dir_offset=-0.7854, # -pi / 4
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=9),
loss_cls=dict(
type='FocalLoss',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
ranges=[[-50, -50, -1.8, 50, 50, -1.8]],
scales=[1, 2, 4],
sizes=[
[0.8660, 2.5981, 1.], # 1.5/sqrt(3)
[0.5774, 1.7321, 1.], # 1/sqrt(3)
[2.5981, 0.8660, 1.], # 1.5 / sqrt(3)
[1.7321, 0.5774, 1.], # 1 / sqrt(3)
[1., 1., 1.],
[0.4, 0.4, 1],
],
Expand All @@ -31,8 +31,7 @@
reshape_out=True),
assigner_per_size=False,
diff_rad_by_sin=True,
dir_offset=0.7854, # pi/4
dir_limit_offset=0,
dir_offset=-0.7854, # -pi / 4
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=9),
loss_cls=dict(
type='FocalLoss',
Expand Down
2 changes: 1 addition & 1 deletion configs/imvoxelnet/imvoxelnet_kitti-3d-car.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
anchor_generator=dict(
type='AlignedAnchor3DRangeGenerator',
ranges=[[-0.16, -39.68, -1.78, 68.96, 39.68, -1.78]],
sizes=[[1.6, 3.9, 1.56]],
sizes=[[3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=True),
diff_rad_by_sin=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
[0, -40.0, -0.6, 70.4, 40.0, -0.6],
[0, -40.0, -1.78, 70.4, 40.0, -1.78],
],
sizes=[[0.6, 0.8, 1.73], [0.6, 1.76, 1.73], [1.6, 3.9, 1.56]],
sizes=[[0.8, 0.6, 1.73], [1.76, 0.6, 1.73], [3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False),
assigner_per_size=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
_delete_=True,
type='Anchor3DRangeGenerator',
ranges=[[0, -40.0, -1.78, 70.4, 40.0, -1.78]],
sizes=[[1.6, 3.9, 1.56]],
sizes=[[3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=False)),
roi_head=dict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
_delete_=True,
type='Anchor3DRangeGenerator',
ranges=[[0, -39.68, -1.78, 69.12, 39.68, -1.78]],
sizes=[[1.6, 3.9, 1.56]],
sizes=[[3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=True)),
# model training and testing settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
[-80, -80, -0.9122268, 80, 80, -0.9122268],
[-80, -80, -1.8012227, 80, 80, -1.8012227]],
sizes=[
[1.92, 4.75, 1.71], # car
[2.84, 10.24, 3.44], # truck
[2.92, 12.70, 3.42], # bus
[2.42, 6.52, 2.34], # emergency vehicle
[2.75, 8.17, 3.20], # other vehicle
[0.96, 2.35, 1.59], # motorcycle
[0.63, 1.76, 1.44], # bicycle
[0.76, 0.80, 1.76], # pedestrian
[0.35, 0.73, 0.50] # animal
[4.75, 1.92, 1.71], # car
[10.24, 2.84, 3.44], # truck
[12.70, 2.92, 3.42], # bus
[6.52, 2.42, 2.34], # emergency vehicle
[8.17, 2.75, 3.20], # other vehicle
[2.35, 0.96, 1.59], # motorcycle
[1.76, 0.63, 1.44], # bicycle
[0.80, 0.76, 1.76], # pedestrian
[0.73, 0.35, 0.50] # animal
],
rotations=[0, 1.57],
reshape_out=True)))
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
[-49.6, -49.6, -1.763965, 49.6, 49.6, -1.763965],
],
sizes=[
[1.95017717, 4.60718145, 1.72270761], # car
[2.4560939, 6.73778078, 2.73004906], # truck
[2.87427237, 12.01320693, 3.81509561], # trailer
[0.60058911, 1.68452161, 1.27192197], # bicycle
[0.66344886, 0.7256437, 1.75748069], # pedestrian
[0.39694519, 0.40359262, 1.06232151], # traffic_cone
[2.49008838, 0.48578221, 0.98297065], # barrier
[4.60718145, 1.95017717, 1.72270761], # car
[6.73778078, 2.4560939, 2.73004906], # truck
[12.01320693, 2.87427237, 3.81509561], # trailer
[1.68452161, 0.60058911, 1.27192197], # bicycle
[0.7256437, 0.66344886, 1.75748069], # pedestrian
[0.40359262, 0.39694519, 1.06232151], # traffic_cone
[0.48578221, 2.49008838, 0.98297065], # barrier
],
custom_values=[0, 0],
rotations=[0, 1.57],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
[-100, -100, -0.9122268, 100, 100, -0.9122268],
[-100, -100, -1.8012227, 100, 100, -1.8012227]],
sizes=[
[1.92, 4.75, 1.71], # car
[2.84, 10.24, 3.44], # truck
[2.92, 12.70, 3.42], # bus
[2.42, 6.52, 2.34], # emergency vehicle
[2.75, 8.17, 3.20], # other vehicle
[0.96, 2.35, 1.59], # motorcycle
[0.63, 1.76, 1.44], # bicycle
[0.76, 0.80, 1.76], # pedestrian
[0.35, 0.73, 0.50] # animal
[4.75, 1.92, 1.71], # car
[10.24, 2.84, 3.44], # truck
[12.70, 2.92, 3.42], # bus
[6.52, 2.42, 2.34], # emergency vehicle
[8.17, 2.75, 3.20], # other vehicle
[2.35, 0.96, 1.59], # motorcycle
[1.76, 0.63, 1.44], # bicycle
[0.80, 0.76, 1.76], # pedestrian
[0.73, 0.35, 0.50] # animal
],
rotations=[0, 1.57],
reshape_out=True)))
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
anchor_generator=dict(
type='AlignedAnchor3DRangeGenerator',
ranges=[[-74.88, -74.88, -0.0345, 74.88, 74.88, -0.0345]],
sizes=[[2.08, 4.73, 1.77]],
sizes=[[4.73, 2.08, 1.77]],
rotations=[0, 1.57],
reshape_out=True)),
# model training and testing settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
anchor_generator=dict(
type='AlignedAnchor3DRangeGenerator',
ranges=[[-74.88, -74.88, -0.0345, 74.88, 74.88, -0.0345]],
sizes=[[2.08, 4.73, 1.77]],
sizes=[[4.73, 2.08, 1.77]],
rotations=[0, 1.57],
reshape_out=True)),
# model training and testing settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
[-80, -80, -0.9122268, 80, 80, -0.9122268],
[-80, -80, -1.8012227, 80, 80, -1.8012227]],
sizes=[
[1.92, 4.75, 1.71], # car
[2.84, 10.24, 3.44], # truck
[2.92, 12.70, 3.42], # bus
[2.42, 6.52, 2.34], # emergency vehicle
[2.75, 8.17, 3.20], # other vehicle
[0.96, 2.35, 1.59], # motorcycle
[0.63, 1.76, 1.44], # bicycle
[0.76, 0.80, 1.76], # pedestrian
[0.35, 0.73, 0.50] # animal
[4.75, 1.92, 1.71], # car
[10.24, 2.84, 3.44], # truck
[12.70, 2.92, 3.42], # bus
[6.52, 2.42, 2.34], # emergency vehicle
[8.17, 2.75, 3.20], # other vehicle
[2.35, 0.96, 1.59], # motorcycle
[1.76, 0.63, 1.44], # bicycle
[0.80, 0.76, 1.76], # pedestrian
[0.73, 0.35, 0.50] # animal
],
rotations=[0, 1.57],
reshape_out=True)))
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
[-49.6, -49.6, -1.763965, 49.6, 49.6, -1.763965],
],
sizes=[
[1.95017717, 4.60718145, 1.72270761], # car
[2.4560939, 6.73778078, 2.73004906], # truck
[2.87427237, 12.01320693, 3.81509561], # trailer
[0.60058911, 1.68452161, 1.27192197], # bicycle
[0.66344886, 0.7256437, 1.75748069], # pedestrian
[0.39694519, 0.40359262, 1.06232151], # traffic_cone
[2.49008838, 0.48578221, 0.98297065], # barrier
[4.60718145, 1.95017717, 1.72270761], # car
[6.73778078, 2.4560939, 2.73004906], # truck
[12.01320693, 2.87427237, 3.81509561], # trailer
[1.68452161, 0.60058911, 1.27192197], # bicycle
[0.7256437, 0.66344886, 1.75748069], # pedestrian
[0.40359262, 0.39694519, 1.06232151], # traffic_cone
[0.48578221, 2.49008838, 0.98297065], # barrier
],
custom_values=[0, 0],
rotations=[0, 1.57],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
[-100, -100, -0.9122268, 100, 100, -0.9122268],
[-100, -100, -1.8012227, 100, 100, -1.8012227]],
sizes=[
[1.92, 4.75, 1.71], # car
[2.84, 10.24, 3.44], # truck
[2.92, 12.70, 3.42], # bus
[2.42, 6.52, 2.34], # emergency vehicle
[2.75, 8.17, 3.20], # other vehicle
[0.96, 2.35, 1.59], # motorcycle
[0.63, 1.76, 1.44], # bicycle
[0.76, 0.80, 1.76], # pedestrian
[0.35, 0.73, 0.50] # animal
[4.75, 1.92, 1.71], # car
[10.24, 2.84, 3.44], # truck
[12.70, 2.92, 3.42], # bus
[6.52, 2.42, 2.34], # emergency vehicle
[8.17, 2.75, 3.20], # other vehicle
[2.35, 0.96, 1.59], # motorcycle
[1.76, 0.63, 1.44], # bicycle
[0.80, 0.76, 1.76], # pedestrian
[0.73, 0.35, 0.50] # animal
],
rotations=[0, 1.57],
reshape_out=True)))
2 changes: 1 addition & 1 deletion configs/second/hv_second_secfpn_6x8_80e_kitti-3d-car.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
_delete_=True,
type='Anchor3DRangeGenerator',
ranges=[[0, -40.0, -1.78, 70.4, 40.0, -1.78]],
sizes=[[1.6, 3.9, 1.56]],
sizes=[[3.9, 1.6, 1.56]],
rotations=[0, 1.57],
reshape_out=True)),
# model training and testing settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
classes=class_names,
sample_groups=dict(Car=15, Pedestrian=10, Cyclist=10),
points_loader=dict(
type='LoadPointsFromFile', load_dim=5, use_dim=[0, 1, 2, 3, 4]))
type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=5,
use_dim=[0, 1, 2, 3, 4]))

train_pipeline = [
dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=6, use_dim=5),
Expand Down
Loading

0 comments on commit 46d420f

Please sign in to comment.