How can we count roofs within informal settlements in Latin America?
As you could see in our latest post, we are working on automating the mapping of slums and informal settlements in Latin America through our open source tool AP-Latam. If governments had updated information about slums and their growth, they could give the affected families better life conditions and change their future. In this post we will talk about how we are dealing with segmentation of roof contours for each potential slum that our methodology detected.
To combine satellite imagery and machine learning algorithms, we fine-tuned a ResNet50 neural network and predicted which tiles contains an informal settlement. You can read more about this method in the aforementioned post. To get better results, we also used a vector dataset of blocks, and calculated the intersection between the squares and blocks. If enough squares covered a block (at least 50% of them), we picked them to form a new dataset of blocks that contain potential informal settlements.
Unfortunately these results don’t match well with informal settlements contours. The reason for this is that they usually not follow the official cadastral patterns. To deal with this, we started experimenting with segmentation techniques to detect the roofs within each potential slum.
We trained Mask R-CNN architecture using the open source Matterport implementation. We used the SpaceNet dataset for Rio do Janeiro to retrain the model to adapt them to satellite imagery. This dataset has 50cm imagery collected from DigitalGlobe’s WorldView-2 satellite and includes building footprints and 8-band multispectral data. We only used the RGB bands.
We adapted the Spacenet data to train Mask R-CNN architecture masking every tile that contains roofs.
Results are great to detect roofs in residential areas but misleading to predict roofs within slums.
Fork and experiment!
All of the source code for building and using classifier has been released as open source at Github with a BSD-2 license. You can read instructions on how to use it on your own raster files. We also uploaded a notebook if you want to know more about our roofs contours experiments.
If you want to know more you can reach us on Gitter, leave a comment or contact us through our website. We encourage you to contribute with AP-Latam as the UPenn Data Science Group do!