{"notes":[{"id":"feature-fusion/bifpn","category":"feature-fusion","legacyPath":"feature-fusion/1911-bifpn","legacySlug":"1911-bifpn","legacyPaths":[],"title":"EfficientDet","subtitle":"The Power of BiFPN","author":"Z. Yuan","paperDate":"2019-11-20","publishedOn":"2024-08-15","paperTitle":"EfficientDet: Scalable and Efficient Object Detection","paperUrl":"https://arxiv.org/abs/1911.09070","bibliography":{"title":"EfficientDet: Scalable and Efficient Object Detection","authors":["Mingxing Tan","Ruoming Pang","Quoc V. Le"],"url":"https://arxiv.org/abs/1911.09070","pdfUrl":"https://arxiv.org/pdf/1911.09070","codeUrl":null,"preprint":{"id":"1911.09070","submittedOn":"2019-11-20","url":"https://arxiv.org/abs/1911.09070"},"publication":{"venue":"CVPR","year":2020,"kind":"conference","url":"https://arxiv.org/abs/1911.09070"},"citation":"@misc{featurefusionbifpn2019,\n  title = {{EfficientDet: Scalable and Efficient Object Detection}},\n  author = {Mingxing Tan and Ruoming Pang and Quoc V. Le},\n  year = {2019},\n  eprint = {1911.09070},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1911.09070}\n}\n","citationPath":"/content/papers/citations/feature-fusion/bifpn.dc7bc273ef7a.bib"},"thumbnail":{"src":"/content/papers/assets/27521b31a9957f1549825cc13abf74d8b51136759adf8d801c24f1b64f5c8d2b.jpg","width":1322,"height":500},"locale":"en","path":"/content/papers/en/feature-fusion/bifpn.5b5be9fa4810.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"model-scaling","text":"Model Scaling","depth":3},{"id":"weighted-average","text":"Weighted Average","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"performance-on-coco","text":"Performance on COCO","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["feature-fusion","object-detection","lightweight","scaling","google-brain"],"relatedReading":[{"id":"feature-fusion/panet","relation":"background","topic":"Fusing multiscale features for detection"},{"id":"feature-fusion/nasfpn","relation":"comparison","topic":"Designing and searching feature pyramids"},{"id":"feature-fusion/detectors","relation":"comparison","topic":"Designing and searching feature pyramids"}]},{"id":"feature-fusion/panet","category":"feature-fusion","legacyPath":"feature-fusion/1803-panet","legacySlug":"1803-panet","legacyPaths":[],"title":"PANet","subtitle":"Give Me a Shortcut","author":"Z. Yuan","paperDate":"2018-03-05","publishedOn":"2024-04-06","paperTitle":"Path Aggregation Network for Instance Segmentation","paperUrl":"https://arxiv.org/abs/1803.01534","bibliography":{"title":"Path Aggregation Network for Instance Segmentation","authors":["Shu Liu","Lu Qi","Haifang Qin","Jianping Shi","Jiaya Jia"],"url":"https://arxiv.org/abs/1803.01534","pdfUrl":"https://arxiv.org/pdf/1803.01534","codeUrl":null,"preprint":{"id":"1803.01534","submittedOn":"2018-03-05","url":"https://arxiv.org/abs/1803.01534"},"publication":{"venue":"CVPR","year":2018,"kind":"conference","url":"https://arxiv.org/abs/1803.01534"},"citation":"@misc{featurefusionpanet2018,\n  title = {{Path Aggregation Network for Instance Segmentation}},\n  author = {Shu Liu and Lu Qi and Haifang Qin and Jianping Shi and Jiaya Jia},\n  year = {2018},\n  eprint = {1803.01534},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1803.01534}\n}\n","citationPath":"/content/papers/citations/feature-fusion/panet.31d49af45ee9.bib"},"thumbnail":{"src":"/content/papers/assets/549012fa5498c4bbe44cfad4f4c54ed4eac5e7f0cdc71ae6308bb1ee6a4942ed.jpg","width":1024,"height":348},"locale":"en","path":"/content/papers/en/feature-fusion/panet.bccaab9f2654.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"panet-model-design","text":"PANet Model Design","depth":3},{"id":"path-aggregation-fpn","text":"Path Aggregation FPN","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"how-does-it-compare-to-basic-fpn","text":"How Does It Compare to Basic FPN?","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["feature-fusion","object-detection","segmentation","cuhk"],"relatedReading":[{"id":"feature-fusion/fpn","relation":"background","topic":"Fusing multiscale features for detection"},{"id":"feature-fusion/bifpn","relation":"next","topic":"Fusing multiscale features for detection"}]},{"id":"feature-fusion/nasfpn","category":"feature-fusion","legacyPath":"feature-fusion/1904-nasfpn","legacySlug":"1904-nasfpn","legacyPaths":[],"title":"NAS-FPN","subtitle":"Money Talks","author":"Z. Yuan","paperDate":"2019-04-16","publishedOn":"2024-04-06","paperTitle":"NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection","paperUrl":"https://arxiv.org/abs/1904.07392","bibliography":{"title":"NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection","authors":["Golnaz Ghiasi","Tsung-Yi Lin","Ruoming Pang","Quoc V. Le"],"url":"https://arxiv.org/abs/1904.07392","pdfUrl":"https://arxiv.org/pdf/1904.07392","codeUrl":null,"preprint":{"id":"1904.07392","submittedOn":"2019-04-16","url":"https://arxiv.org/abs/1904.07392"},"publication":{"venue":"CVPR","year":2019,"kind":"conference","url":"https://arxiv.org/abs/1904.07392"},"citation":"@misc{featurefusionnasfpn2019,\n  title = {{NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection}},\n  author = {Golnaz Ghiasi and Tsung-Yi Lin and Ruoming Pang and Quoc V. Le},\n  year = {2019},\n  eprint = {1904.07392},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1904.07392}\n}\n","citationPath":"/content/papers/citations/feature-fusion/nasfpn.5cd688019361.bib"},"thumbnail":{"src":"/content/papers/assets/ec8c271631cd6ce3dc6155e5cc5ac47f4ce9ccec9a507f6c9671a39a7cb697a7.jpg","width":1024,"height":284},"locale":"en","path":"/content/papers/en/feature-fusion/nasfpn.9ece6e983a08.md","headings":[{"id":"what-is-nas","text":"What is NAS?","depth":2},{"id":"advantages","text":"Advantages","depth":3},{"id":"disadvantages","text":"Disadvantages","depth":3},{"id":"more-disadvantages","text":"More Disadvantages","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"nas-fpn-model-design","text":"NAS-FPN Model Design","depth":3},{"id":"merging-cells","text":"Merging Cells","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["feature-fusion","object-detection","neural-architecture-search","google-brain"],"relatedReading":[{"id":"feature-fusion/bifpn","relation":"comparison","topic":"Designing and searching feature pyramids"},{"id":"feature-fusion/detectors","relation":"comparison","topic":"Designing and searching feature pyramids"}]},{"id":"feature-fusion/detectors","category":"feature-fusion","legacyPath":"feature-fusion/2006-detectors","legacySlug":"2006-detectors","legacyPaths":[],"title":"DetectoRS","subtitle":"Recursive Pyramid","author":"Z. Yuan","paperDate":"2020-06-03","publishedOn":"2025-02-05","paperTitle":"DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution","paperUrl":"https://arxiv.org/abs/2006.02334","bibliography":{"title":"DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution","authors":["Siyuan Qiao","Liang-Chieh Chen","Alan Yuille"],"url":"https://arxiv.org/abs/2006.02334","pdfUrl":"https://arxiv.org/pdf/2006.02334","codeUrl":null,"preprint":{"id":"2006.02334","submittedOn":"2020-06-03","url":"https://arxiv.org/abs/2006.02334"},"publication":{"venue":"CVPR","year":2021,"kind":"conference","url":"https://doi.org/10.1109/cvpr46437.2021.01008"},"citation":"@misc{featurefusiondetectors2020,\n  title = {{DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution}},\n  author = {Siyuan Qiao and Liang-Chieh Chen and Alan Yuille},\n  year = {2020},\n  eprint = {2006.02334},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2006.02334}\n}\n","citationPath":"/content/papers/citations/feature-fusion/detectors.6b46f9ec0a09.bib"},"thumbnail":{"src":"/content/papers/assets/3eef672626e1e4898fc0f046fffe431e0f34a4b314ff13691cb96a6095a7ec9f.jpg","width":1392,"height":594},"locale":"en","path":"/content/papers/en/feature-fusion/detectors.eedc2e0ed06c.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"recursive-feature-pyramid","text":"Recursive Feature Pyramid","depth":3},{"id":"atrous-convolution","text":"Atrous Convolution","depth":3},{"id":"switchable-atrous-convolution","text":"Switchable Atrous Convolution","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"performance-boost-from-rfp-and-sac","text":"Performance Boost from RFP and SAC","depth":3},{"id":"ablation-studies-of-rfp-and-sac","text":"Ablation Studies of RFP and SAC","depth":3},{"id":"comparison-with-other-methods","text":"Comparison with Other Methods","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["feature-fusion","object-detection","segmentation","jhu"],"relatedReading":[{"id":"feature-fusion/nasfpn","relation":"comparison","topic":"Designing and searching feature pyramids"},{"id":"feature-fusion/bifpn","relation":"comparison","topic":"Designing and searching feature pyramids"}]}],"text":"About half a year earlier, Google had introduced NAS-FPN and let a search algorithm discover the feature-fusion paths. Now another Google team goes back to drawing the paths by hand. Wait—did they give up on search already?\n\nThe paper gives a practical reason: NAS-FPN costs a lot to search and produces an irregular structure that is hard to explain or adjust. So the authors leave the searched topology behind and draw a new fusion module from FPN and PANet: BiFPN.\n\n## Defining the Problem\n\nSince its inception, the pioneering work of FPN has been widely applied to various object detection tasks. Numerous variants and improvements have followed, and we can see a rough development trajectory in the image below:\n\n![Figure 2 from the EfficientDet paper comparing cross-scale connections in FPN, PANet, NAS-FPN, and BiFPN](/content/papers/assets/febe86f1288e4c62e5f3a559418602f65fcf9887535e43fe765e761fbb90f798.jpg \"Tan et al., EfficientDet: Scalable and Efficient Object Detection, Figure 2, arXiv:1911.09070v7\")\n\nStarting from the original FPN on the far left, feature fusion occurs across different resolution feature maps, with the deepest feature map being progressively upsampled and added back to shallower feature maps.\n\nPANet later proposed that simply adding features back along one path was insufficient, so they introduced a second path: another round of downsampling and addition. The purpose of this, as we’ve discussed before, is to establish a shortcut for feature fusion from the shallowest to the deepest layers, allowing the model to better utilize different levels of features.\n\n- [**[18.03] PANet: Give Me a Shortcut**](/blog/papers/feature-fusion/panet)\n\nNAS-FPN then used automated search to select a multi-layer fusion structure from candidate designs. The search is costly, and its resulting connections are harder to interpret and adjust.\n\n- [**[19.04] NAS-FPN: Money Talks**](/blog/papers/feature-fusion/nasfpn)\n\nIn this paper, the authors from Google decided not to use the NAS approach but instead revisited the strengths of PANet, focusing on two key perspectives:\n\n- **Feature fusion shouldn’t be just a simple addition; it needs to consider the importance of features and perform weighted addition.**\n- **The number of FPN layers should scale with the model size.**\n\n## Solving the Problem\n\n### Model Architecture\n\n![Figure 3 from EfficientDet: EfficientNet backbone, repeated BiFPN layers, and class and box prediction networks](/content/papers/assets/27521b31a9957f1549825cc13abf74d8b51136759adf8d801c24f1b64f5c8d2b.jpg \"Tan et al., EfficientDet, Figure 3, arXiv:1911.09070v7\")\n\nEfficientDet follows the single-stage direction of detectors such as RetinaNet, using an EfficientNet backbone, repeated BiFPN layers, and class/box prediction heads whose weights are shared across scales. The full model is more than an FPN replacement; this note focuses on the fusion network.\n\nIn the image above, the backbone on the far left is not the focus of this paper, nor is the head on the far right. We should focus solely on the BiFPN in the middle.\n\nThis design starts with PANet and makes a few changes. Let's sketch them out:\n\n1. **Cross-scale connections:**\n\n   The design retains bidirectional cross-scale paths and adds shortcuts between input and output nodes at the same scale. Learnable weights control each input’s contribution at fusion nodes.\n\n\n\n   ![This note adds red arcs to the PANet design in paper Figure 2(b) to illustrate new same-level input-to-output shortcuts](/content/papers/assets/c0f53d818d59bbee640370d26507b7f8309eecfd2dfc448c036680db01372dc8.jpg)\n\n\n\n2. **Removing low-contribution nodes:**\n\n   The authors remove nodes with only one input edge because they do not fuse multiple sources. This is an efficiency choice, not a claim that every single-input operation is useless.\n\n\n\n   ![This note crosses out single-input fusion nodes in the PANet design from paper Figure 2(b)](/content/papers/assets/91fe7682041c6c912b0b2480082d541b9b8e676455513d64261d9aba9e6262e8.jpg)\n\n\n\nThese two pictures annotate the paper's **PANet diagram to explain design steps**; they are not separate original-paper BiFPN results. After adding shortcuts and removing single-input nodes, return to Figure 2(d) for the final BiFPN topology.\n\nThe authors also emphasized an important point: they view this structure as a “module.” As such, it can be stacked in layers, allowing for more feature fusion layers as the model size increases.\n\n\n> [!TIP]\n> \n> This concept was not demonstrated in the original PANet, which has one top-down pass and one added bottom-up pass, each spanning several feature levels. With the idea of module stacking, we can apply this to both FPN and PANet, but any accuracy gain must be evaluated against the extra computation.\n\n\n### Model Scaling\n\n\n\n![Table 1 from EfficientDet: D0–D7x input sizes, EfficientNet backbones, BiFPN channels and layers, and prediction-head layers](/content/papers/assets/8061a384740bcd0cfaa0f82a3d4ca64ac2f00cc908afd25196ff621469dc598e.jpg \"Tan et al., EfficientDet, Table 1, arXiv:1911.09070v7\")\n\n\n\nThe compound-scaling approach extends EfficientNet by jointly adjusting the backbone, BiFPN, prediction heads and input resolution, rather than enlarging only one component.\n\nIf the backbone scales, the fusion network and prediction heads should be configured with it. Table 1 goes from D0 at **512-pixel input, 64 BiFPN channels and 3 layers** to D6 at **1280-pixel input, 384 channels and 8 layers**. D7 and D7x retain the same BiFPN width and depth; D7x uses the larger B7 backbone and an extra feature level. The layer count therefore does not increase at every model step.\n\n### Weighted Average\n\n![Figure 5 from EfficientDet: softmax and fast-normalized input weights at three BiFPN nodes over training steps](/content/papers/assets/eb13ce479eafbae14f1145656c26320e880472881459893d14c1fa7ecaca07eb.jpg \"Tan et al., EfficientDet, Figure 5, arXiv:1911.09070v7; weight trajectories, not AP or latency\")\n\nFinally, the authors discussed how to design the weights for the weighted feature maps.\n\nThree design methods were proposed in the paper:\n\n1. Unbounded fusion: Learn unconstrained weights directly. This can destabilize training, motivating normalization.\n2. Softmax fusion: Apply softmax to the weights, ensuring they sum to 1.\n3. Fast normalized fusion: Apply ReLU so $w_i\\geq0$, then use $O=\\sum_i \\frac{w_i}{\\epsilon+\\sum_j w_j}I_i$ with $\\epsilon=10^{-4}$. The epsilon makes the weight sum approximately, not exactly, 1 and prevents division by zero when all weights are zero.\n\nThe blue and red dashed curves above trace **learned input weights** at three BiFPN nodes during training. They show similar weight behavior, not accuracy or runtime. Those comparisons are in **Table 6**: softmax versus fast fusion produces **33.96/33.85, 43.78/43.77, and 48.79/48.74 AP** across three models, with GPU speed ratios of **1.28, 1.26, and 1.31**. The authors therefore choose the faster fusion with similar accuracy.\n\n## Discussion\n\n### Performance on COCO\n\n\n\n![Table 2 from EfficientDet: COCO test-dev and val detection AP, parameters, FLOPs, and Titan V and V100 latency](/content/papers/assets/fbb27b70a765d48946bddddc40d8534b9da60c95c3c7d76563828b4e7898b20d.jpg \"Tan et al., EfficientDet, Table 2, arXiv:1911.09070v7; test-dev and val are different splits\")\n\n\n\nThe authors conducted experiments on the COCO 2017 detection dataset, using 118,000 training images. Results including D7x below come from the revised paper and retain its historical settings.\n\nDuring training, they used SGD with momentum 0.9 and weight decay 4e-5. The learning rate rose linearly from 0 to 0.16 during the **first epoch**, then followed a cosine decay schedule. Synchronized batch normalization followed each convolution, with decay 0.99 and epsilon 1e-3.\n\nThe model employed SiLU (Swish-1) as the activation function and applied an exponential moving average with a decay factor of 0.9998 to improve stability. During training, the focal loss function was used, with α set to 0.25 and γ to 1.5. Data augmentation strategies included horizontal flipping and scale jittering, with image sizes randomly adjusted to 0.1 to 2.0 times the original size before cropping. Furthermore, soft non-maximum suppression (Soft NMS) was used during evaluation.\n\nFor training resources, EfficientDet-D0 to D6 models were trained for 300 epochs on 32 TPUv3 cores, while EfficientDet-D7 and D7x models were trained for 600 epochs on 128 TPUv3 cores, with a total batch size of 128.\n\nTable 2 groups models by roughly similar accuracy. Across its different pairings, EfficientDet can have **4–9 times fewer parameters** and **13–42 times fewer FLOPs** (multiply-adds); those endpoints do not all describe one model. D0 versus YOLOv3 is **34.6 versus 33.0 test-dev AP** and **2.5B versus 71B FLOPs**, about 28 times fewer operations. The up-to-eightfold parameter and twenty-onefold FLOP comparisons with RetinaNet and Mask R-CNN also refer to different roughly matched pairs.\n\nAt the high-accuracy end, D7x scores **55.1 AP on COCO test-dev and 54.4 AP on val**. The table lists **50.7 val AP** for AmoebaNet+NAS-FPN+AA, a **3.7-point gap on the same split**, or roughly four points; subtracting its val score directly from D7x's test-dev score would mix splits. D7x uses **410B FLOPs** versus **3045B** for that comparison model, about one seventh as many operations, not a measured sevenfold speedup. The paper also reports latency on Titan V FP32, V100 FP16, and a single-thread CPU; its V100 figures include preprocessing and NMS. Hardware, precision, and measurement boundaries matter here.\n\n![Figure 4 from EfficientDet: COCO AP plotted against parameter count, Titan V GPU latency, and Xeon CPU latency](/content/papers/assets/f1fcac9fdf22409b9003330d0c59024a37210a53cc0775342439a09330b22bab.jpg \"Tan et al., EfficientDet, Figure 4, arXiv:1911.09070v7; D0–D6 comparisons, not evidence of a sevenfold D7x speedup\")\n\n## Conclusion\n\nUnder the same RetinaNet training setup, paper Table 4 moves from **ResNet50+FPN at 37.0 AP** to **EfficientNet-B3+FPN at 40.3 AP**, then **EfficientNet-B3+BiFPN at 44.4 AP**. Both changes contribute; the entire EfficientDet-family gain cannot be credited to BiFPN alone. In Table 5, with backbone, prediction heads, and training held fixed, weighted BiFPN reaches **44.39 AP** versus **43.94 AP** without weights. In the tested settings, its bidirectional paths, selective weighting, and lighter fusion network improve the accuracy-cost tradeoff.\n\nSimple and effective, BiFPN is a great companion for implementing models. We highly recommend giving it a try.\n","imageSizes":{"/content/papers/assets/febe86f1288e4c62e5f3a559418602f65fcf9887535e43fe765e761fbb90f798.jpg":{"width":1224,"height":432},"/content/papers/assets/27521b31a9957f1549825cc13abf74d8b51136759adf8d801c24f1b64f5c8d2b.jpg":{"width":1322,"height":500},"/content/papers/assets/c0f53d818d59bbee640370d26507b7f8309eecfd2dfc448c036680db01372dc8.jpg":{"width":1352,"height":1700},"/content/papers/assets/91fe7682041c6c912b0b2480082d541b9b8e676455513d64261d9aba9e6262e8.jpg":{"width":1352,"height":1792},"/content/papers/assets/8061a384740bcd0cfaa0f82a3d4ca64ac2f00cc908afd25196ff621469dc598e.jpg":{"width":1036,"height":568},"/content/papers/assets/eb13ce479eafbae14f1145656c26320e880472881459893d14c1fa7ecaca07eb.jpg":{"width":1486,"height":272},"/content/papers/assets/fbb27b70a765d48946bddddc40d8534b9da60c95c3c7d76563828b4e7898b20d.jpg":{"width":1224,"height":662},"/content/papers/assets/f1fcac9fdf22409b9003330d0c59024a37210a53cc0775342439a09330b22bab.jpg":{"width":1452,"height":458}}}
