Depression is among the most common mental health disorders across the world. Early diagnosis plays a crucial role in timely intervention. Traditional approaches are time consuming, costly and not easily accessible in those regions that are low in resource availability. In recent days automatic depression detection is gaining attention. However, many existing frameworks struggle to handle the facial images captured under uneven illumination. This research proposes a framework that integrates Otsu thresholding for normalization of adaptive illumination and Local Binary Patterns (LBP) for robust feature extraction. A two-stage automated architecture is designed to recognize and grade the severity of depression using facial images. In the first stage, a Random Forest Classifier distinguishes between depressed and undepressed images and there by follows the second stage classifier that classifies the depressed images as mild, moderate or severe level based on the texture features extracted using local binary patterns. The model is trained and evaluated on a facial image dataset, achieving 62.7% accuracy for binary classification and 54.2% for severity classification. The framework is implemented in a Django-based web platform, supporting image upload and real-time prediction, provides a scalable and non-invasive tool for initial mental health screening.
Introduction
Depression is highlighted as a major global mental health issue that affects people of all ages and significantly reduces quality of life and productivity. Traditional diagnosis relies on interviews and questionnaires, which are subjective, time-consuming, and often unavailable in low-resource settings. Because of these limitations, there is growing interest in automated approaches for early detection using Computer Vision and Machine Learning.
Recent research has explored deep learning models that analyze facial expressions and temporal changes to estimate depression levels. Some approaches use deep neural networks to capture facial appearance and motion, while others use distribution-based learning or physiological signals like Remote Photoplethysmography (rPPG). Hybrid systems combining fuzzy logic and deep learning have also been proposed. However, these methods often require large datasets, high computational power, and are sensitive to lighting variations.
To address these challenges, the proposed work focuses on a lightweight approach using facial texture analysis. It combines Otsu thresholding and Local Binary Patterns (LBP). Otsu thresholding is used to reduce illumination effects and improve image consistency, while LBP extracts local texture features from facial regions. For classification, a two-stage model is used: a Random Forest classifier first distinguishes between depressed and non-depressed images, and then further categorizes depression severity into mild, moderate, and severe.
The dataset consists of labeled facial images divided into training and testing sets, including variations in expression, lighting, and quality. Preprocessing includes face detection, resizing, and illumination normalization using Otsu thresholding before feature extraction.
Conclusion
This study presented a framework for detecting depression and assessing its severity using facial image analysis. The proposed system combines image preprocessing, texture-based feature extraction, and machine learning classification to identify patterns that may indicate depressive symptoms. Otsu thresholding was applied during the preprocessing stage to reduce the effect of uneven illumination in facial images. This step helped improve the visibility of facial features and made the images more suitable for analysis. After preprocessing, Local Binary Patterns were used to extract texture features from facial regions. These features were then provided as input to a Random Forest classifier.
The classification process was carried out in two stages. In the first stage, the system distinguished between depressed and non-depressed facial images. In the second stage, the images identified as depressed were further classified into different severity levels, including mild, moderate, and severe. Experimental results showed that the proposed approach can detect depression-related patterns from facial images with reasonable performance. The system achieved an accuracy of approximately 63% in the binary classification stage and 57% in the severity classification stage. Although the results are not perfect, they demonstrate the potential of using texture-based image features for preliminary depression assessment.
Compared with many existing approaches that rely heavily on deep learning architectures, the proposed method offers a relatively simple and computationally efficient alternative. The combination of illumination normalization and LBP feature extraction helps improve the robustness of the system when dealing with images captured under different lighting conditions. In addition, the use of a Random Forest classifier provides stable performance while maintaining moderate computational requirements. Despite these contributions, several limitations remain. Facial expressions alone may not fully represent the emotional state of an individual, and subtle differences between severity levels can make classification challenging. In some cases, lighting variations and image quality may still influence the extracted features. These factors can affect the overall classification performance of the system.
Future work can focus on improving the performance and robustness of the proposed framework. One possible direction is to use larger and more diverse datasets to allow the model to learn a wider range of facial patterns associated with depression. The integration of additional features such as facial landmarks, temporal facial dynamics, or physiological signals could also improve classification accuracy. Furthermore, combining texture-based methods with deep learning models may help capture more complex facial patterns. Such improvements could lead to more reliable automated systems that support early mental health screening and assist professionals in the assessment of depression.
References
[1] Y. Zhu, Y. Shang, Z. Shao, and G. Guo, “Automated depression diagnosis based on deep networks to encode facial appearance and dynamics,” IEEE Transactions on Affective Computing, vol. 9, no. 4, pp. 578–584, Oct.–Dec. 2018.
[2] W. C. de Melo, E. Granger, and A. Hadid, “Depression detection based on deep distribution learning,” in Proc. IEEE Int. Conf. Image Processing (ICIP), Taipei, Taiwan, 2019, pp. 4544–4548.
[3] C. Á. Casado, M. L. Cañellas, and M. B. López, “Depression recognition using remote photoplethysmography from facial videos,” IEEE Transactions on Affective Computing, vol. 14, no. 4, pp. 3305–3316, Oct.–Dec. 2023.
[4] A. S. Rajawat, P. Bedi, S. B. Goyal, P. Bhaladhare, A. Aggarwal, and R. S. Singhal, “Fusion fuzzy logic and deep learning for depression detection using facial expressions,” Procedia Computer Science, vol. 218, pp. 2795–2805, 2023.
[5] A. Pampouchidou, K. Marias, M. Tsiknakis, P. Simos, F. Yang, and F. Meriaudeau, “Designing a framework for assisting depression severity assessment from facial image analysis,” in Proc. IEEE Int. Conf. Signal and Image Processing Applications (ICSIPA), Kuala Lumpur, Malaysia, 2015, pp. 578–583.
[6] T. Ojala, M. Pietikäinen, and T. Mäenpää, “Multiresolution gray-scale and rotation invariant texture classification with local binary patterns,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 7, pp. 971–987, Jul. 2002.
[7] N. Otsu, “A threshold selection method from gray-level histograms,” IEEE Transactions on Systems, Man, and Cybernetics, vol. 9, no. 1, pp. 62–66, Jan. 1979.