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

Data structure in Menpo2D_semifrontal_train.txt #2

Open
js19710423 opened this issue Oct 3, 2019 · 4 comments
Open

Data structure in Menpo2D_semifrontal_train.txt #2

js19710423 opened this issue Oct 3, 2019 · 4 comments

Comments

@js19710423
Copy link

First, thanks for your interesting contribution!

I've downloaded Menpo2D_semifrontal_train.txt and I've seen that it contains a set of 75 points. The last 68 correspond to the facial landmarks, but I am not sure about what are the initial 7 points.
The four corners of the face rectangle and something else?
Thank you in advance.

@kadirbeytorun
Copy link

I think 2 of those 7 are bounding box for the face and 5 are seperate landmarks found by retina-face.
I am not sure about the order though, maybe the first two= bounding box

@js19710423
Copy link
Author

Thank you so much!!

@ignaciohrdz
Copy link

ignaciohrdz commented Mar 5, 2023

Hi, I just had the same question today and I can confirm the order:

  1. Top-left corner of the bounding box (x, y)
  2. Bottom-right corner of the bounding box (x, y)
  3. Left eye (x, y)
  4. Right eye (x, y)
  5. Tip of the nose (x, y)
  6. Left corner of the lip (x, y)
  7. Right corner of the lip (x, y)
  8. The remaining facial landmarks (either 68 or 39)

This is what I did to get the actual facial landmarks:

with open("Menpo2D_semifrontal_train.txt") as f:
    lines = [l.rstrip() for l in f.readlines()]
    images = [l.split(" ")[0] for l in lines]  # image names
    landmarks = [l.split(" ")[1:] for l in lines]  # points (x y x y x y...)
    facial_landmarks_x, facial_landmarks_y = landmarks[14::2], landmarks[15::2]

@starhiking
Copy link

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants