kamangir
commited on
Commit
•
21ce60a
1
Parent(s):
fa18a17
validating single image predict for fashion_mnist - kamangir/bolt#692
Browse files
image_classifier/__init__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
name = "image_classifier"
|
2 |
|
3 |
-
version = "1.1.
|
4 |
|
5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|
|
|
1 |
name = "image_classifier"
|
2 |
|
3 |
+
version = "1.1.172"
|
4 |
|
5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|
image_classifier/classes.py
CHANGED
@@ -54,17 +54,15 @@ class Image_Classifier(object):
|
|
54 |
f"{model_path}/image_classifier/model"
|
55 |
)
|
56 |
except:
|
57 |
-
|
58 |
-
|
59 |
-
crash_report("image_classifier.load({}) failed".format(model_path))
|
60 |
return False
|
61 |
|
62 |
logger.info(
|
63 |
-
"{}.load({}
|
64 |
self.__class__.__name__,
|
|
|
65 |
self.params["window_size"],
|
66 |
self.params["window_size"],
|
67 |
-
path.name(model_path),
|
68 |
"convnet - " if self.params["convnet"] else "",
|
69 |
len(self.class_names),
|
70 |
",".join(self.class_names),
|
@@ -196,9 +194,7 @@ class Image_Classifier(object):
|
|
196 |
)
|
197 |
)
|
198 |
except:
|
199 |
-
|
200 |
-
|
201 |
-
crash_report("image_classifier.predict_frame() crashed.")
|
202 |
return False, -1
|
203 |
|
204 |
prediction_time = time.time() - prediction_time
|
|
|
54 |
f"{model_path}/image_classifier/model"
|
55 |
)
|
56 |
except:
|
57 |
+
crash_report("-f image_classifier: load({model_path}): failed.")
|
|
|
|
|
58 |
return False
|
59 |
|
60 |
logger.info(
|
61 |
+
"{}.load({}): {}x{} {}{} class(es): {}".format(
|
62 |
self.__class__.__name__,
|
63 |
+
model_path,
|
64 |
self.params["window_size"],
|
65 |
self.params["window_size"],
|
|
|
66 |
"convnet - " if self.params["convnet"] else "",
|
67 |
len(self.class_names),
|
68 |
",".join(self.class_names),
|
|
|
194 |
)
|
195 |
)
|
196 |
except:
|
197 |
+
crash_report("-image_classifier: predict_frame(): failed.")
|
|
|
|
|
198 |
return False, -1
|
199 |
|
200 |
prediction_time = time.time() - prediction_time
|