Awesome
Spatial Implicit Neural Representations for Global-Scale Species Mapping - ICML 2023
Code for training and evaluating global-scale species range estimation models. This code enables the recreation of the results from our ICML 2023 paper Spatial Implicit Neural Representations for Global-Scale Species Mapping.
π Overview
Estimating the geographical range of a species from sparse observations is a challenging and important geospatial prediction problem. Given a set of locations where a species has been observed, the goal is to build a model to predict whether the species is present or absent at any location. In this work, we use Spatial Implicit Neural Representations (SINRs) to jointly estimate the geographical range of thousands of species simultaneously. SINRs scale gracefully, making better predictions as we increase the number of training species and the amount of training data per species. We introduce four new range estimation and spatial representation learning benchmarks, and we use them to demonstrate that noisy and biased crowdsourced data can be combined with implicit neural representations to approximate expert-developed range maps for many species.
<sup>Above we visualize predictions from one of our SINR models trained on data from iNaturalist. On the left we show the learned species embedding space, where each point represents a different species. On the right we see the predicted range of the species corresponding to the red dot on the left.<sup>
π Getting Started
Installing Required Packages
-
We recommend using an isolated Python environment to avoid dependency issues. Install the Anaconda Python 3.9 distribution for your operating system from here.
-
Create a new environment and activate it:
conda create -y --name sinr_icml python==3.9
conda activate sinr_icml
- After activating the environment, install the required packages:
pip3 install -r requirements.txt
Data Download and Preparation
Instructions for downloading the data in data/README.md
.
πΊοΈ Generating Predictions
To generate predictions for a model in the form of an image, run the following command:
python viz_map.py --taxa_id 130714
Here, --taxa_id
is the id number for a species of interest from iNaturalist. If you want to generate predictions for a random species, add the --rand_taxa
instead.
Note, before you run this command you need to first download the data as described in data/README.md
. In addition, if you want to evaluate some of the pretrained models from the paper, you need to download those first and place them at sinr/pretrained_models
. See web_app/README.md
for more details.
There is also an interactive browser-based demo available in web_app
.
π Training and Evaluating Models
To train and evaluate a model, run the following command:
python train_and_evaluate_models.py
Hyperparameters
Common parameters of interest can be set within train_and_evaluate_models.py
. All other parameters are exposed in setup.py
.
Outputs
By default, trained models and evaluation results will be saved to a folder in the experiments
directory. Evaluation results will also be printed to the command line.
Interactive Model Visualizer
To visualize range predictions from pretrained SINR models, please follow the instructions in web_app/README.md
.
π Acknowledgements
This project was enabled by data from the Cornell Lab of Ornithology, The International Union for the Conservation of Nature, iNaturalist, NASA, USGS, JAXA, CIESIN, and UC Merced. We are especially indebted to the iNaturalist and eBird communities for their data collection efforts. We also thank Matt Stimas-Mackey and Sam Heinrich for their help with data curation. This project was funded by the Climate Change AI Innovation Grants program, hosted by Climate Change AI with the support of the Quadrature Climate Foundation, Schmidt Futures, and the Canada Hub of Future Earth. This work was also supported by the Caltech Resnick Sustainability Institute and an NSF Graduate Research Fellowship (grant number DGE1745301).
If you find our work useful in your research please consider citing our paper.
@inproceedings{SINR_icml23,
title = {{Spatial Implicit Neural Representations for Global-Scale Species Mapping}},
author = {Cole, Elijah and Van Horn, Grant and Lange, Christian and Shepard, Alexander and Leary, Patrick and Perona, Pietro and Loarie, Scott and Mac Aodha, Oisin},
booktitle = {ICML},
year = {2023}
}
π Disclaimer
Extreme care should be taken before making any decisions based on the outputs of models presented here. Our goal in this work is to demonstrate the promise of large-scale representation learning for species range estimation, not to provide definitive range maps. Our models are trained on biased data and have not been calibrated or validated beyond the experiments illustrated in the paper.