lucasjinreal / yolov7_d2

🔥🔥🔥🔥 (Earlier YOLOv7 not official one) YOLO with Transformers and Instance Segmentation, with TensorRT acceleration! 🔥🔥🔥
GNU General Public License v3.0
3.12k stars 480 forks source link

OrienHead in YoloMask for different backbones #141

Open TeodorChiaburu opened 2 years ago

TeodorChiaburu commented 2 years ago

Hi! While trying to train a YOLO-Mask with a Swin-Tiny backbone, I found out that the Overhead class in yolov7/modeling/meta_arch/yolomask.py requires a 4-dimensional input shape, while the Transformer only delivers 3d. There is also a todo marked in the comments on line 341 of the file. I tried it with a Darknet backbone and it worked. I assume ResNet would also work fine. Any tips on how we can expand this feature for transformers?

lucasjinreal commented 2 years ago

Hi, the OrienMaskHead essentially need same feature feed like detect head, normally provided 3 featuremaps in shape like [1,128,98,90], [1,256,49,45], [1,512,25, 22],

I didn't tried Swin so not very clear about it's outputs, but in if you able to make these 3 output features, you are able to feed to any YOLO head.