junjiehe96 / FastInst

[CVPR2023] FastInst: A Simple Query-Based Model for Real-Time Instance Segmentation
MIT License
175 stars 16 forks source link

AttributeError: 'collections.OrderedDict' object has no attribute 'detach' #41

Closed yyhuang01 closed 4 months ago

yyhuang01 commented 4 months ago

(fastinst) root@/FastInst# python tools/convert-timm-to-d2.py checkpoint_file/fastinst_R50-vd-dcn_ppm-fpn_x3_640_40.1.pth checkpoint_file/fastinst_R50-vd-dcn_ppm-fpn_x3_640_40.1.pkl model -> backbone.model Traceback (most recent call last): File "tools/convert-timm-to-d2.py", line 34, in newmodel[k] = obj.pop(old_k).detach().numpy() AttributeError: 'collections.OrderedDict' object has no attribute 'detach' 试图使用您的工具转换模型时出现了如上错误,我该如何解决?

yyhuang01 commented 4 months ago

是不是因为我的模型下载错了?我应该使用实例中说的那个模型去进行转换?