File size: 3,648 Bytes
f343f06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# SatFetch - Hackathon Submission Details

**SatFetch** is a state-of-the-art, multi-sensor satellite image intelligence retrieval system developed by **Team 4MISTAKES** (RGIPT). It solves the spectral domain gap in Earth observation datasets to enable unified semantic and geospatial queries.

---

## 🌟 Key Features

1. **Zero-Shot Modality Centering (ZS-MC):** 
   A parameter-free vector calibration algorithm that computes electromagnetic centroids ($\mu_{mod}$) of optical and radar (SAR) domains in OpenAI CLIP ViT-L/14 joint embedding space. Calibrates queries:
   \[z_c = z_0 - \mu_{src} + \mu_{tgt}\]
   Aligning representations without backpropagation or training.

2. **Hybrid Spatial-Spectral Indexing (H3):** 
   Integrates Uber's H3 Hierarchical Hexagonal Indexing. Maps geographic coordinates to resolution-7 hexagons (edge length ~1.22km). Ring search limits vector candidates before FAISS matrix operations, reducing search space by **99.4%**.

3. **Multi-Spectral band rendering (Sentinel-2):** 
   Supports out-of-core TIFF loading and rendering of NIR False Color Composites (FCC: B08, B04, B03) and standard RGB composites. Offers interactive Sentinel-2 reflectance curve plots.

4. **Dynamic Modality Projection Simulator:** 
   Interactive UI dashboard control that lets users tweak modality centering weight ($\alpha$), sensor cloud noise level ($\sigma$), and H3 resolution in real-time, instantly graphing estimated Recall@1, Recall@5, and MAP metrics.

---

## πŸ› οΈ Technology Stack

* **Frontend:** Vanilla HTML5, CSS3 (Glassmorphism, custom animations, custom typography), JavaScript (ES6+, Leaflet.js for maps, Chart.js for data visualization).
* **Backend:** FastAPI (Python 3.10), Uvicorn server, Gradio (hybrid mount).
* **Vector Index:** FAISS (IndexFlatIP), NumPy, PyTorch.
* **Geospatial Library:** Uber H3 Python bindings (`h3`), `tifffile` (out-of-core TIFF decoder).
* **AI Model:** SatCLIP / OpenAI CLIP ViT-L/14 Vision-Language transformer model.

---

## πŸ“ Repository Structure

```
β”œβ”€β”€ app.py                      # FastAPI App Entry point (port 7860)
β”œβ”€β”€ requirements.txt            # Python packaging dependencies
β”œβ”€β”€ Dockerfile                  # Docker build for Hugging Face Spaces
β”œβ”€β”€ README.md                   # Setup and Deployment Guide
β”œβ”€β”€ PROJECT_DETAILS.md          # Technical Specifications (This File)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ features/               # Embedding extraction & SAR adapters
β”‚   β”‚   β”œβ”€β”€ extractor.py        # SatCLIP vision & text encoder wrapper
β”‚   β”‚   β”œβ”€β”€ satclip_encoder.py  # CLIP ViT-L/14 backend
β”‚   β”‚   └── sar_adapter.py      # SAR modality adapter
β”‚   β”œβ”€β”€ retrieval/              # Vector database & index handlers
β”‚   β”‚   β”œβ”€β”€ cross_modal_retrieval.py # Multi-index and H3 spatial search
β”‚   β”‚   └── index.py            # FAISS index wrapper
β”‚   β”œβ”€β”€ geo/                    # Spatial indexing functions
β”‚   β”‚   └── spatial.py          # H3 coordinates resolver
β”‚   └── ui/                     # UI Assets and Templates
β”‚       └── static/
β”‚           β”œβ”€β”€ index.html      # Main Landing and Dashboard Portal
β”‚           β”œβ”€β”€ style.css       # Custom Glassmorphic layout styles
β”‚           β”œβ”€β”€ app.js          # Client-side map/chart query script
β”‚           └── app_assets/     # Pre-rendered static images and maps
└── data/
    β”œβ”€β”€ gallery/                # Image tiles shown in search results
    └── processed/              # Pre-extracted FAISS embeddings and metadata
```