{"id":18766364,"url":"https://github.com/elijahcole/sinr","last_synced_at":"2025-08-22T05:31:39.286Z","repository":{"id":172514478,"uuid":"647460230","full_name":"elijahcole/sinr","owner":"elijahcole","description":"Spatial Implicit Neural Representations for Global-Scale Species Mapping - ICML 2023","archived":false,"fork":false,"pushed_at":"2024-08-05T16:37:23.000Z","size":1297,"stargazers_count":42,"open_issues_count":0,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-08T23:16:44.899Z","etag":null,"topics":["deep-learning","geospatial","implicit-neural-representation","representation-learning","species-distribution-modeling"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2306.02564","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elijahcole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T20:43:00.000Z","updated_at":"2025-03-04T11:19:40.000Z","dependencies_parsed_at":"2023-09-05T05:30:41.739Z","dependency_job_id":"365d1145-536c-46e5-973b-045625581ad3","html_url":"https://github.com/elijahcole/sinr","commit_stats":null,"previous_names":["elijahcole/sinr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elijahcole/sinr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elijahcole%2Fsinr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elijahcole%2Fsinr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elijahcole%2Fsinr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elijahcole%2Fsinr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elijahcole","download_url":"https://codeload.github.com/elijahcole/sinr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elijahcole%2Fsinr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271590142,"owners_count":24786151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","geospatial","implicit-neural-representation","representation-learning","species-distribution-modeling"],"created_at":"2024-11-07T18:40:33.391Z","updated_at":"2025-08-22T05:31:38.416Z","avatar_url":"https://github.com/elijahcole.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spatial Implicit Neural Representations for Global-Scale Species Mapping - ICML 2023\n\nCode 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](https://arxiv.org/abs/2306.02564). \n\n## 🌍 Overview \nEstimating 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.\n\n![Model Prediction](images/sinr_traverse.gif)\n\u003csup\u003eAbove we visualize predictions from one of our SINR models trained on data from [iNaturalist](inaturalist.org). 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.\u003csup\u003e\n\n## 🔍 Getting Started \n\n#### Installing Required Packages\n\n1. We recommend using an isolated Python environment to avoid dependency issues. Install the Anaconda Python 3.9 distribution for your operating system from [here](https://www.anaconda.com/download). \n\n2. Create a new environment and activate it:\n```bash\n conda create -y --name sinr_icml python==3.9\n conda activate sinr_icml\n```\n\n3. After activating the environment, install the required packages:\n```bash\n pip3 install -r requirements.txt\n```\n\n#### Data Download and Preparation\nInstructions for downloading the data in `data/README.md`.\n\n## 🗺️ Generating Predictions\nTo generate predictions for a model in the form of an image, run the following command: \n```bash\n python viz_map.py --taxa_id 130714\n```\nHere, `--taxa_id` is the id number for a species of interest from [iNaturalist](https://www.inaturalist.org/taxa/130714). If you want to generate predictions for a random species, add the `--rand_taxa` instead. \n\nNote, 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.\n\nThere is also an interactive browser-based demo available in `web_app`.\n\n## 🚅 Training and Evaluating Models\n\nTo train and evaluate a model, run the following command:\n```bash\n python train_and_evaluate_models.py\n```\n\n#### Hyperparameters\nCommon parameters of interest can be set within `train_and_evaluate_models.py`. All other parameters are exposed in `setup.py`. \n\n#### Outputs\nBy 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. \n\n#### Interactive Model Visualizer\nTo visualize range predictions from pretrained SINR models, please follow the instructions in `web_app/README.md`. \n\n##  🙏 Acknowledgements\nThis 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](inaturalist.org) and [eBird](https://ebird.org) 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](https://www.climatechange.ai/blog/2022-04-13-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).  \n\nIf you find our work useful in your research please consider citing our paper.  \n```\n@inproceedings{SINR_icml23,\n  title     = {{Spatial Implicit Neural Representations for Global-Scale Species Mapping}},\n  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},\n  booktitle = {ICML},\n  year = {2023}\n}\n```\n\n## 📜 Disclaimer\nExtreme 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. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felijahcole%2Fsinr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felijahcole%2Fsinr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felijahcole%2Fsinr/lists"}