Example Notebooks¶
Interactive tutorials using marimo notebooks.
Accessing Notebooks¶
The example notebooks are in the sleap-nn GitHub repository in the example_notebooks/ folder. They use marimo which provides a sandboxed environment that automatically handles all dependencies.
Prerequisites¶
Install uv:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Available Notebooks¶
Download notebooks from here.
Training Demo¶
End-to-end top-down demo: build the centroid + centered-instance configs (saved to YAML), train on the flies13 dataset, evaluate on the test split, then run tracked inference on a clip and render it with sio.render_video. Open it on molab (enable the GPU from the notebook-specs button) or run locally:
Augmentation Guide¶
Visualize different data augmentation techniques available in sleap-nn.
Receptive Field Guide¶
Visualize how receptive field changes with different config parameters.
Running Notebooks¶
Each notebook runs in a sandboxed environment - no need to install sleap-nn separately:
# Navigate to your notebooks folder
cd example_notebooks/
# Run any notebook
uvx marimo edit --sandbox <notebook_name>.py
The --sandbox flag creates an isolated environment with all required dependencies.