EyesAnnotations ordering of x & y coordinates is wrong
Hi,
If I am not mistaken, the adopted convention for face landmarks in bob.bio.face
is to provide them under the form
lm = (y coordinate, x coordinate)
.
The EyesAnnotations
loader does the opposite, i.e. lm = (x coordinate, y coordinate)
, same with the MultiposeAnnotations
loader.
The issue does not show on the CSVDatabase implementation of Mobio and Multipie, because the x- and y- coordinates are also inverted in those CSV files.
Example from mobio :
| PATH | REFERENCE_ID | GENDER | DEVICE | ENVIRONMENT | SESSION_ID | SHORT_ID | SPEECH_TYPE | reye_x | reye_y | leye_x | leye_y |
|--------------------------------------|--------------|--------|--------|-------------|------------|----------|-------------|--------|--------|--------|--------|
| uman/m103/01_mobile/m103_01_p01_i0_0 | 103 | m | mobile | i | 1 | 1 | p | 186 | 243 | 187 | 329 |
You can see the right and left eyes have almost the same x-coordinate which is wrong.
With the corrected coordinates, then the cropped images are rotated 90° because of the issue in EyesAnnotations
.
Fixing the code is easy, however when we do it we should also update the CSV files for Mobio and Multipie. What's the process to update those CSV files ?
ping @tiago.pereira
Edit : I guess this is only an issue because we provide some default cropped_positions
that follow the (y, x) convention, so we could also keep the EyesAnnotations as they are and change the defaults to follow the (x, y) convention. But in any case, we'll need to fix the CSV files.