Ultra-Fast-Lane-Detection-v2 icon indicating copy to clipboard operation
Ultra-Fast-Lane-Detection-v2 copied to clipboard

Points label is not aligned with lanes of training image

Open pwshen opened this issue 3 years ago • 1 comments

https://github.com/cfzd/Ultra-Fast-Lane-Detection-v2/blob/master/data/dali_data.py#L160

At data/dali_data.py from line 152-160, points are transformed with image warp, at this step points are aligned with lanes on image

After warp affine (from line 163-176), the image is resized and cropped, but there's no further transform to the points, shows that the points are not at the correct spots of the image.

Is this a bug, or you did this with some purpose?

pwshen avatar Aug 28 '22 04:08 pwshen

@pwshen Good point! It is correct.

In short, the transform of resize and crop is learned inherently by the network.

In fact, what we always want is the lane coordinates in the original image space. In this way, we have two options:

  • option 1
    • resize the image
    • learn the resized coordinates
    • re-resize the learned coordinates to the original image space
  • option 2
    • resize the image
    • learn the original coordinates
    • directly output the coordinates to the original image space

The two options' learning difficulties are the same. For example, if a network can learn y=f(x), then it can definitely learn y=3*f(x).

cfzd avatar Aug 29 '22 06:08 cfzd