From c983eda802daa7286d8f7eb37dbaf1751254c68d Mon Sep 17 00:00:00 2001 From: Christopher K <34870657+ChristopherKotthoff@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:26:05 +0000 Subject: [PATCH] fixed the random rotation augmentation inconsistency (#155) --- detectree2/models/train.py | 5 ++--- docs/source/tutorial.rst | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/detectree2/models/train.py b/detectree2/models/train.py index 5e404e4d..148dec48 100644 --- a/detectree2/models/train.py +++ b/detectree2/models/train.py @@ -463,9 +463,8 @@ def build_train_loader(cls, cfg): # Define basic augmentations including rotation and flipping augmentations = [ - T.RandomRotation(angle=[90, 90], expand=False), - T.RandomFlip(prob=0.4, horizontal=True, vertical=False), - T.RandomFlip(prob=0.4, horizontal=False, vertical=True), + T.RandomRotation(angle=[0, 360], expand=False), + T.RandomFlip(prob=0.5, horizontal=True, vertical=False), ] # Additional augmentations for RGB images diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index c1817b93..a350119d 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -474,9 +474,8 @@ By default, random rotations and flips will be performed on input images. .. code-block:: python augmentations = [ - T.RandomRotation(angle=[90, 90], expand=False), - T.RandomFlip(prob=0.4, horizontal=True, vertical=False), - T.RandomFlip(prob=0.4, horizontal=False, vertical=True), + T.RandomRotation(angle=[0, 360], expand=False), + T.RandomFlip(prob=0.5, horizontal=True, vertical=False), ] If the input data is RGB, additional augmentations will be applied to adjust the brightness, contrast, saturation, and