Commit 31e99d38 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[py] Added json as default annotation type

parent 33068f84
Pipeline #46238 passed with stage
in 5 minutes and 50 seconds
......@@ -31,7 +31,7 @@ class AnnotationsLoader:
self,
annotation_directory=None,
annotation_extension=".json",
annotation_type="eyecenter",
annotation_type="json",
):
self.annotation_directory = annotation_directory
self.annotation_extension = annotation_extension
......@@ -172,7 +172,7 @@ class CSVToSampleLoader(CSVBaseSampleLoader):
kwargs = dict([[str(h).lower(), r] for h, r in zip(header[2:], row[2:])])
if self.metadata_loader is not None:
metadata = self.metadata_loader(row)
metadata = self.metadata_loader(row, header=header)
kwargs.update(metadata)
return DelayedSample(
......@@ -220,7 +220,7 @@ class LSTToSampleLoader(CSVBaseSampleLoader):
kwargs = {"subject": str(subject)}
if self.metadata_loader is not None:
metadata = self.metadata_loader(row)
metadata = self.metadata_loader(row, header=header)
kwargs.update(metadata)
return DelayedSample(
......
......@@ -111,7 +111,9 @@ def test_csv_file_list_dev_eval():
csv_to_sample_loader=CSVToSampleLoader(
data_loader=bob.io.base.load,
metadata_loader=AnnotationsLoader(
annotation_directory=annotation_directory, annotation_extension=".pos"
annotation_directory=annotation_directory,
annotation_extension=".pos",
annotation_type="eyecenter",
),
dataset_original_directory="",
extension="",
......@@ -159,7 +161,9 @@ def test_csv_file_list_dev_eval_sparse():
csv_to_sample_loader=CSVToSampleLoader(
data_loader=bob.io.base.load,
metadata_loader=AnnotationsLoader(
annotation_directory=annotation_directory, annotation_extension=".pos"
annotation_directory=annotation_directory,
annotation_extension=".pos",
annotation_type="eyecenter",
),
dataset_original_directory="",
extension="",
......
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