Skip to content

Commit

Permalink
Docs note
Browse files Browse the repository at this point in the history
  • Loading branch information
talmo committed Sep 29, 2024
1 parent d04fea5 commit b0af70f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,16 @@ labels.save("labels.slp")
```py
import sleap_io as sio

labels = sio.load_file("labels.v001.slp")
# Load labels without trying to open the video files.
labels = sio.load_file("labels.v001.slp", open_videos=False)

# Fix paths using prefixes.
# Fix paths using prefix replacement.
labels.replace_filenames(prefix_map={
"D:/data/sleap_projects": "/home/user/sleap_projects",
"C:/Users/sleaper/Desktop/test": "/home/user/sleap_projects",
})

# Save labels with updated paths.
labels.save("labels.v002.slp")
```

Expand Down

0 comments on commit b0af70f

Please sign in to comment.