Open EtagiBI opened 4 years ago
Hi did you figure out the fix for this problem ? Even my binark mask in inverted- white(1) for the background and 0 for the class of interest.
Hi did you figure out the fix for this problem ? Even my binark mask in inverted- white(1) for the background and 0 for the class of interest.
Hello, no, I decided to switch to another repository.
Hello,
According to this example, here's a way to detect one desired class in a binary segmentation problem:
Now let's take a look at
Dataset
object:Since
class_values
in this case is equal to [0], all elements of the mask matrix are compared to 0 value. Let's assume that in my case I'm using black and white masks where black is responsible for background and white is responsible for cars. After mask binarization all background pixels tirn into 0s and car pixels - into 1s. And here comes the bummer! When the linemasks = [(mask == v) for v in self.class_values]
gets executed, i get falseTrue
values. In my mask all 0s are background pixels, but inclass_values
0 is a car class value.Any ideas? Should I invert colors in my mask before executing
masks = [(mask == v) for v in self.class_values]
?