Reference for ultralytics/models/yolo/yoloe/train_seg.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/yoloe/train_seg.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.yolo.yoloe.train_seg.YOLOESegTrainer
Bases: YOLOETrainer
, SegmentationTrainer
Trainer class for YOLOE segmentation models.
This class combines YOLOETrainer and SegmentationTrainer to provide training functionality specifically for YOLOE segmentation models.
Attributes:
Name | Type | Description |
---|---|---|
cfg |
dict
|
Configuration dictionary with training parameters. |
overrides |
dict
|
Dictionary with parameter overrides. |
_callbacks |
list
|
List of callback functions for training events. |
This class combines YOLOETrainer and SegmentationTrainer to provide training functionality specifically for YOLOE segmentation models.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cfg
|
Dict
|
Configuration dictionary with training parameters. |
DEFAULT_CFG
|
overrides
|
Dict
|
Dictionary with parameter overrides. |
None
|
_callbacks
|
List
|
List of callback functions for training events. |
None
|
Source code in ultralytics/models/yolo/yoloe/train_seg.py
get_model
Return YOLOESegModel initialized with specified config and weights.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cfg
|
dict | str
|
Model configuration dictionary or YAML file path. |
None
|
weights
|
str
|
Path to pretrained weights file. |
None
|
verbose
|
bool
|
Whether to display model information. |
True
|
Returns:
Type | Description |
---|---|
YOLOESegModel
|
Initialized YOLOE segmentation model. |
Source code in ultralytics/models/yolo/yoloe/train_seg.py
get_validator
Create and return a validator for YOLOE segmentation model evaluation.
Returns:
Type | Description |
---|---|
YOLOESegValidator
|
Validator for YOLOE segmentation models. |
Source code in ultralytics/models/yolo/yoloe/train_seg.py
ultralytics.models.yolo.yoloe.train_seg.YOLOEPESegTrainer
Bases: SegmentationTrainer
Fine-tune YOLOESeg model in linear probing way.
This trainer specializes in fine-tuning YOLOESeg models using a linear probing approach, which involves freezing most of the model and only training specific layers.
Source code in ultralytics/models/yolo/segment/train.py
get_model
Return YOLOESegModel initialized with specified config and weights for linear probing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cfg
|
dict | str
|
Model configuration dictionary or YAML file path. |
None
|
weights
|
str
|
Path to pretrained weights file. |
None
|
verbose
|
bool
|
Whether to display model information. |
True
|
Returns:
Type | Description |
---|---|
YOLOESegModel
|
Initialized YOLOE segmentation model configured for linear probing. |
Source code in ultralytics/models/yolo/yoloe/train_seg.py
ultralytics.models.yolo.yoloe.train_seg.YOLOESegTrainerFromScratch
Bases: YOLOETrainerFromScratch
, YOLOESegTrainer
Trainer for YOLOE segmentation from scratch.
Source code in ultralytics/models/yolo/yoloe/train.py
ultralytics.models.yolo.yoloe.train_seg.YOLOESegVPTrainer
Bases: YOLOEVPTrainer
, YOLOESegTrainerFromScratch
Trainer for YOLOE segmentation with VP.