Skip to content

Repository files navigation

πŸ›°οΈ NovaAI

Multimodal Earth Observation Intelligence with RemoteCLIP and LLM Reasoning

NovaAI is a multimodal Earth Observation (EO) analysis system that combines RemoteCLIP-based satellite image understanding with LLM reasoning to turn satellite imagery into structured scene intelligence.

The system is designed around a staged analysis pipeline:

Satellite Image β†’ RemoteCLIP Vision β†’ EO Interpretation β†’ Prompt Construction β†’ LLM Analysis β†’ Professional Report

It provides land-cover classification, confidence-aware interpretation, AI-generated analysis, risk assessment, provenance metadata, and an HTML-based professional report.


✨ Key Features

  • πŸ›°οΈ Satellite image analysis using RemoteCLIP ViT-L/14
  • 🌍 Zero-shot Earth Observation classification using candidate land-cover labels
  • 🧠 EO interpretation layer that converts vision scores into structured scene context
  • πŸ€– LLM-powered reasoning through OpenRouter's OpenAI-compatible API
  • πŸ“Š Structured analysis responses with dominant and secondary land-cover classes
  • πŸ“ Professional AI reports generated through a configurable report model
  • πŸ“„ Unified HTML report rendering with embedded imagery and analysis
  • ⚑ GPU acceleration when CUDA is available, with CPU fallback
  • ♻️ RemoteCLIP singleton loading to avoid reloading the large model for every request
  • πŸ›‘οΈ Fault-tolerant pipeline β€” LLM failures can return a partial_success response while preserving vision results
  • πŸ”Ž Pipeline provenance including vision model, LLM model, report model, processing time, timestamp, and API version
  • πŸ–ΌοΈ Frontend drag-and-drop image upload with JPG/JPEG/PNG/WEBP validation and a 20 MB client-side limit

🧠 Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Satellite Image         β”‚
β”‚   PNG / JPG / JPEG / WEBP    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Image Validation & Loading    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ RemoteCLIP ViT-L/14          β”‚
β”‚ Vision Encoder               β”‚
β”‚                              β”‚
β”‚ β€’ Image embeddings           β”‚
β”‚ β€’ Cosine similarities        β”‚
β”‚ β€’ Zero-shot scores           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ EO Interpreter               β”‚
β”‚                              β”‚
β”‚ β€’ Dominant land cover        β”‚
β”‚ β€’ Secondary land cover       β”‚
β”‚ β€’ Relative confidence        β”‚
β”‚ β€’ Scene summary              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Prompt Builder               β”‚
β”‚ Structured EO Context        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ OpenRouter LLM               β”‚
β”‚ Configurable model           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β–Ό                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Analyst Narrative        β”‚  β”‚ Professional Report      β”‚
β”‚ GPT/LLM analysis         β”‚  β”‚ Configurable report LLM  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚                             β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Unified AnalysisResponse β”‚
                 β”‚ + HTML Report            β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”¬ Analysis Pipeline

1. Image validation

The backend validates the uploaded image before processing it and converts it into the expected image representation.

2. RemoteCLIP inference

NovaAI loads the RemoteCLIP ViT-L/14 checkpoint and computes:

  • Image embeddings
  • Embedding statistics
  • Zero-shot cosine similarity
  • Softmax-based confidence scores
  • Inference and total processing time

The RemoteCLIP checkpoint is downloaded automatically when it is missing or invalid.

3. Earth Observation interpretation

The raw zero-shot outputs are passed to a dedicated EO interpreter that derives structured scene information such as:

  • Dominant land-cover class
  • Secondary land-cover class
  • Relative confidence
  • Scene summary

4. LLM reasoning

The structured EO context is transformed into a prompt and sent to a configurable LLM through OpenRouter.

The LLM layer is intentionally separated from the vision pipeline so the vision output remains useful even when the external LLM is unavailable.

5. Professional report generation

When the LLM stage succeeds, NovaAI can generate a professional report containing structured sections such as:

  • Executive dashboard
  • Environmental assessment
  • Key findings
  • Recommendations

The report output is merged with deterministic fallbacks to preserve structural integrity when the report model is unavailable or returns invalid JSON.

6. Unified report rendering

The backend renders the final report into HTML, including the analyzed image, classification information, risk level, findings, recommendations, and supporting metadata.


πŸ—οΈ Project Structure

Nova-AI/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ analyze.py
β”‚   β”‚   β”œβ”€β”€ chat.py
β”‚   β”‚   β”œβ”€β”€ insights.py
β”‚   β”‚   β”œβ”€β”€ interpreter.py
β”‚   β”‚   β”œβ”€β”€ report.py
β”‚   β”‚   └── vision.py
β”‚   β”‚
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── settings.py
β”‚   β”‚
β”‚   β”œβ”€β”€ interpreter/
β”‚   β”‚   β”œβ”€β”€ eo_interpreter.py
β”‚   β”‚   β”œβ”€β”€ eo_rules.py
β”‚   β”‚   └── eo_schema.py
β”‚   β”‚
β”‚   β”œβ”€β”€ llm/
β”‚   β”‚   β”œβ”€β”€ base.py
β”‚   β”‚   β”œβ”€β”€ gpt_service.py
β”‚   β”‚   └── openrouter.py
β”‚   β”‚
β”‚   β”œβ”€β”€ prompts/
β”‚   β”‚   β”œβ”€β”€ prompt_builder.py
β”‚   β”‚   └── templates.py
β”‚   β”‚
β”‚   β”œβ”€β”€ report/
β”‚   β”‚   β”œβ”€β”€ claude_prompt_builder.py
β”‚   β”‚   β”œβ”€β”€ html_renderer.py
β”‚   β”‚   β”œβ”€β”€ pdf_generator.py
β”‚   β”‚   β”œβ”€β”€ report_service.py
β”‚   β”‚   β”œβ”€β”€ schemas.py
β”‚   β”‚   └── templates.py
β”‚   β”‚
β”‚   β”œβ”€β”€ schemas/
β”‚   β”‚   β”œβ”€β”€ analysis.py
β”‚   β”‚   └── prompt.py
β”‚   β”‚
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ analysis_service.py
β”‚   β”‚   └── question_service.py
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── logger.py
β”‚   β”‚
β”‚   β”œβ”€β”€ vision/
β”‚   β”‚   β”œβ”€β”€ image_loader.py
β”‚   β”‚   β”œβ”€β”€ inference.py
β”‚   β”‚   β”œβ”€β”€ labels.py
β”‚   β”‚   β”œβ”€β”€ preprocessing.py
β”‚   β”‚   └── remoteclip.py
β”‚   β”‚
β”‚   └── main.py
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ package.json
β”‚   └── ...
β”‚
β”œβ”€β”€ models/
β”œβ”€β”€ data/
β”œβ”€β”€ docs/
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gitignore
└── README.md

πŸ› οΈ Tech Stack

Backend

  • Python 3.9+
  • FastAPI
  • Uvicorn
  • PyTorch
  • OpenCLIP
  • RemoteCLIP
  • Pillow
  • Pydantic Settings
  • OpenAI-compatible async client
  • Tenacity
  • OpenRouter

Frontend

  • React 18
  • Vite
  • JavaScript / JSX
  • CSS

AI / ML

  • RemoteCLIP ViT-L/14
  • Zero-shot image-text similarity
  • Cosine similarity
  • Confidence scoring
  • LLM-based EO reasoning
  • Structured report generation

βš™οΈ Configuration

Create a .env file in the project root:

OPENROUTER_API_KEY=your_openrouter_api_key
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
MODEL_NAME=your_primary_model
REPORT_MODEL=your_report_model
LOG_LEVEL=INFO

MODEL_NAME must be explicitly configured. REPORT_MODEL controls the model used for professional report generation.

Do not commit .env or API keys to GitHub.


πŸš€ Installation

Backend

git clone https://github.com/Nirmal0804/Nova-AI.git
cd Nova-AI

python -m venv venv

Windows

venv\ScriptsοΏ½ctivate

Linux / macOS

source venv/bin/activate

Install backend dependencies:

pip install -r backend/requirements.txt

Configure environment variables:

cp .env.example .env

On Windows, copy .env.example to .env manually if cp is unavailable.

Start the API:

python -m uvicorn backend.main:app --reload --port 8000

πŸ’» Frontend Setup

Open a second terminal:

cd frontend
npm install
npm run dev

Vite will start the development server and provide the local frontend URL.


πŸ›°οΈ RemoteCLIP Model

NovaAI uses the RemoteCLIP ViT-L/14 checkpoint.

The application manages the checkpoint automatically:

  1. Checks whether the checkpoint exists.
  2. Validates the expected file size.
  3. Downloads the checkpoint when required.
  4. Supports resuming an interrupted download.
  5. Loads the model once and reuses it through a singleton service.
  6. Uses CUDA when available and falls back to CPU otherwise.

The checkpoint is large, so the first model initialization can take significantly longer than subsequent inference requests.


πŸ“‘ API Overview

The backend exposes API modules for:

  • Image analysis
  • Chat / LLM interaction
  • Insights
  • EO interpretation
  • Vision processing
  • Professional report generation

The primary analysis flow is exposed through the analysis API and returns a structured AnalysisResponse.

A successful response can include:

status
dominant_land_cover
secondary_land_cover
confidence
summary
gpt_analysis
professional_report
warning
insight
classes
flags
title
risk_level
metadata

πŸ“Š Output & Provenance

NovaAI keeps model provenance in the final analysis response.

Example metadata fields:

Vision Model
LLM Reasoning Model
Report Model
Processing Time
Timestamp (UTC)
API Version

This makes the pipeline easier to inspect and helps distinguish model output from deterministic EO interpretation.


πŸ›‘οΈ Fault Tolerance

NovaAI does not make the external LLM a single point of failure.

If the LLM request fails:

RemoteCLIP
    ↓
EO Interpretation
    ↓
Vision Results
    ↓
partial_success

The system can still return the available vision classification and EO summary.

Professional reports also use fallback structures when the report model is unavailable or produces invalid JSON.


πŸ” Security Notes

  • Store API keys only in environment variables.
  • Never commit .env.
  • Do not expose OpenRouter credentials in frontend code.
  • API requests should be protected appropriately before production deployment.
  • The current frontend is designed primarily as a local/development interface.

⚠️ Current Limitations

NovaAI is a research/prototype system rather than a production-grade satellite intelligence platform.

Important limitations include:

  • RemoteCLIP zero-shot classification depends on the candidate label set.
  • Confidence scores should not be interpreted as calibrated geospatial probabilities.
  • LLM-generated explanations may contain hallucinations and should be independently verified.
  • Satellite scene understanding is limited by image quality, resolution, sensor characteristics, and the available semantic labels.
  • The RemoteCLIP ViT-L/14 checkpoint requires substantial storage and compute resources.
  • External LLM functionality depends on OpenRouter availability, API limits, and configured models.
  • Production deployments require stronger authentication, rate limiting, observability, and data governance.

πŸ”­ Future Directions

Potential extensions include:

  • Multi-sensor and multispectral analysis
  • AOI-aware geospatial processing
  • Temporal satellite change detection
  • Vegetation and environmental indices
  • Geospatial database integration
  • Satellite metadata ingestion
  • Map-based visualization
  • More specialized EO foundation models
  • Retrieval-augmented geospatial knowledge
  • Automated PDF report delivery
  • Batch satellite scene analysis
  • Production-grade authentication and deployment

🎯 Project Goal

NovaAI aims to bridge the gap between raw Earth Observation imagery and human-readable geospatial intelligence by combining specialized vision models with language-model reasoning.

Instead of returning only a classification label, the system attempts to provide an interpretable analysis pipeline with:

Vision β†’ Interpretation β†’ Reasoning β†’ Reporting β†’ Provenance


πŸ“„ License

Add the project's chosen license before distributing NovaAI publicly.


πŸ‘€ Author

Nirmal P

GitHub: @Nirmal0804

About

Multimodal Earth Observation intelligence platform combining RemoteCLIP satellite image analysis with LLM-powered interpretation and professional report generation.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages