I’m trying to apply lesson 3’s U-net segmentation to the ICG Semantic Drone Dataset.
https://www.tugraz.at/index.php?id=22387
The dataset is provided with RGB masks and the labels are provided with RGB values such as:
unlabeled, 0, 0, 0
paved-area, 128, 64, 128
dirt, 130, 76, 0
grass, 0, 102, 0
The issue I have is that the mask’s data has only one value by pixel:
tensor([[[ 0, 0, 0, …, 0, 0, 0],
[ 0, 0, 0, …, 0, 0, 0],
[ 0, 0, 0, …, 0, 0, 0],
…,
[90, 90, 90, …, 0, 0, 0],
[90, 90, 90, …, 0, 0, 0],
[90, 90, 90, …, 0, 0, 0]]])
It hase come to my understanding that the mask is converted to greyscale values.
But the issue I have is that I’m lost with my RGB labels references.
How do I make the link from the greyscale val of mask.data to the RGB values given for the labels?
What is the math behind the RGB to greyscale convertion?
What are the weight given to each channel’s value to get a unique greyscale value?