From 17ce2a9f170afd317b32047932f88fb5cac3240e Mon Sep 17 00:00:00 2001 From: BrentZ-1849203 Date: Fri, 12 Mar 2021 00:38:28 +0100 Subject: [PATCH 1/2] Update models.py --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index 3ca0cd6..8a8f86d 100755 --- a/models.py +++ b/models.py @@ -72,7 +72,7 @@ def build_model(self, load_pretrained=True): iou_threshold=self.config['iou_threshold'], score_threshold=self.config['score_threshold'])) - if load_pretrained and self.weight_path and self.weight_path.endswith('.weights'): + if load_pretrained and self.weight_path and (self.weight_path.endswith('.weights') or self.weight_path.endswitch('.h5')): if self.weight_path.endswith('.weights'): load_weights(self.yolo_model, self.weight_path) print(f'load from {self.weight_path}') From de0c1968dd60ab8bfa9b7cdf2468b1e0cc876482 Mon Sep 17 00:00:00 2001 From: BrentZ-1849203 Date: Fri, 12 Mar 2021 00:41:06 +0100 Subject: [PATCH 2/2] Update models.py --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index 8a8f86d..e2b434c 100755 --- a/models.py +++ b/models.py @@ -72,7 +72,7 @@ def build_model(self, load_pretrained=True): iou_threshold=self.config['iou_threshold'], score_threshold=self.config['score_threshold'])) - if load_pretrained and self.weight_path and (self.weight_path.endswith('.weights') or self.weight_path.endswitch('.h5')): + if load_pretrained and self.weight_path and (self.weight_path.endswith('.weights') or self.weight_path.endswith('.h5')): if self.weight_path.endswith('.weights'): load_weights(self.yolo_model, self.weight_path) print(f'load from {self.weight_path}')