Skip to content

Too many duplicate track names to Set Instance Track #1678

Closed Answered by BKTidswell
BKTidswell asked this question in Help!
Discussion options

You must be logged in to vote

Closing this because I found the workaround that I missed before. Just including the slightly modified code here for reference if anyone needs it, but you can see the problem solved in #1652. While I didn't need to merge the tracks, it does make everything easier to work with. I'm not merging two sleap files, so less needs to be done with the videos, as it's just merging the labels. There might be an easier way to do it, but this worked.

import sleap
sleap.versions()

n_frames = 0
all_frames = []
reference_tracks = {}

slp_files = [
    "labels.v001.slp",
]

first_labels = None

ffirst_labels = None
for slp_file in slp_files:
    # Load saved labels.
    labels = sleap.load_file(slp_file, m…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BKTidswell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help!
Labels
None yet
1 participant