Announcing Solaris: an open source Python library for analyzing overhead imagery with machine learning
By: Nick Weir
Tags: Machine Learning, Software Development, Geospatial, Computer Vision, Deep Learning

Performing machine learning (ML) and analyzing geospatial data are both hard problems requiring a lot of domain expertise. These limitations have historically meant that one needs to be an expert in both to perform even the most basic analyses, making advances in AI for overhead imagery difficult to achieve. We at CosmiQ Works have asked ourselves: is there anything we can do to reduce this barrier to entry, making it easier to apply machine learning methods to overhead imagery data?

Enter Solaris, a new Python library for ML analysis of geospatial data from CosmiQ Works. Solaris builds upon SpaceNet’s previous tool suite, SpaceNetUtilities, along with several other CosmiQ projects like BASISS to provide an end-to-end pipeline for geospatial AI. Solaris provides well-documented Python APIs and simple command line tools to complete every step of a geospatial ML pipeline with ease:

Tile raw imagery and vector labels into pieces compatible with ML Convert vector labels to ML-compatible pixel masks Train state-of-the-art deep learning models with three lines of Python code Segment objects of interest with machine learning models (including the SpaceNet winners’ models, with pre-trained weights and configs provided!) Georegister predictions and convert them to standardized geospatial data formats Score model performance against hand-labeled ground truth using the SpaceNet datasets

…and more!

Would you prefer a basic command line interface so you can run a pre-trained model without learning Python? Solaris has that, with tutorials to help you get started: Create pixel masks from vector labels, train a deep learning algorithm, or predict where buildings are using a pre-trained SpaceNet Challenge-winning model, all without writing a single line of Python code.

Are you a Python developer who doesn’t want to write the tedious pre- and post-processing functions to feed your geospatial data into a deep learning model? The thoroughly documented Solaris Python API as well as Python API usage tutorials are ready to help. Furthermore, the codebase is entirely open source and we welcome any feature requests, bug reports, and tutorial suggestions from users.

Here’s a peek at just a few of the exciting features of Solaris:

Pre-trained SpaceNet Challenge-winning models

CosmiQ Works and the SpaceNet LLC have long provided competitors’ model code after the completion of SpaceNet Challenges; however, each competitor has their own coding environment, analysis pipeline, and codebase that must be understood and implemented to try out their models. We’ve removed this barrier by re-training SpaceNet prize-winning models using Solaris and providing the competitors’ model weights for free on Amazon AWS S3 (thanks to the generous support of AWS!) The Solaris documentation provides tutorials on how to use those models, either from the command line or using the Python API. There is also documentation of the pre-trained models with links to model weights and pre-made configuration files. You can use the existing pre-trained model for prediction, fine-tune those models on new satellite images, or re-train them from scratch. We currently provide four different prize-winning models from the SpaceNet 4: Off-Nadir Building Footprint Extraction Challenge, with many more coming soon:

A ResNet34-UNet, used by selim_sef;

A Densenet121-UNet, used by selim_sef;

A Densenet161-UNet, used by selim_sef;

A VGG16-UNet, used by XD_XD.

This allows you to quickly compare building footprints generated by different models, as we do in the example below: