Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time-Series Final Project: Spatio-Temporal Dynamic Mapping

This repository contains the code for reconstructing and improving the methodology proposed in the paper: "Integrating Unsupervised Machine Intelligence and Anomaly Detection for Spatio-Temporal Dynamic Mapping Using Remote Sensing Image Series" (Sustainability 2023).

Project Overview

The goal of this project is to map landscape disturbances (such as the Mariana and Brumadinho dam collapses, and intense deforestation in Altamira) using unsupervised machine learning applied to time-series remote sensing data from Google Earth Engine (GEE).

Methodology

  1. Paper Reconstruction (Stage 1): We implemented the Isolation Forest (IF) and One-Class Support Vector Machine (OC-SVM) models to detect temporal anomalies across the reconstructed case study datasets:
    • Altamira: MODIS (250m, NDVI)
    • Brumadinho: Landsat-8 (30m, NDVI)
    • Mariana: Sentinel-2 (10m, NDWI)
  2. Simple Baseline: We implemented a classical Z-Score thresholding model to serve as a statistical baseline (evaluated under both leaky and walk-forward leak-free settings).
  3. Improved Method (Stage 2): We introduced a Deep Learning approach using an LSTM Autoencoder. Unlike the classical methods that evaluate isolated pixel values, the LSTM captures the sequential, temporal relationships of the landscape over time, calculating reconstruction errors to flag structural anomalies.

Technical Specifications

  • Task Type: Unsupervised Anomaly Detection (Multivariate input, Univariate output).
  • Sampling Frequency: ~16 days (Terra MODIS), ~10-15 days (Landsat/Sentinel).
  • Input Window Length: 3 time-steps (used for calculating Time-Aware Features like velocity, acceleration, and rolling stats for the LSTM).
  • Forecast Horizon: N/A (Reconstruction-based detection, not future forecasting).
  • Random Seeds: Fixed at 42 where possible to ensure reproducibility.

Environment Requirements

Ensure you have Python 3.8+ installed.

Install the required packages using the provided requirements.txt:

pip install -r requirements.txt

You must also authenticate your Google Earth Engine account before running the pipelines:

earthengine authenticate

Execution Guide

1. Launch MLflow Dashboard

All experiments, parameters, and generated TIFFs are tracked automatically using MLflow. To start the local server (which includes a background daemon to prevent desktop.ini Google Drive syncing crashes):

python run_mlflow.py

Access the dashboard at: http://localhost:5000

2. Preprocess Data

Download and preprocess the GEE data (removes clouds/shadows, calculates spectral indices, and centers the median trend):

python run_preprocessing.py

3. Run Reconstructions & Baseline

Run the classical anomaly detection algorithms (IF, OC-SVM) for each dataset:

python Altamira_Modis_repro.py
python Brumadinho_Landsat_repro.py
python Mariana_Sentinel_repro.py

Run the Simple Baseline (Z-Score) across all datasets:

python run_baseline_all.py

4. Run Improved Method (LSTM Autoencoder)

Train the deep learning model to learn the structural sequences of the environment:

python train_deep.py

Once trained, run the inference script to calculate reconstruction errors and map the anomalies:

python inference_deep.py

5. Compute Quantitative Metrics

Compute the full 6-metric benchmark suite (Spatial Coherence, Flicker Ratio, Persistence, Cluster Size, Entropy, Contrast Ratio):

python compute_custom_metrics.py

Expected Outputs

  • MLflow Database: All models will log their total_anomalies, total_transitions, unsupervised stability metrics, and hyperparameters directly to the MLflow UI.
  • GeoTIFFs: Georeferenced .tif anomaly maps will be saved in the Tiff/ directory, categorized by algorithm and leak-free status.
  • Summary Reports: A consolidated benchmark table will be exported to PAPER_TEXT_ALL_METRICS.csv.

About

Detecting landscape disturbances and environmental disasters using unsupervised machine intelligence and deep learning on time-series satellite imagery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages