Skip to content

Latest commit

 

History

History

cpp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
  1. Start docker 启动命令可参考: README.md

  2. Prepare model

wget https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m.pt
  1. Prepare env
conda config --add channels conda-forge
conda update --all -y

  1. Prepare scripts
conda config --add channels conda-forge
conda update --all -y 

git clone https://github.com/ultralytics/yolov5.git -b v6.0
cd yolov5 && pip install -r requirements.txt

export PYTHONPATH=$PYTHONPATH:/path/to/yolov5

# 若运行 第5步报错找不到libmusa_kernels.so,可以添加以下环境变量 
# export LD_LIBRARY_PATH=/path/to/torch_musa/lib/:$LD_LIBRARY_PATH
# 例如 export LD_LIBRARY_PATH=/opt/conda/envs/py310/lib/python3.10/site-packages/torch_musa/lib/:$LD_LIBRARY_PATH

  1. Build
cd cpp
python load_model.py --models path/to/yolov5m.pt
bash build.sh
  1. Inference
./build/example-app yolov5m_jit.pt