def __init__( self, protocol, annotation_type="eyes-center", fixed_positions=None, dataset_original_directory=rc.get("bob.db.meds.directory", ""), dataset_original_extension=".jpg", ): # Downloading model if not exists urls = MEDSDatabase.urls() filename = get_file("meds.tar.gz", urls, file_hash="3b01354d4c170672ac14120b80dace75") super().__init__( name="meds", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=bob.io.base.load, dataset_original_directory=dataset_original_directory if dataset_original_directory else "", extension=dataset_original_extension, ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )
def __init__(self, protocol, annotation_type="eyes-center", fixed_positions=None): # Downloading model if not exists urls = ARFaceDatabase.urls() filename = get_file( "arface.tar.gz", urls, file_hash="66cf05fe03adb8d73a76fd75641dd468", ) super().__init__( name="arface", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=bob.io.base.load, dataset_original_directory=rc[ "bob.bio.face.arface.directory"] if rc["bob.bio.face.arface.directory"] else "", extension=rc["bob.bio.face.arface.extension"] if rc["bob.bio.face.arface.extension"] else ".ppm", ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )
def __init__(self, protocol, annotation_type="eyes-center", fixed_positions=None): # Downloading model if not exists urls = CasiaAfricaDatabase.urls() filename = get_file( "casia-africa.tar.gz", urls, file_hash="080d4bfffec95a6445507065054757eb", ) directory = (rc["bob.db.casia-africa.directory"] if rc["bob.db.casia-africa.directory "] else "") super().__init__( name="casia-africa", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=bob.io.base.load, dataset_original_directory=directory, extension=".jpg", reference_id_equal_subject_id=False, ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )
def __init__( self, protocol, annotation_type="eyes-center", fixed_positions=None, dataset_original_directory=rc.get("bob.db.morph.directory", ""), dataset_original_extension=".JPG", ): # Downloading model if not exists urls = MorphDatabase.urls() filename = get_file("morph.tar.gz", urls, file_hash="9efa1ff13ef6984ebfcf86f1b1f58873") super().__init__( name="morph", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=bob.io.base.load, dataset_original_directory=dataset_original_directory if dataset_original_directory else "", extension=dataset_original_extension, ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )
def __init__( self, protocol, annotation_type="eyes-center", fixed_positions=None, dataset_original_directory=rc.get("bob.db.mobio.directory", ""), dataset_original_extension=rc.get("bob.db.mobio.extension", ".png"), ): # Downloading model if not exists urls = MobioDatabase.urls() filename = get_file("mobio.tar.gz", urls, file_hash="4a7f99b33a54b2dd337ddcaecb09edb8") super().__init__( name="mobio", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=bob.io.base.load, dataset_original_directory=dataset_original_directory, extension=dataset_original_extension, ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )
def __init__(self, protocol, annotation_type="eyes-center", fixed_positions=None): # Downloading model if not exists urls = FRGCDatabase.urls() filename = get_file( "frgc.tar.gz", urls, file_hash="242168e993fe0f6f29bd59fccf3c79a0", ) super().__init__( name="frgc", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=bob.io.base.load, dataset_original_directory=rc.get( "bob.bio.face.frgc.directory", ""), extension="", reference_id_equal_subject_id=False, ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, score_all_vs_all=True, group_probes_by_reference_id=True, memory_demanding=True, ) self.hash_fn = hash_string
def __init__(self, protocol, annotation_type="eyes-center", fixed_positions=None): # Downloading model if not exists urls = CaspealDatabase.urls() filename = get_file( "caspeal.tar.gz", urls, file_hash="1c77f660ef85fa263a2312fd8263d0d9", ) super().__init__( name="caspeal", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=bob.io.base.load, dataset_original_directory=rc[ "bob.bio.face.caspeal.directory"] if rc["bob.bio.face.caspeal.directory"] else "", extension=".png", ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )
def __init__(self, protocol, annotation_type="eyes-center", fixed_positions=None): # Downloading model if not exists urls = CBSRNirVis2Database.urls() filename = get_file( "cbsr-nir-vis2.tar.gz", urls, file_hash="e4bda52ab6754556783d6730eccc2ae2", ) directory = (rc["bob.db.cbsr-nir-vis-2.directory"] if rc["bob.db.cbsr-nir-vis-2.directory"] else "") def load(filename): extensions = [".jpg", ".bmp"] for e in extensions: f = os.path.splitext(filename)[0] new_filename = f + e if os.path.exists(new_filename): return bob.io.base.load(new_filename) else: raise ValueError("File `{0}` not found".format( str(new_filename))) super().__init__( name="cbsr-nir-vis2", dataset_protocol_path=filename, protocol=protocol, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=load, dataset_original_directory=directory, extension=".jpg", ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )
def __init__( self, protocol, annotation_type="eyes-center", fixed_positions=None ): # Downloading model if not exists urls = PolaThermalDatabase.urls() filename = get_file( "polathermal.tar.gz", urls, file_hash="4693149bc883debe5a9e1441a4f5f4ae", ) directory = rc.get("bob.db.pola-thermal.directory", "") def load(path): """ Images in this dataset are stored as 16-bit PNG [0-65535] and bob.bio.face assumes images are between 0 and 255, so we divide by 257: 65535 / 255 = 257 """ return bob.io.base.load(path) / 257 super().__init__( name="polathermal", protocol=protocol, dataset_protocol_path=filename, csv_to_sample_loader=make_pipeline( CSVToSampleLoaderBiometrics( data_loader=load, dataset_original_directory=directory, extension=".png", ), EyesAnnotations(), ), annotation_type=annotation_type, fixed_positions=fixed_positions, )