Ultra-Fast-Lane-Detection-v2道路标线检测环境部署及Visualization实现
本文主要是对 cfzd/Ultra-Fast-Lane-Detection-v2的项目代码进行本地部署,针对的是ubuntu环境部署。简单记录一下环境部署的流程。
环境安装
直接查看官方INSTALL.md的1,2,3,4部分,我只着重讲一下第5部分。
opencv c++ 安装
1、仅构建核心模块
# Install minimal prerequisites (Ubuntu 18.04 as reference)
sudo apt update && sudo apt install -y cmake g++ wget unzip
# Download and unpack sources
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
unzip opencv.zip
# Create build directory
mkdir -p build && cd build
# Configure
cmake ../opencv-4.x
# Build
cmake --build .
2、安装
构建完成之后,还需要进行安装,直接在build目录下安装即可:
sudo make install
默认情况下,OpenCV 将安装到该*/usr/local*目录。
以上步骤完成之后还需要构建软连接:
# After installation, make a soft link of OpenCV include path.
ln -s /usr/local/include/opencv4/opencv2 /usr/local/include/opencv2
构建 CULane evaluation tools
方法1:
cd evaluation/culane
make
方法2:
cd evaluation/culane
mkdir build && cd build
cmake ..
make
mv culane_evaluator ../evaluate
Visualization
作者提供了脚本来可视化检测结果:
python demo.py configs/culane_res18.py --test_model /path/to/your/culane_res18.pth
configs/culane_res18.py需要添加下载的数据路径:
data_root= '/data/CULane' # Need to be modified before running