# walkerad03/sight-seer architecture

> Architecture diagram of the GitHub repository walkerad03/sight-seer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/walkerad03/sight-seer
- Repository: https://github.com/walkerad03/sight-seer

## Overview

##### Main Components

a) Data Pipeline Layer:
- "preprocessing" module as the entry point
- Two sub-components:
- Image Downloader (download_images.py)
- Dataset Builder (build_dataset.py)

b) ML Model Kit Layer:
- Core ML functionality in "ml_model_kit"
- Key components:
- Data Setup (data_setup.py)
- Model Builder (model_builder.py)
- Training Engine (engine.py)
- Utilities (utils.py)

c) Inference Layer:
- Main.py as the orchestrator
- Prediction flow

##### Data Flow (top to bottom)
- Raw Images → Preprocessing → Structured Dataset → ML Pipeline → Trained Model → Inference

##### Component Interaction Flow
- main.py ↔ ml_model_kit components ↔ preprocessing components

##### Detailed Component Breakdown

**Preprocessing Module**
- Image Downloader
- Dataset Builder

**ML Model Kit**
- Data Setup
- Model Builder
- Training Engine
- Utilities

##### Additional Elements

Technical details:
- Input: Single photograph
- Output: Geographical coordinates
- Model type: ResNet
- Data flow direction
- Training/inference paths

Remember to:
- Keep the ResNet architecture as a central focus
- Clear separation between preprocessing and model operations
- Data transformation points
- Error handling flows
- Validation steps

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Data Pipeline Layer"
        RawImages[("Raw Images")]
        PreProc["Preprocessing"]:::preprocessing
        ImgDown["Image Downloader"]:::preprocessing
        DataBuild["Dataset Builder"]:::preprocessing
        Dataset[("Structured Dataset")]:::storage
    end

    subgraph "ML Model Kit Layer"
        DataSetup["Data Setup"]:::mlkit
        ModelBuild["Model Builder"]:::mlkit
        TrainEng["Training Engine"]:::mlkit
        Utils["Utilities"]:::mlkit
        
        subgraph "ResNet Architecture"
            ResNet["ResNet Model"]:::model
            Valid["Validation"]:::model
            Train["Training"]:::model
        end
    end

    subgraph "Inference Layer"
        Main["Main Orchestrator"]:::main
        Output["Geographical Coordinates"]:::output
    end

    %% Data Flow
    RawImages --> PreProc
    PreProc --> ImgDown
    ImgDown --> DataBuild
    DataBuild --> Dataset
    Dataset --> DataSetup
    DataSetup --> ModelBuild
    ModelBuild --> ResNet
    ResNet --> Valid
    ResNet --> Train
    Train --> TrainEng
    Valid --> TrainEng
    TrainEng --> Main
    Utils -.-> DataSetup
    Utils -.-> ModelBuild
    Utils -.-> TrainEng
    Main --> Output

    %% Click Events
    click PreProc "https://github.com/walkerad03/sight-seer/tree/master/preprocessing"
    click ImgDown "https://github.com/walkerad03/sight-seer/blob/master/preprocessing/download_images.py"
    click DataBuild "https://github.com/walkerad03/sight-seer/blob/master/preprocessing/build_dataset.py"
    click DataSetup "https://github.com/walkerad03/sight-seer/blob/master/ml_model_kit/data_setup.py"
    click ModelBuild "https://github.com/walkerad03/sight-seer/blob/master/ml_model_kit/model_builder.py"
    click TrainEng "https://github.com/walkerad03/sight-seer/blob/master/ml_model_kit/engine.py"
    click Utils "https://github.com/walkerad03/sight-seer/blob/master/ml_model_kit/utils.py"
    click Main "https://github.com/walkerad03/sight-seer/blob/master/main.py"

    %% Styling
    classDef preprocessing fill:#3498db
    classDef mlkit fill:#2ecc71
    classDef model fill:#e74c3c
    classDef main fill:#f39c12
    classDef storage fill:#95a5a6
    classDef output fill:#9b59b6

    %% Legend
    subgraph Legend
        L1["Preprocessing"]:::preprocessing
        L2["ML Model Kit"]:::mlkit
        L3["Model Components"]:::model
        L4["Main Flow"]:::main
        L5[("Storage")]:::storage
        L6["Output"]:::output
    end
```
