开始之前
请在已安装 Python>=3.7 环境和 PyTorch>=1.10 的条件下开始。要安装 PyTorch,请参阅 https://pytorch.ac.cn/get-started/locally/。要安装 HybridNets 依赖项
pip install -qr https://raw.githubusercontent.com/datvuthanh/HybridNets/main/requirements.txt # install dependencies
模型描述
HybridNets 是一个用于多任务的端到端感知网络。我们的工作专注于交通目标检测、可行驶区域分割和车道检测。HybridNets 可以在嵌入式系统上实时运行,并在 BDD100K 数据集上取得了最先进的目标检测和车道检测结果。
结果
交通目标检测
模型 | 召回率 (%) | mAP@0.5 (%) |
---|---|---|
MultiNet |
81.3 | 60.2 |
DLT-Net |
89.4 | 68.4 |
Faster R-CNN |
77.2 | 55.6 |
YOLOv5s |
86.8 | 77.2 |
YOLOP |
89.2 | 76.5 |
HybridNets |
92.8 | 77.3 |
可行驶区域分割
模型 | 可行驶区域 mIoU (%) |
---|---|
MultiNet |
71.6 |
DLT-Net |
71.3 |
PSPNet |
89.6 |
YOLOP |
91.5 |
HybridNets |
90.5 |
车道线检测
模型 | 准确率 (%) | 车道线 IoU (%) |
---|---|---|
Enet |
34.12 | 14.64 |
SCNN |
35.79 | 15.84 |
Enet-SAD |
36.56 | 16.02 |
YOLOP |
70.5 | 26.2 |
HybridNets |
85.4 | 31.6 |
从 PyTorch Hub 加载
此示例加载预训练的 HybridNets 模型,并传递图像进行推理。
import torch
# load model
model = torch.hub.load('datvuthanh/hybridnets', 'hybridnets', pretrained=True)
#inference
img = torch.randn(1,3,640,384)
features, regression, classification, anchors, segmentation = model(img)
引用
@misc{vu2022hybridnets,
title={HybridNets: End-to-End Perception Network},
author={Dat Vu and Bao Ngo and Hung Phan},
year={2022},
eprint={2203.09035},
archivePrefix={arXiv},
primaryClass={cs.CV}
}