You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The following dependencies, listed in `requirements.txt` file
17
+
- The following dependencies, listed in requirements.txt file
19
18
20
19
## Setup and Installation
21
20
22
-
### 1. Create a Virtual Environment
23
-
It is recommended to use a virtual environment for dependency management. You can create one using the following command:
21
+
### 1. Using Virtual Environment (venv)
24
22
23
+
#### 1.1 Create Virtual Environment
25
24
```bash
26
25
python -m venv drowsiness_env
27
26
```
28
27
29
-
### 2. Activate the Virtual Environment
30
-
For Windows:
28
+
#### 1.2 Activate Virtual Environment
29
+
-**Windows**:
30
+
```bash
31
+
drowsiness_env\Scripts\activate
32
+
```
33
+
-**macOS/Linux**:
34
+
```bash
35
+
source drowsiness_env/bin/activate
36
+
```
37
+
38
+
#### 1.3 Install Dependencies
31
39
```bash
32
-
drowsiness_env\Scripts\activate
40
+
pip install -r requirements.txt
41
+
pip install protobuf==3.20.0
33
42
```
34
43
35
-
For macOS/Linux:
44
+
### 2. Using Conda Environment
45
+
46
+
#### 2.1 Create Conda Environment
36
47
```bash
37
-
sourcedrowsiness_env/bin/activate
48
+
conda create --name drowsiness_env python=3.9 -y
38
49
```
39
50
40
-
### 3. Install Dependencies
41
-
Install the required dependencies from the requirements.txt file:
51
+
#### 2.2 Activate Conda Environment
52
+
```bash
53
+
conda activate drowsiness_env
54
+
```
55
+
56
+
#### 2.3 Install Dependencies
42
57
```bash
43
58
pip install -r requirements.txt
59
+
pip install protobuf==3.20.0
60
+
```
61
+
62
+
### 3. Verify Setup
63
+
64
+
Check installed packages:
65
+
```bash
66
+
pip list
44
67
```
45
68
69
+
## Recommendations
70
+
71
+
-**Conda is recommended** for managing complex dependencies, especially for machine learning projects with potential GPU support.
72
+
- Always ensure you're in the correct virtual environment before running the project.
73
+
- Keep your `requirements.txt` updated with all necessary dependencies.
74
+
75
+
## Troubleshooting
76
+
77
+
- If you encounter any installation issues, ensure you have the latest version of pip:
78
+
```bash
79
+
pip install --upgrade pip
80
+
```
81
+
- Check Python version compatibility (Python 3.7 - 3.9 recommended)
82
+
- Verify all system dependencies are installed
83
+
46
84
Required libraries include:
47
85
```text
48
86
opencv-python
@@ -94,6 +132,24 @@ To exit the program, press `q` in the terminal or stop the script execution.
94
132
-**Webcam not detected**: Ensure that your webcam is properly connected and accessible by other applications. Try restarting your machine if the issue persists.
95
133
-**Model loading errors**: If you get an error related to loading the model (`cnnfinal.h5`), make sure the file is placed in the correct directory and the path is specified correctly in the script.
96
134
135
+
## Reporting Issues and Contributing
136
+
137
+
### Reporting Errors or Bugs
138
+
139
+
1.**Check Existing Issues**
140
+
- Before reporting, search existing GitHub issues to avoid duplicates.
141
+
142
+
2.**Create a Detailed Bug Report**
143
+
- Use GitHub Issues
144
+
- Include:
145
+
- Detailed description of the error
146
+
- Steps to reproduce
147
+
- Your environment details (OS, Python version, etc.)
148
+
- Full error traceback
149
+
150
+
151
+
- Discuss in project discussions/comments
152
+
97
153
## Contributing
98
154
99
155
We welcome contributions to this project! If you'd like to contribute, please follow these steps:
@@ -111,4 +167,4 @@ This project is licensed under the MIT License - see the LICENSE file for detail
111
167
112
168
-**OpenCV**: For providing the face and eye detection algorithms.
113
169
-**MediaPipe**: For real-time gaze and head pose tracking.
114
-
-**Keras**: For providing the deep learning framework used to train the eye state classification model.
170
+
-**Keras**: For providing the deep learning framework used to train the eye state classification model.
0 commit comments