Hyperparameter Tuning for Efficientdet

Hi all,

I’m trying to train an object-detection agent using the efficientdet_d3 pretrained model in TFOD and I’m having trouble understanding the multiscale_anchor_generator parameters, namely the min/max_level, anchor_scale and scales_per_octave. Is there a good reference that explains how to systematically adjust these. All the sources I’ve come across speak about how important the tuning of this parameter is, I’d like to create a script that automatically tunes these parameters every time my dataset is updated. Any help/advice is appreciated!

Second question, I’ve been toying with the idea of building an agent from scratch using Keras, is there any advantage to that over using the TFOD. I’m looking to get the maximum performance and am willing to upgrade to overcome computational limitations.

Thanks in advance, this community is very helpful!
Derek

Hi @Derek_Boase ,

You can quickly check this multiscale_anchor_generator parameters, will explain in details about mentioned parameters.

  • min_level/max_level: These define the range of feature map levels from which anchors are generated. Lower levels represent higher resolutions and detect smaller objects, while higher levels focus on larger objects. Choosing appropriate levels ensures anchor boxes cover the size range of your target objects.
  • anchor_scale: This scales the base anchor size to generate different sizes of anchor boxes at each level. Setting it too low might miss large objects, while too high may create excessive and redundant small anchors.
  • scales_per_octave: This determines how many anchor sizes are generated at each level within the chosen octave (range between min and max levels). More scales offer greater granularity but increase computational cost.

For maximizing performance, choosing between building from scratch and using TFOD depends on your expertise, resources, and specific task:

  • Use TFOD: If you’re new to object detection or need a speedy solution, start with TFOD. Utilize its pre-built models and fine-tune them for your data. If you hit performance limitations and have the expertise, consider building a custom model later.
  • Build from scratch: If you have the expertise and computational resources, and maximizing performance is crucial, building from scratch offers greater flexibility and potential for higher accuracy. Be prepared for significant effort and potential debugging challenges.

Thanks.