Commit 15568434 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Use DelayedSample.from_sample

Depends on bob.pipelines!74
parent ea9c885c
Pipeline #53467 passed with stage
in 50 minutes and 18 seconds
......@@ -171,9 +171,7 @@ class FrameBoundingBoxAnnotationLoader(AnnotationsLoader):
for x in X:
# Adds the annotations as delayed_attributes, loading them when needed
annotated_samples.append(
DelayedSample(
x._load,
parent=x,
DelayedSample.from_sample(x,
delayed_attributes=dict(
annotations=functools.partial(
read_frame_annotation_file_replaymobile,
......
......@@ -43,7 +43,7 @@ class EyesAnnotations(TransformerMixin, BaseEstimator):
),
}
sample = DelayedSample(x._load, parent=x, annotations=eyes)
sample = DelayedSample.from_sample(x, annotations=eyes)
[delattr(sample, a) for a in ["leye_x", "leye_y", "reye_x", "reye_y"]]
annotated_samples.append(sample)
......@@ -108,7 +108,7 @@ class MultiposeAnnotations(TransformerMixin, BaseEstimator):
else:
raise ValueError("Annotations not available")
sample = DelayedSample(x._load, parent=x, annotations=annotations)
sample = DelayedSample.from_sample(x, annotations=annotations)
[
delattr(sample, a)
for a in [
......
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