mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 22:46:36 +00:00
@@ -205,18 +205,19 @@ List[TileCandidate] # Re-ranked list
|
||||
|
||||
### `initialize_database(satellite_tiles: List[SatelliteTile]) -> bool`
|
||||
|
||||
**Description**: Initializes satellite descriptor database during system startup.
|
||||
**Description**: Loads pre-built satellite descriptor database. **Note**: Semantic index building (DINOv2 descriptors) is performed by the satellite provider service, not during system startup.
|
||||
|
||||
**Called By**:
|
||||
- F02 Flight Manager (during system initialization)
|
||||
- F02 Flight Processor (during system initialization)
|
||||
|
||||
**Input**:
|
||||
```python
|
||||
List[SatelliteTile]:
|
||||
tile_id: str
|
||||
image: np.ndarray
|
||||
image: np.ndarray # Optional - only if building index locally
|
||||
gps_center: GPSPoint
|
||||
bounds: TileBounds
|
||||
descriptor: Optional[np.ndarray] # Pre-computed descriptor from provider
|
||||
```
|
||||
|
||||
**Output**:
|
||||
@@ -225,19 +226,31 @@ bool: True if database initialized successfully
|
||||
```
|
||||
|
||||
**Processing Flow**:
|
||||
1. For each satellite tile:
|
||||
- compute_location_descriptor(tile.image) → descriptor
|
||||
- Store descriptor with tile metadata
|
||||
2. Build Faiss index using H04 Faiss Index Manager
|
||||
3. Persist index to disk for fast startup
|
||||
1. **Load pre-built index**: Satellite provider provides pre-computed DINOv2 descriptors
|
||||
2. If descriptors provided:
|
||||
- Load descriptors directly
|
||||
- Build Faiss index using H04 Faiss Index Manager
|
||||
3. If descriptors not provided (fallback):
|
||||
- For each satellite tile:
|
||||
- compute_location_descriptor(tile.image) → descriptor
|
||||
- Store descriptor with tile metadata
|
||||
- Build Faiss index
|
||||
4. Persist index to disk for fast startup
|
||||
|
||||
**Satellite Provider Integration**:
|
||||
- **Primary**: Satellite provider builds semantic index offline
|
||||
- Provider exposes index via API or file download
|
||||
- F08 loads pre-built index at startup
|
||||
- **Fallback**: F08 can build index locally if provider doesn't supply it
|
||||
|
||||
**Performance**:
|
||||
- Initialization time: ~10-30 minutes for 10,000 tiles (one-time cost)
|
||||
- Can be done offline and loaded at startup
|
||||
- **Load pre-built index**: <10 seconds (fast startup)
|
||||
- **Build index locally**: ~10-30 minutes for 10,000 tiles (fallback only)
|
||||
|
||||
**Test Cases**:
|
||||
1. **Initialize with 1000 tiles**: Completes successfully
|
||||
2. **Load pre-built index**: Fast startup (<10s)
|
||||
1. **Load pre-built index**: Completes successfully, fast startup
|
||||
2. **Fallback local building**: Builds index if provider doesn't supply it
|
||||
3. **Index query**: Works correctly after loading
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user