autodistill / autodistill-grounded-sam

GroundedSAM Base Model plugin for Autodistill
https://docs.autodistill.com
Apache License 2.0
44 stars 8 forks source link

incompatible keys #4

Closed tfriedel closed 1 year ago

tfriedel commented 1 year ago

When running

from autodistill_grounded_sam import GroundedSAM

base_model = GroundedSAM(ontology=ontology)

I get this output:

_IncompatibleKeys(missing_keys=['mask_decoder.hf_token.weight', 'mask_decoder.hf_mlp.layers.0.weight', 'mask_decoder.hf_mlp.layers.0.bias', 'mask_decoder.hf_mlp.layers.1.weight', 'mask_decoder.hf_mlp.layers.1.bias', 'mask_decoder.hf_mlp.layers.2.weight', 'mask_decoder.hf_mlp.layers.2.bias', 'mask_decoder.compress_vit_feat.0.weight', 'mask_decoder.compress_vit_feat.0.bias', 'mask_decoder.compress_vit_feat.1.weight', 'mask_decoder.compress_vit_feat.1.bias', 'mask_decoder.compress_vit_feat.3.weight', 'mask_decoder.compress_vit_feat.3.bias', 'mask_decoder.embedding_encoder.0.weight', 'mask_decoder.embedding_encoder.0.bias', 'mask_decoder.embedding_encoder.1.weight', 'mask_decoder.embedding_encoder.1.bias', 'mask_decoder.embedding_encoder.3.weight', 'mask_decoder.embedding_encoder.3.bias', 'mask_decoder.embedding_maskfeature.0.weight', 'mask_decoder.embedding_maskfeature.0.bias', 'mask_decoder.embedding_maskfeature.1.weight', 'mask_decoder.embedding_maskfeature.1.bias', 'mask_decoder.embedding_maskfeature.3.weight', 'mask_decoder.embedding_maskfeature.3.bias'], unexpected_keys=[])

It still seems to function though.

edit: Here's the same issue: https://github.com/SysCV/sam-hq/issues/6

Seems like I messed up by having sam-hq installed as well. Uninstalling fixed it.