【问题标题】:Bounding box annotation,going from 4 points to 8边界框注释,从 4 点到 8 点
【发布时间】:2019-09-04 03:10:08
【问题描述】:

我用的是synth文本数据集,word级别的bounding box标注是以4分的形式给出的,这里是文档说的

               - the first dimension is 2 for x and y respectively,
               - the second dimension corresponds to the 4 points
                 (clockwise, starting from top-left), and

所以他们给出了点,ymin,ymax,xmin,max。

这是 4 个点,分别对应左上角和右下角。

但是我正在尝试训练的网络需要 8 个点作为输入,

x1,y1,x2,y2,x3,y3,x4,y4

有没有办法从我的4分到8分。

提前致谢。

【问题讨论】:

  • 第二维中的点到底是什么?它们是左上角还是右下角?请在您的答案中编辑该部分,我应该能够提供帮助!谢谢。
  • @nikhilbalwani 是的,它们是对应于左上角和右下角的 4 个点。
  • @nikhilbalwani 您需要更多信息吗,请告诉我。
  • 如果我已经清楚地了解了这个问题的细节,我的回答应该可以提供帮助。

标签: python numpy image-processing deep-learning


【解决方案1】:

使用这个(假设坐标按顺时针顺序):​​

x1 = top_left['x']
y1 = top_left['y']
x2 = bottom_right['x']
y2 = top_left['y']
x3 = bottom_right['x']
y3 = bottom_right['y']
x4 = top_left['x']
y4 = bottom_right['y']

这个想法很简单:第二个点的 x 坐标变为右下角的那个,第四个点的 y 坐标变为右下角的那个。第三点虽然与右下角的坐标相同。

【讨论】:

  • 让我绘制并检查一下。
  • @Ryan,我进行了一些编辑以将顺序更正为顺时针。以前,顺序不是顺时针的。道歉。
猜你喜欢
  • 1970-01-01
  • 2021-08-18
  • 2015-11-10
  • 1970-01-01
  • 1970-01-01
  • 2019-11-13
  • 2020-08-12
  • 1970-01-01
  • 2022-11-28
相关资源
最近更新 更多