Depression Prediction App is a cross-platform Flutter application that estimates an individual's depression risk score using an offline Machine Learning model.
The app collects lifestyle, academic, and psychological inputs and performs on-device inference using TensorFlow Lite, ensuring privacy, speed, and zero internet dependency.
If you have concerns about mental health, please consult a qualified professional.
- Clean and structured UI for collecting:
- Personal details
- Academic & work pressure
- Lifestyle habits
- Mental health indicators
- Slider-based and dropdown-based inputs for usability
- Fully on-device inference
- No API calls, no cloud processing
- Instant risk score output
- Model runs entirely offline
- Outputs a probability score (0β100%)
- Visual risk classification:
- π’ Low Risk
- π Moderate Risk
- π΄ High Risk
- Clear disclaimer shown with every prediction
- Stores past predictions locally
- Users can review:
- Risk score
- Risk level
- Timestamp
- Data stored using a local database (SQLite)
- Dedicated Progress Chart screen
- Visualizes depression risk trends over time
- Helps users observe changes and patterns
- Supports both Dark Mode and Light Mode
- Theme toggle available directly from the AppBar
- Theme changes applied instantly
- Works fully offline
- No data transmission
- No account or login required
- All predictions and history remain on the device
- Logistic Regression (Calibrated)
- Outputs a well-calibrated probability score
- scikit-learn β training & evaluation
- Isotonic Calibration β probability reliability
- TensorFlow / TensorFlow Lite β mobile inference
- Feature scaling using StandardScaler
- Model evaluated using ROC-AUC
- Final model exported to TensorFlow Lite
- Scaler parameters (
mean,scale) exported separately
- Mental health survey dataset
- ~27,000+ records
- Mixed numerical & categorical features
1. Gender
2. Age
3. Academic Pressure
4. CGPA
5. Study Satisfaction
6. Sleep Duration
7. Dietary Habits
8. Suicidal Thoughts
9. Work / Study Hours
10. Financial Stress
11. Family History of Mental Illness
User Input (Flutter UI)
β
Ordered Feature Vector (11 values)
β
StandardScaler (mean & scale)
β
TensorFlow Lite Logistic Regression
β
Sigmoid Probability Output
β
Risk Level Classification
β
Local Database Storage
- Flutter (Dart)
- scikit-learn
- TensorFlow Lite
- TensorFlow
- SQLite (via Flutter DB helper)
tflite_fluttersqflitepath_provider
- Android Studio
- VS Code
- Google Colab
- Flutter SDK
- Clone this repository:
git clone https://github.com/Kalana-S/Depression-Prediction-App.git cd Depression-Prediction-App - Get all dependencies:
flutter pub get
- Run the app:
flutter run
- (Optional) Build a release APK:
flutter build apk --release
Full app workflow β UI β Input β Offline Prediction β History β Progress Chart
Screen_Record.webm
- Open the app.
- Enter personal, academic, and lifestyle details.
- Tap Estimate Risk.
- View:
- Risk percentage
- Risk level (Low / Moderate / High)
- Check:
- History for past predictions
- Progress Chart for trends over time
- All predictions run offline.
- This app is for educational and research purposes only
- Not intended for clinical diagnosis
- Encourages awareness, not medical decision-making
Contributions are welcome!
If you have improvements or ideas, feel free to fork the repository and submit a pull request.
This project is open-source and available under the MIT License.
π‘ Built with Flutter, powered by offline AI using TensorFlow Lite.