[detectionview] fix bug, when no detection is in the current selection
This commit is contained in:
parent
6c54a86cde
commit
50d982c93b
@ -142,9 +142,10 @@ class DetectionView(QWidget):
|
|||||||
scores = self._data.selectedData("confidence")
|
scores = self._data.selectedData("confidence")
|
||||||
|
|
||||||
image_rect = self._pixmapitem.boundingRect() if self._pixmapitem is not None else QRectF(0,0,0,0)
|
image_rect = self._pixmapitem.boundingRect() if self._pixmapitem is not None else QRectF(0,0,0,0)
|
||||||
|
num_detections = len(frames)
|
||||||
for i, (id, f, t, l, s) in enumerate(zip(ids, frames, tracks, userlabeled, scores)):
|
for i, (id, f, t, l, s) in enumerate(zip(ids, frames, tracks, userlabeled, scores)):
|
||||||
c = Tracks.fromValue(t).toColor()
|
c = Tracks.fromValue(t).toColor()
|
||||||
|
c.setAlpha(int(i * 255 / num_detections))
|
||||||
if keypoint >= 0:
|
if keypoint >= 0:
|
||||||
x = coordinates[i, keypoint, 0]
|
x = coordinates[i, keypoint, 0]
|
||||||
y = coordinates[i, keypoint, 1]
|
y = coordinates[i, keypoint, 1]
|
||||||
|
Loading…
Reference in New Issue
Block a user