DEV Community

Aritro Bag
Aritro Bag

Posted on

I Trained an Open Tabular AI to Catch the 72-Hour Fall Foliage Peak (So You Can Keep Your Phone in Your Backpack)

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

Every autumn, millions of outdoor enthusiasts scramble to catch peak fall foliage. It is one of the most breathtaking natural spectacles on earth—and one of the most frustrating to time. The window of true peak vibrancy lasts roughly 72 hours before cold rains and wind strip the canopy bare.

To catch it, hikers currently face two bad options:

  1. Coarse, paywalled tourism maps: Coarse statewide county-level blobs sponsored by regional hotel boards that completely ignore elevation, microclimate valleys, and specific tree canopy species.
  2. Screen-addicted trail apps: Outdoor apps that demand you keep staring at a glass rectangle on the trail, buzzing with notifications, draining battery in cold weather, and demanding constant GPS screen time.

I built Wander: an open phenology forecaster and zero-screen trail companion.

Wander is designed around a radical Zero-Screen Philosophy:

  • < 30 seconds on screen: Open the web app, let the tabular foundation model calculate the exact 72-hour peak color window calibrated to trail elevation and canopy mix.
  • At the trailhead: Listen to a 45-second natural audio briefing outlining terrain, weather conditions, and tree species to look out for.
  • On the trail: Carry a 1-page printable pocket field card folded into your shirt pocket. Your phone stays zipped away inside your backpack.

The best technology for the outdoors is the one that gets out of the way.


Demo


Code

Wander 🥾

Open Phenology, Fall Peak Foliage Forecaster & Zero-Screen Trail Companion

Hacktoberfest 2026 License: MIT FastAPI TabPFN Tiger Data Temporal ElevenLabs

Built for the DEV Hacktoberfest 2026 Challenge: Week 1 — Touch Grass (#hf26challenge)
"The best builds here should make the screen the shortest part of the experience."


💡 The Problem & The Zero-Screen Solution

Every autumn, millions of hikers scramble to catch the elusive 72-hour peak foliage window. Existing solutions are either:

  • Coarse, paywalled tourism statewide maps that lack elevation accuracy.
  • Clunky smartphone apps that require constant screen checking on the trail, ruining the immersion of nature.

Wander is built on a radical Zero-Screen Philosophy:

  1. < 30 seconds on screen: TabPFN computes the exact 72-hour peak window from micro-weather physics, elevation, and canopy species.
  2. At the trailhead: Listen to a 45-second ElevenLabs audio briefing outlining terrain, weather, and key species.
  3. On the trail: Carry a 1-page printable pocket field card. Your phone stays…

The Biophysical Phenology Engine

Plant phenology (the timing of cyclical biological events like autumn leaf senescence) isn't a text generation problem. It is an environmental physics problem governed by thermal chill hours, solar photoperiod shortening, elevation lapse rates, and drought stress.

Rather than asking an LLM to guess dates, Wander couples TabPFN (Prior Labs) with calibrated bioclimatic formulas derived from U.S. Forest Service and NOAA meteorological datasets:

# backend/app/services/phenology_model.py:107
# Base day of peak for baseline temperate hardwood forest calibrated to mid-October
base_peak_doy = 285.0

# Hopkin's Bioclimatic Law: ~0.8 days shift per degree north, ~0.9 days per 500m elevation
lat_shift = (latitude - 42.0) * 0.8
elev_shift = ((elevation_m - 500.0) / 500.0) * 0.9

# Species thermal sensitivity offset (Aspen vs Sugar Maple vs Red Oak vs Larch)
species_offset = (
    (canopy.quaking_aspen_pct * -1.0) +
    (canopy.alpine_larch_pct * -2.0) +
    (canopy.sugar_maple_pct * 0.0) +
    (canopy.paper_birch_pct * -0.5) +
    (canopy.red_oak_pct * 2.0) +
    (canopy.american_beech_pct * 1.5)
) / total_canopy_weight

# Chill hours acceleration threshold (~350 hours cumulative below 7°C)
chill_hours_norm = weather.chill_hours_cumulative / 350.0
chill_factor_shift = (chill_hours_norm - 1.0) * 1.5

target_peak_doy = base_peak_doy - lat_shift - elev_shift + species_offset - drought_shift - chill_factor_shift
Enter fullscreen mode Exit fullscreen mode

As the peak approaches, chlorophyll $a/b$ decays along a Gompertz sigmoid curve while anthocyanin (fiery reds and purples) and carotenoid pigments peak:

# backend/app/services/phenology_model.py:163
# Chlorophyll & Anthocyanin decay curves
if foliage_pct <= 100.0:
    chlorophyll_pct = round(max(5.0, 100.0 - (foliage_pct * 0.95)), 1)
    anthocyanin_pct = round(min(98.0, (foliage_pct / 100.0) ** 1.6 * 95.0), 1)
else:
    chlorophyll_pct = round(max(0.0, 5.0 - (foliage_pct - 100.0) * 0.4), 1)
    anthocyanin_pct = round(max(20.0, 95.0 - (foliage_pct - 100.0) * 3.5), 1)
Enter fullscreen mode Exit fullscreen mode

How I Built It

Architecture Overview

graph TD
    subgraph Client ["Zero-Screen Client Tier (React 18 + Vite + Tailwind)"]
        UI["Trail Explorer & Peak Timeline (<30s Screen Time)"]
        PrintCard["1-Page Printable Pocket Field Guide"]
        AudioPlayer["Trailhead Audio Player"]
    end

    subgraph BackendGateway ["Backend API (FastAPI on Render)"]
        Router["REST & Hybrid Search Endpoints"]
        CardEngine["Naismith Rule Pocket Card Generator"]
        ElevenLabsService["ElevenLabs Natural Voice Briefing Engine"]
        TabPFNEngine["TabPFN Tabular Regressor Engine"]
        TigerClient["Tiger Data Vector Store Client"]
    end

    subgraph Storage ["Database & Vector Store"]
        TigerDB[("Tiger Data: PostgreSQL + pgvector")]
        TrainingData[("USFS & NOAA Phenology Ground Truth")]
    end

    subgraph DurableOrchestration ["Durable Orchestration (Temporal)"]
        SyncWorkflow["FoliageSyncWorkflow"]
        WeatherAct["fetch_micro_weather_activity"]
        TabPFNAct["batch_tabpfn_inference_activity"]
        DbSyncAct["sync_tiger_db_activity"]
    end

    UI --> Router
    PrintCard --> CardEngine
    AudioPlayer --> ElevenLabsService

    Router --> TabPFNEngine
    Router --> TigerClient
    Router --> ElevenLabsService
    Router --> CardEngine

    TabPFNEngine --> TrainingData
    TigerClient --> TigerDB

    SyncWorkflow --> WeatherAct
    WeatherAct --> TabPFNAct
    TabPFNAct --> TabPFNEngine
    TabPFNAct --> DbSyncAct
    DbSyncAct --> TigerDB

The stack is FastAPI, TabPFN, Tiger Data (PostgreSQL + pgvector), Temporal, ElevenLabs, and React 18.

  1. TabPFN (Prior Labs) Tabular Regressor: Traditional gradient boosted trees (XGBoost/LightGBM) overfit severely on small seasonal datasets without tedious hyperparameter tuning. TabPFN acts as a foundation model for tabular data, running Bayesian neural inference over 11 micro-features (elevation_m, latitude, day_of_year, chill_hours_cumulative, solar_radiation_mj, drought_stress_index, and 5 canopy percentage features) in milliseconds with zero hyperparameter tuning.
  2. Tiger Data (PostgreSQL + pgvector): Stores trail metadata, elevation profiles, and vector embeddings of forest canopy descriptions. Hikers can run natural language semantic queries (e.g., "golden aspens reflection in high alpine lake"), combining cosine similarity with relational filters (elevation > 2500m).
  3. Temporal Durable Workflows: Cold fronts and sudden temperature drops shift foliage timelines overnight. A Temporal FoliageSyncWorkflow runs background synchronization: polling NOAA weather stations, recomputing TabPFN predictions in batch with automated retry backoffs, and atomically synchronizing updated peak dates to Tiger Data.
  4. ElevenLabs Audio Briefings: Generates a concise 45-second pre-trail briefing at the trailhead with natural, human cadence (using Brian/Adam nature guide voices) so hikers don't have to read their phones in bright sunlight.
  5. 1-Page Printable Pocket Card Engine: Uses Naismith's Rule to calculate estimated hiking time based on ascent and distance, laying out key elevation checkpoints and canopy identification notes onto an origami-foldable field sheet.

Why Does Open Innovation Matter?

This project exists because open science and open-weight tabular AI make decentralized tools viable without relying on closed APIs or corporate walled gardens:

  1. Verifiable Ecological Physics vs. Black-Box Tourism: Closed commercial foliage maps are opaque marketing assets meant to boost hotel bookings. By building on open USFS/NOAA citizen science data and TabPFN, anyone can inspect the biophysical equations governing chill hours and elevation shifts.
  2. Backcountry Privacy (Zero Telemetry): Commercial hiking and fitness trackers routinely upload hiker location history and trails to remote ad trackers. Wander's zero-screen philosophy ensures that your hike stays completely unmonitored: check the model, print the card, and leave no digital footprint on the mountain.
  3. Zero-Cost Inference Without Token Billing: Foundation tabular models like TabPFN run in-memory inference without recurring per-query LLM token costs. Outdoor tools can be hosted affordably by small trail associations and community conservancies.

Prize Categories

  • Best Use of TabPFN (Featured): TabPFN is the core intelligence engine of Wander, performing tabular regression over 11 bioclimatic features to predict chlorophyll breakdown %, peak color window (72h), and days-to-peak without overfitting.
  • Best Use of Render (Featured): Wander's full stack is configured and hosted on Render via Infrastructure-as-Code (render.yaml), powering the FastAPI Web Service backend and Vite/React Static Site.
  • Best Use of Tiger Data: Uses Tiger Data (PostgreSQL + pgvector) to index trail geospatial data and run natural language semantic vector search over forest canopy compositions.
  • Best Use of Temporal: Implements a durable FoliageSyncWorkflow with retry policies to orchestrate periodic micro-weather updates, batch TabPFN model recalculations, and database syncs.
  • Best Use of ElevenLabs: Generates 45-second natural audio pre-trail briefings to deliver key elevation, weather, and species details hands-free at the trailhead.
  • Best Use of Entire: The complete interactive agent session documenting the design, implementation, and deployment iterations is embedded directly in this submission.

Top comments (0)