{"id":13641243,"url":"https://github.com/doubleZ0108/Data-Augmentation","last_synced_at":"2025-04-20T07:32:34.857Z","repository":{"id":37635693,"uuid":"283253402","full_name":"doubleZ0108/Data-Augmentation","owner":"doubleZ0108","description":"General Data Augmentation Algorithms for Object Detection(esp. Yolo)","archived":false,"fork":false,"pushed_at":"2023-04-14T03:50:12.000Z","size":550,"stargazers_count":15,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T11:37:43.736Z","etag":null,"topics":["data-augmentation","dataset","object-detection","yolo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doubleZ0108.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-28T15:29:49.000Z","updated_at":"2024-09-04T02:18:07.000Z","dependencies_parsed_at":"2024-11-09T11:31:51.631Z","dependency_job_id":null,"html_url":"https://github.com/doubleZ0108/Data-Augmentation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doubleZ0108%2FData-Augmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doubleZ0108%2FData-Augmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doubleZ0108%2FData-Augmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doubleZ0108%2FData-Augmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doubleZ0108","download_url":"https://codeload.github.com/doubleZ0108/Data-Augmentation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249864314,"owners_count":21336724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-augmentation","dataset","object-detection","yolo"],"created_at":"2024-08-02T01:01:19.105Z","updated_at":"2025-04-20T07:32:34.327Z","avatar_url":"https://github.com/doubleZ0108.png","language":"Python","funding_links":[],"categories":["Summary"],"sub_categories":[],"readme":"# 数据集扩充\n\n[中文(zh-cn)](https://github.com/doubleZ0108/Data-Augmentation/blob/master/README.md) | [English(en)](https://github.com/doubleZ0108/Data-Augmentation/blob/master/README_en.md)\n\n通用目标检测深度学习数据集扩充方法(尤其针对Yolo)\n\n* [具体实现](#具体实现)\n* [如何运行](#如何运行)\n* [开发环境](#开发环境)\n* [关于作者](#关于作者)\n\n------\n\n## 具体实现\n\n[数据集扩充方法详细说明](https://github.com/doubleZ0108/Data-Augmentation/blob/master/doc/data_augmentation_detailed.md)\n\n- 图像强度变换\n  - 亮度变化： [lightness](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/lightness.py)   [darkness](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/darkness.py)\n  - 对比度变化：[contrast](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/contrast.py)\n- 图像滤波\n  - 锐化：[sharpen](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/sharpen.py)\n  - 高斯模糊：[blur](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/blur.py)\n- 透视变换\n  - 镜像翻转：[flip](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/flip.py)\n  - 图像裁剪：[crop](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/crop.py)\n  - 图像拉伸：[deform](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/deform.py)\n  - 镜头畸变：[distortion](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/distortion.py)\n- 注入噪声\n  - 椒盐噪声：[noise](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/noise.py)\n  - 渐晕：[vignetting](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/vignetting.py)\n- 其他\n  - 随机抠除：[cutout](https://github.com/doubleZ0108/Data-Augmentation/blob/master/src/cutout.py)\n\n\u003e 按从左到右，从上到下顺序排列\n\n\u003cimg src=\"https://upload-images.jianshu.io/upload_images/12014150-38d9933ec9b9e736.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" alt=\"image.png\" width=\"67%;\" align=\"center\" /\u003e\n\n\u003cbr/\u003e\n\n## 如何运行\n\n- 安装所需依赖\n\n  ```bash\n  pip install -r requirements.txt\n  ```\n\n- 将原始图片和[标注数据](https://github.com/doubleZ0108/IDEA-Lab-Summer-Camp/blob/master/doc/Study-Notes/labelImg工具.md)放到`data/`中\n\n- 运行\n\n  - `python main.py` 生成所有数据在`data/`文件夹下\n  - 执行对应`.py`文件生成指定扩充图像数据\n\n- 使用\n\n  ```python\n  os.chdir(dirname)\n  (name, appidx) = os.path.splitext(filename)\n  img = np.array(Image.open(filename))  # Image读入的图片形式\n  \n  somealgo_img = somealgo(np.copy(img))\t# 复制一份传入扩充算法\n  somealgo_img.save(name + \"_somealgo\" + appidx)\t# 将扩充图像写入本地\n  saveSomeAlgoLabel(name) # 自动生成对应的标注(部分算法需要手动标注)\n  ```\n\n\u003cbr/\u003e\n\n## 开发环境\n\n- **操作系统**: macOS Catalina 10.15.5\n- **开发语言**: python 3.7.4\n- **主要依赖**: numpy | cv2 | PIL | shutil\n\n\u003cbr/\u003e\n\n## 关于作者\n\n|     姓名👤     |                   张喆 \\| doubleZ                   |\n| :-----------: | :-------------------------------------------------: |\n|   **学校🏫**   |                      同济大学                       |\n| **联系方式✉️** | [dbzdbz@tongji.edu.cn](mailto:dbzdbz@tongji.edu.cn) |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdoubleZ0108%2FData-Augmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FdoubleZ0108%2FData-Augmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdoubleZ0108%2FData-Augmentation/lists"}