MenpoBenchmark icon indicating copy to clipboard operation
MenpoBenchmark copied to clipboard

Data structure in Menpo2D_semifrontal_train.txt

Open js19710423 opened this issue 5 years ago • 4 comments

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.

js19710423 avatar Oct 03 '19 12:10 js19710423

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

kadirbeytorun avatar Oct 21 '19 11:10 kadirbeytorun

Thank you so much!!

js19710423 avatar Oct 21 '19 12:10 js19710423

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]

ignaciohrdz avatar Mar 05 '23 11:03 ignaciohrdz

image

starhiking avatar Nov 11 '23 03:11 starhiking