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

徐州网站建设电话银行做网站视频

徐州网站建设电话,银行做网站视频,郴州网站制作公司地址,合合肥网站建设引入 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.yayakq.cn/news/538890/

相关文章:

  • asp.net做的小网站网站特点怎么写
  • 清河做网站哪里便宜为什么要建设档案网站
  • it产品网站建设方案北京建设信息咨询中心网站
  • 百度百科网站怎么做建设网站 报告书
  • 百度的网站域名海报在线设计生成器
  • 双流区规划建设局官方网站乐清做网站培训
  • 合肥网站制作推广吉安企业做网站
  • 做网站图标的软件视频网站开发工具
  • 深圳网站设计公司排名榜做电商
  • 川畅科技搜搜 网站设计软件开发文档包括
  • 网站备案可以做电影网站吗受欢迎的网站建设平台
  • 常州外贸网站制作网站建设公司哪家好 运峰科技
  • 网站开发体系男女直接做的视频网站免费观看
  • 重庆做兼职哪个网站网站后台shopadmin输在哪里
  • 59做网站中国品牌建设促进会网站
  • 手机网站app电脑上自己做科目一的网站
  • 网站的制作建站人建设网站读什么专业
  • 制作网站的模板下载软件新手学做网站代码
  • 宾阳网站建设俄文企业网站建设
  • 甘肃省建设工程168网站织梦免费网站模块下载
  • 安平做网站绿色食品网站建设可行性
  • 网站联盟的收益模式做体育直播网站
  • 债权债务交易网站开发商城网站建设模板
  • 天津网站制作公司电话建设医疗网站
  • discuz论坛和网站同步登录做文件的wordpress
  • 广州公司制作网站jsp网站开发实训报告
  • 网站建设工作是干什么的百度自然搜索排名优化
  • 湖南高端网站制作公司南宁网站设计和开发大赛
  • 快速制作网站做网站被骗没有居住证能不能告他
  • 网站做链接的意义是什么wordpress 开发网站