Giter VIP home page Giter VIP logo

voc_to_coco's Introduction

VOC_to_COCO

update 2019.10.5

最简单的VOC数据集转换为COCO数据集方式

修改路径后, 只要一条指令就能转换

任何报错请issue我

  1. 请先确认你的VOC如下面的格式

      VOC
        |-- Annotations
        		|-- all xml files
        |-- JPEGImages
        		|-- all your samples
        |-- ImageSets
        		|-- 。。。。
    
    
  2. 克隆本仓到你指定的地址

git clone https://github.com/Stephenfang51/VOC_to_COCO
  1. cd 到VOC_to_COCO 编辑 voc_to_coco.py修改以下3点

    1. 设定验证集样本数, 如果设定为100, 则将从你的样本随机提取100个作为验证集
    2. 设定测试集样本数
    3. VOC Annotations 资料夹路径(最后面的"/"务必加上, 否则报错)

    例如

    val_files_num = 100
    test_files_num = 100
    voc_annotations = '././VOC/Annotations/'  #remember to modify the path

    修改到这边已经结束

  2. 执行生成, 确认是python3版本以上解释器, 否则报错

    python3 voc_to_coco.py
    
  3. COCO 数据集已经生成与VOC同一主目录下


The simplest way to covert VOC style dataset to COCO style dataset, only for object detection tesk for now.

Any problem feel free to issue me !

  1. First need to comfirm that your VOC path looks like:

      VOC
        |-- Annotations
        		|-- all xml files
        |-- JPEGImages
        		|-- all your samples
        |-- ImageSets
        		|-- 。。。。
    
  2. Clone this repo

    git clone https://github.com/Stephenfang51/VOC_to_COCO
    
  3. command cd to VOC_to_COCO path, and set the following three parts

    val_files_num = 100
    test_files_num = 100
    voc_annotations = '././VOC/Annotations/'  #remember to modify the path

    ex.

    if you set val_files_num to 100, which means it wil randomly choice 100 samples from your dataset

  4. do it ! only for python3

    python3 voc_to_coco.py
  5. Done ! your COCO dataset and your VOC dataset in the same path. So easy !

voc_to_coco's People

Contributors

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