Error in python’s multiprocessing library

I’m not sure, if I misunderstand your example, but it doesn’t seem to use hex values.
Anyway, you should be able to convert the decimal values to hex in case you want to use them as keys.

Thanks for the response. I don’t seem to get the decimal values you referred to. However, after some search online I found an article on how to convert a RGB Mask to Segmentation mask. https://www.bulentsiyah.com/preprocessing-rgb-image-masks-to-segmentation-masks

And just to let you know that the code from the link generates a file(image.png) from the original as show below: The dark one is the generated file(image.png)
person1 person1 .