-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The GUI freezes when jumping to labeled frame containing an instance predicted by the model that contains nan positions.
import sleap.io as sio
labels = sio.load_file('sleap/labels.v010.slp')
In [33]: labels.labeled_frames[252].instances[0].points
Out[33]:
PredictedPointsArray([([575.65203857, 356.7387085 ], 0.91531068, True, False, 'Head'),
([572.88000488, 364.34875488], 0.80707204, True, False, 'Eye_Left_Front'),
([583.85784912, 361.18151855], 0.67773259, True, False, 'Eye_Left_Back'),
([568.13079834, 356.41497803], 0.84104878, True, False, 'Eye_Right_Front'),
([571.98321533, 348.07727051], 0.78071177, True, False, 'Eye_Right_Back'),
([599.86999512, 336.30239868], 0.78452855, True, False, 'Swim_Bladder'),
([596.07550049, 340.26177979], 0.5335865 , True, False, 'Tail_0'),
([ nan, nan], 0. , False, False, 'Tail_1'),
([ nan, nan], 0. , False, False, 'Tail_2'),
([ nan, nan], 0. , False, False, 'Tail_3'),
([ nan, nan], 0. , False, False, 'Tail_4'),
([612.53485107, 264.25234985], 0.24509695, True, False, 'Tail_5'),
([612.91308594, 259.89797974], 0.20331819, True, False, 'Tail_6'),
([619.28857422, 248.93322754], 0.20466103, True, False, 'Tail_7'),
([ nan, nan], 0. , False, False, 'Tail_8'),
([ nan, nan], 0. , False, False, 'Tail_9')],
dtype=[('xy', '<f8', (2,)), ('score', '<f8'), ('visible', '?'), ('complete', '?'), ('name', 'O')])
Loading that slp file into sleap-label and jumping to that frame causes the GUI to freeze.
If I replace the nan values with e.g. 100, the frame loads fine
In [56]: labels.labeled_frames[252].instances[0].points
Out[56]:
PredictedPointsArray([([575.65203857, 356.7387085 ], 0.91531068, True, False, 'Head'),
([572.88000488, 364.34875488], 0.80707204, True, False, 'Eye_Left_Front'),
([583.85784912, 361.18151855], 0.67773259, True, False, 'Eye_Left_Back'),
([568.13079834, 356.41497803], 0.84104878, True, False, 'Eye_Right_Front'),
([571.98321533, 348.07727051], 0.78071177, True, False, 'Eye_Right_Back'),
([599.86999512, 336.30239868], 0.78452855, True, False, 'Swim_Bladder'),
([596.07550049, 340.26177979], 0.5335865 , True, False, 'Tail_0'),
([100. , 100. ], 0. , False, False, 'Tail_1'),
([100. , 100. ], 0. , False, False, 'Tail_2'),
([100. , 100. ], 0. , False, False, 'Tail_3'),
([100. , 100. ], 0. , False, False, 'Tail_4'),
([612.53485107, 264.25234985], 0.24509695, True, False, 'Tail_5'),
([612.91308594, 259.89797974], 0.20331819, True, False, 'Tail_6'),
([619.28857422, 248.93322754], 0.20466103, True, False, 'Tail_7'),
([100. , 100. ], 0. , False, False, 'Tail_8'),
([100. , 100. ], 0. , False, False, 'Tail_9')],
dtype=[('xy', '<f8', (2,)), ('score', '<f8'), ('visible', '?'), ('complete', '?'), ('name', 'O')])
Your personal set up
SLEAP: 1.5.1
Numpy: 2.2.6
Python: 3.11.0
OS: Linux-6.14.0-33-generic-x86_64-with-glibc2.41 (Ubuntu 25.04)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working