mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-23 09:16:36 +00:00
feat: stage8 — Global Place Recognition and Metric Refinement
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"""Global Place Recognition schemas (Component F08)."""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
import numpy as np
|
||||
from pydantic import BaseModel
|
||||
|
||||
from gps_denied.schemas.flight import GPSPoint
|
||||
from gps_denied.schemas.satellite import TileBounds
|
||||
|
||||
|
||||
class TileCandidate(BaseModel):
|
||||
"""A matched satellite tile candidate."""
|
||||
tile_id: str
|
||||
gps_center: GPSPoint
|
||||
bounds: TileBounds
|
||||
similarity_score: float
|
||||
rank: int
|
||||
spatial_score: Optional[float] = None
|
||||
|
||||
|
||||
class DatabaseMatch(BaseModel):
|
||||
"""Raw index match from Faiss queries."""
|
||||
index: int
|
||||
tile_id: str
|
||||
distance: float
|
||||
similarity_score: float
|
||||
|
||||
|
||||
class SatelliteTile(BaseModel):
|
||||
"""A stored satellite tile representation for indexing."""
|
||||
model_config = {"arbitrary_types_allowed": True}
|
||||
|
||||
tile_id: str
|
||||
image: np.ndarray
|
||||
gps_center: GPSPoint
|
||||
bounds: TileBounds
|
||||
descriptor: Optional[np.ndarray] = None
|
||||
Reference in New Issue
Block a user