Giter VIP home page Giter VIP logo

rle-to-png's Introduction

RLE to PNG

A utility script to convert Run-Length-Encoded Binary Masks in Darwin JSON 2.0 from V7 Labs to PNG.

The script must receive a JSON document that complies with the Darwin JSON 2.0 Format. Refer here.

Example

Binary Mask annotated in JSON. See here.

drawing
Binary Mask in PNG Format

Installation

  1. Clone the Repository

    git clone https://github.com/mukund-ks/RLE-To-PNG.git
  2. Move into your local copy of repo

    cd RLE-to-PNG
  3. Setup a Virtual Environment

    python -m venv env
  4. Activate the Virtual Environment

    env/Scripts/activate
  5. Install Dependencies

    pip install -r requirements.txt

Usage

  • Run the 'help' command to see accepted arguments.
python main.py --help
Usage: main.py [OPTIONS]

  Utility script to convert Darwin 2.0 JSON Binary Masks from V7Labs to PNG. The masks should be 
  Run-Length-Encoded and the JSON document should be following the Darwin 2.0 JSON Format.

  Args:     
    mask_dir (str): Mask Directory with Darwin 2.0 JSON files.
    save_dir (str): Saving Directory for PNG Masks.

  Raises:     
    OSError: In the event that provided directory does not exist.

Options:
  -M, --mask-dir TEXT  Directory with Masks as JSON files  [required]
  -S, --save-dir TEXT  Directory to save PNG Masks in  [required]
  --help               Show this message and exit.
  • An example
python main.py --mask-dir Data --save-dir Mask

rle-to-png's People

Contributors

mukund-ks avatar

Stargazers

 avatar

Watchers

 avatar

rle-to-png's Issues

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.