Small update
This commit is contained in:
@@ -196,7 +196,9 @@ def main():
|
||||
bbox = np.array(bbox) * np.array([img.shape[1], img.shape[0], img.shape[1], img.shape[0]])
|
||||
yc, xc, h, w = bbox
|
||||
print("bbox", bbox)
|
||||
polyline = np.array(coords[4:]).reshape(-1, 2) * np.array([img.shape[1], img.shape[0]])
|
||||
|
||||
# polyline = np.array(coords[4:]).reshape(-1, 2) * np.array([img.shape[1], img.shape[0]])
|
||||
polyline = np.array(coords).reshape(-1, 2) * np.array([img.shape[1], img.shape[0]])
|
||||
print("pl", coords[4:])
|
||||
print("pl", polyline)
|
||||
|
||||
@@ -207,6 +209,7 @@ def main():
|
||||
plt.figure(figsize=(10, 10 * out.shape[0] / out.shape[1]))
|
||||
plt.imshow(out_rgb)
|
||||
plt.plot(polyline[:, 0], polyline[:, 1], "y", linewidth=2)
|
||||
if 0:
|
||||
plt.plot(
|
||||
[yc - h / 2, yc - h / 2, yc + h / 2, yc + h / 2, yc - h / 2],
|
||||
[xc - w / 2, xc + w / 2, xc + w / 2, xc - w / 2, xc - w / 2],
|
||||
|
||||
Reference in New Issue
Block a user