예제 #1
0
 def __init__(self, dir_path='dataset/data'):
     self.image_size = tuple((500, 500))
     self.features = []
     self.image_path_list = []
     self.mse_all = []
     self.labels = []
     #object of feature extractor
     self.fe_obj = fe.Global_feature_extraction()
     self.dir_path = dir_path
     self.lables = os.listdir(dir_path)
     self.lables.sort()
예제 #2
0
 def __init__(self, csv_path):
     self.image_size = tuple((500, 500))
     self.features = []
     self.image_path_list = []
     self.mse_all = []
     self.labels = []
     #object of feature extractor
     self.fe_obj = fe.Global_feature_extraction()
     #self.dir_path = dir_path
     self.csv_path = csv_path
     self.data = pd.read_csv(csv_path, index_col=0)
예제 #3
0
#|_________________________|

import numpy as np
import cv2
import global_feature_extractor as fe
import os
import glob
import pickle as pkl
#******************************  hiper parameters
image_size = tuple((500, 500))
features = []
image_path_list = []
mse_all = []
labels = []
#object of feature extractor
fe_obj = fe.Global_feature_extraction()
dir_path = 'dataset/data'
lables = os.listdir(dir_path)
lables.sort()

#******************************
print("\n\n [INFO] successfully loaded hiper parameters ...")

# loop over all the labels in the folder
count = 1
for i, label in enumerate(lables):
    cur_path = dir_path + "/" + label
    count = 1
    features = []
    labels = []
    image_path_list = []