Skip to content
Snippets Groups Projects
Commit 495035df authored by Olegs NIKISINS's avatar Olegs NIKISINS
Browse files

Merge branch 'batl_hldi_update' into 'master'

Batl hldi update

See merge request !79
parents 08484e67 93b2a6b3
No related branches found
No related tags found
1 merge request!79Batl hldi update
Pipeline #25979 passed
...@@ -573,6 +573,14 @@ class BatlPadDatabase(PadDatabase): ...@@ -573,6 +573,14 @@ class BatlPadDatabase(PadDatabase):
if not os.path.isfile(file_path): # no file with annotations if not os.path.isfile(file_path): # no file with annotations
# original values of the arguments of f:
stream_type_original = f.stream_type
reference_stream_type_original = f.reference_stream_type
warp_to_reference_original = f.warp_to_reference
convert_to_rgb_original = f.convert_to_rgb
crop_original = f.crop
video_data_only_original = f.video_data_only
f.stream_type = "color" f.stream_type = "color"
f.reference_stream_type = "color" f.reference_stream_type = "color"
f.warp_to_reference = False f.warp_to_reference = False
...@@ -583,6 +591,14 @@ class BatlPadDatabase(PadDatabase): ...@@ -583,6 +591,14 @@ class BatlPadDatabase(PadDatabase):
video = f.load(directory=self.original_directory, video = f.load(directory=self.original_directory,
extension=self.original_extension) extension=self.original_extension)
# set arguments of f to the original values:
f.stream_type = stream_type_original
f.reference_stream_type = reference_stream_type_original
f.warp_to_reference = warp_to_reference_original
f.convert_to_rgb = convert_to_rgb_original
f.crop = crop_original
f.video_data_only = video_data_only_original
annotations = {} annotations = {}
for idx, image in enumerate(video.as_array()): for idx, image in enumerate(video.as_array()):
...@@ -614,7 +630,7 @@ class BatlPadDatabase(PadDatabase): ...@@ -614,7 +630,7 @@ class BatlPadDatabase(PadDatabase):
# If specified append annotations for the roi in the facial region: # If specified append annotations for the roi in the facial region:
if self.append_color_face_roi_annot: if self.append_color_face_roi_annot:
file_path = pkg_resources.resource_filename( 'bob.pad.face', os.path.join('lists/batl/color_skin_non_skin_annotations/', "annotations_train_set" + ".json") ) file_path = pkg_resources.resource_filename( 'bob.pad.face', os.path.join('lists/batl/color_skin_non_skin_annotations/', "annotations_train_dev_set" + ".json") )
with open(file_path, 'r') as json_file: # open the file containing all annotations: with open(file_path, 'r') as json_file: # open the file containing all annotations:
......
Files contain annotations for the color images in the training set of the Idiap BATL database. Files contain annotations for the color images in the **training** and **development** sets of the Idiap BATL database.
A region correponding to non-skin pixels is annotated in the "Attack" samples, and A region correponding to non-skin pixels is annotated in the "Attack" samples, and
region corresponding to skin pixels is annotated in the "Bona-fide" samples. region corresponding to skin pixels is annotated in the "Bona-fide" samples.
......
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