# hsg-aiml/remotesensingco2estimation architecture

> Architecture diagram of the GitHub repository hsg-aiml/remotesensingco2estimation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hsg-aiml/remotesensingco2estimation
- Repository: https://github.com/hsg-aiml/remotesensingco2estimation

## Overview

##### Project type and purpose
- This is a research‐oriented machine‐learning codebase for estimating power‐plant CO₂ emissions from satellite imagery using a multitask deep network.
- It provides data loading, custom augmentations, model definition, training, and evaluation scripts.

##### File structure
- Top level:
– README.md (project overview)
– custom_augmentations.py (data‐augmentation routines)
– dataset_multitask.py (dataset class and loader)
– train_multitask.py (training entry point)
– eval_multitask.py (evaluation/inference entry point)
– models/ (model definition)
· model_multitask.py (multitask network architecture)
- No deployment or microservice code; this is a standalone training/evaluation pipeline.

##### README for additional insights
- Describes a three‐headed output: plume‐area mask, fuel type, power generation rate → CO₂ estimate.
- References external dataset on Zenodo.
- Emphasizes end-to-end training and physics-guided post‐processing.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Source
    ExtData["External Data Source<br/>(Zenodo Repository)"]:::external

    %% Data Preparation
    subgraph "Data Preparation"
        direction TB
        Loader["Dataset Loader<br/>(dataset_multitask.py)"]:::data
        Aug["Custom Augmentations<br/>(custom_augmentations.py)"]:::data
    end

    %% Model Definition
    subgraph "Model Definition"
        direction TB
        Model["Multitask Model<br/>• Mask Head<br/>• Classification Head<br/>• Regression Head<br/>(models/model_multitask.py)"]:::model
    end

    %% Training Pipeline
    subgraph "Training Pipeline"
        direction TB
        TrainScript["Train Script<br/>(train_multitask.py)"]:::script
        Checkpoint["Model Checkpoint<br/>(checkpoint.pt)"]:::artifact
    end

    %% Evaluation Pipeline
    subgraph "Evaluation Pipeline"
        direction TB
        EvalScript["Eval Script<br/>(eval_multitask.py)"]:::script
        Metrics["Evaluation Metrics<br/>(metrics.json)"]:::artifact
        CO2["CO₂ Calculator<br/>(power→CO₂ conversion)"]:::artifact
    end

    %% Documentation
    Readme["Project Overview<br/>(README.md)"]:::doc

    %% Connections
    ExtData -->|provides raw images & labels| Loader
    Loader -->|outputs batches| Aug
    Aug -->|preprocessed data| Model
    Model -->|forward pass| TrainScript
    TrainScript -->|saves| Checkpoint
    Checkpoint -->|loaded by| EvalScript
    EvalScript -->|inference results| Metrics
    Metrics -->|input to| CO2

    %% Click Events
    click Loader "https://github.com/hsg-aiml/remotesensingco2estimation/blob/main/dataset_multitask.py"
    click Aug "https://github.com/hsg-aiml/remotesensingco2estimation/blob/main/custom_augmentations.py"
    click Model "https://github.com/hsg-aiml/remotesensingco2estimation/blob/main/models/model_multitask.py"
    click TrainScript "https://github.com/hsg-aiml/remotesensingco2estimation/blob/main/train_multitask.py"
    click EvalScript "https://github.com/hsg-aiml/remotesensingco2estimation/blob/main/eval_multitask.py"
    click Readme "https://github.com/hsg-aiml/remotesensingco2estimation/blob/main/README.md"

    %% Styles
    classDef external fill:#f9f,stroke:#333,stroke-width:1px;
    classDef data fill:#ccf,stroke:#333,stroke-width:1px;
    classDef model fill:#cfc,stroke:#333,stroke-width:1px;
    classDef script fill:#ffc,stroke:#333,stroke-width:1px;
    classDef artifact fill:#fcf,stroke:#333,stroke-width:1px;
    classDef doc fill:#eef,stroke:#333,stroke-width:1px;
```
