Skip to main content

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: pygco requires 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


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.0.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlxops_aug-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file mlxops_aug-0.1.0.tar.gz.

File metadata

  • Download URL: mlxops_aug-0.1.0.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

Hashes for mlxops_aug-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5e3de590292e9472fe6f8af0911eb2e7c669596eb4e8646dd083849e0abcd851
MD5 8222e642b4e90ebe3fc6861c47ab4923
BLAKE2b-256 8a64b2d0e20bb1a1d50336ceba284ba4bd29751f1ae486778ec543f91abdfd92

See more details on using hashes here.

File details

Details for the file mlxops_aug-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mlxops_aug-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mlxops_aug-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f7e63d878f2c68093c7ac6bff2534d60bf766812b36c459dc7a0bc63c04f65b
MD5 244b6aad4c9234070d5a11da062502f3
BLAKE2b-256 a34f35e9a65d9a9c41dacbe377acd5723abd4e037d49abbe30949d7497248f6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page