krumo / Domain-Adaptive-Faster-RCNN-PyTorch

Domain Adaptive Faster R-CNN in PyTorch
MIT License
304 stars 68 forks source link

What is the use of masks in rpn/loss.py? #19

Closed SkeletonOne closed 3 years ago

SkeletonOne commented 3 years ago

Hi, I noticed that in rpn/loss.py, prepare_targets you have an output named "masks", but in call, you only do "torch.cat" to it and nothing else. So I am wondering what is the use of it? Thanks!

krumo commented 3 years ago

Hi @SkeletonOne, thanks for this question. The masks here is useless. I avoid computing regression losses on target domain by avoiding generating bbox labels for target domain instead of using a mask to filter out target domain losses. There is some redundancy in the current implementation and I will fix it in the later update. Thanks again for pointing this problem out!

Feobi1999 commented 3 years ago

which part of your code means “ I avoid computing regression losses on target domain by avoiding generating bbox labels for target domain instead of using a mask to filter out target domain losses.” Beacause I didnot find the related process in rpn.py? Thanks