当前位置: 首页 > news >正文

买正品去哪个网站最好深圳设计院有哪些

买正品去哪个网站最好,深圳设计院有哪些,手机网站可以做英文版本吗,哪个网站做质量认证书范本若该文为原创文章#xff0c;转载请注明原文出处。 Swin Transformer是做什么的这里不做介绍#xff0c;主要是记录下学习的全过程#xff0c;Swin Transformer在搭建和训练的过程中#xff0c;折腾了很久#xff0c;主要是在折腾环境。 一、AutoDL租用实例 个人没有GP…若该文为原创文章转载请注明原文出处。 Swin Transformer是做什么的这里不做介绍主要是记录下学习的全过程Swin Transformer在搭建和训练的过程中折腾了很久主要是在折腾环境。 一、AutoDL租用实例 个人没有GPU电脑使用的是租的,平台是AutoDL。 GPU使的是RTX 2080Ti一小时0.88元整个过程大概3-5小时很划算。 实例创建过程自行了解创建后打开界面如下 二、环境搭建 1、创建虚拟机 conda create -n swin_env python3.8 2、激活虚拟机 ​​​​​​​conda activate swin_env 激活出错IMPORTANT: You may need to close and restart your shell after running conda init. 重新进入虚拟环境 source activate 3、CUDA和pytorch版本安装 根据文档先查出对应版本 python -c import torch;print(torch.__version__);print(torch.version.cuda) 根据CUDA版本安装pytorch,对应版本查询Previous PyTorch Versions | PyTorch 根据CUDA版本对应安装我安装的是下面版本安装过程比较久耐心等待 conda install pytorch1.7.1 torchvision0.8.2 torchaudio0.7.2 cudatoolkit10.1 -c pytorch 4、安装mmcv git clone -b v1.4.0 https://github.com/open-mmlab/mmcv.git. cd mmcv MMCV_WITH_OPS1 pip install -e . pip list 5、安装mmdetection git clone -b v2.25.0 https://github.com/open-mmlab/mmdetection.git cd mmdetection pip install -r requirements/build.txt pip install -v -e . # or python setup.py 根据测试在运行时会出错 这个原因是cython版本问题所以需要降级 pip install cython0.29.36 降级后重新安装运行正常。 6、安装apex 安装apex是个坑在后面测试时出错了AttributeError: module ‘torch.distributed’ has no attribute ‘_all_gather_base’这个错误这个是错误是apex安装不对造成的所以要安装对。 git clone https://github.com/NVIDIA/apex.git cd apex git checkout f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0 python setup.py install pip install -v --no-cache-dir ./ 7、Swin-Transformer-Object-Detection下载 git clone https://github.com/SwinTransformer/Swin-Transformer-ObjectDetection.git cd Swin-Transformer-Object-Detection python setup.py develop 安装一切都比较正常接下来就是测试测试需要预训练权重文件所以先下载权重文件。 8、下载预训练权重文件 下载mask_rcnn_swin_tiny_patch4_window7_1x.pth权重文件并放置在Swin-Transformer-ObjectDetection文件夹下 百度网盘下载链接 链接https://pan.baidu.com/s/1cO3ln3fokP3cazveC-bjuw 提取码uzzk 下载后放在Swin-Transformer-Object-Detection目录下。 9、测试 直接在Swin-Transformer-Object-Detection目录下执行下面命令 python demo/image_demo.py demo/demo.jpg configs/swin/mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_adamw_1x_coco.py mask_rcnn_swin_tiny_patch4_window7_1x.pth 在运行过程中有报错 1、报错 AttributeError: module ‘torch.distributed’ has no attribute ‘_all_gather_base’ 如果是根据上面的安装apex应该是不会出错的。 2、报错 UserWarning: ImageToTensor pipeline is replaced by DefaultFormatBundle for batch inference. It is recommended to manually replace it in the test data pipeline in your config file. 处理参考安装mmdetection进行测试不出图片和报错记录_userwarning: imagetotensor pipeline is replac-CSDN博客 提示我们需要将pipline中的“ImgeToTensor”换成“DefaultFormatBundle”文件夹指引configs——base——datasets——coco_detection.py按ctrlF进行搜索“test_pipeline”,将transforms下的“ImageToTensor”改为“DefaultFormatBundle”然后删除后面的 keys[‘img’]。 这里有个需要注意的使用的是ubuntu虚拟机所以无法显示所以修改了下代码把结果保存下来。 # demo/image_demo.pyfrom argparse import ArgumentParserfrom mmdet.apis import inference_detector, init_detector, show_result_pyplotdef main():parser ArgumentParser()parser.add_argument(img, helpImage file)parser.add_argument(config, helpConfig file)parser.add_argument(checkpoint, helpCheckpoint file)parser.add_argument(--device, defaultcuda:0, helpDevice used for inference)parser.add_argument(--score-thr, typefloat, default0.3, helpbbox score threshold)args parser.parse_args()# build the model from a config file and a checkpoint filemodel init_detector(args.config, args.checkpoint, deviceargs.device)# test a single imageresult inference_detector(model, args.img)# show the results#show_result_pyplot(model, args.img, result, score_thrargs.score_thr)model.show_result(args.img, result, out_fileresult.jpg)if __name__ __main__:main() 运行后有保存成result.jpg图片。 到此环境搭建完成并实现了目标检测和分割。 如有侵权或需要完整代码请及时联系博主。
http://www.dnsts.com.cn/news/202984.html

相关文章:

  • 中国建设部建造师网站手机无人区离线地图app
  • 零基础学pytho 网站开发深圳燃气公司电话多少
  • 如何注册一家网站建设公司权威网站建设公司
  • 南宁网站建设王道下拉強espcms易思企业网站系统
  • 网站明确内容作风建设简报--门户网站
  • vs做的网站排版错位做渠道的网站有哪些方面
  • 黄页推广网站招标网官网入口
  • 知名企业网站人才招聘情况网站后台怎么上传图片产品
  • 房地产信息网查询专业网站优化公司排名
  • 网站建设的工期拖延如何解决广告设计公司绩效考核
  • 网站内容优化关键词布局汕头企业网站建设设计
  • dns加网站长沙谷歌优化
  • 视频网站 外链wordpress ajax 加载文章内容
  • 360免费建站官方百度指数人群画像哪里查询
  • 4435建站开发板
  • 网上家教网站开发沧县做网站价格
  • 外包网站开发wordpress支付查看插件
  • 密云做网站企业网站建设的三种方式并举例
  • 物流网站建设图片沈阳制作网站的公司
  • 重庆网站建设模板wordpress网站密码
  • 深圳做网站什么公司好网站开发 自动生成缩略图
  • 贵阳双龙区建设局网站泰安诚信的网站建设
  • 河南教育平台网站建设手游源码
  • 网站建设哪家好知道万维科技做网站商城必须要买空间吗
  • 个人网站logo公众号的维护与运营
  • 南京安居建设集团网站wordpress 博客同步
  • 医院网站做品牌推广需要哪些电子商务软文写作
  • 安徽省建设厅八大员报名网站网站设计平台 动易
  • 一般网站尺寸国外手机网站模板
  • wordpress模板站杭州江干区抖音seo品牌