Skip to content
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

Number of noun categories of the object detector for v2.0 #33

Open
kylemin opened this issue Oct 10, 2023 · 0 comments
Open

Number of noun categories of the object detector for v2.0 #33

kylemin opened this issue Oct 10, 2023 · 0 comments

Comments

@kylemin
Copy link

kylemin commented Oct 10, 2023

Hi,

I want to produce object detections following this instruction. It works well for v1.0, but does not work for v2.0. I found that although the number of noun categories is 128, the shape of roi_heads.box_predictor.cls_score.weight of the downloaded v2.0 model (v2/sta_models/object_detector.pth) is (130, 1024). I think it should be (129, 1024).

For v1.0, the number of noun categories is 87 and the shape of roi_heads.box_predictor.cls_score.weight is (88, 1024), so it does not cause any error. I cannot load the v2.0 model and I wonder why it assumes 129 categories when there are only 128 categories in the annotations.

For v2.0, the error message looks as follows:

Skip loading parameter 'roi_heads.box_predictor.cls_score.weight' to the model due to incompatible shapes: (130, 1024) in the checkpoint but (129, 1024) in the model! You might want to double check if this is expected.
Skip loading parameter 'roi_heads.box_predictor.cls_score.bias' to the model due to incompatible shapes: (130,) in the checkpoint but (129,) in the model! You might want to double check if this is expected.
Skip loading parameter 'roi_heads.box_predictor.bbox_pred.weight' to the model due to incompatible shapes: (516, 1024) in the checkpoint but (512, 1024) in the model! You might want to double check if this is expected.
Skip loading parameter 'roi_heads.box_predictor.bbox_pred.bias' to the model due to incompatible shapes: (516,) in the checkpoint but (512,) in the model! You might want to double check if this is expected.
Some model parameters or buffers are not found in the checkpoint:
roi_heads.box_predictor.bbox_pred.{bias, weight}
roi_heads.box_predictor.cls_score.{bias, weight}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant