diff --git a/.agents/PROJECT_CONTEXT.md b/.agents/PROJECT_CONTEXT.md index 62ae0e5..954a8fc 100755 --- a/.agents/PROJECT_CONTEXT.md +++ b/.agents/PROJECT_CONTEXT.md @@ -352,8 +352,8 @@ auto_augment=randaugment Вероятности и доли валидируются в диапазоне `0…1`; `degrees`, `shear` и `close_mosaic` не могут быть отрицательными. Режимы copy-paste: `flip`, `mixup`. -Политики AutoAugment: `randaugment`, `autoaugment`, `augmix`. Если augmentation -выключена, эти kwargs вообще не передаются в Ultralytics. +Политики AutoAugment: `none` (отключено), `randaugment`, `autoaugment`, `augmix`. Если augmentation +выключена, эти kwargs вообще не передаются в Ultralytics. При `auto_augment="none"` параметр транслируется в `None` для Ultralytics. ## 10. Работа с датасетами diff --git a/src/yolo_webui/config.py b/src/yolo_webui/config.py index 4feb00c..30173bf 100755 --- a/src/yolo_webui/config.py +++ b/src/yolo_webui/config.py @@ -8,7 +8,7 @@ from typing import Any, Literal YoloTask = Literal["detect", "segment", "classify", "pose", "obb"] -AutoAugmentPolicy = Literal["randaugment", "autoaugment", "augmix"] +AutoAugmentPolicy = Literal["none", "randaugment", "autoaugment", "augmix"] CopyPasteMode = Literal["flip", "mixup"] SUPPORTED_TASKS: tuple[YoloTask, ...] = ( "detect", @@ -18,6 +18,7 @@ SUPPORTED_TASKS: tuple[YoloTask, ...] = ( "obb", ) SUPPORTED_AUTO_AUGMENT_POLICIES: tuple[AutoAugmentPolicy, ...] = ( + "none", "randaugment", "autoaugment", "augmix", @@ -161,7 +162,7 @@ class AugmentationConfig: "cutmix": self.cutmix, "copy_paste": self.copy_paste, "copy_paste_mode": self.copy_paste_mode, - "auto_augment": self.auto_augment, + "auto_augment": None if self.auto_augment == "none" else self.auto_augment, "erasing": self.erasing, "close_mosaic": self.close_mosaic, } diff --git a/src/yolo_webui/static/index.html b/src/yolo_webui/static/index.html index 58c69e6..f856920 100755 --- a/src/yolo_webui/static/index.html +++ b/src/yolo_webui/static/index.html @@ -296,6 +296,7 @@