/mask-converter

Convert contours in JSON file (result of VIA 2) into mask in PNG file

Primary LanguagePythonApache License 2.0Apache-2.0

mask-converter

Convert contours in JSON file (result of VIA 2) into mask in PNG file

README in other languages:

1. Introduction

About VIA 2

VIA 2 is a web-based annotation tool for creating and managing annotations of images. It was developed by Abhishek Dutta, Ankush Gupta, and Andrew Zisserman of the Visual Geometry Group (VGG) at the University of Oxford.

The VIA tool allows users to annotate images with bounding boxes, polygons, lines, and points, among other object types. It also supports multiple annotation formats, including COCO, JSON and CSV, making it a versatile tool for various computer vision tasks such as object detection, segmentation, and recognition.

What can mask-converter do with VIA 2

If you're labeling images for segmentation tasks like me, you'll realize that the JSON data from VIA 2 is not suitable for segmentation models such as U-Net. The mask-converter can convert JSON data into PNG masks, which are perfect for model training.

2. Usage

Requirements:

  • Operating system: Windows
  • Software: VIA (version 2.0.*)

Workflow:

  1. Before starting the labeling process, ensure that all the images you intend to label are organized and stored in a single folder.
  2. Use VIA 2 to generate labels for your images and save them as JSON file.
  3. Locate and double-click on "mask-converter.exe" to launch the program.
  4. When prompted, navigate to the folder that contains the images you want to label.
  5. Next, select the JSON file that was generated by VIA 2 and click "confirm" to begin the converting process.