Tensorflow 对象检测纵横比是 height/width 还是 width/height?

Is Tensorflow Object Detection Aspect Ratio height/width or width/height?

我正在研究 Tensorflow 的对象检测模型,并希望提供我自己的自定义纵横比。在配置文件中,它可能看起来像这样:

    anchor_generator {
      ssd_anchor_generator {
        num_layers: 4
        min_scale: 0.2
        max_scale: 0.95
        aspect_ratios: 1.0
        aspect_ratios: .5
        aspect_ratios: 2.
        aspect_ratios: 10.0
        reduce_boxes_in_lowest_layer: true
      }

通过源代码挖掘,我不清楚纵横比是定义为 height/width 还是 width/height。我假设它是 width/height(所以 10 会有 w:h 的 10:1)但是如果我错了我知道我的模型会训练得很差!

我们在代码库中的转换是:aspect_ratio = width/height,它遵循纵横比的一般定义:https://en.wikipedia.org/wiki/Aspect_ratio_(image).

由于 opencv 文档
纵横比 = 宽度 / 高度
检查 this link.