Coder Social home page Coder Social logo

yolo2coco's Introduction

darknet格式数据→COCO

  • darknet训练数据目录结构(详情参见dataset/darknet):

    darknet
    ├── class.names
    ├── gen_config.data
    ├── gen_train.txt
    ├── gen_valid.txt
    └── images
        ├── train
        └── valid
    
  • 转换

    python darknet2coco.py --data_path dataset/darknet/gen_config.data

YOLOV5格式数据→COCO

  • 值得一提的是,由标注软件labelme标注所得yolo格式数据,也可由该脚本做转换。前提是满足以下数据目录结构。

  • YOLOV5训练格式目录结构(详情参见dataset/YOLOV5):

    YOLOV5
    ├── classes.txt
    ├── images
    │   ├── images(13).jpg
    │   └── images(3).jpg
    ├── labels
    │   ├── images(13).txt
    │   └── images(3).txt
    ├── train.txt
    └── val.txt
    
  • 转换

    python yolov5_2_coco.py --dir_path dataset/YOLOV5
  • 转换后目录结构(详情参见dataset/YOLOV5_COCO_format):

    YOLOV5_COCO_format
    ├── annotations
    │   ├── instances_train2017.json
    │   └── instances_val2017.json
    ├── train2017
    │   └── 000000000001.jpg
    └── val2017
        └── 000000000001.jpg
    

可视化COCO格式标注格式

python coco_visual.py --vis_num 1 \
                      --json_path dataset/YOLOV5_COCO_format/annotations/instances_train2017.json \
                      --img_dir dataset/YOLOV5_COCO_format/train2017

相关资料

yolo2coco's People

Contributors

znsoftm avatar swhl avatar shaischneider 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.