Code Monkey home page Code Monkey logo

coco-llike-dataset-creator's Introduction

Coco-like-dataset-creator

Convert Data created with labelme to coco format data set. This repo is aimed at creating a full dataset which include the following subsets:

    1. train set ~60% of the input images by default  
    2. test set ~20% of the input images bt default 
    3. validation set ~20% of the input images. 

The output has been tasted (so far all I can tell is that the training began) on facebookresearch/maskrcnn-benchmark for instance segmentation.

create the class with the file: CreateDastaSet.py

Installation

I have based this script on the labelme labelme2coco script therefore follow the labelme installation instraction at wkentaro/labelme

How to Create the Dataset

  1. Use the wkentaro/labelme to annotate your data

  2. Edit CreateDataSet inputDict as follows -input = path\to\your\Inputfolder at the following format : (Bug therefore the fornat is required )

    • Inputfoder -subfolder1 - containing data - Imgs and annotations
      -subfolder2 - containing data - Imgs and annotations -subfolder3 - containing data - Imgs and annotations
    • outputfoler= path\to\where\output\data\will\be\created
    • labels = 'path\to\label.txt'
    1. Verify the output with the following notebook from [pycococreator] (https://github.com/waspinator/pycococreator)
  3. run the CreateDataSet.py script

TODO:

  • 1. add annotations field BoundingBox
  • 2. convert to work with iscrowded =0 , aka polygons dots
  • 3. add support to appending exsiting dataset (MUST Backup Previous version to dir\old\setname+timeframe )
  • 4. re-enble parser
  • 5. solve directory in directory bug for list of json files gathering
  • 6. add a change directory function to \usedforcreatingdataset of input images in order to avoid using them for appending the dataset.
  • 7. use imantics - Annotation to calculate BBox and area in stade of labelme function
  • 8. figure how to add rotated boundingboxes

Knowon Bugs :

  • solved - appended empty annotations to the sets
  • Input dircteroy has to be parent directory bug
  • Image Resize doesn't mach with mask

credits:

labelme

pycococreator

cocoapi

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.