Giter Club home page Giter Club logo

labelimg_labelme_dataaugmentation's Introduction

这是一个目标检测和目标分割增强的小工具,需要您事先标记一些图片,然后变化增强图片(支持LabelIMg和LabelMe标注的文件),希望对您有所帮助!

包括3个python文件(rename_file.py、DataAugmentforLabelImg.py和DataAugmentforLabelMe.py)

  1. rename_file.py能实现文件的重命名,注意修改文件的路径
  2. DataAugmentforLabelImg.py能实现LabelImg标注后的图片的增强(包括模糊,亮度,裁剪,旋转,平移,镜像等变化)
  3. DataAugmentforLabelMe.py能实现LabelMe标注后的图片的增强(包括模糊、亮度、平移、镜像等变化)

注意:一些包的安装是必要的,比如Opencv_python等
##将您需要增强的图片放在对应的文件夹即可,具体可参考demo给出的图片和xml文件存放路径,您放入即可
保存结果:

  1. 目标检测增强后的图片默认会保存在./data/Images2中,xml文件会保存在./data/Annotations2中(包括新的图片和xml文件)
  2. 目标分割增强后的图片默认会保存在./data2中(包括新的图片和json文件)

实现这个工具参考了:
https://github.com/maozezhong/CV_ToolBox/blob/master/DataAugForObjectDetection/

##Demo

LabelImg标定用于检测的图片,使用DataAugmentforLabelImg

image

增强结果:

image

LabelMe标定用于检测的图片,使用DataAugmentforLabelMe

image

增强结果:

image

labelimg_labelme_dataaugmentation's People

Contributors

pureyangcry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.