SysCV/sam-hq

Runtime error in Colab

gttae opened this issue · 1 comments

Thank you for conducting such excellent research.
I have modified the train code to run it on Colab and executed it. However, I am leaving this message to seek advice because I encountered this error.

in build_sam_vit_b(checkpoint)
32
33 def build_sam_vit_b(checkpoint=None):
---> 34 return _build_sam(
35 encoder_embed_dim=768,
36 encoder_depth=12,

in _build_sam(encoder_embed_dim, encoder_depth, encoder_num_heads, encoder_global_attn_indexes, checkpoint)
61 image_embedding_size = image_size // vit_patch_size
62 sam = Sam(
---> 63 image_encoder=ImageEncoderViT(
64 depth=encoder_depth,
65 embed_dim=encoder_embed_dim,

in init(self, img_size, patch_size, in_chans, embed_dim, depth, num_heads, mlp_ratio, out_chans, qkv_bias, norm_layer, act_layer, use_abs_pos, use_rel_pos, rel_pos_zero_init, window_size, global_attn_indexes)
72
73 for i in range(depth):
---> 74 block = Block(
75 dim=embed_dim,
76 num_heads=num_heads,

in init(self, dim, num_heads, mlp_ratio, qkv_bias, norm_layer, act_layer, use_rel_pos, rel_pos_zero_init, window_size, input_size)
153 super().init()
154 self.norm1 = norm_layer(dim)
--> 155 self.attn = Attention(
156 dim,
157 num_heads=num_heads,

TypeError: Attention.init() got an unexpected keyword argument 'qkv_bias'

Can I receive the file 'pretrained_checkpoint/sam_vit_b_maskdecoder.pth'?