A small Python toolkit for binary kelp segmentation on Planet 8/4/3-band imagery: prepare and chip data, train SegFormer models, map unlabeled imagery, and evaluate saved predictions against supplied labels.
The selected CA/BC model is 8-band SegFormer B0, BCE + Dice, epoch-16 EMA, trained with BC. Its identity and location are in the experiment contract. Tiny training is a workflow check, not a reproduction of this model.
Follow the sequential tiny walkthrough from installation through a copied model, predictions and a labeled report. It uses a small Box example and CPU training. Use GPU setup for production. The documentation index routes detailed recipes and references.
From this repository, with uv installed:
uv python install 3.12
uv sync --python 3.12 --frozen
uv run --frozen kelpseg --helpThe installed command calls reusable functions in kelpseg. Settings are plain
recipe files; machine-specific paths and large artifacts stay outside Git.
Preparation writes once to a fresh destination and stops on failure. Original
imagery and labels are immutable. UCLA Box through rclone is the transfer and
backup store; see storage policy.
Read AGENTS.md, the queue and the selected task contract before editing. Use Python 3.12 and the locked environment. Relevant focused tests accompany changes:
uv run --frozen pytest
uv run --frozen ruff format --check .
uv run --frozen ruff check .uv run --frozen pytest -q tests/test_repository_hygiene.py checks repository
file syntax, size, conflict markers and whitespace. No Git hooks are required.
uv build creates the installable wheel and source distribution.
See history and recovery for completed studies and retired code. New-region experiment recipes and a consolidated methods document remain in the pending roadmap.