Skip to content

Commit b8a6782

Browse files
authored
docs: add information for the argument separate (#732)
1 parent e7b26a4 commit b8a6782

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

mindcv/data/loader.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ def create_loader(
5858
(default=None).
5959
python_multiprocessing (bool, optional): Parallelize Python operations with multiple worker processes. This
6060
option could be beneficial if the Python operation is computational heavy (default=False).
61-
separate(bool, optional): separate the image origin and the image been transformed
61+
separate(bool, optional): separate the image clean and the image been transformed.
62+
If separate==True, that means the dataset returned has 3 parts:
63+
* the first part called image "clean", which means the image without auto_augment (e.g., auto-aug)
64+
* the second and third parts called image transformed, hence, with the auto_augment transform.
65+
Refer to ".transforms_factory.create_transforms" for more information.
6266
6367
Note:
6468
1. cutmix is now experimental (which means performance gain is not guarantee)

mindcv/data/transforms_factory.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ def create_transforms(
196196
image_resize (int): the image size after resize for adapting to network. Default: 224.
197197
is_training (bool): if True, augmentation will be applied if support. Default: False.
198198
auto_augment(str):augmentation strategies, such as "augmix", "autoaug" etc.
199-
separate: separate the image origin and the image been transformed.
199+
separate: separate the image clean and the image been transformed. If separate==True, the transformers are
200+
returned as a tuple of 3 separate transforms for use in a mixing dataset that passes:
201+
* all data through the primary transform, called "clean" data
202+
* a portion of the data through the secondary transform (e.g., auto-aug)
203+
* normalized and converts the branches above with the third, transform
200204
**kwargs: additional args parsed to `transforms_imagenet_train` and `transforms_imagenet_eval`
201205
202206
Returns:

0 commit comments

Comments
 (0)