Shapefile / raster workflow for segmentation of elements


After weeks of following class on deep learning and reading stuff, I can’t figure out a proper workflow to solve my problem.

I have some Shapefiles (georeferenced polygons) that indicate elements on aerial imagery. I would like to train a model to find those elements automatically on big images. For example, elements can be pools:

I struggle to understand how to create my dataset.

One workflow that could work would be to crop 512 x 512 image around the pool and to create a binary mask from each polygon, and to add it to a fourth channel (after the RGB) ?

Once I have my dataset ready, is it possible to use fastai on it?

I need the baseline to start playing with it.

This is a great resource for what you want to do. And I think it got some examples, too:

1 Like

Finally, the solution was to generate Image + mask around each pool

For that, I have used rasterio + fiona libraries.

1 Like


Besides, I noted that all your samples are in the center of your masks? Does this affect regularization? Anything you noticed in this regard?

Thank you !

I don’t know what is regularization in the context of deep learning.

But now that you mention it, it could be a good idea to add a random offset to avoid that all pool are in the center of my masks.

Thank you for your comment :slight_smile: