滕州网站建设 助企网络,阿里云搭建网站,马鞍山网站建设开发,wordpress批量导入文章由于实验室服务器的环境不匹配#xff0c;需要重新再在的包很多#xff0c;我转成了云上服务器AutoDL。
通过github我下载了yolov5的5.0版本“yolov5-5.0”.
下载之后会有tutoral.py的教程文件。
通过Setup模块来配置相关环境#xff1a;
!git clone https://github.com…由于实验室服务器的环境不匹配需要重新再在的包很多我转成了云上服务器AutoDL。
通过github我下载了yolov5的5.0版本“yolov5-5.0”.
下载之后会有tutoral.py的教程文件。
通过Setup模块来配置相关环境
!git clone https://github.com/ultralytics/yolov5 # clone repo
%cd yolov5
%pip install -qr requirements.txt # install dependenciesimport torch
from IPython.display import Image, clear_output # to display imagesclear_output()
print(Setup complete. Using torch %s %s % (torch.__version__, torch.cuda.get_device_properties(0) if torch.cuda.is_available() else CPU))
这第一行代码是直接下载yolov5文件的压缩包即通过github下载了一次yolov5文件再下载一个。
第二行代码是进入yolov5文件夹的意思。
第三行代码是一次性下载所有相关包的意思。
在终端运行python train.py之后出现的报错问题 Exception has occurred: RemoteDisconnected Remote end closed connection without response 关了梯子成功运行 untimeError: Given groups1, weight of size [512, 1024, 1, 1], expected input[1, 512, 8, 8] to have 1024 channels, but got 512 channels instead 在train.py文件中
parser.add_argument(--cfg, typestr, defaultmodels/yolov5s.yaml, helpmodel.yaml path)修改if name ‘main’:里的 cfg的dafault为‘models/yolov5s.yaml’即可 WARNING: Dataset not found, nonexistent paths: [/root/autodl-tmp/coco128/images/train2017] 按照提示在指定文件夹下创建文件夹完善目录结构