README.md

April 9, 2026 ยท View on GitHub

๐Ÿ›ฐ๏ธ Location Is All You Need (LIANet)

arXiv

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 pretraining
  • Finetuning/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 pretraining
  • Finetuning/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/
      โ””โ”€ ...