Skip to content

ADAS 前车碰撞预警系统:True innovation does not come from closed barriers, but from sharing knowledge and lowering entry barriers so that more people can benefit.

License

Notifications You must be signed in to change notification settings

HHX300/forward-collision-warning-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

前车碰撞预警(追尾)系统

该系统结合了 UFLD 车道线检测、 YOLO 目标检测、 单/双目测距算法(包括标定、测量、估算、矫正),并配备可视化界面。系统支持 Torch 与 TensorRT 推理加速,系统界面采用 QT多线程、队列存储设计,从而实现了实时性与高精度的性能表现。

一. 软件架构

本系统采用模块化设计,主要包含以下核心模块:

  • 深度学习框架: PyTorch + TensorRT

  • 计算机视觉: OpenCV + PIL + Supervision

  • 车道线检测: Ultra-Fast-Lane-Detection-v2

  • 目标检测: YOLOv5/v7/v8/v9/v11/YOLOv11-seg

  • 界面开发: PyQT + OpenCV

  • 配置管理: JSON + Pyd + yaml

二. 安装教程

1. git项目

git clone https://github.com/HHX300/forward-collision-warning-system.git

# 若 git clone 项目速度太慢, GitHub 提供直接下载 zip:
https://github.com/HHX300/forward-collision-warning-system/releases/tag/v5.0.0

#下载解压即可,但不能直接用 git 管理。
cd forward-collision-warning-system

2. 创建虚拟环境

conda create -n fcw python=3.10

3. 激活环境

conda activate fcw

4. 安装依赖

  • 安装pytorch依赖

    # 根据自己电脑的cuda和cpu情况选择相应版本,或者自行pytorch官网下载
    # CUDA 11.8
    pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cu118
    # CUDA 12.1
    pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cu121
    # CUDA 12.4
    pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cu124
    # CPU only
    pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cpu
  • 安装相应依赖

    pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
    

5. 下载模型权重文件、测试视频(可选)

deepsort特征提取模型权重

通过网盘分享的文件:ckpt_t586_ZQP_car.t7
链接: https://pan.baidu.com/s/1grZQBNDAKmmJ_xYO6qmgvg?pwd=ZJW3 提取码: ZJW3
--来自百度网盘超级会员v8的分享

yolo目标检测模型权重(在pytorch<=2.5.0环境下)

通过网盘分享的文件:检测模型
链接: https://pan.baidu.com/s/1Xry6dZmdND2nmWWwQE19tg?pwd=ZJW9 提取码: ZJW9
--来自百度网盘超级会员v8的分享

车道线检测模型权重

通过网盘分享的文件:车道线检测模型
链接: https://pan.baidu.com/s/1JREfwVIEyjIYM0Bw6ly1tg?pwd=ZJW2 提取码: ZJW2
--来自百度网盘超级会员v2的分享

测试视频

通过网盘分享的文件:测试视频
链接: https://pan.baidu.com/s/1QrKhclTW3rDTadJfM1r1Dw 提取码: ZJW6
--来自百度网盘超级会员v8的分享

用户头像

通过网盘分享的文件:用户头像
链接: https://pan.baidu.com/s/14_WSEV5S5-Ka1UhnGr2pUA?pwd=ZJW1 提取码: ZJW1
--来自百度网盘超级会员v8的分享

三. 使用说明

运行程序

python main.py

📌 演示demo

演示GIF

四. ⭐⭐ 如果这个项目对你有帮助,请给个 Star!⭐⭐

About

ADAS 前车碰撞预警系统:True innovation does not come from closed barriers, but from sharing knowledge and lowering entry barriers so that more people can benefit.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages