robosat icon indicating copy to clipboard operation
robosat copied to clipboard

Automatically refine generated training dataset masks

Open daniel-j-h opened this issue 7 years ago • 1 comments
trafficstars

At the moment we generate the segmentation masks based on OpenStreetMap geometries in rs rasterize. There is no standard of how fine or coarse geometries are mapped in OpenStreetMap. Sometimes we get fine-detailed masks, sometimes they can be very coarse.

See the following for quite a good mask:

Image Mask
95309 95309

We should check if the cv2.floodFill algorithm can help us automatically refining the masks.

It works as follows: start out with a seed pixel in the image and from there grow a region as long as the neighboring pixels are "similar" by color. We probably need to experiment with different color spaces, e.g. converting RGB into HSV and then maybe only using the H channel? The problem I'm seeing here is huge color differences: think cars of different colors, lane marking, parking lot concrete. Needs experimentation.

Tasks:

  • [ ] Look into the flood fill algorithm
  • [ ] Experiment to see if it can help refining the training dataset masks

Note: this does not depend on parking lots. The same applies e.g. for buildings, roads, etc.

daniel-j-h avatar Jun 10 '18 23:06 daniel-j-h

Hi @daniel-j-h, Nvidia's blog states that they use flood fill on SpaceNet Road Detection, I explored it for a day and try to see how it would work on Segmentation training dataset prep. I wasn't able to work it out, and would love to know how you approach it. Keep me updated on your progress, please.

Geoyi avatar Jul 01 '18 16:07 Geoyi