ReFlecta is a real-time satellite image change detection and analysis platform that uses computer vision to identify and visualize environmental changes over time. The system analyzes before-and-after images from various global locations including Antarctica glaciers, deforestation areas, oil spills, ports, and military installations.
graph TB
%% Frontend Layer
subgraph "Frontend Layer"
UI[Web Interface<br/>HTML / CSS / JS]
TABS[Tab Navigation<br/>Hotspot & Upload]
end
%% API Gateway
subgraph "API Gateway"
API[FastAPI Server<br/>Port: 8000]
end
%% Core Processing Engine
subgraph "Core Processing Engine"
IMG[Image Loader<br/>Local Assets]
CD[Change Detection Engine]
VIZ[Visualization Engine]
end
%% Data Sources
subgraph "Data Sources"
ASSETS[Local Assets<br/>antarctica1.webp, iraq1.webp, etc.]
UPLOAD[User Uploads<br/>Before / After Images]
end
%% Analysis Pipeline (shortened)
subgraph "Analysis Pipeline"
DETECT[Detection<br/>Structural + Color Change]
STATS[Statistics Generation<br/>Change %, Regions, Pixels]
end
%% Output Generation
subgraph "Output Generation"
SIDEBYSIDE[Side-by-Side View]
DASHBOARD[Analysis Dashboard]
JSON[Statistics JSON]
end
%% Connections
UI --> API
TABS --> API
API --> IMG
API --> CD
API --> VIZ
IMG --> ASSETS
IMG --> UPLOAD
CD --> DETECT
DETECT --> STATS
VIZ --> SIDEBYSIDE
VIZ --> DASHBOARD
STATS --> JSON
SIDEBYSIDE --> UI
DASHBOARD --> UI
JSON --> UI
cd backend
pip install -r requirements.txtEnsure the assets/ directory contains the required image files:
ls assets/
# Should show: antarctica1.webp, antarctica2.webp, iraq1.webp, iraq2.webp, etc.python main.pyThe backend API will be available at: http://localhost:8000
Open a new terminal and navigate to the project root:
# From the project root directory
python -m http.server 3000The frontend will be available at: http://localhost:3000
- Open your web browser
- Go to
http://localhost:3000 - Use the ReFlecta interface to:
- Select from 10 predefined global hotspots (Antarctica, Iraq, Rotterdam Port, etc.)
- Upload your own before/after images for custom analysis
- View detailed change detection results with statistics and visualizations
GET /- API information and available endpointsGET /health- Health check and system statusGET /hotspots- Available predefined analysis locationsPOST /analyze- Analyze changes for selected hotspot locationPOST /upload-analyze- Analyze user-uploaded before/after imagesGET /test-images- Test endpoint to verify image loadingGET /docs- Interactive API documentation (Swagger UI)
- Multi-Algorithm Change Detection: Uses SSIM, perceptual color analysis, and GMM for accurate detection
- Predefined Hotspots: Analyze 10+ global locations (Antarctica, Iraq, Rotterdam Port, etc.)
- Smart Filtering: Ignores minor variations and focuses on significant changes
- Advanced Visualization: Side-by-side comparisons and comprehensive analysis dashboards
- Upload Support: Analyze your own before/after images with the same algorithms
- Detailed Statistics: Change percentages, affected regions, and pixel-level analysis
- Noise Reduction: Advanced post-processing to eliminate false positives
- Consensus Voting: Multiple algorithms vote on changes for improved accuracy
- Backend: FastAPI, Python 3.8+, OpenCV, NumPy, SciPy, Matplotlib, Pillow
- Frontend: HTML5, JavaScript (ES6+), Tailwind CSS, Custom CSS
- Computer Vision: OpenCV for image processing, SSIM for structural analysis
- Data Source: Local image assets, user uploads (JPEG, PNG, WEBP, TIFF)
- API Documentation: Swagger UI (FastAPI auto-generated)
- Image Processing: Multi-algorithm pipeline with consensus voting