yinguobing / facial-landmark-dataset

A collection of facial landmark datasets and Python code to make use of them.
MIT License
100 stars 14 forks source link

300-W dataset structure. #1

Closed yinguobing closed 4 years ago

yinguobing commented 4 years ago

How is the 300-W dataset organized? Dataset: https://ibug.doc.ic.ac.uk/resources/300-W/

yinguobing commented 4 years ago

The raw data you downloaded from the official website are 4 compressed multipart zip files.

300w.zip.001  300w.zip.002 300w.zip.003  300w.zip.004

To unzip them (refer to SO for more):

cat 300w.zip.* > 300w.zip
zip -FF 300w.zip --out 300w-fixed.zip
unzip 300w-fixed.zip 

You will get a directory named 300W.

There are two directories in it:

01_Indoor  02_Outdoor

Each contains 300 png files and 300 pts files.

To take a peek of all the files:

python3 count_files.py ~/data/raw/facial_landmark/300w/300W/
Total files: 1200
{'png': 600, 'pts': 600}
Done!
yinguobing commented 4 years ago

For each image the marks are stored in a text file with an extension name pts. Here is an example: File: indoor_001.pts

version: 1
n_points: 68
{
446.000 91.000
449.459 119.344
450.957 150.614
460.552 176.986
471.486 202.157
488.087 226.842
506.016 246.438
524.662 263.865
553.315 271.435
578.732 266.260
599.361 248.966
615.947 220.651
627.439 197.999
635.375 179.064
642.063 156.371
647.302 124.753
646.518 92.944
470.271 117.870
486.218 109.415
503.097 114.454
519.714 120.090
533.680 127.609
571.937 123.590
585.702 117.155
602.344 109.070
620.077 103.951
633.964 111.236
554.931 145.072
554.589 161.106
554.658 177.570
554.777 194.295
532.717 197.930
543.637 202.841
555.652 205.483
565.441 202.069
576.368 197.061
487.474 136.436
499.184 132.337
513.781 133.589
527.594 143.047
513.422 144.769
499.117 144.737
579.876 140.815
590.901 130.008
605.648 128.376
618.343 132.671
606.771 140.525
593.466 141.419
519.040 229.040
536.292 221.978
547.001 221.192
557.161 224.381
568.172 219.826
579.144 222.233
589.098 224.410
581.071 239.804
570.103 251.962
558.241 254.844
547.661 254.621
534.085 247.772
524.758 230.477
547.684 231.663
557.304 230.805
568.172 229.159
585.417 225.992
569.211 237.777
557.473 240.542
547.989 240.014
}

The key marks indices are: 36, 39, 42, 45, 48, 54