# vladimirescu/efficientgeometrysatellitesynthesis architecture

> Architecture diagram of the GitHub repository vladimirescu/efficientgeometrysatellitesynthesis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vladimirescu/efficientgeometrysatellitesynthesis
- Repository: https://github.com/vladimirescu/efficientgeometrysatellitesynthesis

## Overview

This repository is a command-line inference entry point for geometry-controlled satellite-image synthesis, rather than the implementation of the synthesis model itself. The user supplies a prompt and either coordinates or an OSM image; the script downloads the Hugging Face repository, loads its pipeline, invokes generation, and saves the generated image and control tile. The README documents coordinate-based OSM tile retrieval by the pipeline. The pipeline implementation is hosted remotely and is not present in the supplied tree, so its internal stages and invocation details are not expanded. Note: the README uses `--osm_map`, while the script defines `--osm_path`.

Main entry points: [`infer_HF.py`](https://github.com/vladimirescu/efficientgeometrysatellitesynthesis/blob/main/infer_HF.py) (Inference runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Inference entry"]
  node_cli["CLI arguments<br/>[infer_HF.py]"]
  node_runner["Inference runner<br/>[infer_HF.py]"]
end

subgraph group_inputs["Geometry inputs"]
  node_osm["OpenStreetMap API"]
  node_local_map["Local OSM image"]
end

subgraph group_generation["Synthesis"]
  node_hf["Hugging Face Hub"]
  node_pipeline["SatSynthPipeline"]
end

subgraph group_outputs["Saved outputs"]
  node_generated["generated.png"]
  node_osm_output["osm_map.png"]
end

node_user(("User"))

node_user -->|"provides arguments"| node_cli
node_cli -->|"configures"| node_runner
node_runner -->|"downloads code and weights"| node_hf
node_hf -->|"provides pipeline files"| node_runner
node_runner -->|"loads and invokes"| node_pipeline
node_runner -->|"opens optional image"| node_local_map
node_runner -->|"passes prompt and coordinates"| node_pipeline
node_pipeline -.->|"fetches coordinate tile"| node_osm
node_pipeline -->|"returns images"| node_runner
node_runner -->|"saves generated image"| node_generated
node_runner -->|"saves control image"| node_osm_output

click node_cli "https://github.com/vladimirescu/efficientgeometrysatellitesynthesis/blob/main/infer_HF.py"
click node_runner "https://github.com/vladimirescu/efficientgeometrysatellitesynthesis/blob/main/infer_HF.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_runner,node_user toneBlue
class node_osm,node_local_map toneAmber
class node_hf,node_pipeline toneMint
class node_generated,node_osm_output toneRose
```

## Components

### Inference entry

- [CLI arguments](https://github.com/vladimirescu/efficientgeometrysatellitesynthesis/blob/main/infer_HF.py): `infer_HF.py`
- [Inference runner](https://github.com/vladimirescu/efficientgeometrysatellitesynthesis/blob/main/infer_HF.py): `infer_HF.py`

### Geometry inputs

- **OpenStreetMap API**
- **Local OSM image**

### Synthesis

- **Hugging Face Hub**
- **SatSynthPipeline**

### Saved outputs

- **generated.png**
- **osm_map.png**

### Other components

- **User**

## Connections

- User → CLI arguments: provides arguments
- CLI arguments → Inference runner: configures
- Inference runner → Hugging Face Hub: downloads code and weights
- Hugging Face Hub → Inference runner: provides pipeline files
- Inference runner → SatSynthPipeline: loads and invokes
- Inference runner → Local OSM image: opens optional image
- Inference runner → SatSynthPipeline: passes prompt and coordinates
- SatSynthPipeline → OpenStreetMap API: fetches coordinate tile
- SatSynthPipeline → Inference runner: returns images
- Inference runner → generated.png: saves generated image
- Inference runner → osm_map.png: saves control image
