Skip to content

Repository files navigation

GEE Data Fetcher

This repository provides a pipeline to fetch and save Earth Engine (EE) datasets like MODIS, ERA5, GLDAS etc. in .npz format for custom spatiotemporal analysis.

Features

  • Modular, date-wise downloader using Earth Engine Python API
  • JSON-based configuration of datasets
  • Supports daily, static, and composite fetch modes
  • Auto-clipping and .npz saving for each band/image

Requirements

  • earthengine-api
  • numpy
  • requests

Python PyTorch License: MIT

A submission for the Bharatiya Antariksh Hackathon by ISRO from Team DDR3.


Overview

Agni-Net is an advanced deep learning model designed to predict the spread of wildfires by analyzing complex geospatial and meteorological data. Traditional methods often struggle with the non-linear interactions between static terrain and dynamic weather. Our solution mimics the analytical process of a human expert by using a novel dual-stream spatio-temporal architecture, allowing it to learn these complex relationships and produce highly accurate forecast maps.

This project provides a robust framework for turning raw satellite and weather data into actionable intelligence for disaster management and resource allocation, directly addressing a critical national challenge for India.


Key Features

  • Dual-Encoder Architecture: Processes static terrain and time-series weather data in parallel using specialized encoders.
  • ConvLSTM for Temporal Dynamics: Captures the evolution and movement of weather patterns over time.
  • Dual Skip Connections: Intelligently fuses spatial details from the terrain with temporal context from the weather at every level of the decoder.
  • Advanced Loss Function: Employs a combined Focal + Dice Loss to effectively handle the extreme class imbalance of rare fire pixels.
  • Robust Training Strategy: Incorporates Data Normalization, Instance Normalization, Gradient Clipping, and a Learning Rate Scheduler for stable and effective training.

Model Architecture: FireUnetMultiRes

The model is a U-Net-like architecture with two distinct encoders that merge at a central bottleneck. The decoder then uses skip connections from both encoders to reconstruct the output.

1. Static Encoder

A deep CNN that analyzes the static terrain data. Its purpose is to learn the permanent, spatial features of the landscape that influence fire behavior. Its skip connections provide the final decoder with a high-fidelity geographical blueprint.

2. Dynamic Encoder

A ConvLSTM network that processes the time-series weather data. It learns the temporal patterns of how conditions change over time. Its skip connections provide the decoder with multi-scale information about the weather dynamics.

3. Fusion and Decoder

The insights from both encoders are fused at the bottleneck. The decoder then upsamples this fused representation, using the dual skip connections to combine the precise spatial details from the static data with the temporal context from the dynamic data at every step. This synergy allows the model to learn complex, real-world interactions.


Dataset

The model is designed to handle a complex, multi-modal, and multi-resolution dataset:

  • Static Data:.npy files containing 8 feature channels (e.g., elevation, slope, fuel type).
  • Dynamic Data: .npy files containing patches of data over 5 timesteps, with 13 feature channels (e.g., temperature, wind).
  • Target Data: 200x200 ground truth fire masks with pixel values from 0-100.

A custom PyTorch FireDataset class handles the complex indexing and memory-mapped loading. All input data is normalized to a [0, 1] range before being fed to the model.


Getting Started

Prerequisites

  • Python 3.9+
  • PyTorch 2.0+
  • CUDA-enabled GPU (recommended)
  • Other dependencies: numpy, matplotlib, tqdm

Installation

  1. Clone the repository:
    git clone [your-repo-url]
    cd [your-repo-name]
  2. Install the required packages:
    pip install -r requirements.txt

Training

  1. Organize your data into the structure specified in the Config class.
  2. Run the training notebook (training_notebook.ipynb). Checkpoints will be saved automatically in the ./checkpoints directory.

Evaluation

  1. Update the checkpoint_to_load path in the evaluation notebook (evaluation_notebook.ipynb).
  2. Run the notebook to calculate final metrics (IoU, Precision, Recall, F1 Score) on the validation set.

Results

Our model successfully overcomes the class imbalance problem and learns to segment fire regions with high accuracy.

Sample Predictions

| | | | | | | | | |

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages