How jdavidmb/emotionai works
Project Type and Purpose
• EmotionsAI is a machine-learning/deep-learning pipeline implemented entirely in Jupyter notebooks for early detection of mental-health issues via facial-expression classification.
• It covers data ingestion, preprocessing, three families of models (supervised ML, deep neural nets, unsupervised clustering), evaluation, and inference.
High-Level File Structure Analysis
• Carga de datos.ipynb → Data ingestion & preprocessing
• Entrenamiento_de_modelos.ipynb → Training supervised ML & deep-learning models
• NonsupervisedLearning.ipynb → Training and analysis of clustering algorithms
• Funcionamiento.ipynb → Inference and demonstration of model outputs
• README.md → Project overview, dataset link, model list, external references
Key Components
a. Data Source
• Kaggle FER dataset (48×48 grayscale faces)
• Storage: Local filesystem or mounted data directory
b. Data Ingestion & Preprocessing
• Notebook “Carga de datos.ipynb”
• Steps: load images → normalize pixel values → split train/test sets → possible data augmentation
c. Feature Extraction
• (If explicit) flatten images or extract handcrafted features (e.g., HOG, LBP)
d. Model Training
• Supervised ML block
• Gaussian Naive Bayes
• Decision Tree
• Random Forest
• Deep Learning block
• Custom neural network architecture (layers, activations)
• Unsupervised Learning block
• K-Means
• Agglomerative Clustering
e. Model Evaluation
• Metrics: accuracy, confusion matrix, precision/recall for each emotion class
• Visualization: charts generated in notebooks
f. Inference / Deployment (Notebook “Funcionamiento.ipynb”)
• Input: new face images or webcam snapshots
• Output: predicted emotion label, probability scores, plotted results
g. Auxiliary Components
• Jupyter environment and kernel dependencies (Python, NumPy, scikit-learn, TensorFlow/Keras, Matplotlib)
• External links for user reference (video demo, presentation)
Architectural Patterns and Design Principles
• Modular pipeline: each notebook corresponds to a pipeline stage
• Separation of concerns: ingestion, training (split by paradigm), evaluation, inference
• Reproducibility: fixed dataset split, notebook-driven code
• Extensibility: new algorithms can plug into the training block
Detailed Elements
• Component rectangles: Data Source, Preprocessor, Feature Extractor, Model Trainers (three sub-blocks), Evaluator, Inference Engine
• Notes on dataset link and environment dependencies