<p>Yes, it would be better to use anchors/default boxes with aspect-ratio similar to what you see in your data.</p>
<p>For example, if you use TF Object Detection API, each model contains a config file with the different model configurations.<br />
i.e.: <a href="https://github.com/tensorflow/models/blob/master/research/object_detection/configs/tf2/ssd_mobilenet_v2_320x320_coco17_tpu-8.config" rel="nofollow noreferrer">https://github.com/tensorflow/models/blob/master/research/object_detection/configs/tf2/ssd_mobilenet_v2_320x320_coco17_tpu-8.config</a></p>
<pre><code>  ssd_anchor_generator {
    num_layers: 6
    min_scale: 0.2
    max_scale: 0.95
    aspect_ratios: 1.0
    aspect_ratios: 2.0
    aspect_ratios: 0.5
    aspect_ratios: 3.0
    aspect_ratios: 0.3333
  }
}
</code></pre>
<p>Usually the term aspect ration is referring to the result of <strong>width/height</strong><br />
So, in case you would have wanted only landscape-like objects you would keep only the aspect ratios bigger than 1 (2.0,3.0)</p>
<p>Also, just for emphasizing this point, giving aspect-ratios similar to what you expect can be seen in the literature.
For example - YOLOV3 article (<a href="https://arxiv.org/pdf/1804.02767.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1804.02767.pdf</a>)
<a href="https://i.stack.imgur.com/JE58Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JE58Y.png" alt="yolov3-choosing-default boxes" /></a></p>
<p>In yolov3 - Redmond chose the anchors after analyzing the most probable object shapes in coco.</p>
object detection of a high aspect ratio object
<p>I want to train a deep learning model (say SSD or yolo) for object detection. The object I want to detect has very high aspect ratio, say a pencil. I want the output bounding box as close as possible to the object with similar aspect ratio. How should I optimize the model for this? Should I optimize all aspect ratio of pre-defined boxes to make them closer to the real object? For my case, the object is always in one orientation. Thanks</p>