Skip to content
Snippets Groups Projects
Commit 91b16612 authored by Laurent COLBOIS's avatar Laurent COLBOIS
Browse files

Simplify id types

parent ea1a3d96
No related branches found
No related tags found
1 merge request!124Resolve "IJBC database will fail on non-Idiap filesystems"
...@@ -17,8 +17,8 @@ def _make_sample_from_template_row(row, image_directory): ...@@ -17,8 +17,8 @@ def _make_sample_from_template_row(row, image_directory):
return DelayedSample( return DelayedSample(
load=partial(bob.io.image.load, os.path.join(image_directory, row["FILENAME"])), load=partial(bob.io.image.load, os.path.join(image_directory, row["FILENAME"])),
reference_id=str(row["TEMPLATE_ID"]), reference_id=row["TEMPLATE_ID"],
subject_id=str(row["SUBJECT_ID"]), subject_id=row["SUBJECT_ID"],
key=os.path.splitext(row["FILENAME"])[0] + "-" + hashstr, key=os.path.splitext(row["FILENAME"])[0] + "-" + hashstr,
annotations={ annotations={
"topleft": (float(row["FACE_Y"]), float(row["FACE_X"])), "topleft": (float(row["FACE_Y"]), float(row["FACE_X"])),
...@@ -160,7 +160,7 @@ class IJBCDatabase(Database): ...@@ -160,7 +160,7 @@ class IJBCDatabase(Database):
grouped_matches = self.matches.groupby("PROBE_TEMPLATE_ID") grouped_matches = self.matches.groupby("PROBE_TEMPLATE_ID")
for probe_sampleset in self._cached_probes: for probe_sampleset in self._cached_probes:
probe_sampleset.references = list( probe_sampleset.references = list(
grouped_matches.get_group(int(probe_sampleset.reference_id))[ grouped_matches.get_group(probe_sampleset.reference_id)[
"REFERENCE_TEMPLATE_ID" "REFERENCE_TEMPLATE_ID"
] ]
) )
......
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