cardwing/Codes-for-Lane-Detection

How to generate label images from the json file in the TuSimple dataset?

khw321 opened this issue · 24 comments

Just like the label images in CULane, how to decide the lane's Id in the TuSimple dataset? Cause there will be 0~5 lanes in an image.
And can you share your code for generating the training label images?

@khw321 , the attached files are the annotated training (3268) and validation labels (358), please use them to replace the train_gt.txt and val_gt.txt in train_lanenet.py. Check if you can get similar performance compared with SCNN-Torch.

list
label

@khw321 , besides, you need to resize the image to 256 x 512 instead of 288 x 800 in TuSimple. I will release the corresponding training & testing scripts for TuSimple and BDD100K soon (both Tensorflow and Torch codes).

@cardwing Thanks a lot. I still have trouble in deciding the lanes'id. Is it according to the mid of a lane to decide ego lane and then get the others? Could you tell me how did you generate it or share your script?

@khw321 , the attached file is the script to generate the labels, please check. The lane id is assigned according to the position of the lane regarding the vehicle. For instance, the most left lane, left lane, right lane, most right lane are assigned 1, 2, 3, 4, respectively.

segLabelGen0.zip

您能提供将图森数据集提供的json文件转换成png格式的label的脚本吗?非常感谢

@BDMLLang, please refer to the above answer, where segLabelGen0.zip is the script to generate the labels

@khw321 , the attached file is the script to generate the labels, please check. The lane id is assigned according to the position of the lane regarding the vehicle. For instance, the most left lane, left lane, right lane, most right lane are assigned 1, 2, 3, 4, respectively.

segLabelGen0.zip

@cardwing
Hello, there's still one question: the max number of lanes in Tusimple is 5, but you only have 4 instances lane.
It's that mean, you forgive the 5th lane in Tusimple dataset?
Can you give me an answer? It's same in SCNN and your paper, which bothered some time :)

For CULane, the number of output channels is 4 since the number of lanes is 4. For TuSimple, the number of output channels is 5 since the maximum number of lanes is 5. However, in most cases, the number of lanes is fewer than 5 for TuSimple. Hence, predicting 4 lanes is OK for TuSimple except that there are some decreases in performance.

@cardwing
I got it, thank you very much!
Recently, I read your paper about SAD. Your experiment is very solid.
But I'm troubled about data augmentation in the input image. You mentioned random rotation and random cropping. How did you calculate the existence prediction brach loss, the label of existence changed with your random cropped image? But it seems 0 or 1, and couldn't transform like image.\

The lane existence does not change since the cropped image accounts for around 90% of the original image. As to random rotation, the rotation degree is just 2 (-1 ~ 1) so it also does not change the lane existence prediction.

haha, soga. Little augmentation but not change the spatial existence information of label.

For CULane, the number of output channels is 4 since the number of lanes is 4. For TuSimple, the number of output channels is 5 since the maximum number of lanes is 5. However, in most cases, the number of lanes is fewer than 5 for TuSimple. Hence, predicting 4 lanes is OK for TuSimple except that there are some decreases in performance.
你好, 我 有一个疑问希望你能解答,我查看了你提供的list_train.txt中的内容,发现标注文件在中有5条车道线的image,你在exist label上只显示为4条车道线,你能告诉我你是舍弃了哪一条吗?从你的生成label的脚本中没有查出来。你最新的SAD论文中enet-sad的输出channel是4还是5呢?
期待你的回复
祝好

There are six lanes in list6_train.txt. As to the ENet-SAD model, the number of output channels is 4 for CULane and 5 for TuSimple.

Tusimple 数据集 你提供下载的list_train.txt里面的exist label都是4条车道吧,是我下载的是以前的版本吗?
image

Tusimple 数据集 你提供下载的list_train.txt里面的exist label都是4条车道吧,是我下载的是以前的版本吗?
image

Yes, you're right. But there are 5 lanes in segGT, the problem is that existence only has 4.
So, you just need to change the existence, add 1 if 5th exist, otherwise 0.
Or, you can use my promoted list, here is it :)
https://pan.baidu.com/s/1JeFVluVWGjT56H46rju-gQ

@cardwing It seems to need "segGT6" directory, not "segGT". Could you provide the label about your "segGT6"
By the way, which label do you select to get the performance of your paper about Tusimple :)

segGT6. And both labels are used.

segGT6. And both labels are used.

你好,你上面不是说你的Enet-SADmodel 使用tusimple数据集时,最后的输出channel为5吗? 你提供的这个segGT6是用来怎么训练的呢?
谢谢

I believe this list is for trainval (3626). But it got 10 duplicate lines at the end. Did you upload the wrong files or is it only this one is wrong?

It seems that you are right. Please delete these lines if you want.

Thanks. I've inspected the lists and I believe other than these 10 lines they should be alright.

By the way, I'll be re-implementing and testing ERFNet-SAD on TuSimple, any idea what performance I should be getting on the test set? I didn't find your experimental results about this particular setup. (It's just a small question, so I guess I'll just say it here without opening a new issue, since you guys already got a lot of them -_-)

ERFNet-SAD should at least obtain 96% accuracy on the TuSimple testing set.

q36101 commented

Are the validation and testing dataset the same?