Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
3 years ago | |
---|---|---|
__pycache__ | 3 years ago | |
cache | 3 years ago | |
config | 3 years ago | |
db | 3 years ago | |
images | 3 years ago | |
models | 3 years ago | |
nnet | 3 years ago | |
sample | 3 years ago | |
test | 3 years ago | |
utils | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
config.py | 3 years ago | |
detection.py | 3 years ago | |
environment.txt | 3 years ago | |
requirements.txt | 3 years ago |
1.0
传入车载摄像头图片,进行single-stage的多车道检测
主要应用于车载摄像头(前挡风玻璃视角或车顶视角),沿着车辆前行方向的照片
多车道线检测模型在自建深圳街景数据集的数据集下,Accuracy为0.903,FP为0.095, FN为0.086,FPS为95.9.
训练数据集:Tusimple 和 自建深圳街景数据集
测试数据集:自建深圳街景数据集
Linux ubuntu 16.04, 参考requirements.txt,Pytorch的版本为1.5
conda env create --name lstr --file environment.txt
conda activate lstr
pip install -r requirements.txt
from detection import Detector
det = Detector()
res = det.predict(image)
参数 | 类型 | 是否必填 | 说明 |
---|---|---|---|
image | ndarray | 是 | 维度为(H,W,C)的图片,通道类型为BGR |
若无检测到的车道,返回dict中lane_num为0, pred为空列表
若检测到车道,返回元素为dict,其中lane_num为预测的车道数量, pred为各个车道的参数
结果参数
字段 | 类型 | 说明 |
---|---|---|
lane_num | int | 检测车道的数量 |
pred | dict | 各个车道的参数 |
pred参数列表
函数详见Detector().draw_pred_lanes_on_img
index | 说明 |
---|---|
0 | 推理模式下值恒为1 |
1 | 车道线出现上边界,[0, 1] |
2 | 车道线出现下边界,[0, 1] |
3~6 | 相机拟合参数,对于所有车道线而言一致 |
7~8 | 垂直方向的起始和结束偏移 |
import cv2
from detection import Detector
fn = './images/demo.jpg'
img_np = cv2.imread(fn)
det = Detector()
res = det.predict(img_np)
print(res)
# 预测结果可视化,返回值为ndarray(通道BGR)
img_ans = det.draw_pred_lanes_on_img(img_np, out_path='./images/demo_res.jpg')
返回示例
# return of det.predict()
{'lane_num': 4,
'pred': [
[1.0,0.49616843461990356,0.8387134075164795,-0.026381952688097954,-0.8071742057800293,0.16039453446865082,0.06537707149982452,1.3407330513000488,0.27653542160987854],
[1.0,0.5121796131134033,0.7413002252578735,-0.026381952688097954,-0.8071742057800293,0.16039453446865082,0.06537707149982452,-1.9884920120239258,-1.331274390220642],
[1.0,0.500149667263031,0.9988266825675964,-0.026381952688097954,-0.8071742057800293,0.16039453446865082,0.06537707149982452,0.41860583424568176,-0.15374942123889923],
[1.0,0.5129679441452026,0.986085057258606,-0.026381952688097954,-0.8071742057800293,0.16039453446865082,0.06537707149982452,-0.7568719387054443,-0.7400014400482178]
]
}
预测样本情况
基于transformer的多车道线线形预测,后续将增加识别车道线类型的功能
Python Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》