This repository provides two main scripts to configure and run a cell segmentation workflow:
@ -7,6 +9,8 @@ This repository provides two main scripts to configure and run a cell segmentati
* **generate\_config.py**: Interactive script to create JSON configuration files for training or prediction.
* **main.py**: Entry point to train, test, or predict using the generated configuration.
---
## Installation
0. **Install uv**:
@ -40,6 +44,8 @@ Follow the official guide at [https://docs.astral.sh/uv/](https://docs.astral.sh
uv sync
```
---
## Dataset Structure
Your data directory must follow this hierarchy:
@ -75,6 +81,8 @@ In this case, set the `masks_subdir` field in your dataset configuration to the
**Mask format**: Instance masks should be provided for multi-label segmentation with channel-last ordering, i.e., each mask array must have shape `(H, W, C)`.
---
## generate\_config.py
This script guides you through creating a JSON configuration for either training or prediction.
@ -101,6 +109,8 @@ Generated config includes sections:
6. **Save** model checkpoint and upload to W\&B if in training mode.
---
## Configurable Parameters
A brief overview of the key parameters you can adjust in your JSON config:
@ -155,6 +167,8 @@ A brief overview of the key parameters you can adjust in your JSON config:
> **Batch size note:** Validation, testing, and prediction runs always use a batch size of `1`, regardless of the `batch_size` setting in the training configuration.