Skip to content

Applying track labels to predictions/instances #758

Answered by talmo
rfkova asked this question in Help!
Discussion options

You must be logged in to vote

Hi @rfkova,

Why do you need the track set for a single instance tracking model? It's implicit if there is only a single animal per frame. Is it for compatibility with downstream analyses or something?

In any case, here's a quick script that you should be able to run on Colab or in a local script or notebook to do this:

import sleap

labels = sleap.load_file("labels.v000.slp")
track = sleap.Track(name="animal")  # the name is optional and be whatever you want
for instance in labels.instances():
    instance.track = track
labels.save("labels.v001.slp")

The propagate track labels option refers to manually switching track identities to fix swaps that happen during multi-instance tracking. It …

Replies: 1 comment 4 replies

Comment options

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

@rfkova
Comment options

@talmo
Comment options

@rfkova
Comment options

Answer selected by rfkova
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