Skip to content

General Data Augmentation Algorithms for Object Detection(esp. Yolo)

Notifications You must be signed in to change notification settings

doubleZ0108/Data-Augmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

数据集扩充

中文(zh-cn) | English(en)

通用目标检测深度学习数据集扩充方法(尤其针对Yolo)


具体实现

数据集扩充方法详细说明

按从左到右,从上到下顺序排列

image.png


如何运行

  • 安装所需依赖

    pip install -r requirements.txt
  • 将原始图片和标注数据放到data/

  • 运行

    • python main.py 生成所有数据在data/文件夹下
    • 执行对应.py文件生成指定扩充图像数据
  • 使用

    os.chdir(dirname)
    (name, appidx) = os.path.splitext(filename)
    img = np.array(Image.open(filename))  # Image读入的图片形式
    
    somealgo_img = somealgo(np.copy(img))	# 复制一份传入扩充算法
    somealgo_img.save(name + "_somealgo" + appidx)	# 将扩充图像写入本地
    saveSomeAlgoLabel(name) # 自动生成对应的标注(部分算法需要手动标注)

开发环境

  • 操作系统: macOS Catalina 10.15.5
  • 开发语言: python 3.7.4
  • 主要依赖: numpy | cv2 | PIL | shutil

关于作者

姓名👤 张喆 | doubleZ
学校🏫 同济大学
联系方式✉️ dbzdbz@tongji.edu.cn

About

General Data Augmentation Algorithms for Object Detection(esp. Yolo)

Topics

Resources

Stars

Watchers

Forks

Languages