Data augmentation methods for deep learning (CutMix, MixUp, PuzzleMix)
Project description
mlxops-aug
Data augmentation methods for deep learning, including CutMix, MixUp, and PuzzleMix.
Installation
pip install mlxops-aug
For PuzzleMix support (requires pygco):
pip install "mlxops-aug[puzzlemix]"
Note:
pygcorequires a C compiler. See pyGCO for installation instructions.
Usage
CutMix / MixUp
from mlxops_aug import CutMixUp
aug = CutMixUp(
num_classes=10,
config={
"use_cutmix": True,
"use_mixup": True,
"alpha": 1.0,
"prob": 0.5,
},
)
x_aug, y_aug = aug(x, y)
PuzzleMix
from mlxops_aug import PuzzleMix
aug = PuzzleMix(
num_classes=10,
config={
"block_num": 2,
"transport": True,
"prob": 1.0,
},
)
Requirements
- Python >= 3.10
- PyTorch >= 2.0
- torchvision >= 0.15
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mlxops_aug-0.1.6.tar.gz
(2.0 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlxops_aug-0.1.6.tar.gz.
File metadata
- Download URL: mlxops_aug-0.1.6.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
077721a50acc63274e506038f0595c83b708fb037df4972f7b973689f78bbdbd
|
|
| MD5 |
df0b72bc7e94b29076040dbe9e23831e
|
|
| BLAKE2b-256 |
29dccc982f1095288ed84fefee9ec8c8a01073265e00763030fef2c2dbbb6ca8
|
File details
Details for the file mlxops_aug-0.1.6-py3-none-any.whl.
File metadata
- Download URL: mlxops_aug-0.1.6-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dd8e2903158d0e67b94a5c77b6f7c4210e57db12c10034e5c6e907e33f8534d
|
|
| MD5 |
c4fde48ddaef1c17a49985e8cbee091c
|
|
| BLAKE2b-256 |
98a986cf6d31909ed8911cedc25ad2aac3d6a662fd018601c60d34ed809f9734
|