Yet-another-efficientdet-pytorch: The use of the 'first_time' in BiFPN

Created on 10 Apr 2020  ·  4Comments  ·  Source: zylo117/Yet-Another-EfficientDet-Pytorch

Hi, thanks for the great work.

I was wondering what is the use of the 'first_time' in BiFPN

Thank you.

Most helpful comment

hi, you need to understand efficientdet's architecture first.

the outputs of backbone, let's call it features, will go to repeated BiFPN

BiFPN is just another kind of FPN, is to merge backbone's adjacent layer's feature and then extract fused features. So it requires all inputs have the same channel(can be done by conv) and any two adjacent feature must have the same size(can be done by upsample/pooling).

But for the first time, there are only three features, P3 P4 P5, but BiFPN takes 5. So extra 2 features need to be generated, hence p5_to_p6, p6_to_p7.

And there is another problem, channels of p3 p4 p5 doesn't match BiFPN input channel. So apply conv on them to make it consistent with the BiFPN's.

That's when first_time comes in, to tell the BiFPN these are the features from the backbone, Instead of the repeated BiFPN.

All 4 comments

hi, you need to understand efficientdet's architecture first.

the outputs of backbone, let's call it features, will go to repeated BiFPN

BiFPN is just another kind of FPN, is to merge backbone's adjacent layer's feature and then extract fused features. So it requires all inputs have the same channel(can be done by conv) and any two adjacent feature must have the same size(can be done by upsample/pooling).

But for the first time, there are only three features, P3 P4 P5, but BiFPN takes 5. So extra 2 features need to be generated, hence p5_to_p6, p6_to_p7.

And there is another problem, channels of p3 p4 p5 doesn't match BiFPN input channel. So apply conv on them to make it consistent with the BiFPN's.

That's when first_time comes in, to tell the BiFPN these are the features from the backbone, Instead of the repeated BiFPN.

ok I get it now, but where did you set it to be True?

Oh!!!
Thank you so much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tdn670000 picture tdn670000  ·  10Comments

you-old picture you-old  ·  4Comments

LiangTinting picture LiangTinting  ·  6Comments

zhangxue123 picture zhangxue123  ·  13Comments

HsLOL picture HsLOL  ·  8Comments