YOLOv3测试和训练

参考文章:

学习YOLO系列的个人总结_boss-dog的博客-CSDN博客

windows操作系统上运行ultralytics/yolov3进行目标检测_itsgoodtobebad的专栏-CSDN博客

0.环境

windows10

1.下载

2.建立虚环境、安装包

安装包非常缓慢 忘了指定下载源

$ pip install -r requirements.txt

指定下载源

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

3下载权重文件

4.运行

python detect.py --source data/images --weights yolov3.pt --conf 0.25

出现问题1.

用Pycharm运行后出现“No module named 'cv2'”错误的终极解决方案_Rock N' Roll Forever-CSDN博客

PyCharm使用opencv错误解决办法:ModuleNotFoundError: No module named 'cv2'/ImportError: DLL load failed_柳鲲鹏-CSDN博客

巨坑 之 pip install 和 conda install 的区别 以及 查看 和 修改 虚拟环境下运行路径_NuerNuer的博客-CSDN博客

使用conda安装opencv成功解决

出现问题2:

ImportError: Failed to load PyTorch C extensions:
    It appears that PyTorch has loaded the `torch/_C` folder
    of the PyTorch repository rather than the C extensions which
    are expected in the `torch._C` namespace. This can occur when
    using the `install` workflow. e.g.
        $ python setup.py install && python -c "import torch"

    This error can generally be solved using the `develop` workflow
        $ python setup.py develop && python -c "import torch"  # This should succeed
    or by running Python from a different directory.
 

按提示解决出现:

python: can't open file 'setup.py': [Errno 2] No such file or directory
 

安装pytorch

更新pandas

你可能感兴趣的:(python)