Inspiration
Every minute, our planet loses tropical forest equivalent to 10 football fields. With the European Union Deforestation Regulation (EUDR, Regulation (EU) 2023/1115) coming into strict legal enforcement, global supply chains for cocoa, coffee, soy, palm oil, wood, and rubber face catastrophic non-compliance fines—up to 4% of corporate annual turnover—unless they can mathematically prove zero deforestation after the statutory cutoff date of December 31, 2020.
However, existing commercial monitoring tools suffer from a fatal flaw: tropical clouds. In biomes like the Amazon basin, the Congo basin, and Southeast Asia, persistent cloud cover and atmospheric haze blind standard optical satellites (like Landsat and Sentinel-2) for up to 70% of the year. Illegal loggers exploit these cloudy months to clear thousands of hectares undetected.
We were inspired to build GeoFM to eliminate this blind spot forever—combining microwave radar signals that penetrate any cloud cover with optical multispectral feeds into an autonomous, mathematically rigorous Foundation Model that provides all-weather monitoring and automated statutory legal compliance.
What It Does
GeoFM is an end-to-end multimodal geospatial AI system engineered for bitemporal change detection and statutory EUDR regulatory auditing:
- All-Weather Dual-Satellite Fusion: Ingests paired satellite acquisitions across two timestamps ($T_1$ baseline and $T_2$ observation). It combines Copernicus Sentinel-2 multispectral optical (10m–20m Surface Reflectance) with Sentinel-1 C-Band Synthetic Aperture Radar (SAR GRD) that sees through clouds, smoke, and nighttime darkness.
- Bitemporal Change Segmentation: Pinpoints exact forest canopy disruptions, selective logging roads, and clear-cuts with 78.97% Deforestation Recall, a 0.656 F1 score, and 0.488 IoU under severe real-world class imbalance.
- Statutory EUDR Compliance Engine: Takes farm parcel plot coordinates (GeoJSON polygons), verifies zero deforestation since the Dec 31, 2020 EUDR cutoff, calculates area-adjusted stratified error matrices with 95% Confidence Intervals according to international standards (Olofsson et al., 2014), and generates cryptographic compliance audit certificates with SHA-256 verification hashes.
- Real-Time Web Studio & Alerting: Features an interactive Leaflet map interface, sub-250ms CPU inference, and automated webhook triggers for instant alert dispatch to supply chain officers and forest rangers.
How We Built It
We engineered GeoFM from the ground up using PyTorch 2.0, modern Geospatial toolkits, and an end-to-end 7-stage architecture:
- Signal Normalization & Despeckling: Optical reflectance bands are normalized to $[0, 1]$, computing physical vegetation indices ($NDVI = \frac{NIR - Red}{NIR + Red}$, $EVI$, $NDWI$). Sentinel-1 dual-polarization SAR backscatter ($\gamma^0_{VV}$, $\gamma^0_{VH}$) is converted from linear intensity to decibels ($dB = 10 \cdot \log_{10}(I)$) and filtered with an adaptive Lee speckle filter to eliminate granular microwave noise.
- Siamese Feature Extraction: Bitemporal satellite feeds pass through parallel Siamese encoder towers with residual connections, capturing hierarchical multi-scale spatial representations.
- Vision Transformer (ViT) & Cross-Modal Attention: A spatial Vision Transformer bottleneck models long-range pixel relationships across the landscape. Multimodal optical and radar features are merged via bidirectional cross-attention with an adaptive cloud gating mechanism—when optical data is obscured by clouds (detected via blue-band saturation and NIR-SWIR shadow tests), the model dynamically shifts its attention weight to the SAR radar stream: $$\text{Fused} = \sigma(\mathbf{W}g \cdot \mathbf{x}{SAR}) \odot \mathbf{x}{SAR} + (1 - \sigma(\mathbf{W}_g \cdot \mathbf{x}{SAR})) \odot \mathbf{x}_{opt}$$
- Parameter-Efficient Fine-Tuning (PEFT / LoRA): To rapidly adapt to diverse global biomes without catastrophic forgetting, we integrated Low-Rank Adaptation ($r=8, \alpha=16$) into the query and value projection matrices of the ViT self-attention layers: $$\mathbf{W}' = \mathbf{W}_0 + \frac{\alpha}{r} \mathbf{B} \mathbf{A}$$ This freezes 99% of base model weights while fine-tuning in minutes on local biome variations.
- Custom Loss Function: Trained with a compound Focal Tversky Loss ($\alpha=0.7, \beta=0.3, \gamma=4/3$) to conquer the 100:1 background-to-deforestation class imbalance.
- Production Stack: FastAPI backend, Rasterio/GeoPandas for STAC polygon geospatial operations, Docker containerization, Leaflet interactive mapping, and a full suite of 87 unit and integration tests achieving 100% pass across all stages.
Challenges We Ran Into
- Extreme Class Imbalance: In tropical monitoring, genuine deforestation accounts for less than 1% of total pixel volume in any given satellite tile. Standard cross-entropy and DICE loss models collapsed to predicting pure non-forest background. Tuning the Focal Tversky formulation with high penalization on false negatives was crucial to achieving 78.97% recall.
- SAR Speckle vs. Physical Forest Loss: Radar backscatter exhibits intrinsic multiplicative speckle noise that resembles canopy disturbance. We implemented custom vectorized Lee local-window filters and ratio-temporal difference layers ($\frac{VH_{T2}}{VH_{T1}}$) to separate real structural canopy collapse from random surface roughness noise.
- Multi-Sensor Alignment & Scale Differences: Sentinel-1 SAR GRD and Sentinel-2 optical data have distinct coordinate reference systems, pixel spacings, and orbit geometries. Building an automated reprojection and bilinear resampling pipeline that preserved physical radiometric values without blurring boundaries was an intense engineering hurdle.
- Edge & CPU Optimization: Hackathon and production deployments often lack expensive multi-GPU clusters. We quantized the attention weights and stripped non-essential tensor ops to bring CPU inference time down to under 250 milliseconds per patch.
Accomplishments That We're Proud Of
- 78.97% Real-World Deforestation Recall: Verified on fully trained 30-epoch weights across challenging tropical test sets.
- 100% Test Pipeline Pass: Engineered 87 comprehensive tests covering the synthetic data generator, model architecture, LoRA adaptation, EUDR validator, and end-to-end inference pipeline.
- True All-Weather Resilience: Successfully demonstrated reliable canopy change detection under synthetic 80%+ simulated cloud cover where optical-only baselines failed completely.
- Rigorous Statutory Compliance: Rather than just outputting a heatmap, GeoFM generates legally binding EUDR audit reports with area-adjusted stratified error matrices and 95% Confidence Intervals according to the Olofsson et al. (2014) standard.
What We Learned
- The incredible complementary nature of microwave radar and optical remote sensing: optical gives spectral chemistry (chlorophyll, moisture), while SAR gives 3D physical structure (trunks, branches, biomass volume).
- How to adapt modern NLP/LLM fine-tuning techniques (LoRA PEFT) directly to geospatial foundation models to make them drastically cheaper and faster to customize.
- The intricate regulatory nuances of the EUDR directive and how technical AI metrics must translate directly into statutory legal certificates to deliver real economic value to agricultural cooperatives and trade partners.
What's Next for GeoFM
- Global Biome Expansion: Expanding our fine-tuned LoRA adapters to temperate boreal forests and mangrove ecosystems in Central and Southeast Asia.
- Direct Supply Chain ERP Integration: Connecting GeoFM webhooks directly into enterprise supply chain systems (SAP, Oracle, Trase) to automate shipment clearance in real time.
- Autonomous Drone & Mobile Edge Feed: Deploying lightweight quantized GeoFM weights to handheld devices and edge drones for indigenous forest rangers to verify deforestation alerts on the ground in real time.
Built With
- jupyter-notebook
- python