MenpoBenchmark
MenpoBenchmark copied to clipboard
Data structure in Menpo2D_semifrontal_train.txt
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.
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
Thank you so much!!
Hi, I just had the same question today and I can confirm the order:
- Top-left corner of the bounding box (x, y)
- Bottom-right corner of the bounding box (x, y)
- Left eye (x, y)
- Right eye (x, y)
- Tip of the nose (x, y)
- Left corner of the lip (x, y)
- Right corner of the lip (x, y)
- 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]