Metadata-Version: 2.4
Name: mlxops-aug
Version: 0.1.9
Summary: Data augmentation methods for deep learning (CutMix, MixUp, PuzzleMix)
Project-URL: Homepage, https://github.com/youyinnn/mlxops-aug
License: MIT License
        
        Copyright (c) 2026 mlxops-aug contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: gco-wrapper
Requires-Dist: mlxops-utils
Requires-Dist: mlxops-xai
Requires-Dist: numpy
Requires-Dist: opencv-contrib-python==4.13.0.92
Requires-Dist: torch>=2.10.0
Requires-Dist: torchvision>=0.25.0
Provides-Extra: demo
Requires-Dist: datasets; extra == 'demo'
Requires-Dist: ipykernel; extra == 'demo'
Description-Content-Type: text/markdown

# mlxops-aug

Data augmentation methods for deep learning, including CutMix, MixUp, and PuzzleMix.

## Installation

```bash
pip install mlxops-aug
```

For PuzzleMix support (requires `pygco`):

```bash
pip install "mlxops-aug[puzzlemix]"
```

> **Note:** `pygco` requires a C compiler. See [pyGCO](https://github.com/Borda/pyGCO) for installation instructions.

## Usage

### CutMix / MixUp

```python
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

```python
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
