How koradajnaneswara-tech/stress-detector works
MindGuard estimates stress from video, audio, and keyboard/mouse signals, falling back through three modality tiers. Its main workflow is sensor feature extraction, tiered score fusion, local explanation/intervention generation, and presentation with session history. It has two front ends: the documented browser dashboard served by FastAPI and an alternative Streamlit app. SQLite persistence and an accuracy benchmark are additional capabilities. Some storage and dashboard wiring is unsampled, so those relationships are shown only where the excerpts, README, or source index support them.
Main entry points: server.py FastAPI service · fusion_module.py Tiered stress fusion · app.py Streamlit interface · llm_module.py Local explanations
Components 13
Signal extraction
- Video features
video_module.py - Audio features
audio_module.py - Behavioral features
behavioral_module.py - Browser signal bridge
server.py
Scoring and insights
- Tiered stress fusion
fusion_module.py - Local explanations
llm_module.py
Interfaces and history
- FastAPI service
server.py - Browser dashboard
dashboard.html - Streamlit interface
app.py - Session history
storage_module.py
Evaluation
- Accuracy benchmark
evaluate_accuracy.py
Other components
- User
- Ollama phi3:mini
Connections 18
- User → Streamlit interface: uses
README.md - User → Browser dashboard: uses
README.md - Video features → Tiered stress fusion: provides features
app.py - Audio features → Tiered stress fusion: provides features
app.py - Behavioral features → Tiered stress fusion: provides features
app.py - Tiered stress fusion → Streamlit interface: returns state
app.py - Streamlit interface → Session history: reads history
app.py - Streamlit interface → Local explanations: gets insights
app.py - User → FastAPI service: syncs signals
server.py - FastAPI service → Browser signal bridge: updates features
server.py - Browser signal bridge → Tiered stress fusion: provides features
server.py - Behavioral features → FastAPI service: provides features
server.py - FastAPI service → Tiered stress fusion: requests state
server.py - FastAPI service → Session history: records history
server.py - FastAPI service → Local explanations: requests insight
server.py - Local explanations → Ollama phi3:mini: calls locally
llm_module.py - FastAPI service → Accuracy benchmark: runs benchmark
server.py - Browser dashboard → FastAPI service: communicates with