jiankangdeng / MenpoBenchmark

Multi-pose 2D and 3D Face Alignment & Tracking
https://link.springer.com/article/10.1007/s11263-018-1134-y
150 stars 20 forks source link

Data structure in Menpo2D_semifrontal_train.txt #2

Open js19710423 opened 4 years ago

js19710423 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Thank you so much!!

ignaciohrdz commented 1 year ago

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 commented 10 months ago
image