Skip to content

Using SLEAP on a directory of images (predefined frames) rather than a video #1976

Discussion options

You must be logged in to vote

Hi @Mattshanevdberg,

There are a few way to do this.

import sleap_io as sio
from pathlib import Path

# Define paths
labels_path = Path("/your/labels.slp")
new_labels_path = Path("specify/path/to/save/new/labels.slp")

# Load the SLP file
labels = sio.load_slp(labels_path)
labeled_frames_list = labels.labeled_frames

# Specify desired frames as integer values
wanted_frames = [1, 5, 10]  # Example: list of desired frame indices

# Filter frames
specific_frames = [frame for 

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@Mattshanevdberg
Comment options

@eberrigan
Comment options

Answer selected by eberrigan
@Mattshanevdberg
Comment options

@eberrigan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help!
Labels
None yet
2 participants