Productivity #11: Import PNG Mask as pre-labels

Productivity #11: Import PNG Mask as pre-labels

The annotation tool enables user to import PNG masks as pre-labels. This is fastest way to implement model assisted annotation without exposing your model's intellectual property.

The input dataset should contain image files and one Png mask file per label as seen in the  dataset below (import-prelabel-mask.csv)

Image files and PNG Mask files 

File Naming Convention

If name of the image file to be annotated is image-filename.jpg, for the labels to be imported correctly, it is required that PNG masks should be named with a suffix <image-filename>_mask_<label-name>.png

Steps for pre-loading labels

  1. First create a dataset with dicom (or jpeg) files and png mask files as shown in the attached zip file. Name the PNG mask files with suffix <dicom-filename>_mask_<label name>.png. In the attached example, there are 2 dicom files and 4 png mask files. Dicom file 00012_2f44c2d62d278ae9.dcm has 2 labels – 00012_2f44c2d62d278ae9_mask_FemurBone.png and 00012_2f44c2d62d278ae9_mask_TibiaBone.png, dicom file 00018_7ec96b8a49737895.dcm has 2 labels -- 00018_7ec96b8a49737895_mask_FemurBone.png and 00018_7ec96b8a49737895_mask_TibiaBone.png
  2. Second, create a labeling instruction with labels and colors (exact same color hex code as those in PNG masks). In the attached example labeling instruction is "KneeSegmentation"
  3. Third, create a labeling job with the dataset created in step 1, and the labeling instruction created in step 2.