chnaged augmentation to augment

augment-fix
Francesco Mattioli 3 months ago
parent b1eb587102
commit 8a593b2aa6
  1. 2
      docs/en/modes/train.md
  2. 3
      ultralytics/cfg/default.yaml
  3. 4
      ultralytics/data/build.py

@ -225,7 +225,7 @@ The training settings for YOLO models encompass various hyperparameters and conf
| `dropout` | `0.0` | Dropout rate for regularization in classification tasks, preventing overfitting by randomly omitting units during training. |
| `val` | `True` | Enables validation during training, allowing for periodic evaluation of model performance on a separate dataset. |
| `plots` | `False` | Generates and saves plots of training and validation metrics, as well as prediction examples, providing visual insights into model performance and learning progression. |
| `augmentation` | `True` | Enables data augmentation during training, introducing variability into the training data to improve model generalization. |
| `augment` | `True` | Enables data augmentation during training, introducing variability into the training data to improve model generalization. |
!!! info "Note on Batch-size Settings"

@ -35,7 +35,6 @@ fraction: 1.0 # (float) dataset fraction to train on (default is 1.0, all images
profile: False # (bool) profile ONNX and TensorRT speeds during training for loggers
freeze: None # (int | list, optional) freeze first n layers, or freeze list of layer indices during training
multi_scale: False # (bool) Whether to use multiscale during training
augmentation: True # (bool) Enables data augmentation during training
# Segmentation
overlap_mask: True # (bool) masks should overlap during training (segment train only)
mask_ratio: 4 # (int) mask downsample ratio (segment train only)
@ -59,7 +58,7 @@ source: # (str, optional) source directory for images or videos
vid_stride: 1 # (int) video frame-rate stride
stream_buffer: False # (bool) buffer all streaming frames (True) or return the most recent frame (False)
visualize: False # (bool) visualize model features
augment: False # (bool) apply image augmentation to prediction sources
augment: False # (bool) apply image augmentation to prediction and training sources
agnostic_nms: False # (bool) class-agnostic NMS
classes: # (int | list[int], optional) filter results by class, i.e. classes=0, or classes=[0,2,3]
retina_masks: False # (bool) use high-resolution segmentation masks

@ -88,7 +88,7 @@ def build_yolo_dataset(cfg, img_path, batch, data, mode="train", rect=False, str
img_path=img_path,
imgsz=cfg.imgsz,
batch_size=batch,
augment=cfg.augmentation if mode == "train" else False, # augmentation
augment=cfg.augment if mode == "train" else False, # augmentation
hyp=cfg, # TODO: probably add a get_hyps_from_cfg function
rect=cfg.rect or rect, # rectangular batches
cache=cfg.cache or None,
@ -110,7 +110,7 @@ def build_grounding(cfg, img_path, json_file, batch, mode="train", rect=False, s
json_file=json_file,
imgsz=cfg.imgsz,
batch_size=batch,
augment=cfg.augmentation if mode == "train" else False, # augmentation
augment=cfg.augment if mode == "train" else False, # augmentation
hyp=cfg, # TODO: probably add a get_hyps_from_cfg function
rect=cfg.rect or rect, # rectangular batches
cache=cfg.cache or None,

Loading…
Cancel
Save