Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.05 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.05 KB

Labelme to Binary Image

This tool allows you to convert images from the web or desktop versions of labelme into binary images.

Usage

python toBinary.py [-h] [--nosave] [--preview] file/folder {png,jpg} labels [labels ...]

positional arguments:
  file/folder        path to input file/folder (json/xml/folder)
  {png,jpg}          output file type
  labels             labels to include in the image

optional arguments:
  -h, --help         show this help message and exit
  --savedir SAVEDIR  directory to save images in (default: masks)
  --nosave           dont save image
  --preview          show image preview
  --bgcolor COLOR    background color
  --fgcolor COLOR    foreground (label) color

Screenshots

Original Image from LabelMe:

Original Image

python toBinary.py Example/example.xml jpg line: Original Image

python toBinary.py Example/example.xml jpg barrel: Original Image