作者 |肆十二
来源 | CSDN博客
conda config --remove-key channelsconda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/pytorch/conda config --set show_channel_urls yespipconfigsetglobal.index-urlhttps://mirrors.ustc.edu.cn/pypi/web/simple
conda create -n yolo5 python==3.8.5condaactivateyolo5
安装之前一定要先更新你的显卡驱动,去官网下载对应型的驱动安装
30系显卡只能使用cuda11的版本
一定要创建虚拟环境,这样的话各个深度学习框架之间不发生冲突
conda install pytorch==1.8.0 torchvision torchaudio cudatoolkit=10.2 # 注意这条命令指定Pytorch的版本和cuda的版本condainstallpytorch==1.8.0torchvision==0.9.0torchaudio==0.8.0cpuonly#CPU的小伙伴直接执行这条命令即可
安装完毕之后,我们来测试一下GPU是否
pipinstallpycocotools-windowspip install -r requirements.txtpip install pyqt5pipinstalllabelme
pythondetect.py--sourcedata/images/bus.jpg--weightspretrained/yolov5s.ptpython detect.py --source 0 # webcamfile.jpg # imagefile.mp4 # videopath/ # directorypath/*.jpg # glob'https://youtu.be/NUsoVlDFqZg' # YouTube video'rtsp://example.com/media.mp4'#RTSP,RTMP,HTTstream
YOLO_Mask└─ score├─ images│ ├─ test # 下面放测试集图片│ ├─ train # 下面放训练集图片│ └─ val # 下面放验证集图片└─ labels├─ test # 下面放测试集标签├─ train # 下面放训练集标签├─val#下面放验证集标签
pythontrain.py--datamask_data.yaml--cfgmask_yolov5s.yaml--weightspretrained/yolov5s.pt--epoch100--batch-size4--devicecpu分享
点收藏
点点赞
点在看
文章转发自AI科技大本营微信公众号,版权归其所有。文章内容不代表本站立场和任何投资暗示。
Copyright © 2021.Company 元宇宙YITB.COM All rights reserved.元宇宙YITB.COM