steps.sam2.model.trainer¶
trainer
¶
Functions:
| Name | Description |
|---|---|
train |
Training step for fine-tuning a SAM2 model on a custom dataset. |
train(model, dataset_collection, sam2_repo_path)
¶
Training step for fine-tuning a SAM2 model on a custom dataset.
This step prepares the dataset and masks, configures the environment, and launches the SAM2 training loop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Model
|
The Picsellia model instance containing pretrained weights and logging context. |
required |
|
DatasetCollection[CocoDataset]
|
The dataset collection for training, expected to include a 'train' split. |
required |
|
str
|
Path to the local SAM2 repository used for training. |
required |