NVIDIA / retinanet-examples

Fast and accurate object detection with end-to-end GPU optimization
BSD 3-Clause "New" or "Revised" License
885 stars 271 forks source link

Rotated BBox Inference #269

Closed YoussefFathi closed 3 years ago

YoussefFathi commented 3 years ago

Is there a pretrained model available that was trained on rotated bounding box detection and can be used directly for inference of rotated bbox? I've tried using the uploaded pretrained models (i.e ResNet18FPN) for inference with (--rotated-bbox) however I get this error:

RuntimeError: Error(s) in loading state_dict for Model: size mismatch for cls_head.8.weight: copying a param with shape torch.Size([720, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([2160, 256, 3, 3]). size mismatch for cls_head.8.bias: copying a param with shape torch.Size([720]) from checkpoint, the shape in current model is torch.Size([2160]). size mismatch for box_head.8.weight: copying a param with shape torch.Size([36, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([162, 256, 3, 3]). size mismatch for box_head.8.bias: copying a param with shape torch.Size([36]) from checkpoint, the shape in current model is torch.Size([162]).

ghost commented 3 years ago

The uploaded model is only for axis-aligned bounding boxes. We don't have any pretrained models for rotated objects because labels need to be created for this purpose. You can check out this blog: https://developer.nvidia.com/blog/detecting-rotated-objects-using-the-odtk/

piseabhijeet commented 3 years ago

Hi @yashnv

Is there any out of box utility that creates a rotated bbox annotation from mask images?

The task - i already have images and annotations for an instance segmentation task, i need to evaluate retina-net for the same to compare against rotated maskrcnn and yolact.

Petros626 commented 1 year ago

@ghost before I open a new issue, that means no model was trained from scratch with rotated bb? In the blog, they used rotated bounding boxes only for transfer learning the model?