Git Product home page Git Product logo

microsoft / landcover-orinoquia Goto Github PK

View Code? Open in Web Editor NEW
29.0 9.0 5.0 10.79 MB

Land cover mapping of the Orinoquía region in Colombia, in collaboration with Wildlife Conservation Society Colombia. An #AIforEarth project

Home Page: https://www.microsoft.com/en-us/ai/ai-for-earth

License: MIT License

Shell 0.09% QML 0.34% Python 2.03% Jupyter Notebook 97.35% JavaScript 0.19%
land-cover semantic-segmentation computer-vision orinoquia colombia land-use aiforearth

landcover-orinoquia's Introduction

Land cover mapping the Orinoquía region

In this AI for Earth project, we worked with the Wildlife Conservation Society Colombia (WCS Colombia) to create up-to-date land cover maps of the Orinoquía region in Colombia. This natural region encompasses a high diversity of ecosystems, from seasonally flooded savanna to rainforest. In recent years, agricultural production has expanded, causing changes in these ecosystems. It is therefore critically important to present information on land use to policy makers so that they may balance the need for agricultural development and conserving the biodiversity and ecological functions of the region.

Image of a river and landscape around it, taken near Sabana, Colombia Landscape near Sabanas, Colombia. Photo credit Wildlife Conservation Society.

Specifically, we used a land use and land cover (LULC) map that was manually produced using satellite imagery and field data from 2011-2012 to train a semantic segmentation model for 12 land cover classes. The model can be applied to composites of Landsat 8 imagery collected in subsequent years to enable ecological analysis.

This repo contains the scripts and configuration files used to train the land cover model using a median composite of Landsat 8 images from 2013-2014. We will be evaluating the result of applying the model to 2019-2020 imagery and releasing the resulting maps in the coming months.

Category color map:

Category color map

Labels based on imagery in 2011-2012, mapped to the 12 land cover classes: Labels based on imagery in 2011-2012 Basemap © OpenStreetMap contributors

Model predictions on validation tiles from the 2013-2014 median composite of Landsat 8 imagery: Model predictions on validation tiles from the 2013-2014 Basemap © OpenStreetMap contributors

Model prediction on 2019-2020/04 median composite, the updated land cover map: Model predictions on new imagery from 2019-2020 Basemap © OpenStreetMap contributors

Setup

Creating the conda environment

At the root directory of this repo, use environment.yml to create a conda virtual environment called wcs:

conda env create --file environment.yml

If you need additional packages, add them in environment.yml and update the environment:

conda env update --name wcs --file environment.yml --prune

Installing ai4eutils

You need to add the ai4eutils repo to the PYTHONPATH, as we make use of the geospatial module there.

Setting up the Solaris package

We need to set up a separate conda environment for using Solaris. Instructions are available on https://github.com/CosmiQ/solaris.

We do not want to install the Solaris pip package inside the wcs environment because it requires versions of PyTorch/TensorFlow that we might not want.

There are two ways to set up Solaris:

  1. To install Solaris using their published package on PyPI, first create a conda environment called solaris, which will make the next pip installation step go smoothly:

    conda env create --file environment_solaris.yml
    pip install solaris==0.2.2
    
  2. If installing from source:

    Once we clone the repo, add some more dependencies to its environment.yml so that Jupyter Notebook ran from our wcs environment can use the Solaris kernel to run certain notebooks:

      - nb_conda_kernels
      - ipykernel
      - humanfriendly
    

Our fork of Solaris is here: https://github.com/yangsiyu007/solaris

Upstream: https://github.com/CosmiQ/solaris

Setting up an environment for the newer version of GDAL

It seems that in our existing environment, rasterio is not compatible with GDAL>=3.1, which is required for creating Cloud Optimized GeoTIFFs (COGs). We create a separate environment for GDAL to run such commands in:

conda env create --name gdalnew --channel conda-forge python gdal==3.1.2

Terminology

See Satellite data terminology.

Related repositories

The interactive Land Cover Mapping tool; also see finetuning

https://github.com/microsoft/landcover

Collection of utilities used in this repo

https://github.com/microsoft/ai4eutils

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

License

This repository is licensed with the MIT license. See LICENSE.

landcover-orinoquia's People

Contributors

microsoft-github-operations[bot] avatar microsoftopensource avatar yangsiyu007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

landcover-orinoquia's Issues

Several missing files to reproduce analysis

This is a very interesting project. I'd like to try to reproduce parts of this analysis using Microsoft Planetary Computer, but there are many missing input files. Here are a couple of examples of files or resources not present in the repo:

'/data/WCS_land_use/Landuse_shape/derived/landuse.shp' and '/data/WCS_land_use/Imagery/wcs_orinoquia_trial_region_201301_201512.tif' referenced in data/3_tile_and_mask.ipynb,

Also:

"users/yangsiyu007/Orinoquia_outline", referenced in gee_queries.js (ideally in some standard format like .geojson rather than inside the Google Earth Engine)

There may be others. Perhaps @yangsiyu007 would have a more comprehensive view.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.