Closed gneworld closed 4 years ago
@gneworld Yeah, I think so. It's hard to classifiy the lane into left or right when a car is changing lane, so the performance could be poor. The straight way is to change the definition of ground truth, and make the lane is not distinguished by it's direction.
@cfzd
change the definition of ground truth 您所说的更改ground truth定义是指修改这里的 1 1 0 1之类的标记吗
make the lane is not distinguished by it's direction. 看了下code,并没有找到通过车道线方向区分车道顺序的地方,烦请大佬提示一下
@gneworld
The 1 1 1 1
string in CULane is used to identify the existence of lanes. So 0 1 1 0
means the leftmost and the rightmost lanes are not present in this image.
For the order of CULane, it is stored in the segmentation map, i.e. the laneseg_label_w16/***/*.png
files.
The lanes are marked with 1,2,3,4
from left to right in the image. More information can be found in CULane.
@cfzd Do you mean that change the lanes are marked with 1,2,3,4 from left to right in the image to 1,1,1,1 or else? I still don't know how to change the definition of ground truth, and make the lane is not distinguished by it's direction. -_-||
@gneworld I'll give you a code style example:
#read a label
label = cv2.imread('laneseg_label_w16/***/*.png')
#the label is single-channel
label = label[:,:,0]
# get lanes from left to right, i.e. 1,2,3,4
leftmost_lane_index = (label == 1)
left_lane_index = (label == 2)
right_lane_index = (label == 3)
rightmost_lane_index = (label == 4)
#then you can change the order by manipulating the index
new_label = np.zeros_like(label)
new_label[leftmost_lane_index] = 4
new_label[left_lane_index] = 2
new_label[right_lane_index] = 1
new_label[rightmost_lane_index] = 3
# the order from left to right is changed from 1,2,3,4 to 4,2,1,3
The above code just did a simple swap for the demonstration. If you want to change it that is not distinguished by the direction, you may need to change this part:
your_defined_order1, your_defined_order2, \
your_defined_order3, your_defined_order4 \
= some_method_to_get_the_order_without_direction()
new_label = np.zeros_like(label)
new_label[leftmost_lane_index] = your_defined_order1
new_label[left_lane_index] = your_defined_order2
new_label[right_lane_index] = your_defined_order3
new_label[rightmost_lane_index] = your_defined_order4
@cfzd 感谢你的code sample, 不过我认为并没有解决车辆变道时的临界状态问题,也就是说当车辆骑着车道线行驶时,当前车道线上的点还是会被随机分配到 left_lane_index 和 right_lane_index ,和我们自定义的order关系不大。。。 可能我的理解不到位,还请大佬多多指教
@cfzd hello, I follow your code sample to change dataloader code like this, but find that it is completely unconvergent
@gneworld Randomly shuffle the order of lane could not work. The network would be confused by the contradictory order of lane. You can also see this issue: #70
If you want to solve this problem of changing lane, you should figure out a method, which is not defined by the direction of the lane, while maintaining the same order for all images. In this way, the network could converge.
大佬您好,“not defined by the direction of the lane, while maintaining the same order for all images” 这句话百思不得其解,可以翻译成中文解释下吗,拜谢
@gneworld 如果你想要解决换道的问题,你就要想出一个方法,它首先不能通过车道线方向来定义顺序,同时对数据集中的所有图片要保持一样的规则。其实就是两个点,第一不能按照方向来定义顺序,第二这个顺序的定义要对所有图片都一样,如果规则不一样的话网络可能就无法收敛了。
@cfzd 大佬您好,我反复查看了最新code,没找到通过车道线方向来定义顺序的地方,烦请您提示一下,thanks
@gneworld 这个是CULane数据集定义的顺序,他们的分割标注文件中已经规定了好了。我们只是使用了CULane数据集定义好的顺序。
@gneworld 可以看一下这个仓库:https://github.com/XingangPan/seg_label_generate
大佬,我在测试model时发现车辆在变道时,检测出的车道会扭曲变形严重,变道结束后,效果就恢复良好了,分析了下,原因感觉是变道过程中车辆骑在车道线上行驶,导致模型对这条骑着的车道线进行分类时,无法区分是左车道还是右车道,所以产生一个中间临界状态,不知这个解释是否正确,以及这种变道过程中检测效果变差的case该如何解决呢, 拜谢大佬!