YOLOv5的详细使用教程,以及使用yolov5训练自己的数据集
文章目录:
本人环境声明:
系统环境:Ubuntu18.04.1cuda版本:10.2.89cudnn版本:7.6.5torch版本:1.5.0torchvision版本:0.6.0- 项目代码
yolov5,官网,项目开源的时间:20200601
自定义数据集:
1 安装环境依赖
1.1 克隆项目
git clone https://github.com/ultralytics/yolov5 # clone repo
如果下载比较慢,建议使用下面的镜像下载:
git clone https://github.com.cnpmjs.org/ultralytics/yolov5 # clone repo
1.2 安装必要的环境依赖
官方给出的要求是:python>=3.7、PyTorch>=1.5,安装依赖:
cd yolov5
pip install -U -r requirements.txt
requirements.txt
# pip install -U -r requirements.txt
Cython
numpy==1.17
opencv-python
torch>=1.5
matplotlib
pillow
tensorboard
PyYAML>=5.3
torchvision
scipy
tqdm
git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
# Nvidia Apex (optional) for mixed precision training --------------------------
# git clone https://github.com/NVIDIA/apex && cd apex && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . --user && cd .. && rm -rf apex
# Conda commands (in place of pip) ---------------------------------------------
# conda update -yn base -c defaults conda
# conda install -yc anaconda numpy opencv matplotlib tqdm pillow ipython
# conda install -yc conda-forge scikit-image pycocotools tensorboard
# conda install -yc spyder-ide spyder-line-profiler
# conda install -yc pytorch pytorch torchvision
# conda install -yc conda-forge protobuf numpy && pip install onnx # https://github.com/onnx/onnx#linux-and-macos
2 下载预训练模型和标注的数据集
2.1 下载预训练模型
2.1.1 执行脚本下载预训练模型
/yolov5/weights/download_weights.sh脚本定义下载预训练模型,脚本代码内容如下:
#!/bin/bash
# Download common models
python3 -c "from utils.goog
1万+




被折叠的 条评论
为什么被折叠?



