Thanks for sharing, but I have two questions. The first is whether the foreground pixel value of the label is 1 or 0. The second is how to map the output from the script you provide to the mask, using normalization? Or softmax?
The model predicts logits, and output is binary. To get a continuous prediction you can use torch.sigmoid and to get a discrete prediction you can do torch.sigmoid(yh) > 0.5 ( or any other threshold of your choosing). You can find an example in the colab (search for sigmoid)
Thanks for sharing, but I have two questions. The first is whether the foreground pixel value of the label is 1 or 0. The second is how to map the output from the script you provide to the mask, using normalization? Or softmax?