kamangir
commited on
Commit
•
ff67081
1
Parent(s):
5877e39
validating fashion_mnist train - kamangir/bolt#689
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.61"
|
4 |
|
5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|
image_classifier/classes.py
CHANGED
@@ -1,7 +1,11 @@
|
|
|
|
1 |
from .plot import *
|
2 |
from abcli import file
|
3 |
from abcli import path
|
4 |
from abcli import string
|
|
|
|
|
|
|
5 |
import numpy as np
|
6 |
import matplotlib.pyplot as plt
|
7 |
import tensorflow as tf
|
@@ -79,14 +83,17 @@ class Image_Classifier(object):
|
|
79 |
prediction_time = (time.time() - prediction_time) / test_images.shape[0]
|
80 |
logger.info(
|
81 |
"image_classifier.predict(): {} / frame".format(
|
82 |
-
string.pretty_duration(
|
|
|
|
|
|
|
83 |
)
|
84 |
)
|
85 |
|
86 |
if not output_path:
|
87 |
return True
|
88 |
|
89 |
-
if not file.save("{}/predictions.pyndarray"
|
90 |
return False
|
91 |
|
92 |
if test_labels is not None:
|
|
|
1 |
+
import cv2
|
2 |
from .plot import *
|
3 |
from abcli import file
|
4 |
from abcli import path
|
5 |
from abcli import string
|
6 |
+
from abcli.plugins import graphics
|
7 |
+
from abcli.plugins import objects
|
8 |
+
from abcli.tasks import host
|
9 |
import numpy as np
|
10 |
import matplotlib.pyplot as plt
|
11 |
import tensorflow as tf
|
|
|
83 |
prediction_time = (time.time() - prediction_time) / test_images.shape[0]
|
84 |
logger.info(
|
85 |
"image_classifier.predict(): {} / frame".format(
|
86 |
+
string.pretty_duration(
|
87 |
+
prediction_time,
|
88 |
+
include_ms=True,
|
89 |
+
)
|
90 |
)
|
91 |
)
|
92 |
|
93 |
if not output_path:
|
94 |
return True
|
95 |
|
96 |
+
if not file.save(f"{output_path}/predictions.pyndarray", predictions):
|
97 |
return False
|
98 |
|
99 |
if test_labels is not None:
|