赞
踩
复现Ultra-Fast-Lane-Detection-v2道路标线检测
执行该代码:
python train.py /line_detection/UFLD-v2/configs/tusimple_res18.py --log_path /line_detection/UFLD-v2/log
报错:
ModuleNotFoundError: No module named 'nvidia':
具体如下:
Traceback (most recent call last):
File "train.py", line 8, in <module>
from utils.common import calc_loss, get_model, get_train_loader, inference, merge_config, save_model, cp_projects
File "/line_detection/UFLD-v2/utils/common.py", line 2, in <module>
from data.dali_data import TrainCollect
File "/line_detection/UFLD-v2/data/dali_data.py", line 4, in <module>
from nvidia.dali.pipeline import Pipeline
ModuleNotFoundError: No module named 'nvidia'
}
缺少了某种文件conda list | grep nvidia
没有输出
所以执行以下命令:
$ pip install nvidia-pyindex
$ pip install nvidia-dali
再次执行 conda list | grep nvidia
输出如下:
nvidia-dali 0.7.0 pypi_0 pypi
nvidia-pyindex 1.0.9 pypi_0 pypi
再次执行该代码:
python train.py /line_detection/UFLD-v2/configs/tusimple_res18.py --log_path /line_detection/UFLD-v2/log
报错如下:
Traceback (most recent call last):
File "train.py", line 8, in <module>
from utils.common import calc_loss, get_model, get_train_loader, inference, merge_config, save_model, cp_projects
File "//line_detection/UFLD-v2/utils/common.py", line 2, in <module>
from data.dali_data import TrainCollect
File "/line_detection/UFLD-v2/data/dali_data.py", line 6, in <module>
import nvidia.dali.fn as fn
ModuleNotFoundError: No module named 'nvidia.dali.fn'
执行以下命令:
注意对应cuda的版本
。
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda102
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda110
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/cuda/10.0 nvidia-dali
问题解决!!!!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。