cfzd / Ultra-Fast-Lane-Detection-v2

Ultra Fast Deep Lane Detection With Hybrid Anchor Driven Ordinal Classification (TPAMI 2022)
MIT License
583 stars 96 forks source link

Is there a way to tell how many lanes are detected #38

Open farshidrayhancv opened 1 year ago

farshidrayhancv commented 1 year ago

In the prev version, we could get the number of detected lanes like,

output_img, lane_points, lanes_detected = lane_detector.cfg.detect_lanes(frame)

lanes_detected = ['False', 'True', 'True', 'False'] The above would mean the two center lanes have been detected

Is there a way to do that here?

578223592 commented 1 year ago

你可以在后处理中通过run_test函数判断

farshidrayhancv commented 1 year ago

Can u elaborate, please?

578223592 commented 1 year ago

如果您想查看训练数据是否存在车道线可以查看install部分的指引,那里会教你生成annotation.json文件,这个文件里面就是车道线点的数据。 如果你想在训练时候查看,你可以通过loss函数里面传入的label来判断,-1表示某个车道线点不存在,如果一条车道线坐标全部是-1,那么这个车道线自然不存在。 如果你想在测试的时候看某个车道线是否存在,那么你可以看程序是否执行fp.write(xxx),如果执行了,那么写入的车道线点对应的车道线是存在的,反之自然不存在