7. 专业README中文文档
1. 项目简介
TrivialAugment是ICCV 2021论文《TrivialAugment: Tuning-free Yet State-of-the-Art Data Augmentation》的官方实现,提供了一种简单但性能卓越的数据增强算法。
2. 快速开始
2.1 单独使用增强方法
推荐使用torchvision中的实现:
from torchvision.transforms import TrivialAugmentWide
或复制aug_lib.py文件到您的项目:
from aug_lib import TrivialAugment
augmenter = TrivialAugment()
aug_img = augmenter(img) # img为PIL图像
2.2 配置增强策略空间
# 设置标准增强空间(默认)
aug_lib.set_augmentation_space('fixed_standard')
# 设置自定义增强空间
aug_lib.set_augmentation_space('fixed_custom',2,['cutout'])
2.3 使用完整代码库
git clone https://github.com/automl/trivialaugment
cd trivialaugment
pip install -r requirements.txt
# 安装PyTorch(需手动)
训练命令示例:
python -m TrivialAugment.train -c confs/wresnet40x2_cifar100_b128_maxlr.1_ta_fixedsesp_nowarmup_200epochs.yaml --dataroot data
3. 实验工具
提供置信区间计算工具(evaluation_tools.py)和结果聚合脚本(aggregate_results.py)。
4. 引用
@InProceedings{Muller_2021_ICCV,
author = {M"uller, Samuel G. and Hutter, Frank},
title = {TrivialAugment: Tuning-Free Yet State-of-the-Art Data Augmentation},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2021},
pages = {774-782}
}