How dhyan2815/smokesignal-ai works
Main Components
a. Frontend Web UI (Streamlit)
• app.py
• assets/ (static images, UI assets)
b. Inference Engine & Business Logic
• utils/preprocess.py (image loading, resizing, normalization)
• utils/alerts.py (SMTP email alert logic)
• config.py (environment-based email credentials, threshold settings)
c. Model Artifact
• model/wildfire_detector_model.keras (pre-trained CNN)
d. External Services
• Gmail SMTP server (for sending email alerts)
e. (Optional) Training Pipeline
• notebooks/SmokeSignal-AI.ipynb
• data source: Kaggle Wildfire Dataset
• TensorFlow/Keras training components
Relationships and Data Flows
• User uploads satellite image via Streamlit UI → app.py
• app.py invokes preprocess module → outputs normalized tensor
• Inference Engine loads wildfire_detector_model.keras → outputs confidence score
• Decision Logic in app.py: if confidence ≥ threshold → call alerts module
• alerts.py reads credentials from config.py → connects to Gmail SMTP → sends formatted email
• UI displays result (confidence score, image, status) back to user
Architectural Patterns & Principles
• Separation of Concerns: UI layer vs. preprocessing vs. inference vs. alerting
• Config-as-Code: config.py reads environment variables—no secrets in code
• Modular Design: each utility (preprocess, alerts) lives in its own module
• Single-Process, Event-Driven Streamlit App: request → process → response