Commit ae9d1080 authored by dasharatha.vamshi's avatar dasharatha.vamshi

changes

parent 12189ac4
...@@ -209,7 +209,6 @@ class Welspun_Classifier(ModelWrapper): ...@@ -209,7 +209,6 @@ class Welspun_Classifier(ModelWrapper):
# log.info("Batch size is {}".format(n)) # log.info("Batch size is {}".format(n))
# #
# log.info("Starting inference in synchronous mode") # log.info("Starting inference in synchronous mode")
if self.counter % 3 == 0:
start = time.time() start = time.time()
res = self.exec_net.infer(inputs={self.input_blob: images}) res = self.exec_net.infer(inputs={self.input_blob: images})
print(f"Inference time: {time.time() - start}") print(f"Inference time: {time.time() - start}")
...@@ -227,7 +226,7 @@ class Welspun_Classifier(ModelWrapper): ...@@ -227,7 +226,7 @@ class Welspun_Classifier(ModelWrapper):
a = x.index(max(x)) a = x.index(max(x))
# print(type(prob)) # print(type(prob))
# if self.counter%1 == 0: # if self.counter%1 == 0:
# self.counter = self.counter + 1 self.counter = self.counter + 1
if a == 1 and x[1] > 0.95: if a == 1 and x[1] > 0.95:
if self.defect_type == 'Mix': if self.defect_type == 'Mix':
...@@ -347,10 +346,9 @@ class Welspun_Classifier(ModelWrapper): ...@@ -347,10 +346,9 @@ class Welspun_Classifier(ModelWrapper):
# fontScale=1, fontFace=cv2.LINE_AA) # fontScale=1, fontFace=cv2.LINE_AA)
# self.send_payload("Stitch Detected", frame, "Stitch " + str(prob[0]), "#472020", "#ed2020", "sound_1") # self.send_payload("Stitch Detected", frame, "Stitch " + str(prob[0]), "#472020", "#ed2020", "sound_1")
# logger.info(f"Probability: {prob}") # logger.info(f"Probability: {prob}")
self.counter = self.counter + 1 # self.counter= self.counter + 1
print("total time taken to process-------------> ", str(time.time() - starttime)) print("total time taken to process-------------> ", str(time.time() - starttime))
# logger.info(f"total time taken to process----------------- {time.time()-starttime}") # logger.info(f"total time taken to process----------------- {time.time()-starttime}")
# cv2.imshow('res', frame) # cv2.imshow('res', frame)
else:
pass
return frame return frame
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment