Error after apply erosion filter -on images and labels/masks to- to detach two connected objects #2615
Unanswered
aymanaboghonim
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using pspnet and custom dataset to do binary segmentation task.
Training was running without any error but metrics of foreground object / building was lower than background.
To handle this issue, I followed the recommendations to set num_class = 1 and use_segmoid = True and reduce_label = False,
as well as using multiple loss (dice + BCE) but metrics did not improve well.
here is metrics
So, I intended to apply erosion filter on both images and labels to detach two connected objects because I think that dense object plays an important role in this situation.
After applying erosion filter using opencv
kernel = np.ones((3, 3), np.uint8)
cv2.erode(image,kernel,iterations = 1)
I encountered an error.
my labels is rgb.png images , here is an example
Please help , thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions