Update segment2box() comment (#2600)
This commit is contained in:
1 parent
ad05e37d99
commit
d4456e43b2
1 file changed
+1
-1
+1
-1
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user