open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
28.68k stars 9.32k forks source link

add CBAM attention mechanism block within Resnet backbone #8013

Open alaa-shubbak opened 2 years ago

alaa-shubbak commented 2 years ago

Hello , I would like to thank you all for such a great work. I am using mmdetection now since a round 1 year. and i like this environment and platform.

I would like to as about adding the general attention mechanism block (CBAM ) within my algorithm or backbone to improve the detection.

I used the spatial attention mechanism represented by empirical_attention within my config , and i use the instruction plugins

I am still wounding how can I add the CBAM in my model, can you please help me in that? i already have some resnet_CBAM model ready but in tensorflow. keras , what shall i do to add such block easily within mmdetection either backbone or neck structure.

looking forward to your answer.

alaa-shubbak commented 2 years ago

I found this model of resnet_cbam ready in pytorch

https://github.com/luuuyi/CBAM.PyTorch/blob/master/model/resnet_cbam.py

what will be the way to add it in my config and use it within mmdetection library ?

jbwang1997 commented 2 years ago

Maybe this issue can give you some advice.