MIT License Copyright (c) 2018 Distributed Robotic Exploration and Mapping Systems Laboratory, ASU
Zhiang Chen, Nov 2018
xml2mask.py provides methods of generating masks from xml files downloaded from web-based annotation tool LabelMe. It can
- generate and combine all masks on a single layer and save as
.jpg
files. e.g. mask.shape = [width, height] - generate all masks on individual layers and save as
.npy
files. e.g. mask.shape = [nm_objects, width, height]
rename.py provides methods of renaming images and the corresponding annotations by numerical order. It supports to
- rename images and annotations by numerical order
- add annotations with prefix "label_"
- convert with
.jpg
and.png
- work with
.npy
augmentation.py augments images and corresponding annotations with same rules, which include
- resizing
- left-right flipping
- up-down flipping
- rotating
- zooming-in and zooming-out
generateCSV.py generates CSV files for RetinaNet https://github.com/DREAMS-lab/keras-retinanet. See the test main for how to use it: https://github.com/DREAMS-lab/data_augmentor/blob/master/generateCSV.py#L67.
processTiff.py provides methods of processing GeoTiff. It can
- split large GeoTiff to small GeoTiff
- convert GeoTiff to PNG
labelReader.py provides methods of generating masks from json files downloaded from web-based annotation tool LabelBox.
This is dependent on GDAL python. To install the related packages:
$ sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update
$ sudo apt-get install gdal-bin