GithubHelp home page GithubHelp logo

imgann's Introduction

Build Status
Version

img-ann

The imgann is a package for a simplify operations in image annotated files. such as, annotation type converting [coco format, pascalVOC format, csv format], image dataset sampling], etc.

Installation

You can install the Real Python Feed Reader from PyPI:

$pip install imgann

The package is support Python 3.6 and above.

Usage

  • To get N number of annotated images randomly. you can use coco format, pascalVOC format or csv format as annotation format. keywords can be from ['coco', 'csv', 'voc']
    from imgann import Sample
    Sample.show_samples( <image dataset dir> : string, <annotation file dit> : string, <number of images> : int, <annotation type> : string= 'coco' )

    example :
    Sample.show_samples('./data/test','./annotations/test',5,'voc')

  • To convert annotation file format.

    • coco to pascal VOC format converting from imgann import Convertor
      Convertor.coco2voc( <image dataset dir> : string, <coco annotated .json file dir> : string, <voc formatted .xml file saving folder dir> : string)

      example :
      Convertor.coco2voc('../data/train', '../data/annotations/dataset.json', '../data/annotations/voc_dataset')

    • coco to csv format converting from imgann import Convertor
      Convertor.coco2csv( <image dataset dir> : string, <coco annotated .json file dir> : string, <voc formatted .csv file dir> : string)

      example :
      Convertor.coco2csv('../data/train', '../data/annotations/dataset.json', '../data/annotations/dataset.csv')

    • csv to coco format converting from imgann import Convertor
      Convertor.coco2csv( <image dataset dir> : string, <csv annotated .csv file dir> : string, <coco formatted .json file dir> : string)

      example :
      Convertor.csv2coco('../data/train', '../data/annotations/dataset.csv', '../data/annotations/dataset.json')

    • csv to pascal VOC format converting from imgann import Convertor
      Convertor.csv2voc( <image dataset dir> : string, <csv annotated .csv file dir> : string, <pascal VOC formatted .xml file saving folder dir> : string)

      example :
      Convertor.coco2csv('../data/train', '../data/annotations/dataset.csv', '../data/annotations/voc_dataset')

    • pascal VOC to coco format converting from imgann import Convertor
      Convertor.voc2coc( <image dataset dir> : string, <pascal VOC annotated file included folder dir> : string, <coco formatted .json file dir> : string)

      example :
      Convertor.voc2coco('../data/train', '../data/annotations/voc_dataset', '../data/annotations/dataset.json)

    • pascal VOC to csv format converting from imgann import Convertor
      Convertor.voc2csv( <image dataset dir> : string, <pascal VOC annotated file included folder dir> : string, <csv formatted .csv file dir> : string)

      example :
      Convertor.voc2coco('../data/train', '../data/annotations/voc_dataset', '../data/annotations/dataset.csv)

  • To get summary of image dataset
    from imgann import Sample
    Sample.describe_data( <path to image dataset main folder> )

    example :
    Sample.describe_data('../data/train')

  • To get summary of complete data annotation
    from imgann import Sample
    Sample.describe_ann( <path to image dataset main folder> , <path to image annotation file/folder> , <image annotation type>['coco', 'yolo', 'csv', 'voc'] )

    example :
    Sample.describe_ann('../data/train', '../data/annotations/dataset.json', 'coco')

imgann's People

Contributors

nipdep avatar trungtv avatar

Watchers

James Cloos 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.