Kaynağa Gözat

Update segment2box() comment (#2600)

5.0
Glenn Jocher GitHub 3 yıl önce
ebeveyn
işleme
d4456e43b2
Veri tabanında bu imza için bilinen anahtar bulunamadı GPC Anahtar Kimliği: 4AEE18F83AFDEB23
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. +1
    -1
      utils/general.py

+ 1
- 1
utils/general.py Dosyayı Görüntüle

@@ -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):

Yükleniyor…
İptal
Kaydet