OpenDriveLab / LaneSegNet

[ICLR 2024] Map Learning with Lane Segment for Autonomous Driving
Apache License 2.0
262 stars 28 forks source link

ped_cross points num ? #13

Closed hello7623 closed 9 months ago

hello7623 commented 9 months ago

in dataset :

    def ped2lane_segment(self, points):
        assert points.shape[0] == 5
        dir_vector = points[1] - points[0]
        dir = np.rad2deg(np.arctan2(dir_vector[1], dir_vector[0]))

        if dir < -45 or dir > 135:
            left_boundary = points[[2, 3]]
            right_boundary = points[[1, 0]]
        else:
            left_boundary = points[[0, 1]]
            right_boundary = points[[3, 2]]

        centerline = LineString((left_boundary + right_boundary) / 2)
        left_boundary = LineString(left_boundary)
        right_boundary = LineString(right_boundary)

        return centerline, left_boundary, right_boundary

you assert points.shape[0] == 5, but in mapbucket info, some ped cross is not 5 points, so it has assert error.... how to solve it ?

hello7623 commented 9 months ago

solved, use new map bucket...