Giter Site home page Giter Site logo

dataset-utils's Introduction

Dataset-Utils

This repository is created to process data labels in the field of detection,

voc2coco contains function which can convert pascal voc .xml to coco .json format.

datasetutils can transform images with annotations to low resolution images with annotations.

voc2coco

You can get the image annotations by labelImg.

It's usually Pascal VOC format. The file directory is as follows:

MarkerDataset
├── annotations
│   ├── 000000.xml
│   ├── 000001.xml
│   ├── ...
│   └── ...
├── images
│   ├── 000000.jpg
│   ├── 000001.jpg
│   ├── ...
│   └── ...
├── coco_output.json # convert function output this file
├── except.txt # contains some xml which don't have boox
└── xmllist.txt # contains all xml file names in annotations dir

To convert voc to coco, we can use:

python voc2coco.py --xml_path /path/to/annotaions --xml_list_path /path/to/xmllist.txt --output_path /path/to/coco_output.json

It will create xmllist.txt and except.txt which contain the name of xml files, and coco_output.json is coco format annotations.

All these are used for my detection dataset

datasetutils

This file can transform high resolution images with annotations to low resolution images.

For example, My dataset have 25,000 images with annotations. The resolution is 1280×720. Use this python file to create a low resolution dataset. It contains 25,000 images with annotations, but resolution is changed to 640×360. It also changed the xml annotation file to match low resolution images.

dataset-utils's People

Contributors

lih627 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dataset-utils's Issues

Filename Error

HI @lih627 I wanted to ask that how can I work around your code if I want to use a string as a file name and not an integer for example "some_file_name_0.xml" as well as "some_file_name_0.png"?

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.