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.2.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.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mlxops_aug-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 07a543ef859ae18635860849e3a28bbfe42a43f2a9a0d5a196825777d6ef307f
MD5 5aee642f0f840025a4bacc8b9e0be44b
BLAKE2b-256 9d36af57bff9e1042b4939f4d01494da582559b5f7dde18d5a175edbda2b488d

See more details on using hashes here.

File details

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

File metadata

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

Hashes for mlxops_aug-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 756e787849481bfb0a937127e24b608974c1bbaff06c8a0621e52a53c764cfab
MD5 3de402609d48cf1b143dec52ca9542b0
BLAKE2b-256 206a3731cc54c406dfc1f8b374cd1bfa49e270b98b860acf9867097d318c87ba

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