lucastabelini / PolyLaneNet

Code for the paper entitled "PolyLaneNet: Lane Estimation via Deep Polynomial Regression" (ICPR 2020)
https://arxiv.org/abs/2004.10924
MIT License
295 stars 74 forks source link

Could you show me what labels in dataloader look like? #29

Closed meanmee closed 3 years ago

lucastabelini commented 3 years ago

I'm not sure if that's whats you meant, but you can look at the TuSimple data loader.

meanmee commented 3 years ago

I followed the format of Tusimple, but encountered the error: IndexError: The shape of the mask [64, 1] at index 0 does not match the shape of the indexed tensor [80, 1] at index 0

image

lucastabelini commented 3 years ago

Can you show the .yaml used? It seems the number of lanes in the prediction is not the same in the annotation. Maybe you need to set max_lanes: 5 (like here).

meanmee commented 3 years ago

I was using Tusimplt_2order.yaml

lucastabelini commented 3 years ago

Are you using a custom dataset loader?

meanmee commented 3 years ago

No. the same as tusimple.py

lucastabelini commented 3 years ago

What is the maximum number of lanes in your dataset? It seems the number of output lanes is set to 5 but the dataset has a maximum of 4. As I said in a previous reply, you probably need to set max_lanes: 5 in the dataset settings.

meanmee commented 3 years ago

Yes, You are right. I had sampled all the training-set by deleting samples whose number of lanes bigger than 4. After I set max_lanes: 5 to 4. It works. Thanks.

meanmee commented 3 years ago

BTW,Could you show me how to set orders. cuz 2-order works badly for me

lucastabelini commented 3 years ago

A third order polynomial is used in tusimple.yml.

meanmee commented 3 years ago

So the only thing I need to do is to set nums_output?. like if I want to set to 4th order, I need to change num_outputs to 5 * (1 + 2 + 5) in the case of 5 max_lanes?

meanmee commented 3 years ago

ok, It's not.

lucastabelini commented 3 years ago

The code only has support for up to 3rd order polynomials. Besides, it is generally not a good idea to go above that.

meanmee commented 3 years ago

Thanks for your patience. I am confused with curriculum_steps: image What is it used for?

lucastabelini commented 3 years ago

We tried using curriculum learning to see if it would improve the results, but it did not. After that, I just used the code to do the ablation study on the polynomial order. Basically, curriculum_steps is a list where each value is the epoch number where a polynomial coefficient starts to be used. For example, if curriculum_steps = [0, 0, 0, 0], all 4 coefficients (i.e., a,b,c and d in ax^3+bx^2+cx+d) are used from the beginning on the training (epoch 0). If curriculum_steps = [9000, 0, 0, 0] is used (as in tusimple_2order.yaml), the a coefficient is only used after epoch 9000 (which, in this case, would never happen). Before that, its output is always set to 0, as shown in your image.