diff --git a/model.py b/model.py index a8e7d78..6dcfae0 100644 --- a/model.py +++ b/model.py @@ -46,13 +46,11 @@ def __init__(self, cfg_file): self.l_model = [] self.encodings_path = params['encodings_path'] - self.configs_path = params['configs_path'] self.plots_path = params['plots_path'] self.tensorboard_log_path = params['tensorboard_log_path'] self.weights_save_path = params['weights_save_path'] os.makedirs(self.encodings_path, exist_ok=True) - os.makedirs(self.configs_path, exist_ok=True) os.makedirs(self.plots_path, exist_ok=True) os.makedirs(self.tensorboard_log_path, exist_ok=True) os.makedirs(self.weights_save_path, exist_ok=True) @@ -235,7 +233,6 @@ def predict(self, image): else: img = image img = cv2.resize(img, (self.input_shape[0], self.input_shape[1])) - print(img.shape) encoding = self.base_model.predict(np.expand_dims(img, axis=0)) distances = self.calculate_distances(encoding) max_element = np.argmin(distances) diff --git a/utils.py b/utils.py index e8d94a2..3f1b761 100644 --- a/utils.py +++ b/utils.py @@ -97,19 +97,13 @@ def parse_net_params(filename='configs/road_signs.yml'): params = {k: v for k, v in cfg.items() if k not in ['optimizer']} - current_directory = os.path.dirname(os.path.abspath(__file__)) - print(current_directory) - params['encodings_path'] = os.path.join(current_directory, - cfg['encodings_path'], + params['encodings_path'] = os.path.join(cfg['encodings_path'], cfg['project_name']) - params['plots_path'] = os.path.join(current_directory, - cfg['plots_path'], + params['plots_path'] = os.path.join(cfg['plots_path'], cfg['project_name']) - params['tensorboard_log_path'] = os.path.join(current_directory, - cfg['tensorboard_log_path'], + params['tensorboard_log_path'] = os.path.join(cfg['tensorboard_log_path'], cfg['project_name']) - params['weights_save_path'] = os.path.join(current_directory, - cfg['weights_save_path'], + params['weights_save_path'] = os.path.join(cfg['weights_save_path'], cfg['project_name']) if 'dataset_path' in cfg: