Skip to content
Snippets Groups Projects
Commit 1a99ee82 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge branch 'fix-xy-annotations' into 'master'

Resolve "EyesAnnotations ordering of x & y coordinates is wrong"

Closes #41

See merge request !100
parents 478a60ab 2e5b5a01
No related branches found
No related tags found
1 merge request!100Resolve "EyesAnnotations ordering of x & y coordinates is wrong"
Pipeline #47845 passed
...@@ -97,7 +97,9 @@ class MEDSDatabase(CSVDatasetZTNorm): ...@@ -97,7 +97,9 @@ class MEDSDatabase(CSVDatasetZTNorm):
# Downloading model if not exists # Downloading model if not exists
urls = MEDSDatabase.urls() urls = MEDSDatabase.urls()
filename = get_file("meds.tar.gz", urls) filename = get_file(
"meds.tar.gz", urls, file_hash="3b01354d4c170672ac14120b80dace75"
)
self.annotation_type = "eyes-center" self.annotation_type = "eyes-center"
self.fixed_positions = None self.fixed_positions = None
...@@ -122,6 +124,6 @@ class MEDSDatabase(CSVDatasetZTNorm): ...@@ -122,6 +124,6 @@ class MEDSDatabase(CSVDatasetZTNorm):
@staticmethod @staticmethod
def urls(): def urls():
return [ return [
"https://www.idiap.ch/software/bob/databases/latest/meds.tar.gz", "https://www.idiap.ch/software/bob/databases/latest/meds_v2.tar.gz",
"http://www.idiap.ch/software/bob/databases/latest/meds.tar.gz", "http://www.idiap.ch/software/bob/databases/latest/meds_v2.tar.gz",
] ]
...@@ -52,7 +52,9 @@ class MobioDatabase(CSVDatasetZTNorm): ...@@ -52,7 +52,9 @@ class MobioDatabase(CSVDatasetZTNorm):
# Downloading model if not exists # Downloading model if not exists
urls = MobioDatabase.urls() urls = MobioDatabase.urls()
filename = get_file("mobio.tar.gz", urls) filename = get_file(
"mobio.tar.gz", urls, file_hash="42cee778c17a34762d5fc5dd13ce3ee6"
)
self.annotation_type = "eyes-center" self.annotation_type = "eyes-center"
self.fixed_positions = None self.fixed_positions = None
...@@ -92,6 +94,6 @@ class MobioDatabase(CSVDatasetZTNorm): ...@@ -92,6 +94,6 @@ class MobioDatabase(CSVDatasetZTNorm):
@staticmethod @staticmethod
def urls(): def urls():
return [ return [
"https://www.idiap.ch/software/bob/databases/latest/mobio.tar.gz", "https://www.idiap.ch/software/bob/databases/latest/mobio_v2.tar.gz",
"http://www.idiap.ch/software/bob/databases/latest/mobio.tar.gz", "http://www.idiap.ch/software/bob/databases/latest/mobio_v2.tar.gz",
] ]
...@@ -61,7 +61,9 @@ class MorphDatabase(CSVDatasetZTNorm): ...@@ -61,7 +61,9 @@ class MorphDatabase(CSVDatasetZTNorm):
# Downloading model if not exists # Downloading model if not exists
urls = MorphDatabase.urls() urls = MorphDatabase.urls()
filename = get_file("morph.tar.gz", urls) filename = get_file(
"morph.tar.gz", urls, file_hash="9efa1ff13ef6984ebfcf86f1b1f58873"
)
self.annotation_type = "eyes-center" self.annotation_type = "eyes-center"
self.fixed_positions = None self.fixed_positions = None
...@@ -86,6 +88,6 @@ class MorphDatabase(CSVDatasetZTNorm): ...@@ -86,6 +88,6 @@ class MorphDatabase(CSVDatasetZTNorm):
@staticmethod @staticmethod
def urls(): def urls():
return [ return [
"https://www.idiap.ch/software/bob/databases/latest/morph.tar.gz", "https://www.idiap.ch/software/bob/databases/latest/morph_v2.tar.gz",
"http://www.idiap.ch/software/bob/databases/latest/morph.tar.gz", "http://www.idiap.ch/software/bob/databases/latest/morph_v2.tar.gz",
] ]
...@@ -24,7 +24,9 @@ class MultipieDatabase(CSVDataset): ...@@ -24,7 +24,9 @@ class MultipieDatabase(CSVDataset):
# Downloading model if not exists # Downloading model if not exists
urls = MultipieDatabase.urls() urls = MultipieDatabase.urls()
filename = get_file("multipie.tar.gz", urls) filename = get_file(
"multipie.tar.gz", urls, file_hash="6c27c9616c2d0373c5f052b061d80178"
)
self.annotation_type = ["eyes-center", "left-profile", "right-profile"] self.annotation_type = ["eyes-center", "left-profile", "right-profile"]
self.fixed_positions = None self.fixed_positions = None
...@@ -73,6 +75,6 @@ class MultipieDatabase(CSVDataset): ...@@ -73,6 +75,6 @@ class MultipieDatabase(CSVDataset):
@staticmethod @staticmethod
def urls(): def urls():
return [ return [
"https://www.idiap.ch/software/bob/databases/latest/multipie.tar.gz", "https://www.idiap.ch/software/bob/databases/latest/multipie_v2.tar.gz",
"http://www.idiap.ch/software/bob/databases/latest/multipie.tar.gz", "http://www.idiap.ch/software/bob/databases/latest/multipie_v2.tar.gz",
] ]
...@@ -34,12 +34,12 @@ class EyesAnnotations(TransformerMixin, BaseEstimator): ...@@ -34,12 +34,12 @@ class EyesAnnotations(TransformerMixin, BaseEstimator):
for x in X: for x in X:
eyes = { eyes = {
"leye": ( "leye": (
float(find_attribute(x, "leye_x")),
float(find_attribute(x, "leye_y")), float(find_attribute(x, "leye_y")),
float(find_attribute(x, "leye_x")),
), ),
"reye": ( "reye": (
float(find_attribute(x, "reye_x")),
float(find_attribute(x, "reye_y")), float(find_attribute(x, "reye_y")),
float(find_attribute(x, "reye_x")),
), ),
} }
...@@ -69,12 +69,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator): ...@@ -69,12 +69,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator):
# Normal profile # Normal profile
annotations = { annotations = {
"leye": ( "leye": (
float(find_attribute(x, "leye_x")),
float(find_attribute(x, "leye_y")), float(find_attribute(x, "leye_y")),
float(find_attribute(x, "leye_x")),
), ),
"reye": ( "reye": (
float(find_attribute(x, "reye_x")),
float(find_attribute(x, "reye_y")), float(find_attribute(x, "reye_y")),
float(find_attribute(x, "reye_x")),
), ),
} }
elif ( elif (
...@@ -83,12 +83,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator): ...@@ -83,12 +83,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator):
# Left profile # Left profile
annotations = { annotations = {
"leye": ( "leye": (
float(find_attribute(x, "leye_x")),
float(find_attribute(x, "leye_y")), float(find_attribute(x, "leye_y")),
float(find_attribute(x, "leye_x")),
), ),
"mouth": ( "mouth": (
float(find_attribute(x, "mouthl_x")),
float(find_attribute(x, "mouthl_y")), float(find_attribute(x, "mouthl_y")),
float(find_attribute(x, "mouthl_x")),
), ),
} }
elif ( elif (
...@@ -97,12 +97,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator): ...@@ -97,12 +97,12 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator):
# Right profile # Right profile
annotations = { annotations = {
"reye": ( "reye": (
float(find_attribute(x, "reye_x")),
float(find_attribute(x, "reye_y")), float(find_attribute(x, "reye_y")),
float(find_attribute(x, "reye_x")),
), ),
"mouth": ( "mouth": (
float(find_attribute(x, "mouthr_x")),
float(find_attribute(x, "mouthr_y")), float(find_attribute(x, "mouthr_y")),
float(find_attribute(x, "mouthr_x")),
), ),
} }
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment