CoolFace
Apppublic

vijulshah/pupilsense

sourceHugging Faceupdated 1y agoView on Hugging Face
4likes
dataset_creation.py27 linesDownload Raw Back to preprocessing
1import sys2import cv23import os.path as osp4 5root_path = osp.abspath(osp.join(__file__, osp.pardir, osp.pardir))6sys.path.append(root_path)7 8from feature_extraction.features_extractor import FeaturesExtractor9 10 11class EyeDentityDatasetCreation:12 13    def __init__(self, feature_extraction_configs, sr_configs=None):14        self.extraction_library = feature_extraction_configs["extraction_library"]15        self.upscale = 116 17        self.blink_detection = feature_extraction_configs["blink_detection"]18        self.features_extractor = FeaturesExtractor(19            extraction_library=self.extraction_library,20            blink_detection=self.blink_detection,21            upscale=self.upscale,22        )23 24    def __call__(self, img):25        result_dict = self.features_extractor(img)26        return result_dict27