I am trying to prepare semantic segmentation masks out of photoshop images. I'd like to have pixel-perfect solid colour masks (in machine learning segmentation sense) for different parts of the image. Here's the example I'm working on:
I select the area to be labelled and fill it with a solid colour. The problem is on the borders - some of the interior pixels are not solid, as they are on the alpha scale.
I've read that photoshop selection is not binary (degree of belonging as an alpha channel rather than selected/not selected), and there are many weird tricks with anti-aliasing, feathering and thresholding. All of this sounds hacky and does not always work in my case. I'm using Photoshop 2023 on OS X.
What's the correct way to create semantic segmentation masks in photoshop? In particular, is there any way to make selection work in a binary mode (without alpha channels)?
Is there a way to ensure that a set of layers (segmentation masks) are disjoint and covers all areas of the image altogether?