This command converts a Labelme JSON file to a mask:
As the argument, you can pass either a JSON file or directory of JSON files.
labelmetk json-to-mask [OPTIONS] FILE_OR_DIR...
To customize the behavior, use the following options:
--exclude-labels TEXT
Labels to exclude. If you have labels you’d like to exclude (e.g., __ignore__
label for the region you want to skip labeling) pass these into this option (e.g., --exclude-labels __ignore__
).
--browse
Browse images on a browser. If you pass this option, the command opens the browser to show images as an table.
--include-labels TEXT
Labels to only include. This is opposite to --exclude-labels
option and can’t be used together.
If you only have a single JSON file, pass it to the command:
labelmetk json-to-mask small_dataset/2011_000003.json
to get a mask image: