amazon-science / bigdetection

BigDetection: A Large-scale Benchmark for Improved Object Detector Pre-training
Apache License 2.0
391 stars 25 forks source link

Config for Cascade R-CNN #9

Closed dzhurak closed 2 years ago

dzhurak commented 2 years ago

Hello, the config for Cascade R-CNN is missing. I tried to use the one from Detectron2 without the mask head but got the following error

        Missing key(s) in state_dict: "backbone.fpn_lateral2.weight", "backbone.fpn_lateral2.bias", "backbone.fpn_output2.weight", "backbone.fpn_output2.bias".
        Unexpected key(s) in state_dict: "backbone.top_block.p6.weight", "backbone.top_block.p6.bias", "backbone.top_block.p7.weight", "backbone.top_block.p7.bias".
        size mismatch for proposal_generator.rpn_head.objectness_logits.weight: copying a param with shape torch.Size([9, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([3, 256, 1, 1]).
        size mismatch for proposal_generator.rpn_head.objectness_logits.bias: copying a param with shape torch.Size([9]) from checkpoint, the shape in current model is torch.Size([3]).
        size mismatch for proposal_generator.rpn_head.anchor_deltas.weight: copying a param with shape torch.Size([36, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([12, 256, 1, 1]).
        size mismatch for proposal_generator.rpn_head.anchor_deltas.bias: copying a param with shape torch.Size([36]) from checkpoint, the shape in current model is torch.Size([12])
bryanyzhu commented 2 years ago

@cailk any thought?

cailk commented 2 years ago

Hello, the config for Cascade R-CNN is missing. I tried to use the one from Detectron2 without the mask head but got the following error

        Missing key(s) in state_dict: "backbone.fpn_lateral2.weight", "backbone.fpn_lateral2.bias", "backbone.fpn_output2.weight", "backbone.fpn_output2.bias".
        Unexpected key(s) in state_dict: "backbone.top_block.p6.weight", "backbone.top_block.p6.bias", "backbone.top_block.p7.weight", "backbone.top_block.p7.bias".
        size mismatch for proposal_generator.rpn_head.objectness_logits.weight: copying a param with shape torch.Size([9, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([3, 256, 1, 1]).
        size mismatch for proposal_generator.rpn_head.objectness_logits.bias: copying a param with shape torch.Size([9]) from checkpoint, the shape in current model is torch.Size([3]).
        size mismatch for proposal_generator.rpn_head.anchor_deltas.weight: copying a param with shape torch.Size([36, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([12, 256, 1, 1]).
        size mismatch for proposal_generator.rpn_head.anchor_deltas.bias: copying a param with shape torch.Size([36]) from checkpoint, the shape in current model is torch.Size([12])

Hi, sorry for the late reply. We just updated the configurations for detectron2-based models. To better reproduce these results, I suggest you use the project of CenterNet2 as we are also running upon this codebase~