Closed abderhasan closed 5 years ago
The implementation expects a one-hot encoding. In case of a binary segmentation (foreground & background) the input should be 1
if its a foreground pixel and 0
otherwise.
In your case you would have to do something like
labels[..., 0] = label==1
labels[..., 1] = label==2
Great! Thanks a lot.
Sorry, just a quick question. In my case, the foreground was given the label "1" and the background the label "2". So, should it be this way?
labels[..., 0] = label==2 labels[..., 1] = label==1
Thanks.
My data is composed of 2-classes. I have labeled the classes 1 (foreground) and 2 (background). Pixels were labeled here for semantic segmentation.
In
image_util.py
lines 64 and 65, when I did the following:I got an error that the index of labels is out of range.
Should I change the labels as above, or keeping it as follows is considered correct?
So, what I'm trying to ask is, should the label IDs in
image_util.py
be similar to my original label IDs (i.e. 1 and 2)?Thanks.