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.1.tar.gz
(1.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.1.tar.gz.
File metadata
- Download URL: mlxops_aug-0.1.1.tar.gz
- Upload date:
- Size: 1.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 |
a04cfae1dac45d2a0cd944cbd86c4400d88ae90d5ff02f2099e8788eea734f36
|
|
| MD5 |
685052cfd290e7e40b97095324a0c1cd
|
|
| BLAKE2b-256 |
509e22a821460b884f6cdb66a1248eebac4b79c24eca0c4cf050fd3ed9b2305d
|
File details
Details for the file mlxops_aug-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mlxops_aug-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.2 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 |
736f89e0984845c8426e498e7ad24da3a43680cd42f95f9d6fd7c6100de0c34a
|
|
| MD5 |
e6cb4a599084cef541480d75156c468c
|
|
| BLAKE2b-256 |
1bfe9e2f3a431defffb244df5b6df7911830b19f2020b66b76484ed882e67c89
|