From 5f186396ce185ad4a9cccaab5dc2c6e38638f36e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 25 Mar 2021 15:12:49 +0100 Subject: [PATCH] Update segment2box() comment (#2600) --- utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/general.py b/utils/general.py index 284146c87e10..9822582cdb86 100755 --- a/utils/general.py +++ b/utils/general.py @@ -289,7 +289,7 @@ def segment2box(segment, width=640, height=640): x, y = segment.T # segment xy inside = (x >= 0) & (y >= 0) & (x <= width) & (y <= height) x, y, = x[inside], y[inside] - return np.array([x.min(), y.min(), x.max(), y.max()]) if any(x) else np.zeros((1, 4)) # cls, xyxy + return np.array([x.min(), y.min(), x.max(), y.max()]) if any(x) else np.zeros((1, 4)) # xyxy def segments2boxes(segments):