如何获取坐标?(tensorflow标签模型对象检测)

2024-05-23 18:02:51 发布

您现在位置:Python中文网/ 问答频道 /正文

大家好,有人能帮我吗

我想知道矩形坐标

(左上右道指) 我引用这个https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/blob/master/Object_detection_webcam.py

是否需要使用“盒子”?如何让tensorflow知道哪个是矩形坐标

以下是正确的吗?它需要是int吗? 左x_=1280*(np.挤压(框[0,0,1]))

y_左=640*(np.挤压(框[0,0,0]))

x_right=1280*(np.挤压(框[0,0,3]))

y_right=640*(np.挤压(框[0,0,2])) ------------------------------------------------------------------它需要是int吗

左x_=int(圆形(左x_))

y_左=整数(圆形(y_左))

x_right=int(圆形(x_right))

y#u right=#int(圆形(y#u right))

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here


Tags: httpsimagerightgithubcomhereobjectnp
1条回答
网友
1楼 · 发布于 2024-05-23 18:02:51

boxes是一个规范化坐标数组。boxes数组的长度等于检测次数。对于索引i

boxes[i]=[x_left, y_left, x_right, y_right],

其中x_lefty_leftx_righty_right在区间[0,1]内

如果馈送到模型的图像具有高度H和宽度W,则框的坐标为

x_left = int(W*x_left)
y_left = int(H*y_left)
x_right = int(W*x_right)
y_right = int(H*y_right).

相关问题 更多 >