Implementation of Driver Fatigue Detection System For Loco Pilot, Preventing Train Accidents Using Python And ESP32 CAM

  • Unique Paper ID: 182422
  • PageNo: 1905-1909
  • Abstract:
  • Fatigue among train drivers, especially loco pilots, has been identified as a critical factor contributing to train accidents worldwide. Prolonged working hours, monotonous routes, and high stress can lead to drowsiness and reduced alertness, severely impairing a driver’s ability to respond promptly to signals and track conditions. In response to this safety challenge, the proposed system leverages the capabilities of embedded systems and artificial intelligence to develop a real-time Driver Fatigue Detection System using the ESP32-CAM module and Python-based image processing techniques. The primary aim of this project is to proactively detect signs of drowsiness or inattention in the loco pilot and initiate preventive measures to avoid accidents. This system uses an ESP32-CAM, a compact microcontroller with an onboard camera and Wi-Fi capability, to continuously monitor the facial features of the loco pilot. The camera captures real-time video frames of the driver’s face, which are processed using machine learning algorithms either on-device or remotely using a server running Python. The Python-based backend employs computer vision techniques, particularly OpenCV and pre-trained models such as Haar cascades or Dlib’s facial landmark detectors, to detect key indicators of fatigue such as eye closure duration (PERCLOS), blink rate, yawning frequency, and head tilt. These features are essential in estimating the alertness level of the driver.

Copyright & License

Copyright © 2026 Authors retain the copyright of this article. This article is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

BibTeX

@article{182422,
        author = {Simran Khan and Vivekanand P. Thakare and Rupali Bhalavi and Sana  Shaikh},
        title = {Implementation of  Driver Fatigue Detection System For Loco Pilot, Preventing Train Accidents Using Python And ESP32 CAM},
        journal = {International Journal of Innovative Research in Technology},
        year = {2025},
        volume = {12},
        number = {2},
        pages = {1905-1909},
        issn = {2349-6002},
        url = {https://ijirt.org/article?manuscript=182422},
        abstract = {Fatigue among train drivers, especially loco pilots, has been identified as a critical factor contributing to train accidents worldwide. Prolonged working hours, monotonous routes, and high stress can lead to drowsiness and reduced alertness, severely impairing a driver’s ability to respond promptly to signals and track conditions. In response to this safety challenge, the proposed system leverages the capabilities of embedded systems and artificial intelligence to develop a real-time Driver Fatigue Detection System using the ESP32-CAM module and Python-based image processing techniques. The primary aim of this project is to proactively detect signs of drowsiness or inattention in the loco pilot and initiate preventive measures to avoid accidents.
This system uses an ESP32-CAM, a compact microcontroller with an onboard camera and Wi-Fi capability, to continuously monitor the facial features of the loco pilot. The camera captures real-time video frames of the driver’s face, which are processed using machine learning algorithms either on-device or remotely using a server running Python. The Python-based backend employs computer vision techniques, particularly OpenCV and pre-trained models such as Haar cascades or Dlib’s facial landmark detectors, to detect key indicators of fatigue such as eye closure duration (PERCLOS), blink rate, yawning frequency, and head tilt. These features are essential in estimating the alertness level of the driver.},
        keywords = {Driver Fatigue Detection,  Loco Pilot Monitoring,  Train Accident Prevention,  ESP32-CAM,  Python,  OpenCV,  Real-time Image Processing,  Eye Blink Detection,  Yawning Detection,  Drowsiness Detection,  Face Monitoring System,  Internet of Things (IoT), Machine Learning,  Computer Vision,  Railway Safety System.},
        month = {July},
        }

Cite This Article

Khan, S., & Thakare, V. P., & Bhalavi, R., & Shaikh, S. . (2025). Implementation of Driver Fatigue Detection System For Loco Pilot, Preventing Train Accidents Using Python And ESP32 CAM. International Journal of Innovative Research in Technology (IJIRT), 12(2), 1905–1909.

Related Articles