cardwing / Codes-for-Lane-Detection

Learning Lightweight Lane Detection CNNs by Self Attention Distillation (ICCV 2019)
MIT License
1.04k stars 334 forks source link

Training SCNN model #7

Closed chokkarapu closed 5 years ago

chokkarapu commented 5 years ago

Hi,

I started training from scratch, during training its printing accuracy and mean_accuracy as shown below in snapshot

trainingscnn

What does it mean between accuracy and mean accuracy.? From term mean i understand like its mean of accuracy of each and every epoch...

Kindly give some interpretation towards the mentioned terms.

chokkarapu commented 5 years ago

Interested in knowing difference between accuracy and accuracy back terms

cardwing commented 5 years ago

@chokkarapu , accuracy and accuracy_back denote the pixel accuracy of lane pixels and background pixels, respectively. Besides, your reported accuracy is too low as the training episodes reach 3w. Please check whether your codes and the training process are right.

cardwing commented 5 years ago

@chokkarapu , training from scratch is not recommended. You should use the vgg.npy as the backbone and start training from that model.

cardwing commented 5 years ago

@chokkarapu , the accuracy and accuracy_back should be similar to this figure as the training process proceeds.

demo_training

chokkarapu commented 5 years ago

@chokkarapu , training from scratch is not recommended. You should use the vgg.npy as the backbone and start training from that model.

Sorry, yes Im using vgg.npy as the backbone when starting training...

Im using your latest checked-in code only...i didnt modified ... I changed dataset to my own...other then that i didnt modified.

cardwing commented 5 years ago

@chokkarapu , that's weird. You need to check if the hyper-parameters are appropriately selected, e.g., learning rate scheme, momentum, etc.

cardwing commented 5 years ago

Besides, you also need to check whether the labels are used appropriately.

chokkarapu commented 5 years ago

Any idea how to check the labels are rightly provided or not? In some of images I dont lane markers still I marked it "no_lane " label, I providing that label as "1" in train_gt.txt for example.

cardwing commented 5 years ago

@chokkarapu , in my implementation, the background is labelled as "0". To check the labels, you can either print them as figures or use numpy.unique() to check if the range of the labels is right. From your training process, it is obvious that the model does not learn to detect lanes well as it almost predict every pixel as background.

chokkarapu commented 5 years ago

@cardwing : Thanks for response. In my dataset, the instance label Image is RGB channel imagewith following pixel information Background pixel is labelled as "0" i.e. (0,0,0) Left_To_Left_Lane = (128, 128, 128) Left_lane = (255, 0, 0) Right_Lane = (0, 255, 0) Right_Right_Lane = (255, 255, 255)

The sample image is shown below...

frame42_42

In training code I have considered chaneel-1 from RGB image i.e. "label_insta = label_img[:, :, 1] "

Kindly correct me is my labelled data is proper as per CULane for example.

cardwing commented 5 years ago

@chokkarapu , in the default setting of SCNN, the input label should be a map filled with 0, 1, 2, 3, 4, where 0 denotes background and 1~4 denote lane 1~ lane 4. Therefore, in your custom dataset, you should label the image in the same manner. In other words, you should change your 3-channel label map to a 1-channel map and the background is denoted as 0, lane 1~lane 4 as 1~4. Just perform a simple operation can accomplish that goal.

chokkarapu commented 5 years ago

@chokkarapu , in the default setting of SCNN, the input label should be a map filled with 0, 1, 2, 3, 4, where 0 denotes background and 14 denote lane 1 lane 4. Therefore, in your custom dataset, you should label the image in the same manner. In other words, you should change your 3-channel label map to a 1-channel map and the background is denoted as 0, lane 1lane 4 as 14. Just perform a simple operation can accomplish that goal.

Thank you for input...Even me too planning to do mentioned operation. To Be clear the i need to have data to be mentioned as below: Background: Pixel Value =0 Lane-1 ; Pixel value= 1 Lane-2 : Pixel Value = 2 Lane-3 : Pixel Value = 3 Lane-4 : Pixel Value = 4

cardwing commented 5 years ago

@chokkarapu , yes.