【问题标题】:why need to specify the parameter ‘bounding_boxes’ for sample_distorted_bounding_box in tensorflow?为什么需要在tensorflow中为sample_distorted_bounding_box指定参数‘bounding_boxes’?
【发布时间】:2018-10-15 21:54:47
【问题描述】:
sample_distorted_bounding_box(
    image_size,
    bounding_boxes,
    ...
)

提供并返回边界框 [y_min, x_min, y_max, x_max]。边界框坐标是相对于底层图像的宽度和高度在 [0.0, 1.0] 中的浮点数。

该函数会返回一个随机扭曲的边界框,为什么我需要在使用前指定一个边界框?

【问题讨论】:

    标签: python-3.x tensorflow


    【解决方案1】:

    这是因为此函数计算的框可以使用提供的框作为输入来指导采样。

    更具体地说,sample_distorted_bounding_boxes 返回的随机框可以强制包含输入边界框的最小部分。目标是避免边界框不包含或不相关信息。该分数由参数min_object_covered 控制,默认为0.1。

    请注意,输入 bounding_boxes 可能为空,在这种情况下,它默认为覆盖整个图像的单个框。

    【讨论】:

    • 感谢您的回答。但我仍然不明白什么是“包含输入边界框的最小部分”?
    • 你好,输入 bounding_boxes 的数量和返回的 distort_bbox 的数量有什么关系,似乎返回的 distort_bbox 总是 1。
    • @roachsinai,返回的bboxes确实只有一个box,指的是这个方法随机生成的cropping box,这个cropping box至少要覆盖每个box的min_object_covered部分。唉,这种方法的命名和文档非常混乱。他们应该将这个方法命名为类似于 geneate_random_cropping_box(...) 。
    猜你喜欢
    • 2013-05-28
    • 1970-01-01
    • 1970-01-01
    • 2021-05-17
    • 1970-01-01
    • 2015-03-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多