Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ground/Flood masks postprocessing #129

Open
melisandeteng opened this issue Apr 27, 2020 · 1 comment
Open

Ground/Flood masks postprocessing #129

melisandeteng opened this issue Apr 27, 2020 · 1 comment
Assignees

Comments

@melisandeteng
Copy link
Contributor

There are two main things for which postprocessing steps could be used in ground/flood masks obtained with Deeplab models:

  • Blobs in the sky / Small noisy disconnected components:
    image

Ideas for criteria

  • Look at surrounding pixels of a connected component - e.g. reject if all the pixels around are segmented as sky
  • Look at location of the blob if the image: reject if > x % of the blob if in the top y % part of the image
  • Holes in the ground:
    • the close_holes.py script closes all holes that are smaller than a chosen threshold.
      What is a good threshold ? How can we adapt it depending on the input image?
      If it is too big, the postprocessing step might lead to even more erroneous masks.
      Example below: ground segmentation with Deeplabv3 and ground segmentation with the postprocessing step.
      image
      image
@Shivamshaiv
Copy link

Shivamshaiv commented Apr 28, 2020

The method of dealing with such problems, in general, would be to use a combination of the distance transform of the binary marks and followed by morphological erosion and dilation.
The best function implementation to do these tasks would be

  1. scipy.ndimage.morphology.distance_transform_edt
  2. skimage.morphology.remove_small_objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants