[skeleton] correctly catch zero len detection

This commit is contained in:
Jan Grewe 2025-02-17 23:11:57 +01:00
parent 74fc43b586
commit 6c46d834eb

View File

@ -165,6 +165,8 @@ class SkeletonWidget(QWidget):
frames:np.ndarray, tracks:np.ndarray, brush:QBrush):
num_detections = 0 if coordinates is None else coordinates.shape[0]
logging.debug("SkeletonWidget: add %i Skeletons", num_detections)
if num_detections < 1:
return
sorting = np.argsort(frames)
coordinates = coordinates[sorting,:, :]
detection_ids = detection_ids[sorting]