Inspiration
In May 2024, the strongest geomagnetic storm in 20 years — a G5 event — sent auroras as far south as Florida and triggered power grid warnings across Europe and North America. Cities reported sudden blackouts and infrastructure disruptions. It was a wake-up call: solar weather is not an abstract astronomical curiosity. It is a real threat to the systems modern civilization depends on.
The problem is that solar flares travel at the speed of light — we get, at best, 8 minutes of warning from the flash itself, and 17–72 hours from the slower coronal mass ejection that follows. That window is everything. SunFlux AI was built to maximize it — predicting flares before they erupt, and using Amazon Nova Lite to make those predictions understandable and actionable for the people who need them most.
What It Does
SunFlux AI is a full-stack space weather intelligence platform:
- Flare Prediction: A PyTorch CNN analyzes active regions and outputs flare probability, peak X-ray flux, and flare class (A/B/C/M/X)
- 3D Solar Visualization: Real-time Three.js render of the sun with Grad-CAM attention overlays showing which solar surface regions the model focused on
- AI Assistant powered by Amazon Nova Lite: Receives live prediction context and translates model outputs into actionable intelligence for grid operators and satellite teams
- Geomagnetic Impact Map: Google Maps satellite view showing aurora oval zones, HF radio blackout bands, and power grid risk regions
- Graceful Fallback: If Nova Lite limits are reached, automatically falls back to Llama 3.3 via Groq
How We Built It
ML Pipeline
- Dataset: NASA SDO/HMI solar magnetogram imagery across 171Å, 193Å, 211Å channels
- Preprocessing: OpenCV pipeline with grayscale conversion, CLAHE contrast enhancement, Min-Max normalization
- Model: Custom PyTorch CNN achieving ~99% validation accuracy after 10 epochs
- Regression head predicts log₁₀ peak X-ray flux; classification head outputs flare probability
Backend
- FastAPI serving model inference, Grad-CAM attention regions, and chat endpoints
- Amazon Nova Lite via AWS Bedrock as the primary reasoning layer
- Groq (Llama 3.3 70B) as automatic fallback
Frontend
- Next.js + TypeScript dashboard with shadcn/ui
- Three.js with custom GLSL shaders — texture baked from Blender since procedural shader nodes don't export to GLB
- Google Maps JavaScript API for geomagnetic impact visualization
Nova Lite Integration The chatbot automatically injects the current active region, flare probability, and flare class as context into every Nova Lite request — so responses interpret the specific prediction on screen, not generic space weather facts.
Challenges
- Blender to Three.js texture pipeline: The sun model used procedural Musgrave/Noise shader nodes that don't export to GLB. Solved by baking emission to a 4K PNG and writing a custom GLSL fragment shader with UV seam blending
- Nova Lite rate limits: Designed a transparent fallback chain so the demo never breaks regardless of API quota
- Grad-CAM on multi-channel input: Adapting gradient-weighted class activation mapping to 3-channel magnetogram inputs required careful layer targeting
- Context injection: Making Nova Lite responses feel grounded in actual prediction data required careful prompt engineering with live dashboard state
Accomplishments
- End-to-end pipeline from raw solar imagery to natural language impact assessment
- CNN achieving ~99% validation accuracy on solar flare classification
- Nova Lite integration that genuinely augments ML output rather than just wrapping it in a chatbox
- 3D interactive sun with real baked solar texture and physically accurate limb darkening
- Geomagnetic impact zones derived dynamically from model output
What We Learned
- Amazon Nova Lite excels at translating domain-specific technical outputs into accessible, context-aware language — the key is injecting structured context rather than asking open-ended questions
- Procedural 3D materials require baking for web deployment — a non-obvious but critical pipeline step
- Solar flare prediction has severe class imbalance between quiet and active periods requiring careful dataset curation
What's Next
- Integrate real-time GOES X-ray flux data via NOAA API for live monitoring
- Temporal modelling with LSTM or transformer layers to capture active region evolution
- Explore Nova Lite for automated daily space weather briefings delivered to subscribed operators
- Deploy as a public early-warning service with email/SMS alerts for high-probability flare events
Log in or sign up for Devpost to join the conversation.