toandaominh1997 / EfficientDet.Pytorch

Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
MIT License
1.44k stars 306 forks source link

Double normalization in weighted feature fusion #102

Open oadams opened 4 years ago

oadams commented 4 years ago

In BiFPN.forward() the feature weights are normalized:

https://github.com/toandaominh1997/EfficientDet.Pytorch/blob/fbe56e58c9a2749520303d2d380427e5f01305ba/models/bifpn.py#L178-L180

In calculating the bottom up and top down features, it appears this normalization is done again unnecessarily:

https://github.com/toandaominh1997/EfficientDet.Pytorch/blob/fbe56e58c9a2749520303d2d380427e5f01305ba/models/bifpn.py#L190

https://github.com/toandaominh1997/EfficientDet.Pytorch/blob/fbe56e58c9a2749520303d2d380427e5f01305ba/models/bifpn.py#L196

XiaoyuShi97 commented 4 years ago

@oadams Hi guy, I also find this issue and I believe this can cause big problem. Did you try training the model without changing this part?

oadams commented 4 years ago

@Shi-Xiaoyu No, I never actually trained the model using this code, I was just reading the code.