yolo入门

之前做过一遍,但是没记笔记,寄

anaconda

注意加上path

1
2
3
4
5
6
7
8
9
10
11
12
13
# 创建
conda create -n yolov5 python=3.7 -y
# 激活
conda activate yolov5
# 先安装cuda再安装requirement
# 有两个安不上
conda install -c https://conda.anaconda.org/menpo opencv
pip install opencv-python
pip3 install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
conda install -c https://conda.anaconda.org/menpo thop
pip3 install thop -i https://pypi.tuna.tsinghua.edu.cn/simple
# 删除
conda env remove --name yolov5

代理

C:\Users\02\AppData\Roaming\pip下的pip.ini

1
2
3
4
5
6
7
[global]

timeout = 6000

index-url =https://mirrors.aliyun.com/pypi/simple/

trusted-host =mirrors.aliyun.come

ide

1
2
3
# 切换环境到yolov5
pip install -r requirement.txt
# 我是懒逼,我直接打开txt文件让ide自己装

cuda

官网找命令然后去掉 -c pytorch 换成 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/