/pycococreator

Helper functions to create COCO datasets

Primary LanguagePythonApache License 2.0Apache-2.0

Show bounding boxes and labels

I added codes for showing the bounding boxes and labels. To show it, I used Jupyter Notebook and created deployer.ipynb and visualize_cg.ipynb files.

  • Directory Structure
    |__ examples					
        |__ crestedgecko
        	|__ deployer.ipynb
        	|__ visualize_cg.ipynb
            	|__ train
            		|__ annotations
            			|__ CG_train2018_000000000001_patternless_0.png
            			|__ instances_crestedgecko_train2018
            		|__ crestedgecko_train2018
            			|__ CG_train2018_000000000001.jpg
        |__ shapes
        	|__ ...	        
  1. Rename and resize image files.
  2. Create an annotation file from images and masking images.

Show bounding boxes and labels including segmentations from the created annotation file.
alt text

Install

  1. pip install git+git://github.com/waspinator/pycococreator.git@0.2.0
  2. Run Jupyter Notebook.(Set working directory as pycococreator)
  3. Go to pycococreator/examples/crestedgecko directory.
  4. Open deployer.ipynb and run it.
  • instances_crestedgecko_train2018.json annotation file will be created in pycococreator/examples/crestedgecko/train directory.
  1. Copy the annotation file to pycococreator/examples/crestedgecko/annotations directory.
  2. Open visualize_cg.ipynb and run it to show the sample image.
  • Segmentation, bounding box and label will be drawn on the sample image.

License

This project is made available under the Apache 2.0 License.

It is forked from: https://github.com/waspinator/pycococreator

Reference

[1] https://patrickwasp.com/create-your-own-coco-style-dataset