Giter Site home page Giter Site logo

segmentmaskconverttoolkit's Introduction

UAVidToolKit

UAVidToolKit provides basic tools for easier usage of the UAVid dataset. Including label conversion, label visualization, performance evaluation and image label path pair txtfile preparation.

Install

Download the toolkit into the dataset folder as follows,

cd <UAVid dataset folder>
git clone https://github.com/YeLyuUT/UAVidToolKit.git
cd UAVidToolKit
python setup.py build_ext --inplace
cd ..

Rename training, validation and testing subfolders into 'train', 'valid' and 'test'. Or create symlink with cmd,

ln -s <train dir> train
ln -s <valid dir> valid
ln -s <test dir> test

The data structure should be like:

\UAVidDataset
    \train
        \seq
        ...
    \valid
        \seq
        ...
    \test
        \seq
        ...
    \UAVidToolKit

Usage

In the UAVid dataset folder, apply commands as follows:

  • Label image conversion from 3 channel RGB color image to 1 channel label index image.
python UAVidToolKit/prepareTrainIdFiles.py -s <src folder> -t <dst folder>

e.g. python UAVidToolKit/prepareTrainIdFiles.py -s valid/ -t tooltest/

  • Label image conversion from 1 channel label index image to 3 channel RGB color image.
python UAVidToolKit/convertTrainIdFiles2Color.py -s <src folder> -t <dst folder> -f <sub folder name>

e.g. python UAVidToolKit/convertTrainIdFiles2Color.py -s tooltest/ -t tooltest/ -f 'color'

  • Blend image and label files.
python UAVidToolKit/blendImageAndLabel.py -i <image folder> -l <label folder> -o <output folder> -id <image subfolder name> -ld <label subfolder name> -od <output subfolder name>

e.g. python UAVidToolKit/blendImageAndLabel.py -i valid/ -l tooltest/ -o tooltest/ -id Images -ld color -od blend

  • Performance evaluation.
python UAVidToolKit/evaluate.py -gt <ground truth folder> -p <prediction folder> -v

If add '-v', visualize mIoU and confusion matrix results with figures.

e.g. python UAVidToolKit/evaluate.py -gt valid -p pred_valid -v

  • Write image label paths pair into txt.
python UAVidToolKit/writeImageLabelPathPairsToTxtFile.py -d <dataset folder> -t -v

If add '-t', add training set to txt.

If add '-v', add valid set to txt.

e.g. python UAVidToolKit/writeImageLabelPathPairsToTxtFile.py -d ./ -t -v

A Message

If you have any question or new feature suggestion, please create an issue to let me know.

segmentmaskconverttoolkit's People

Contributors

yelyuut 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.