cfzd / Ultra-Fast-Lane-Detection

Ultra Fast Structure-aware Deep Lane Detection (ECCV 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问为什么训练路侧相机检测车道线的模型大小有2G这么大?

zqs1996 opened this issue · comments

commented

我已经在UFLDv2的仓库中回答了这个问题。
cfzd/Ultra-Fast-Lane-Detection-v2#56

我已经在UFLDv2的仓库中回答了这个问题。 cfzd/Ultra-Fast-Lane-Detection-v2#56
6_3
2_1

您好,大佬,请问我训练的模型应用在路侧相机端去检测车道线时,弯道车道线的检测效果是这样子(如贴图所示)?被拉长到图像底部了。谢谢

commented

@zqs1996
在数据处理时,我们默认会把车道线做延伸至图像底部的处理,你可以注释掉它,在这个部分:

for i in range(self.num_lanes):
if np.all(all_idx_cp[i,:,1] == -1):
continue
# if there is no lane
valid = all_idx_cp[i,:,1] != -1
# get all valid lane points' index
valid_idx = all_idx_cp[i,valid,:]
# get all valid lane points
if valid_idx[-1,0] == all_idx_cp[0,-1,0]:
# if the last valid lane point's y-coordinate is already the last y-coordinate of all rows
# this means this lane has reached the bottom boundary of the image
# so we skip
continue
if len(valid_idx) < 6:
continue
# if the lane is too short to extend
valid_idx_half = valid_idx[len(valid_idx) // 2:,:]
p = np.polyfit(valid_idx_half[:,0], valid_idx_half[:,1],deg = 1)
start_line = valid_idx_half[-1,0]
pos = find_start_pos(all_idx_cp[i,:,0],start_line) + 1
fitted = np.polyval(p,all_idx_cp[i,pos:,0])
fitted = np.array([-1 if y < 0 or y > w-1 else y for y in fitted])
assert np.all(all_idx_cp[i,pos:,1] == -1)
all_idx_cp[i,pos:,1] = fitted
if -1 in all_idx[:, :, 0]:
pdb.set_trace()