train_segmentation_model
Train a custom segmentation model using training images and labels, with adjustable epochs, learning rate, and GPU support for tailored cell analysis.
Instructions
Train a custom Cellpose segmentation model.
Args: train_dir: Directory containing training images train_labels_dir: Directory containing training masks/labels model_name: Name for the trained model model_type: Base model type (cyto, nuclei, etc.) n_epochs: Number of training epochs learning_rate: Learning rate for training batch_size: Batch size for training test_dir: Optional directory with test images test_labels_dir: Optional directory with test labels gpu: Whether to use GPU acceleration output_dir: Directory to save trained model (default: current directory)
Returns
Dictionary with training resultsInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpu | No | ||
| n_epochs | No | ||
| test_dir | No | ||
| train_dir | Yes | ||
| batch_size | No | ||
| model_name | Yes | ||
| model_type | No | cyto | |
| output_dir | No | ||
| learning_rate | No | ||
| test_labels_dir | No | ||
| train_labels_dir | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||