Replies: 1 comment 6 replies
-
Hi @rfkova, Here's a quick snippet that should do what you want: import sleap
# Load multi-video labels file.
labels = sleap.load_file("labels.v000.slp")
# Save labels for each video separately.
for i, video in enumerate(labels.videos):
# Create a new Labels object containing only labels from the current video.
labels_i = sleap.Labels(labels[video])
# Save.
labels_i.save(f"labels.v000.video{i}.slp") Let me know if that works for you! Talmo |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I have an SLP file with tons of predictions (not 100% due to some possible bugs), enough to probably interpolate intermediate poses with some of the built-in SIMBA tools. Problem is, SIMBA wants single predictions files per video and I have numerous predictions files covering both videos from each time I ran inference - thus I need to find a way to separate predictions from each video and wrap all the inference predictions into two files representing all predictions from each video.
Cheers!
Ryan
Beta Was this translation helpful? Give feedback.
All reactions