Edit Anchor Boxes sizes in model config #220
-
Hi all, AnchorGenerator(sizes=(32, 64, 128, 256, 512,), aspect_ratios=(0.25, 0.5, 1.0, 2.0, 4.0)) Is this supported in EffDet? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The box sizes are computed relative to the feature map sizes w/ the aspect ratios and anchor scale config. I based that on code from the TF impl, which shares most of the impl with Tensorflow Retinanet models, although some variations of that code do alow explicitly setting the sizes... It's a non-trivial amount of code to wrap ones head around, and have a TODO to simplify and maybe switch to the torchvision approach but it's well off of current priorities and projects.... I think you can tune it fairly easily for datasets where the scales of the objects differ from a typical coco by tuning the anchor scale (which can be specified as one scalar or a sequence per feature level. efficientdet-pytorch/effdet/anchors.py Lines 235 to 285 in b3dcb20 |
Beta Was this translation helpful? Give feedback.
The box sizes are computed relative to the feature map sizes w/ the aspect ratios and anchor scale config. I based that on code from the TF impl, which shares most of the impl with Tensorflow Retinanet models, although some variations of that code do alow explicitly setting the sizes...
It's a non-trivial amount of code to wrap ones head around, and have a TODO to simplify and maybe switch to the torchvision approach but it's well off of current priorities and projects....
I think you can tune it fairly easily for datasets where the scales of the objects differ from a typical coco by tuning the anchor scale (which can be specified as one scalar or a sequence per feature level.
efficien…