Hi, I would like to use blender to generate training data for machine learning algorithm. I’m not experienced in blender but I can write Python scripts.
I want to create masks for every object in the scene and be able to export them as separate masks with encoded object id. I’m only interested in generating masks for visible objects. I know there exists cryptomatte as of blender 2.8 but I haven’t found any automated way to do this for large number of objects. So I’m looking for a script/tool that can make this process automatic.
Below there is a toy example. First is the original image. Second one has separate colors for each object in the array. Each of the object that has this random color should be a separate mask.