Skip to main content

A simpler imgaug tool

Project description

SimpleAUG 更加简单的数据增强库

使用示例

pip install SimpleAUG

数据增强的具体配置可以到overview_of_augmenters.html查阅

from imgaug import augmenters as iaa
from simpleaug import aug

# 输入VOC数据集的路径
XML_DIR = "/demo/VOC_MASK/Annotations/"
IMG_DIR = "/demo/VOC_MASK/JPEGImages/"

# 数据增强后的存储路径
AUG_XML_DIR = "/demo/VOC_MASK_AUG/Annotations/"  # 存储增强后的XML文件夹路径
AUG_IMG_DIR = "/demo/VOC_MASK_AUG/JPEGImages/"  # 存储增强后的影像文件夹路径

# 数据增强配置
AUGCONF = [
    # iaa.Invert(0.5),
    iaa.Fliplr(0.5),
    iaa.Multiply((1.2, 1.5)),  # change brightness, doesn't affect BBs
    iaa.GaussianBlur(sigma=(0, 3.0)),  # iaa.GaussianBlur(0.5),
    iaa.Affine(
        translate_px={"x": 15, "y": 15},
        scale=(0.8, 0.95),
    ),  # translate by 40/60px on x/y axis, and scale to 50-70%, affects BBs
    iaa.Sometimes(
        0.5,
        iaa.GaussianBlur(sigma=2.0),
        iaa.Sequential([iaa.Affine(rotate=45), iaa.Sharpen(alpha=1.0)])
    )
]

#       输入地址            输出地址              增强次数 数据增强配置
aug.aug(IMG_DIR, XML_DIR, AUG_XML_DIR, AUG_IMG_DIR, 2, AUGCONF)

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

simpleaug-0.0.2.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

SimpleAUG-0.0.2.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file simpleaug-0.0.2.1.tar.gz.

File metadata

  • Download URL: simpleaug-0.0.2.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.16

File hashes

Hashes for simpleaug-0.0.2.1.tar.gz
Algorithm Hash digest
SHA256 d8cfef35db18647824cb86f06c2049c3d66e3496567cd6c3f5ee8c3c5e7d5ec0
MD5 b8d35fefeffe085b1028a94062c8e736
BLAKE2b-256 6c50a99763b33875ffcb2ea23a9c2de5fec56c3012ceba3947b708182f7ba9ce

See more details on using hashes here.

File details

Details for the file SimpleAUG-0.0.2.1-py3-none-any.whl.

File metadata

  • Download URL: SimpleAUG-0.0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.16

File hashes

Hashes for SimpleAUG-0.0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab5d23d48edc1a0077f65fb941b54269a61e825560a01d722a4252eaf4aceb9c
MD5 27ea98feea1b4aee0411b3f742c8b89e
BLAKE2b-256 fbedede03efc6f177f2787a4b9bd02575845e6c969b98e1129573c0da1850a1c

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