# Driver Identification and Detection of Drowsiness while Driving
## 3 Requirements and Technologies
### Other Devices  
Initially, this project was conducted using a MacBook Pro computer equipped with an Apple M1 Pro chip and 16 GB of random-access memory (RAM). Both driver identification and the drowsiness detection algorithms were successfully tested on this device in real time, demonstrating its suitability for the project's goals. However, considering the impracticality of using a laptop while driving, alternative devices that are smaller, more convenient, secure, and do not obstruct the driver's visibility were explored.  
As a result, it was considered more appropriate to establish a client-server scheme in which the NVIDIA Jetson Nano Developer Kit 2 GB [33] serves as the client, and the server is dockerized on an external machine. Additionally, a second client was available at Nokia's company offices, acting as a control client. This is because the Jetson Nano only has 2 GB of graphics, which made the initial tests difficult as this was insufficient for analysis in real time, but it can work in situations such as a loss of coverage with less image capture frequency.  
The decision to adopt this architecture stemmed from the constrained graphical capacity of the Jetson Nano, which posed challenges during initial tests. With only 2 GB of graphics memory, real-time analysis proved inadequate. However, the device exhibited satisfactory performance under circumstances involving sporadic image captures.  
In order to quantify the efficacy of the driver face recognition program, the average execution time was measured. These figures represent the average total execution time across tests conducted under optimal conditions, wherein the user's face was unobstructed by glasses, masks, or hair. Notably, the computational overhead increases with a larger database of individuals, potentially impeding program responsiveness. Nonetheless, this is unlikely to pose a significant issue in practical scenarios, given that vehicles typically accommodate one to three occupants.  
Furthermore, the execution time is contingent on the processing capabilities of the device, with superior performance observed on higher-spec machines. Consequently, the server was selected as the preferred platform for frame analysis, surpassing the computational capabilities of the Jetson Nano.  
A comparison of average execution times for driver face recognition is provided in Table 1. Notably, face recognition processing on the server yielded an average time of 3.84 s when gazing at the camera and 8.79 s when focused on the road. In contrast, analysis conducted on the Jetson Nano exhibited significantly longer processing times, averaging 107.51 s and 106.96 s, respectively.  
Regarding drowsiness detection, the server achieved a processing rate of 0.15-0.16 frames per second (FPS), demonstrating satisfactory performance. Conversely, the latency experienced on the Jetson Nano was prohibitively high, rendering drowsiness detection impractical.  
These findings underscore the inadequacy of the Jetson Nano for real-time analysis without substantial system modifications.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Driver’s View** & **Server Average Time** & **Jetson Nano Average Time** \\ \hline At the camera & 3.84 s & 107.51 s \\ At the road & 3.79 s & 106.96 s \\ \hline \hline \end{tabular}
\end{table}
Table 1: Average facial recognition time