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.5.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.5.tar.gz.
File metadata
- Download URL: mlxops_aug-0.1.5.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 |
00dc45db9dd667e3f54c0c86d684681f890bc9e0d46e40206d11873322aa2877
|
|
| MD5 |
141f19c416a167918c8f212136791719
|
|
| BLAKE2b-256 |
c60cbf1b7a617beab4ba7b7bb9c6ea70eee763690d4ef4984018554a4a320d4a
|
File details
Details for the file mlxops_aug-0.1.5-py3-none-any.whl.
File metadata
- Download URL: mlxops_aug-0.1.5-py3-none-any.whl
- Upload date:
- Size: 22.3 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 |
ed85bb61fafe93e6532ad80bd27699f93c7338c74c9ec1c3590c20a71cf2b956
|
|
| MD5 |
19c6a59c37db459095b1a644759cff45
|
|
| BLAKE2b-256 |
82ee7b149b3c5b73986af1600fddeb19eafb7a3b21d5e2e23970f5aa474dc262
|