axvier 上面安裝運行yolox

1. 安裝yolovx

 

git clone https://github.com/Megvii-BaseDetection/YOLOX.git
cd YOLOX
python3 -m pip install -r requirements.txt


報錯,在pyton環境下按照requirements.txt 文件裏面的包順序 import
發現,只有import numpy 成功

於是,按照requirments.txt裏面順序一個一個安裝
1. 注意numpy>=1.15,默認安裝的是1.13,此版本的numpy 會導致後面的包安裝錯誤

python3 -m pip install numpy==1.15 -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install torch==1.7 -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install opencv_python -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install loguru -i https://pypi.tuna.tsinghua.edu.cn/simple
......

Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects

onnx  模塊裝不了,可以不裝



安裝好後運行:
python3 tools/demo.py demo -n yolox-l -c ./weights/yolox_l.pth.tar --path ./10-14-35.mp4 --conf 0.25 --nms 0.45 --tsize 640 --save_result --device gpu

出現錯誤:
AssertionError: Torch not compiled with CUDA enabled
查詢vn原因是pytorch, cuda 版本不對應造成

官方正確的關系是
# CUDA 10.2 conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.2 -c pytorch

沒找到
torchvision==0.9.0
改成
torchvision==0.9.1



安裝成功後還是報
AssertionError: Torch not compiled with CUDA enabled
 



torchvision==0.9.0
posted @ 2021-11-28 22:47  wangaolin  阅读(362)  评论(0编辑  收藏  举报