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

2017主流网站开发语言免费培训机构

2017主流网站开发语言,免费培训机构,政府部门建立网站的作用,电影网站做淘客引入 Grounding 目标检测模型串联 SAM 从而实现实例分割任务,目前支持 Grounding DINO 和 GLIP 参考教程 MMDetection-SAM 如果是 Grounding DINO 则安装如下依赖即可 cd playground pip install githttps://github.com/facebookresearch/segment-anything.git pip…

引入 Grounding 目标检测模型串联 SAM 从而实现实例分割任务,目前支持 Grounding DINO 和 GLIP

参考教程

MMDetection-SAM

如果是 Grounding DINO 则安装如下依赖即可

cd playground
pip install git+https://github.com/facebookresearch/segment-anything.git
pip install git+https://github.com/IDEA-Research/GroundingDINO.git # 需要编译 CUDA OP,请确保你的 PyTorch 版本、GCC 版本和 NVCC 编译版本兼容

如果是 GLIP 则安装如下依赖即可

cd playgroundpip install git+https://github.com/facebookresearch/segment-anything.git
pip install einops shapely timm yacs tensorboardX ftfy prettytable pymongo transformers nltk inflect scipy pycocotools opencv-python matplotlibgit clone https://github.com/microsoft/GLIP.git
cd GLIP; python setup.py build develop --user  # 需要编译 CUDA OP,请确保你的 PyTorch 版本、GCC 版本和 NVCC 编译版本兼容,暂时不支持 PyTorch 1.11+ 版本

执行功能演示代码报错

(mmdet-sam) hadoop@server:~/jupyter/mmdet-sam/playground/mmdet_sam$ python detector_sam_demo.py ../images/cat_remote.jpg \
    configs/GroundingDINO_SwinT_OGC.py \
    ../models/groundingdino_swint_ogc.pth \
    -t "cat . remote" \
    --sam-device cpu
[nltk_data] Downloading package punkt to /home/hadoop/nltk_data...
[nltk_data]   Package punkt is already up-to-date!
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /home/hadoop/nltk_data...
[nltk_data]   Package averaged_perceptron_tagger is already up-to-
[nltk_data]       date!
final text_encoder_type: bert-base-uncased
pytorch_model.bin: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 440M/440M [00:25<00:00, 17.2MB/s]
Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.seq_relationship.bias', 'cls.seq_relationship.weight', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.bias']
- This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Traceback (most recent call last):
  File "detector_sam_demo.py", line 511, in <module>
    main()
  File "detector_sam_demo.py", line 438, in main
    det_model = build_detecter(args)
  File "detector_sam_demo.py", line 160, in build_detecter
    detecter = __build_grounding_dino_model(args)
  File "detector_sam_demo.py", line 117, in __build_grounding_dino_model
    checkpoint = torch.load(args.det_weight, map_location='cpu')
  File "/home/hadoop/anaconda3/envs/mmdet-sam/lib/python3.8/site-packages/torch/serialization.py", line 600, in load
    with _open_zipfile_reader(opened_file) as opened_zipfile:
  File "/home/hadoop/anaconda3/envs/mmdet-sam/lib/python3.8/site-packages/torch/serialization.py", line 242, in __init__
    super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
OSError: [Errno 22] Invalid argument

其中 242行代码长这样

这个语句是打开一个文件, 检查输入参数

模型地址: ../models/groundingdino_swint_ogc.pth

发现此模型只有44k, 肯定不对, 重新下载模型, 有662M, 重新下载模型重新跑

遇到此问题, 在网上搜答案是找不到的, 还是要分析好自己的输入参数

http://www.yidumall.com/news/105109.html

相关文章:

  • 源码怎么做网站优化网站教程
  • 做简单网站代码电商网站推广方案
  • 有一个专门做lol同人的网站正规seo需要多少钱
  • b站入口企业关键词优化专业公司
  • 合肥网站设计制作婚恋网站排名前十名
  • 产品设计师网站hs网站推广
  • 软环境建设办公室网站百度推广工作好干吗
  • 网站有收录没排名营销策划精准营销
  • 义乌公司网站青岛谷歌优化
  • 自己做公司网站成本百度推广工具有哪些
  • 动易后台 网站统计调查 报表类型怎样使用seo优化主要工作内容
  • 佛山网站建设企业2024年阳性什么症状
  • 快速建站平台源码鸿星尔克网络营销案例分析
  • 公司网站设计解决方案百度知道官网登录入口
  • 做网站的怎么跑业务海南seo代理加盟供应商
  • 生物商城网站建设营销策略方案
  • 网站空间的价格微信推广引流平台
  • 渭南网站建设风尚网络百度关键词搜索广告的优缺点
  • 徐州企业网站建设搜索引擎技巧
  • 做网站建本地环境作用策划方案
  • 西安专业得网站建设公司最近国内新闻
  • 做区位分析的地图网站seo推广培训资料
  • 杭州网络游戏公司排名连云港网站seo
  • 《网站开发与应用seo咨询
  • 桂城网站建设制作安徽网站开发哪家好
  • 网站seo谷歌互联网销售
  • 全球速卖通怎么开店优化大师 win10下载
  • 商城网站建设策划书google付费推广
  • 网站域名 代办谷歌seo招聘
  • 邯郸网站建设联系电话如何创建个人网站免费