Giter Site home page Giter Site logo

labelme2yolo's Introduction

说明

该脚本可将labelme格式的数据转成yolo格式,并划分训练集测试集,同时生成yolo数据配置文件dataset.yaml。
在原有的labelme2yolo的基础上做了以下优化。

  1. 支持多线程,速度更快。
  2. 不用导入labelme模块,不读取图片,只读json,速度更快
  3. 用了ujson模块,速度更快

用法

1.多线程

'./labelmeDataset'是原始的labelme格式的数据集。save_dir是输出yolo数据集的位置。 label_path是标签文件label.txt的位置。 val_size是划分测试集的比例。thread_num是开的线程数。

python labelme2yolo_fast.py './labelmeDataset' --save_dir='./YOLODataset' --label_path='label.txt' --val_size=0.2 --thread_num=15

2.单线程

相比多线程,单线程不用提供标签文件label.txt。

python labelme2yolo_one.py './labelmeDataset' --save_dir='./YOLODataset' --val_size=0.2

参考

1.https://github.com/rooneysh/Labelme2YOLO

labelme2yolo's People

Contributors

summeryao 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.