How prince-git-hub-360/depression-detection works
This proof-of-concept collects a user’s text, voice, and face data, derives sentiment, audio features, and facial emotion, then combines them into a rule-based depression score and status. It appends results to a CSV and displays recent history and scores in Streamlit. A separate script trains and evaluates a random-forest regressor from the log. The main workflow is implemented in one file, so its stages share a source path; the graph reflects operations visible in the excerpts, not separate modules.
Main entry points: depression.py Fusion score · PHQ.py Log model evaluation
Components 13
User assessment
- Text input
depression.py - Voice recording
depression.py - Face capture
depression.py
Modality analysis
- Text sentiment
depression.py - Voice features
depression.py - Facial emotion
depression.py
Scoring and history
- Fusion score
depression.py - Depression log CSV
depression.py - Streamlit history
depression.py
Log evaluation
- Log model evaluation
PHQ.py
Other components
- User
- DistilBERT classifier
- DeepFace
Connections 14
- User → Text input: enters text
depression.py - User → Voice recording: provides voice
depression.py - User → Face capture: faces camera
depression.py - Text input → Text sentiment: validates and classifies
depression.py - Text sentiment → DistilBERT classifier: uses pipeline
depression.py - Voice recording → Voice features: extracts features
depression.py - Face capture → Facial emotion: analyzes image
depression.py - Facial emotion → DeepFace: uses analyzer
depression.py - Text sentiment → Fusion score: contributes labels
depression.py - Voice features → Fusion score: contributes pitch and energy
depression.py - Facial emotion → Fusion score: contributes emotion
depression.py - Fusion score → Depression log CSV: appends result
depression.py - Depression log CSV → Streamlit history: loads history
depression.py - Depression log CSV → Log model evaluation: loads training data
PHQ.py