SimpleAUG
SimpleAUG是一个更加简单易用的图像识别数据集增强库,它二次封装于Imgaug库,并正在快速地迭代中!
使用示例
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)
Release files for SimpleAUG 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SimpleAUG-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Release files / SimpleAUG-0.0.4-py3-none-any.whl
| Download URL | SimpleAUG-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e924298b503167aadb76b89013b5ceac83cd1aaf5bac85ad94bd556bd6187830
|
|
BLAKE2b-256 checksum How to use checksums |
b5e7a07f36d47bc1c45d112b8080c1ce6c3a2b71fc3baf840b8e2918633c5969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.8.16
|