Commit 12406f2c authored by dasharatha.vamshi's avatar dasharatha.vamshi

changes

parent 745cbdb6
......@@ -56,6 +56,7 @@ class Welspun_Classifier(ModelWrapper):
self.defect_type = ""
self.frame_skip_count = 25
self.counter = 0
self.k = 0
def _pre_process(self, x):
"""
......@@ -188,6 +189,8 @@ class Welspun_Classifier(ModelWrapper):
return exp_vec / np.sum(exp_vec)
def process_frame(self, frame):
if self.k % 25 == 0:
self.k = self.k + 1
starttime = time.time()
vino_frame = frame.copy()
# vino_frame = vino_frame[20:600,150:650]
......@@ -290,7 +293,8 @@ class Welspun_Classifier(ModelWrapper):
color=(0, 0, 255),
thickness=2,
fontScale=1, fontFace=cv2.LINE_AA)
self.send_payload("Split Defect Detected", resized_frame, "Split " + str(prob[3]), "#472020", "#ed2020",
self.send_payload("Split Defect Detected", resized_frame, "Split " + str(prob[3]), "#472020",
"#ed2020",
"sound_1")
logger.info(f"Probability: {prob}")
# if self.counter % 25 == 0:
......
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