Skip to content

sleap-roots

Analysis tools for SLEAP-based plant root phenotyping.

  • 🌱 Fast Root Phenotyping


    Extract 100+ morphological traits from plant root images using pose estimation with SLEAP.

    Quick Start

  • 📊 Pipeline-Based Analysis


    Pre-built pipelines for dicots, monocots, and custom root system architectures.

    Pipeline Guide

  • 🔬 Scientifically Validated


    Published methods with reproducible trait computations and batch processing.

    Read the Paper

  • Developer Friendly


    Clean Python API with comprehensive docs, type hints, and codecov test coverage.

    API Reference

What is sleap-roots?

sleap-roots is a Python package for extracting morphological traits from plant root images analyzed with SLEAP (Social LEAP Estimates Animal Poses). While SLEAP is designed for animal pose estimation, it works exceptionally well for tracking plant root landmarks over time.

This package provides:

  • Trait pipelines for different root system architectures (dicots, monocots)
  • 100+ morphological traits including lengths, angles, counts, and topology
  • Batch processing for high-throughput phenotyping experiments
  • Modular utilities for custom trait development

Key Features

Multiple Pipeline Support

Choose from pre-built pipelines optimized for different plant types:

  • DicotPipeline – Primary + lateral roots (soy, canola, arabidopsis)
  • YoungerMonocotPipeline – Primary + crown roots (early-stage rice, maize)
  • OlderMonocotPipeline – Crown roots only (mature rice, maize)
  • MultipleDicotPipeline – Multi-plant dicot setups
  • PrimaryRootPipeline – Primary root only
  • LateralRootPipeline – Lateral roots only

Or create your own custom pipeline!

High Performance

Fast trait extraction: Process plants in 0.1-0.5s each (single-plant pipelines) or analyze 100+ plants in under a minute.

Pipeline Type Time per Plant Throughput
Single plant (DicotPipeline) 0.1-0.5s 120-600 plants/min
Multiple plants 0.5-2s per image 30-120 plants/min

Benchmarked on GitHub Actions (2 cores, 7GB RAM). Performance scales with your CPU and available memory.

For Developers

See the Developer Guide → Benchmarking for detailed performance tracking and regression detection infrastructure.

Research Ready

  • Published validation in Plant Phenomics
  • Reproducible trait computations with clear documentation
  • CSV export compatible with statistical analysis tools

Extensible

  • Modular design for custom trait development
  • Clean Python API with comprehensive type hints
  • Well-tested codebase codecov

Getting Started

Ready to extract root traits from your images? Follow these steps:

  1. Install sleap-roots – Quick pip or uv install (2 minutes)
  2. Quick Start Tutorial – Learn the basics with example data (5 minutes)
  3. Choose a Pipeline – Find the right pipeline for your plant type

For Contributors

Want to contribute to sleap-roots? See the Development Setup Guide for instructions on setting up a development environment.

Quick Example

import sleap_roots as sr

# Load SLEAP predictions
series = sr.Series.load(
    series_name="my_plant",
    h5_path="predictions.h5",
    primary_path="primary_roots.slp",
    lateral_path="lateral_roots.slp"
)

# Compute traits using dicot pipeline
pipeline = sr.DicotPipeline()
traits = pipeline.compute_plant_traits(series, write_csv=True)

# Access individual traits
print(f"Primary root length: {traits['primary_length'].iloc[0]:.2f} pixels")
print(f"Lateral root count: {traits['lateral_count'].iloc[0]}")

Citation

If you use sleap-roots in your research, please cite:

E.M. Berrigan et al., "Fast and Efficient Root Phenotyping via Pose Estimation", Plant Phenomics. DOI: 10.34133/plantphenomics.0175

Acknowledgments

Created by the Talmo Lab and Busch Lab at the Salk Institute, as part of the Harnessing Plants Initiative.

Contributors

  • Elizabeth Berrigan
  • Lin Wang
  • Andrew O'Connor
  • Talmo Pereira