Skip to content

Example Notebooks

This page provides information on how to access and use the example notebooks from the sleap-nn GitHub repository.

Accessing Example Notebooks

The example notebooks are available in the sleap-nn GitHub repository in the example_notebooks/ folder. These notebooks are created with marimo and provide interactive tutorials for various sleap-nn workflows.

Getting Started with Marimo

The example notebooks use marimo, which provides a sandboxed environment that automatically handles all dependencies. You don't need to create a separate sleap-nn environment.

Prerequisites

Install uv:

First Time Setup

Install uv first - a fast Python package manager:

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Setup

Download the notebooks from here!

(i) Training Demo Notebook

  • Description: End-to-end demo on creating config files and running training, inference, and evaluation using sleap-nn APIs.
   uvx marimo edit --sandbox training_demo.py

(ii) Augmentation Guide Notebook

  • Description: Visualize the different data augmentation techniques available in sleap-nn.
   uvx marimo edit --sandbox augmentation_guide.py

(iii) Receptive Field Guide Notebook

  • Description: Visualize how the receptive field could be set by changing the config parameters.
   uvx marimo edit --sandbox receptive_field_guide.py