README.md
April 9, 2026 ยท View on GitHub
๐ฐ๏ธ Location Is All You Need (LIANet)
Official Repository for the Paper:
๐ Location Is All You Need: Continuous Spatiotemporal Neural Representations of Earth Observation Data
This repository contains the implementation of LIANet, a neural architecture designed for learning continuous spatiotemporal representations from Earth Observation (EO) data.
It includes scripts for pretraining and fine-tuning, needed to reproduce the results presented in the paper. The corresponding dataset and labels will be open-sourced upon acceptance.
The repository is structured into two main components:
- Pretraining: Learn general continuous spatiotemporal representations.
- Fine-tuning: Adapt pretrained weights for specific downstream EO tasks (e.g., landcover classification, building footprint detection).
Setup
The data used in this work can be downloaded from the following link:
๐ https://drive.google.com/drive/folders/1YKtqOJsDsCeZ_k-cpG902H2V6FQdGkzr?usp=sharing
After downloading, place the files in:
~/Data/LIANet_data
The data are available ...?
Pretraining results will be saved to:
~/Results/LIANet_results/Pretraining
and fine-tuning results will be saved to:
~/Results/LIANet_results/Finetuning
Before running the code, make sure the Docker environment is set up.
Use the provided bash scripts to start the corresponding Docker containers with the appropriate mount points:
Pretraining/docker/start_container.shโ for pretrainingFinetuning/docker/start_container.shโ for fine-tuning
Before running the code, make sure the Docker environment is set up.
Use the provided bash scripts to start the corresponding Docker containers with the appropriate mount points:
Pretraining/docker/start_container.shโ for pretrainingFinetuning/docker/start_container.shโ for fine-tuning
Pretraining
Once Docker is running and the data are placed in ~/Data/LIANet_data, start pretraining with:
python main.py
The pretrained model checkpoints will be automatically saved to:
~/Results/LIANet_results/Pretraining
Fine-tuning
After obtaining the pretrained checkpoint, switch to the fine-tuning Docker environment. Assuming the labeled data are available in ~/Data/LIANet_data, start fine-tuning with:
python train.py
The fine-tuned model outputs will be saved to:
~/Results/LIANet_results/Finetuning
Pretraining
Once Docker is running and the data are placed in ~/Data/LIANet_data, start pretraining with:
python main.py
The pretrained model checkpoints will be automatically saved to:
~/Results/LIANet_results/Pretraining
Fine-tuning
After obtaining the pretrained checkpoint, switch to the fine-tuning Docker environment. Assuming the labeled data are available in ~/Data/LIANet_data, start fine-tuning with:
python train.py
The fine-tuned model outputs will be saved to:
~/Results/LIANet_results/Finetuning
๐ Repository Structure
~git/
โโ LIANet/
โโ Finetuning/
โ โโ docker/
โ โโ src/
โ โโ configs/ # YAML configs for fine-tuning runs
โ โโ models/ # Model definitions for downstream tasks
โ โโ datasets.py # Dataset loaders for fine-tuning tasks
โ โโ lr_scheduler.py # Learning rate scheduling utilities
โ โโ metrics.py # Evaluation metrics
โ โโ settings.py # Global constants and paths
โ โโ train.py # Main training entry point (fine-tuning)
โ โโ utils.py # Helper functions
โ
โโ Pretraining/
โ โโ docker/
โ โโ src/
โ โโ configs/ # Pretraining configuration files
โ โโ models/ # LIANet model class
โ โโ schedulers/ # Learning rate schedulers for pretraining
โ โโ trainroutines/ # Training loops / routines
โ โโ dataset.py # Dataset definitions for pretraining
โ โโ main.py # Main entry script for pretraining
โ โโ metrics.py # Metrics used during pretraining
โ โโ trainer.py # Model trainer class
โ โโ utils.py # General utility functions
โ
โโ .gitignore
โโ README.md
๐ฆ Data Directory
~/Data/LIANet_data/
โโ DLT.tif # Dominant Leaf Type label raster
โโ dw_0.tif # Dynamic World label (season index 0)
โโ dw_1.tif # Dynamic World label (season index 1)
โโ dw_2.tif # Dynamic World label (season index 2)
โโ dw_3.tif # Dynamic World label (season index 3)
โโ mbf_binary.tif # Building footprint binary mask
โโ mbf_density.tif # Building footprint density
โโ mch.tif # Meta Canopy Height (regression label)
โโ s2_seasonidx0.tif # Sentinel-2 input image (season index 0)
โโ s2_seasonidx1.tif # Sentinel-2 input image (season index 1)
โโ s2_seasonidx2.tif # Sentinel-2 input image (season index 2)
โโ s2_seasonidx3.tif # Sentinel-2 input image (season index 3)
And Results Directory
~/Results/
โโ LIANet_results/
โโ Pretraining/ # Stores pretraining runs and checkpoints
โโ Finetuning/ # Stores fine-tuning results
โโ dynamic_world/
โโ ...