Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landmark Index Dict Consistency #250

Closed
wants to merge 1 commit into from
Closed

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