Skip to content

Conversation

@duwudi
Copy link

@duwudi duwudi commented Jun 4, 2021

The 5-landmark dict has a different indexing definition. This makes it difficult to write code that works with both the 5-landmark and 68-landmark dlib detectors.

For example, this:

left_eye_start, left_eye_end = FACIAL_LANDMARKS_68_IDXS["left_eye"]
left_eye_landmarks = features[left_eye_start:left_eye_end]

is not the same as this:

left_eye_start, left_eye_end = FACIAL_LANDMARKS_5_IDXS["left_eye"]
left_eye_landmarks = features[left_eye_start:left_eye_end]

The latter only gives one of the left eye landmark positions, rather than both as desired

The 5-landmark dict has a different indexing definition. This makes it difficult to write code that works with both the 5-landmark and 68-landmark dlib detectors.

For example:
```left_eye_start, left_eye_end = FACIAL_LANDMARKS_68_IDXS["left_eye"]
left_eye_landmarks = features[left_eye_start:left_eye_end]```

Is not the same as:
```left_eye_start, left_eye_end = FACIAL_LANDMARKS_5_IDXS["left_eye"]
left_eye_landmarks = features[left_eye_start:left_eye_end]```
@ritwikraha
Copy link

Hey @duwudi thanks for this, this is being looked into at #249

@ritwikraha ritwikraha closed this Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants