Loading repository data…
Loading repository data…
Vedant-Git-dev / repository
GeoVision is a web application that analyzes satellite imagery to detect land cover changes over time.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Satellite change detection powered by Google Earth Engine, Dynamic World land cover classification, and AI driven natural language explanations.
Existing land-cover products often expose raw classifications but don't help users ask natural language questions or understand changes. GeoVision combines satellite imagery, land-cover analysis, and AI explanations into an interactive system for exploring environmental change.
GeoVision is a web application that analyzes satellite imagery to detect land cover changes over time. It leverages Sentinel 2 multispectral data and Dynamic World probability maps to identify transitions between land cover classes such as forest, urban, water, agriculture, and bare land. The system features an AI chat interface that lets users ask questions about land use changes in natural language, with real time streaming updates and detailed AI generated explanations.
The application follows a modular pipeline architecture:
Geocode Location
|
v
Resolve AOI (GAUL District / OSM City)
|
v
Fetch Sentinel 2 Composite (Before)
|
v
Fetch Sentinel 2 Composite (After)
|
v
Build Dynamic World Probability Maps (Before + After)
|
v
Detect Changes (Rule Engine + Spectral Cross Validation)
|
v
Compute Land Cover Statistics
|
v
Generate AI Explanation (Groq LLM)
git clone https://github.com/Vedant-Git-dev/GeoVision.git
pip install -r requirements.txt
earthengine authenticate
cp .env.example .env
# Edit .env and set your EE_PROJECT_ID and GROQ_API_KEY
python app.py
The server will start on http://127.0.0.1:5000.
Configuration is centralized in geovision/config.py. Key settings include:
| Setting | Default | Description |
|---|---|---|
| DEFAULT_LOCATION | Pune, India | Fallback location for geocoding |
| DEFAULT_BEFORE_DATE | 2023-11-01 | Default start date for analysis |
| DEFAULT_AFTER_DATE | 2024-11-01 | Default end date for analysis |
| DATE_WINDOW_DAYS | 90 | Days to expand around each target date |
| MIN_CLASS_CONF | 0.45 | Minimum class proportion for confidence gate |
| MIN_SIGNATURE_CONF | 0.25 | Minimum raw DW probability for signature dominance |
| MIN_DOMINANCE_MARGIN | 0.05 | Lead margin over runner up class |
| MIN_PROB_SURGE | 0.25 | Minimum probability increase for surge gate |
| MAX_SCENE_CLOUD_PCT | 20 | Maximum cloud percentage per Sentinel 2 scene |
POST /generateRuns the satellite change detection pipeline synchronously.
Request Body:
{
"location": "Pune, India",
"before_date": "2023-11-01",
"after_date": "2024-11-01",
"question": "What changed?"
}
Response:
{
"success": true,
"config": {
"center": [18.5936, 73.7301],
"before_tiles": "https://...",
"after_tiles": "https://...",
"change_mask_tiles": "https://...",
"land_cover_before_tiles": "https://...",
"land_cover_after_tiles": "https://...",
"land_cover_stats": { ... },
"aoi": { ... },
"area_name": "Pune",
"settlements": [ ... ]
},
"explanation": "AI generated summary..."
}
POST /generate/streamSame as /generate but streams progress as Server Sent Events.
Event Types:
progress: Pipeline step updates with step name, number, and totalresult: Final analysis resulterror: Error details if the pipeline failsPOST /api/chatProcesses a natural language chat message and returns an analysis or conversational reply.
Request Body:
{
"message": "What changed in Mumbai between 2020 and 2024?",
"history": []
}
POST /api/chat/streamChat endpoint with SSE streaming for real time pipeline progress.
.
├── app.py # Flask application entry point
├── requirements.txt # Python dependencies
├── .env.example # Environment variable template
├── public/ # Static frontend assets
│ ├── chat.html # Main chat interface
│ ├── chat.css # Chat styles with light/dark themes
│ ├── chat.js # Client side chat logic
│ └── style.css # Additional styles
└── geovision/ # Core application package
├── __init__.py # Package initialization and logging
├── config.py # Centralized constants and settings
├── pipeline.py # Main pipeline orchestrator
├── chat.py # Natural language intent parser and orchestrator
├── explain.py # LLM explanation generator
├── ee_init.py # Google Earth Engine initialization
├── geocode.py # Nominatim geocoding wrapper
├── boundary.py # FAO GAUL and OSM boundary lookup
├── composite.py # Sentinel 2 cloud masking and compositing
├── dynamic_world.py # Dynamic World probability compositing
├── signature.py # DW to 5 class signature mapping
├── changes.py # Change detection rule engine
├── stats.py # Land cover statistics computation
├── settlements.py # OSM settlement discovery
├── spectral.py # Spectral index computation (NDVI/NDWI)
└── types.py # Core data types (Location, DateRange)
GeoVision uses a rigorous multi gate approach to minimize false positives:
The system monitors these specific land cover transitions:
| From | To | Label | Color |
|---|---|---|---|
| Forest | Urban | Forest to Urban | #f44336 |
| Water | Urban | Water to Urban | #1976d2 |
| Forest | Water | Forest to Water | #81c784 |
| Urban | Forest | Urban to Forest | #009688 |
| Urban | Water | Urban to Water | #00bcd4 |
| Water | Forest | Water to Forest | #1e88e5 |
For a pixel to register as a valid transition, it must pass all three gates:
Confidence Gate: Both the source and target class proportions must exceed MIN_CLASS_CONF (0.45) in their respective timelines. This ensures both endpoints are decisive classifications rather than noisy mixed pixels.
Surge Gate: The target class's raw Dynamic World probability must have increased by at least MIN_PROB_SURGE (0.25) between the before and after periods. This catches genuine transitions rather than classification noise at the boundary.
Spectral Gate: Independent spectral indices cross validate the Dynamic World labels. Transitions to forest require NDVI >= 0.3, and transitions to water require NDWI >= 0.1. This rejects shadows misclassified as water and senescent vegetation misclassified as bare land.
Dynamic World provides 9 probability bands per pixel. GeoVision maps these to a simplified 5 class schema using raw (non normalized) probabilities with a dominance margin check. A class is only assigned if it beats every other class by at least 0.05 and has a raw proportion of at least 0.25. This prevents "tallest dwarf" errors where all classes have low confidence but one happens to be highest.
| Class | Color | Code |
|---|---|---|
| Water | Deep Blue | 0 |
| Forest | Green | 1 |
| Bare Land | Brown | 3 |
| Agriculture | Yellow | 4 |
| Urban | Red | 6 |
The chat interface supports natural language queries such as:
The chat parser maintains conversation history, reuses previously established parameters, and asks clarifying questions when location or dates are missing. It also supports city level granularity when users specify sub areas (e.g., "Kharadi, Pune" or "Whitefield, Bangalore").
See requirements.txt for the full list. Key dependencies include:
| Package | Version | Purpose |
|---|---|---|
| earthengine_api | >=0.1.400 | Google Earth Engine Python API |
| flask | >=3.0.0 | Web framework |
| geopy | >=2 |