一、环境配置
参考链接:https://blog.csdn.net/weixin_39916966/article/details/103199105
安装Cuda9.0+cuDNN7.4
anaconda创建虚拟环境:conda create -n pytorch13 python=3.6.8,进入环境,conda activate pytorch13
安装pytorch1.3:conda install pytorch=1.3 torchvision cudatoolkit=10.1 -c pytorch
安装opencv:pip install opencv-python==3.4.5.20
安装fvcore: pip install 'git+https://github.com/facebookresearch/fvcore'
安装pycocotools:
pip install cython;
pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
确保gcc>=4.9 gcc --version
安装tensorboard
pip install tensorboard
安装detectron2
git clone [https://github.com/facebookresearch/detectron2.git]
cd detectron2
python setup.py build develop
若pytorch1.3命令下载不下来,可通过网页端手动下载,在进行安装
window,anaconda下安装tar.bz2文件命令:
进入到待安装的虚拟环境中
本地安装命令:conda install --use-local <your-pkg-name>
conda install --use-local pytorch-1.3.1-py3.5_cuda101_cudnn7_0.tar.bz2
二、YAML基本语法
参考链接:https://blog.csdn.net/m0_37664906/article/details/81708975
yaml文件在detectron2整个框架中作为配置文件进行参数配置的
YAML以数据为中心,比json、xml等更适合做配置文件
1:基本语法规则
大小写敏感 使用缩进表示层级关系 缩进时不允许使用Tab键,只允许使用空格 缩进的空格数目不重要,只要相同层级的元素左对齐即可。
2、支持的数据结构
3、具体写法
如下所示:
name: zhangsan
age: 20
isBoss: false
多行写法使用- 值
来表示数组中的一个元素,需要注意缩进;单行使用[值,值]
来表示一个数组
#多行结构
friends:
- zhangsan
- lisi
- wangwu
#单行结构
friend:[zhangsan,lisi,wangwu]
多行写法:key:value的形式,使用多行写法需要注意缩进
单行写法:使用{key:value}的形式书写
#多行结构
friend:
name:zhangsan
age:20
#单行结构
friend:{name:zhangsan,age:20}
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有