티스토리 뷰

* 이 글은 특히 진짜 잘 모르고 쓴 글이니 틀린 부분이 있으면 댓글로 가르침을 주시면 정말 감사드리겠습니다.

 

https://developer0hye.tistory.com/713

 

RT DETR의 백본은 무엇일까

https://arxiv.org/pdf/2304.08069.pdf https://github.com/lyuwenyu/RT-DETR GitHub - lyuwenyu/RT-DETR: [CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOL [CVPR 2024] Official RT-DETR (RTDETR paddle pytorch),

developer0hye.tistory.com

 

https://developer0hye.tistory.com/715

 

RT DETR의 Encoder 는 무엇일까

https://developer0hye.tistory.com/713 RT DETR의 백본은 무엇일까 https://arxiv.org/pdf/2304.08069.pdf https://github.com/lyuwenyu/RT-DETR GitHub - lyuwenyu/RT-DETR: [CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansforme

developer0hye.tistory.com

 

 

Encoder를 거친 피쳐들 가운데 이제 특정 피쳐들을 선별하고 이 피쳐들은 레이어 몇개를 더 거쳐서 Decoder의 Query 가 됩니다. 이 특정 피쳐들을 선별하는 괴정이 Query Selection입니다. 개념적으로 실제로 객체를 잘 예측할만한 피쳐들을 미리 한 번 선별해주고 이를 Decoder의 Hgih quality Query로 가공하는 작업이라고 이해했습니다.

 

이런 방법은 이미

 

Efficient detr: improving end-to-end object detector with dense prior,

 

Dino: Detr with improved denoising anchor boxes for end-to-end object detection,

 

Deformable detr: Deformable transformers for end-to-end object detection

 

논문에서 제안된 방법이였다고 합니다.

 

이 과정이 구현된 부분이 프로젝트에서 아래 코드로 보입니다.(코드 안돌려보고 상상으로 작성... 언젠가 한 번 직접 돌려보면서 확인 필요)

 

https://github.com/lyuwenyu/RT-DETR/blob/46bd4f1821320f903baa17a69308cb1998fba570/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_decoder.py#L471-L515

 

RT-DETR/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_decoder.py at 46bd4f1821320f903baa17a69308cb1998fba570 · lyuwenyu/RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥 - lyuwenyu/RT-DETR

github.com

 

 

https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_decoder.py#L557-L559

 

RT-DETR/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_decoder.py at main · lyuwenyu/RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥 - lyuwenyu/RT-DETR

github.com

 

https://github.com/lyuwenyu/RT-DETR/blob/46bd4f1821320f903baa17a69308cb1998fba570/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_criterion.py#L254-L270

 

RT-DETR/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_criterion.py at 46bd4f1821320f903baa17a69308cb1998fba570 · lyuwenyu/RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥 - lyuwenyu/RT-DETR

github.com

 

https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_criterion.py#L111-L136

 

RT-DETR/rtdetr_pytorch/src/zoo/rtdetr/rtdetr_criterion.py at main · lyuwenyu/RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥 - lyuwenyu/RT-DETR

github.com

 

 

 

그럼 RT DETR의 query selection 과정은 뭐가 특별할까요?

 

RT DETR의 query selection 과정에 대해 알아보기 전, RT DETR이 Query Selection 기법을 언급하며 인용한 Efficient detr: improving end-to-end object detector with dense prior 논문을 볼 필요가 있다는 생각이 들었습니다. 구글링해보니 아래 글이 Efficient DETR 에 대해 잘 설명해놓았다는 느낌이 들었습니다.

 

https://medium.com/@yanzixuan1019/detr-and-efficient-detr-614a94dfde10 

 

DETR and Efficient DETR

Motivation for using transformer in Computer Vision

medium.com

 

호오... 근데 Efficient DETR은 코드가 없어서 논문 보고 상상력으로 이해할 수 밖에 없는데, Efficient DETR에서 Encoder 에서 나온 피쳐로 RPN 거쳐서 Good Initial Query Selection 및 생성하는 방식이랑 RT DETR에서의 방식이랑 별반 차이 없어보입니다...

 

RT DETR 논문에서는 기존 방식은 Classification 에 치중된 방식이라 Classification 이랑 Localization 둘다 잘해야하는 Detection Task에서는 적합하지 않을 수 있다고 말하면서 Classification과 Localization간의 Uncertainty 를 minimize 할 수 있게 Loss function을 수정했다는데 코드만 봐서는 잘 모르겠습니다.

추측하건데, loss function으로 varifocal loss 를 사용을 했는데 이거랑 의미가 부합하는 거 같습니다. 

 

https://arxiv.org/pdf/2008.13367

 

잘 아시는 분이 있다면 꼭 댓글로 가르침을 부탁드리겠습니다!

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함