Reference for ultralytics/models/yolo/world/train.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/world/train.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.yolo.world.train.WorldTrainer
Bases: DetectionTrainer
A class to fine-tune a world model on a close-set dataset.
Example
Source code in ultralytics/models/yolo/world/train.py
build_dataset
Build YOLO Dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
img_path | str | Path to the folder containing images. | required |
mode | str |
| 'train' |
batch | int | Size of batches, this is for | None |
Source code in ultralytics/models/yolo/world/train.py
get_model
Return WorldModel initialized with specified config and weights.
Source code in ultralytics/models/yolo/world/train.py
preprocess_batch
Preprocesses a batch of images for YOLOWorld training, adjusting formatting and dimensions as needed.
Source code in ultralytics/models/yolo/world/train.py
ultralytics.models.yolo.world.train.on_pretrain_routine_end
Callback.
Source code in ultralytics/models/yolo/world/train.py
📅 Created 7 months ago ✏️ Updated 2 months ago