krumo / Domain-Adaptive-Faster-RCNN-PyTorch

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

lambda trade off parameter? #43

Closed just-eoghan closed 2 years ago

just-eoghan commented 2 years ago

In the paper "Domain Adaptive Faster R-CNN for Object Detection in the Wild" https://arxiv.org/pdf/1803.03243.pdf

The Loss is described as follows: The final training loss of the proposed network is a summation of each individual part, which can be written as: L = Ldet + λ(Limg + Lins + Lcst) where λ is a trade-off parameter to balance the Faster R-CNN loss and our newly added domain adaptation components

In the code the loss is defined as: losses = sum(loss for loss in loss_dict.values()) Where there is no reference to a trade-off parameter.

Is this handled somewhere else in the code or is the trade-off parameter left out intentionally?

krumo commented 2 years ago

Hi, thanks for your attention. The code of lambda trade-off parameter could be found at https://github.com/krumo/Domain-Adaptive-Faster-RCNN-PyTorch/blob/master/maskrcnn_benchmark/modeling/da_heads/da_heads.py#L136-L141. You could change the lambda value for different domain adaptation module in the config.