File size: 811 Bytes
0f2d9f6
 
 
 
 
 
 
 
 
 
 
 
 
 
7ee620d
0f2d9f6
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import sys
import cv2
import os.path as osp

root_path = osp.abspath(osp.join(__file__, osp.pardir, osp.pardir))
sys.path.append(root_path)

from feature_extraction.features_extractor import FeaturesExtractor


class EyeDentityDatasetCreation:

    def __init__(self, feature_extraction_configs, sr_configs=None):
        self.extraction_library = feature_extraction_configs["extraction_library"]
        self.upscale = 1

        self.blink_detection = feature_extraction_configs["blink_detection"]
        self.features_extractor = FeaturesExtractor(
            extraction_library=self.extraction_library,
            blink_detection=self.blink_detection,
            upscale=self.upscale,
        )

    def __call__(self, img):
        result_dict = self.features_extractor(img)
        return result_dict