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.2.0.tar.gz (2.2 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.2.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mlxops_aug-0.2.0.tar.gz
  • Upload date:
  • Size: 2.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 525d8c2308a7bba4689b13ae5bcb80a756deaaa90d83fb5dbdf309739ec4bb9b
MD5 b269e7f3fe13ce00fb24f03c6042a128
BLAKE2b-256 c09297be4af8fa39fb484fbf970a784e7248a5a7bf2eef2cd0eed61104668921

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlxops_aug-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fc46d9937ed61f85f3dd1059b9c38585dc1cb45f43afab494f45234ed3f0e8f
MD5 74580bf1f9818de4f7312f7755ed6986
BLAKE2b-256 d0a1fa376891052e3666befa401a1023204f071d3fb047c907cc97476aaa00fe

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