augmentation
feature's utils.
Classes:
| Name | Description |
|---|---|
ImageFeatureAugmentation |
Feature augmentation class for images. |
ImageFeatureAugmentation
#
Feature augmentation class for images.
The corresponding data uses the channel-last format, i.e. batch_size x H x W x num_channels. You may need to use Compose([Permute([0, 3, 1, 2]), YourTransformation(), Permute([0, 2, 3, 1])]) if your augmentation requires the channel first. You don't need to convert to torch tensor first, as it is automatically handled by xpdeep.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Compose | None
|
A feature augmentation function used to augment raw data. This is done before data preprocessing. |
None
|
|
Compose | None
|
A feature augmentation function used to augment data after it has been preprocessed. |
None
|
Methods:
| Name | Description |
|---|---|
__attrs_post_init__ |
Post init method, triggered after calling init method to check instance's validity. |
to_model |
Convert to AugmentationInsert. |
Attributes:
| Name | Type | Description |
|---|---|---|
augment_raw |
Compose | None
|
|
augment_preprocessed |
Compose | None
|
|
augment_raw: transforms.Compose | None = field(default=None)
#
augment_preprocessed: transforms.Compose | None = field(default=None)
#
__attrs_post_init__() -> None
#
Post init method, triggered after calling init method to check instance's validity.
Source code in src/xpdeep/dataset/feature/augmentation.py
to_model() -> AugmentationInsert
#
Convert to AugmentationInsert.