Skip to content

Commit

Permalink
Update openlane_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Yutong-gannis authored Sep 1, 2023
1 parent a4ceebb commit c3851c3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions loader/bev_road/openlane_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,14 @@ def get_seg_offset(self, idx, smooth=False):
if lane1['attribute'] not in [1, 2, 3, 4]:
continue
elif left_lane == 1 and right_lane == 0: # 只有左车道线存在
if lane1['attribute'] != 2 and lane1['category'] != 21:
if lane1['attribute'] not in [1, 2] and lane1['category'] != 21:
continue
elif left_lane == 0 and right_lane == 1: # 只有右车道线存在
if lane1['attribute'] != 3 and lane1['category'] != 20:
if lane1['attribute'] not in [3, 4] and lane1['category'] != 20:
continue
else: #左右车道均不存在
if lane1['category'] not in [20, 21]:
continue

for idx in range(len(lanes)):
lane1 = lanes[idx]
lane_camera_w = np.array(lane1['xyz']).T[np.array(lane1['visibility']) == 1.0].T
lane_camera_w = np.vstack((lane_camera_w, np.ones((1, lane_camera_w.shape[1]))))
lane_ego_persformer = matrix_lane2persformer @ lane_camera_w #
Expand Down

0 comments on commit c3851c3

Please sign in to comment.