Skip to content

Commit 9135377

Browse files
committed
Docs: Add download instructions for dlib model
1 parent 2f17976 commit 9135377

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ Install dependencies
2525

2626
pip install -r requirements.txt
2727

28+
Download the facial landmark model
29+
30+
The dlib facial landmark model is required for blink detection. Download it from the link below, unzip it, and place the `shape_predictor_68_face_landmarks.dat` file inside the `/models` directory.
31+
* **Download Link**: [shape_predictor_68_face_landmarks.dat](https://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2)
32+
2833
🔄 How to Contribute
2934

3035
Check existing issues or ask to be assigned one on Discord.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ source venv/bin/activate # On Windows: venv\Scripts\activate
4848
```bash
4949
pip install -r requirements.txt
5050
```
51-
3. **Run the application:**
51+
3. **Download the model:**
52+
53+
The dlib facial landmark model is required for blink detection. Download it from the link below, unzip it, and place the `shape_predictor_68_face_landmarks.dat` file inside the `/models` directory.
54+
* **Download Link**: [shape_predictor_68_face_landmarks.dat](https://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2)
55+
56+
4. **Run the application:**
5257
```bash
5358
python main.py
5459
```

blinkDetect.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
RESIZE_HEIGHT = 460
2121

2222
thresh = 0.27
23-
modelPath = "models/shape_predictor_70_face_landmarks.dat"
23+
24+
# IMPORTANT: You must download the shape_predictor_68_face_landmarks.dat file from
25+
# https://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
26+
# and place it in the 'models' folder
27+
modelPath = "models/shape_predictor_68_face_landmarks.dat"
2428
sound_path = "alarm.wav"
2529

2630
detector = dlib.get_frontal_face_detector()

0 commit comments

Comments
 (0)