-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathextractor.py
More file actions
35 lines (24 loc) · 897 Bytes
/
extractor.py
File metadata and controls
35 lines (24 loc) · 897 Bytes
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
28
29
30
31
32
33
"""
Author: Viet Nguyen
Date: 2022-08-28
"""
# %%
##### CLASS ORDER ###########
##### Backgrund: 0
##### Sclera: 1
##### Iris: 2
##### PUPIL: 3
import os
from vietlib.data.extractor import OpenEDSExtractor, OptimizedRITEyesNewPipelineExtractor
os.makedirs("data", exist_ok=True)
# image_size = (320, 240) # Small
# image_size = (400, 320) # large
image_size = (400, 640) # original
data_dir = "/data/OpenEDS/Semantic_Segmentation_Dataset" # Path to your downloaded dataset
target_path = "./data/open_eds_real.h5"
e = OpenEDSExtractor(data_dir, target_path, image_size=image_size, val_with_train=True, keep_original=True)
e.extract(resizing=False)
data_dir = "/data/new_rit_eyes/raw" # Path to your downloaded dataset
target_path = "./data/rit_eyes.h5"
e = OptimizedRITEyesNewPipelineExtractor(data_dir, target_path, image_size=image_size, val_with_train=True)
e.extract(resizing=False)