Commit 1a99ee82 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira

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
Pipeline #47845 passed with stages
in 46 minutes and 5 seconds
......@@ -97,7 +97,9 @@ class MEDSDatabase(CSVDatasetZTNorm):
# Downloading model if not exists
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.fixed_positions = None
......@@ -122,6 +124,6 @@ class MEDSDatabase(CSVDatasetZTNorm):
@staticmethod
def urls():
return [
"https://www.idiap.ch/software/bob/databases/latest/meds.tar.gz",
"http://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_v2.tar.gz",
]
......@@ -52,7 +52,9 @@ class MobioDatabase(CSVDatasetZTNorm):
# Downloading model if not exists
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.fixed_positions = None
......@@ -92,6 +94,6 @@ class MobioDatabase(CSVDatasetZTNorm):
@staticmethod
def urls():
return [
"https://www.idiap.ch/software/bob/databases/latest/mobio.tar.gz",
"http://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_v2.tar.gz",
]
......@@ -61,7 +61,9 @@ class MorphDatabase(CSVDatasetZTNorm):
# Downloading model if not exists
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.fixed_positions = None
......@@ -86,6 +88,6 @@ class MorphDatabase(CSVDatasetZTNorm):
@staticmethod
def urls():
return [
"https://www.idiap.ch/software/bob/databases/latest/morph.tar.gz",
"http://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_v2.tar.gz",
]
......@@ -24,7 +24,9 @@ class MultipieDatabase(CSVDataset):
# Downloading model if not exists
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.fixed_positions = None
......@@ -73,6 +75,6 @@ class MultipieDatabase(CSVDataset):
@staticmethod
def urls():
return [
"https://www.idiap.ch/software/bob/databases/latest/multipie.tar.gz",
"http://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_v2.tar.gz",
]
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment