How kanglesoham11-code/pccoe_hackathon works
Crop Stress Detection combines a geospatial preparation pipeline, a browser-based field viewer, and crop-photo stress investigation. The main field workflow loads grid and terrain data through the API, then lets users inspect cells and visualize satellite, NDVI, terrain, and stress layers. The crop workflow supports photo-based assessment and interactive diagnostic investigations through backend endpoints. The README documents raster-to-grid processing and its scientific caveat: measurements are observations, not diagnoses. Some pipeline and frontend integrations are represented from documentation or indexes because their source was not excerpted.
Main entry points: LandInspectionPage.tsx Land Inspection · ThreeCanvas.tsx 3D Field Canvas · server.py Application API · 03_download_sentinel.py Imagery Download
Components 29
Field and Crop UI
- App Router
frontend/src/App.tsx - Land Inspection
frontend/src/pages/LandInspectionPage.tsx - Crop Inspection
frontend/src/pages/CropInspectionPage.tsx - 3D Field Canvas
frontend/src/components/ThreeCanvas.tsx - Terrain Scene
frontend/src/three/TerrainScene.ts - Crop Renderer
frontend/src/three/CropRenderer.ts - Stress Layer
frontend/src/three/StressRiskLayer.ts - Grid Overlay
frontend/src/three/GridOverlay.ts - Cell Inspector
frontend/src/components/CellInspector.tsx - Layer Controls
frontend/src/components/LayerToggle.tsx - Field Information
frontend/src/components/InfoPanel.tsx - Stress Analysis
frontend/src/components/StressAnalysisPanel.tsx - Voice Recorder
frontend/src/utils/wavRecorder.ts
Application Services
- Application API
backend/server.py - Diagnostic Engine
backend/diagnostic_engine.py - Processed Grid Data
backend/server.py
Geospatial Pipeline
- Imagery Download
scripts/03_download_sentinel.py - NDVI Calculation
scripts/04_calculate_ndvi.py - Elevation Download
scripts/05_download_dem.py - Terrain Derivation
scripts/06_calculate_terrain.py - Grid Construction
scripts/07_create_grid.py - Stress Enrichment
scripts/10_intelligence_engine.py
Configuration and Access
- Pipeline Settings
config/settings.py - Copernicus OAuth
src/auth.py
Other components
- Farmer / Agronomist
- Groq API
- Sarvam Speech API
- Sentinel-2 Imagery
- Copernicus DEM
Connections 31
- Farmer / Agronomist → App Router: uses
- App Router → Application API: fetches grid and terrain
frontend/src/App.tsx - Application API → Processed Grid Data: reads processed data
backend/server.py - App Router → Land Inspection: routes to
frontend/src/App.tsx - App Router → Crop Inspection: routes to
frontend/src/App.tsx - Land Inspection → 3D Field Canvas: renders
frontend/src/pages/LandInspectionPage.tsx - Land Inspection → Cell Inspector: renders
frontend/src/pages/LandInspectionPage.tsx - Land Inspection → Layer Controls: renders
frontend/src/pages/LandInspectionPage.tsx - Land Inspection → Field Information: renders
frontend/src/pages/LandInspectionPage.tsx - Land Inspection → Stress Analysis: renders
frontend/src/pages/LandInspectionPage.tsx - 3D Field Canvas → Terrain Scene: creates
frontend/src/components/ThreeCanvas.tsx - 3D Field Canvas → Crop Renderer: uses
frontend/src/components/ThreeCanvas.tsx - 3D Field Canvas → Stress Layer: uses
frontend/src/components/ThreeCanvas.tsx - 3D Field Canvas → Grid Overlay: uses
frontend/src/components/ThreeCanvas.tsx - Crop Inspection → Voice Recorder: records audio
frontend/src/pages/CropInspectionPage.tsx - Crop Inspection → Application API: requests investigations
- Application API → Diagnostic Engine: starts investigations
backend/server.py - Diagnostic Engine → Groq API: requests language assistance
- Application API → Sarvam Speech API: sends speech requests
backend/server.py - Pipeline Settings → Copernicus OAuth: provides credentials
src/auth.py - Imagery Download → Copernicus OAuth: gets access token
scripts/03_download_sentinel.py - Imagery Download → Pipeline Settings: uses settings
scripts/03_download_sentinel.py - Imagery Download → Sentinel-2 Imagery: downloads imagery
- Elevation Download → Copernicus DEM: downloads elevation
- Imagery Download → NDVI Calculation: provides imagery
- NDVI Calculation → Terrain Derivation: provides raster basis
- Elevation Download → Terrain Derivation: provides elevation
- Terrain Derivation → Grid Construction: provides terrain measures
- NDVI Calculation → Grid Construction: defines grid template
- Grid Construction → Processed Grid Data: produces grid layers
- Grid Construction → Stress Enrichment: enriches grid