Add HUB-SDK Docs reference section (#7781)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
This commit is contained in:
parent
5941128835
commit
ee88882874
25 changed files with 142 additions and 47 deletions
|
|
@ -75,7 +75,6 @@ def segment2box(segment, width=640, height=640):
|
|||
Returns:
|
||||
(np.ndarray): the minimum and maximum x and y values of the segment.
|
||||
"""
|
||||
# Convert 1 segment label to 1 box label, applying inside-image constraint, i.e. (xy1, xy2, ...) to (xyxy)
|
||||
x, y = segment.T # segment xy
|
||||
inside = (x >= 0) & (y >= 0) & (x <= width) & (y <= height)
|
||||
x = x[inside]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue