lunular

An open source ML toolkit for overhead imagery.

PyPI python version
PyPI

build
docs
license

This is a beta version of lunular which may continue to develop. Please report any bugs through issues!


This library is a minimal fork of the solaris project by CosmiQ Works. Currently, the focus of this library is to extract the dataset preprocessing and evaluation methods that do not depend on tensorflow or pytorch, in order to produce a relatively light, framework agnostic package for preparing geospatial ML datasets and evaluating geospatial ML results.

This repository provides the source code for the lunular project, which provides software tools for:

  • Tiling large-format overhead images and vector labels
  • Converting between geospatial raster and vector formats and machine learning-compatible formats
  • Evaluating performance of deep learning model predictions, including semantic and instance segmentation, object detection, and related tasks

Documentation

The full documentation for lunular can be found at https://lunular.readthedocs.io, and includes:

  • A summary of lunular
  • Installation instructions
  • API Documentation
  • Tutorials for common uses

The documentation is still being improved, so if a tutorial you need isn’t there yet, check back soon or post an issue!

Installation Instructions

coming soon: One-command installation from conda-forge.

We recommend creating a conda environment with the dependencies defined in environment.yml before installing lunular. After cloning the repository:

cd lunular

If you’re installing on a system with GPU access:

conda env create -n lunular -f environment-gpu.yml

Otherwise:

conda env create -n lunular -f environment.yml

Finally, regardless of your installation environment:

conda activate lunular
pip install .

pip

The package also exists on PyPI, but note that some of the dependencies, specifically rtree and gdal, are challenging to install without anaconda. We therefore recommend installing at least those dependencies using conda before installing from PyPI.

conda install -c conda-forge rtree gdal=2.4.1
pip install lunular

If you don’t want to use conda, you can install libspatialindex, then pip install rtree. Installing GDAL without conda can be very difficult and approaches vary dramatically depending upon the build environment and version, but the rasterio install documentation provides OS-specific install instructions. Simply follow their install instructions, replacing pip install rasterio with pip install lunular at the end.

Dependencies

All dependencies can be found in the requirements file ./requirements.txt or
environment.yml

License

See LICENSE.

GitHub

View Github