FPN Anchor Generator

Looking for advice on how to set the parameters for the anchor generator for Mask-RCNN on a custom dataset.

Given a FPN ResNet backbone there are 5 levels with each level cutting the stride in half. Each output is given a single anchor size and a list of aspect ratios. So by default on the first level of the pyramid the image is 1/4 of the size and the anchor sizes are 32x32 with various aspect ratios applied. Then the next level is 1/8 with 64x64 and so on. Is this the right interpretation?

My image set has very long and very skinny objects and I’m not doing so well in detecting them. The problem I see is that as it downsamples that object gets too skinny that it’s hard to see but at the lower levels the anchors are too small. The other objects are very big with 1 class being fairly small but regularly shaped (not an extreme aspect ratio)

What’s the ideal way to compute ideal parameters for the anchor generator. I can loop through my train set and cluster the boxes but the whole FPN thing confuses me.