-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encountered an error while running the demo script for few-shot VOC inference in object detection. #76
Comments
The model complains that missing weights in the instance mask segmentation branch. Maybe you load the wrong checkpoint? You may want to load the ViT-L trained on LVIS one, instead of the one in VOC, if you want to use the mask branch. |
I tried using the ViT-L on LVIS one, did I do it correctly? the path is located on open-vocabulary folder?
But I still got the error like "offline_backbone.bottom_up.res5.2.conv2.norm.running_var", "offline_backbone.bottom_up.res5.2.conv2.norm.num_batches_tracked", "offline_backbone.bottom_up.res5.2.conv3.weight", "offline_backbone.bottom_up.res5.2.conv3.norm.weight", "offline_backbone.bottom_up.res5.2.conv3.norm.bias", "offline_backbone.bottom_up.res5.2.conv3.norm.running_mean", "offline_backbone.bottom_up.res5.2.conv3.norm.running_var", "offline_backbone.bottom_up.res5.2.conv3.norm.num_batches_tracked", "offline_proposal_generator.rpn_head.conv.conv0.weight", "offline_proposal_generator.rpn_head.conv.conv0.bias", "offline_proposal_generator.rpn_head.conv.conv1.weight", "offline_proposal_generator.rpn_head.conv.conv1.bias", "per_cls_cnn.main_layers.3.0.weight", "per_cls_cnn.main_layers.3.0.bias", "per_cls_cnn.main_layers.3.1.weight", "per_cls_cnn.main_layers.3.1.bias", "per_cls_cnn.main_layers.3.1.running_mean", "per_cls_cnn.main_layers.3.1.running_var", "per_cls_cnn.main_layers.3.1.num_batches_tracked", "per_cls_cnn.main_layers.4.0.weight", "per_cls_cnn.main_layers.4.0.bias", "per_cls_cnn.main_layers.4.1.weight", "per_cls_cnn.main_layers.4.1.bias", "per_cls_cnn.main_layers.4.1.running_mean", "per_cls_cnn.main_layers.4.1.running_var", "per_cls_cnn.main_layers.4.1.num_batches_tracked", "per_cls_cnn.mask_layers.3.weight", "per_cls_cnn.mask_layers.3.bias", "per_cls_cnn.mask_layers.4.weight", "per_cls_cnn.mask_layers.4.bias", "bg_cnn.main_layers.3.0.weight", "bg_cnn.main_layers.3.0.bias", "bg_cnn.main_layers.3.1.weight", "bg_cnn.main_layers.3.1.bias", "bg_cnn.main_layers.3.1.running_mean", "bg_cnn.main_layers.3.1.running_var", "bg_cnn.main_layers.3.1.num_batches_tracked", "bg_cnn.main_layers.4.0.weight", "bg_cnn.main_layers.4.0.bias", "bg_cnn.main_layers.4.1.weight", "bg_cnn.main_layers.4.1.bias", "bg_cnn.main_layers.4.1.running_mean", "bg_cnn.main_layers.4.1.running_var", "bg_cnn.main_layers.4.1.num_batches_tracked", "bg_cnn.mask_layers.3.weight", "bg_cnn.mask_layers.3.bias", "bg_cnn.mask_layers.4.weight", "bg_cnn.mask_layers.4.bias". |
If you want to use the LVIS model, you need to reset the config and rpn_config file back to the origin. I think the part that you need to change is the
You may need to change the voc split and number of shots. |
Thank you for your reply! I understand that I need to update the category_space, but I’m not at that step yet. Right now, I’m stuck on loading the model. So you means my config file, rpn_config_file and model_path like the following? Because
Basically I am stuck on the following code:
I got the error like: Traceback (most recent call last): |
No, I mean # this three arguments shall be set to the original values
config_file="configs/open-vocabulary/lvis/vitl.yaml",
rpn_config_file="configs/RPN/mask_rcnn_R_50_FPN_1x.yaml",
model_path="weights/trained/open-vocabulary/lvis/vitl_0069999.pth",
# change this to prototypes of Pascal VOC classes
category_space="demo/ycb_prototypes.pth", |
Ok, thank you for your suggestions. But if I want to use a COCO configuration file, how should I specify the config file path? For example, my current setup looks like the following:
But these setting seems incorrect. How should I set things up properly? Which checkpoint should I use, and which RPN configuration file is needed to work with the COCO config file? If I want to use this one
|
You can try replacing the |
Hello, I tried replacing the RPN config file from mask_rcnn_R_50_FPN_1x.yaml to mask_rcnn_R_50_C4_1x_ovd_FSD.yaml. Does the code look correct? The code likes the following:
But I got the following error: RuntimeError: Error(s) in loading state_dict for OpenSetDetectorWithExamples: |
The COCO model does not have the instance mask branch. You need to turn off it at Line 177 in 9cab390
|
Thank you very much! It works! |
Hello, I am trying to using demo to do the inferences for few-shot VOC. My code as following:
I don't know which part I did wrong, but I got the error like :RuntimeError: Error(s) in loading state_dict for OpenSetDetectorWithExamples:
Missing key(s) in state_dict: "test_class_weight", "mask_intra_dist_emb.weight", "mask_intra_dist_emb.bias", "mask_bg_dist_emb.weight", "mask_bg_dist_emb.bias", "mask_feat_compress.0.weight", "mask_feat_compress.0.bias", "mask_feat_compress.1.weight", "mask_feat_compress.1.bias", "mask_feat_compress.2.weight", "mask_feat_compress.2.bias", "fc_init_mask.weight", "fc_init_mask.bias", "mp_layers.0.0.weight", "mp_layers.0.0.bias", "mp_layers.0.1.weight", "mp_layers.0.1.bias", "mp_layers.1.0.weight", "mp_layers.1.0.bias", "mp_layers.1.1.weight", "mp_layers.1.1.bias", "mp_layers.2.0.weight", "mp_layers.2.0.bias", "mp_layers.2.1.weight", "mp_layers.2.1.bias", "mp_layers.3.0.weight", "mp_layers.3.0.bias", "mp_layers.3.1.weight", "mp_layers.3.1.bias", "mp_layers.4.0.weight", "mp_layers.4.0.bias", "mp_layers.4.1.weight", "mp_layers.4.1.bias", "mp_out_layers.0.weight", "mp_out_layers.0.bias", "mp_out_layers.1.weight", "mp_out_layers.1.bias", "mp_out_layers.2.weight", "mp_out_layers.2.bias", "mp_out_layers.3.weight", "mp_out_layers.3.bias", "mp_out_layers.4.weight", "mp_out_layers.4.bias", "mask_deconv.0.weight", "mask_deconv.0.bias", "mask_deconv.1.weight", "mask_deconv.1.bias", "mask_predictor.weight", "mask_predictor.bias". So do you have any idea to help me out? Thank you very much!
The text was updated successfully, but these errors were encountered: