From 249b7072fd069f2ecb6aae254c97fe750a8a81fa Mon Sep 17 00:00:00 2001
From: Laurent COLBOIS <lcolbois@.idiap.ch>
Date: Sun, 7 Feb 2021 18:23:04 +0100
Subject: [PATCH] Permute x and y coordinates in annotation loaders

---
 bob/bio/face/database/sample_loaders.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/bob/bio/face/database/sample_loaders.py b/bob/bio/face/database/sample_loaders.py
index bc6b553f..4148f87a 100644
--- a/bob/bio/face/database/sample_loaders.py
+++ b/bob/bio/face/database/sample_loaders.py
@@ -34,12 +34,12 @@ class EyesAnnotations(TransformerMixin, BaseEstimator):
         for x in X:
             eyes = {
                 "leye": (
-                    float(find_attribute(x, "leye_x")),
                     float(find_attribute(x, "leye_y")),
+                    float(find_attribute(x, "leye_x")),
                 ),
                 "reye": (
-                    float(find_attribute(x, "reye_x")),
                     float(find_attribute(x, "reye_y")),
+                    float(find_attribute(x, "reye_x")),
                 ),
             }
 
@@ -69,12 +69,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator):
                 # Normal profile
                 annotations = {
                     "leye": (
-                        float(find_attribute(x, "leye_x")),
                         float(find_attribute(x, "leye_y")),
+                        float(find_attribute(x, "leye_x")),
                     ),
                     "reye": (
-                        float(find_attribute(x, "reye_x")),
                         float(find_attribute(x, "reye_y")),
+                        float(find_attribute(x, "reye_x")),
                     ),
                 }
             elif (
@@ -83,12 +83,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator):
                 # Left profile
                 annotations = {
                     "leye": (
-                        float(find_attribute(x, "leye_x")),
                         float(find_attribute(x, "leye_y")),
+                        float(find_attribute(x, "leye_x")),
                     ),
                     "mouth": (
-                        float(find_attribute(x, "mouthl_x")),
                         float(find_attribute(x, "mouthl_y")),
+                        float(find_attribute(x, "mouthl_x")),
                     ),
                 }
             elif (
@@ -97,12 +97,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator):
                 # Right profile
                 annotations = {
                     "reye": (
-                        float(find_attribute(x, "reye_x")),
                         float(find_attribute(x, "reye_y")),
+                        float(find_attribute(x, "reye_x")),
                     ),
                     "mouth": (
-                        float(find_attribute(x, "mouthr_x")),
                         float(find_attribute(x, "mouthr_y")),
+                        float(find_attribute(x, "mouthr_x")),
                     ),
                 }
             else:
-- 
GitLab