How to convert Playment segmentation mask to a grayscale mask
Many semantic segmentation models expect masks in grayscale format. In other words, each pixel of the PNG mask has a value between 0 and 255 with each integer corresponding to a class. Usually, 0 is reserved for blank pixels with no class.
To convert the Playment format PNG mask to a grayscale mask, you can use the python script given below. It is written in python3 and required the numpy, PIL & imageio libraries.
PreviousHow to export annotation data in COCO format?NextHow to split a video into frames and create jobs in GT Studio
Last updated
Was this helpful?