Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
QianC95 committed Oct 21, 2024
2 parents 12214f6 + 5bd4794 commit c8fbc9f
Show file tree
Hide file tree
Showing 85 changed files with 14,243 additions and 3,139 deletions.
Binary file modified .DS_Store
Binary file not shown.
34 changes: 34 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python Package using Conda

on: [push]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
conda install pytest
pytest
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# TorchSpatial: A Location Encoding Framework and Benchmark for Spatial Representation Learning
🚧 Constructing...

![TorchSpatial Overall Framework](figs/TorchSpatial_task4.jpg)
## Overview
TorchSpatial offers a comprehensive framework and benchmark suite designed to advance spatial representation learning (SRL). It supports the development and evaluation of location encoders using extensive benchmarks and innovative evaluation metrics.

## Features
- **Unified Framework**: Integrates 15 recognized location encoders to enhance scalability and reproducibility.
- **LocBench Benchmark**: Includes 17 datasets for geo-aware image classification and regression, enabling thorough performance assessments across various geographic distributions.
- **Geo-Bias Score**: A novel metric to evaluate model performance and geographic bias, promoting spatial fairness in GeoAI applications.

## Availability
Access the TorchSpatial framework, LocBench benchmarks, and evaluation metrics on GitHub: [TorchSpatial GitHub Repository](https://github.com/seai-lab/TorchSpatial).

## Overall Framework
![TorchSpatial Overall Framework](figs/TorchSpatial4_10regTasks.jpg)



Expand All @@ -10,9 +22,11 @@

## Data Download Instructions
The data can be downloaded from the following DOI link:
[Download Data](https://doi.org/10.6084/m9.figshare.26026798)

Data should be organized following the ..
[Download Data](https://doi.org/10.6084/m9.figshare.26026798



)

## Code Execution
The example bash files for running the codes can be found in main/run_bash folder
Expand Down Expand Up @@ -68,8 +82,15 @@ All our experiments were conducted on a Ubuntu workstation equipped with 4 NVIDI


### Reference
If you find our work useful in your research please consider citing [our ISPRS PHOTO 2023 paper](https://www.researchgate.net/publication/371964548_Sphere2Vec_A_General-Purpose_Location_Representation_Learning_over_a_Spherical_Surface_for_Large-Scale_Geospatial_Predictions).
If you find our work useful in your research please consider citing our TorchSpatial paper and [ISPRS PHOTO 2023 paper](https://www.researchgate.net/publication/371964548_Sphere2Vec_A_General-Purpose_Location_Representation_Learning_over_a_Spherical_Surface_for_Large-Scale_Geospatial_Predictions).
```
@article{wu2024torchspatial,
title={TorchSpatial: A Location Encoding Framework and Benchmark for Spatial Representation Learning},
author={Wu, Nemin and Cao, Qian and Wang, Zhangyu and Liu, Zeping and Qi, Yanlin and Zhang, Jielu and Ni, Joshua and Yao, Xiaobai and Ma, Hongxu and Mu, Lan and Ermon, Stefano and Ganu, Tanuja and Nambi, Akshay and Lao, Ni and Mai, Gengchen},
journal={arXiv preprint arXiv:2406.15658},
year={2024}
}
@article{mai2023sphere2vec,
title={Sphere2Vec: A General-Purpose Location Representation Learning over a Spherical Surface for Large-Scale Geospatial Predictions},
author={Mai, Gengchen and Xuan, Yao and Zuo, Wenyun and He, Yutong and Song, Jiaming and Ermon, Stefano and Janowicz, Krzysztof and Lao, Ni},
Expand Down Expand Up @@ -111,3 +132,6 @@ If you use the unsupervised learning function, please also cite [our ICML 2023 p
organization={PMLR}
}
```

### License
Our code is under MIT license. All data products created through our work that are not covered under upstream licensing agreements are available via a CC BY-NC 4.0 license. All upstream data use restrictions take precedence over this license.
91 changes: 0 additions & 91 deletions documentation/Encoders/NeRF.md

This file was deleted.

106 changes: 0 additions & 106 deletions documentation/Encoders/Space2Vec-grid.md

This file was deleted.

101 changes: 0 additions & 101 deletions documentation/Encoders/Space2Vec-theory.md

This file was deleted.

Loading

0 comments on commit c8fbc9f

Please sign in to comment.