Commit 90517f90 authored by dasharatha.vamshi's avatar dasharatha.vamshi

good sample to no defect

parent 3b0a1bb7
...@@ -225,7 +225,7 @@ class Welspun_Classifier(ModelWrapper): ...@@ -225,7 +225,7 @@ class Welspun_Classifier(ModelWrapper):
# if self.counter%1 == 0: # if self.counter%1 == 0:
self.counter = self.counter + 1 self.counter = self.counter + 1
if a == 0 and max(x) > 0: if a == 0 and x[0] > 0.95:
resized_frame = cv2.resize(frame, (64, 64)) resized_frame = cv2.resize(frame, (64, 64))
cv2.putText(frame, text="Mix Color Defect Detected", org=(50, 50), cv2.putText(frame, text="Mix Color Defect Detected", org=(50, 50),
color=(0, 0, 255), color=(0, 0, 255),
...@@ -238,7 +238,7 @@ class Welspun_Classifier(ModelWrapper): ...@@ -238,7 +238,7 @@ class Welspun_Classifier(ModelWrapper):
"sound_1") "sound_1")
logger.info(f"Probability: {prob}") logger.info(f"Probability: {prob}")
self.counter = 0 self.counter = 0
elif a == 2 and max(x) > 0: elif a == 2 and x[2] > 0.95:
resized_frame = cv2.resize(frame, (64, 64)) resized_frame = cv2.resize(frame, (64, 64))
cv2.putText(frame, text="Split Defect Detected", org=(50, 50), cv2.putText(frame, text="Split Defect Detected", org=(50, 50),
color=(0, 0, 255), color=(0, 0, 255),
...@@ -250,7 +250,7 @@ class Welspun_Classifier(ModelWrapper): ...@@ -250,7 +250,7 @@ class Welspun_Classifier(ModelWrapper):
"sound_1") "sound_1")
logger.info(f"Probability: {prob}") logger.info(f"Probability: {prob}")
self.counter = 0 self.counter = 0
elif a == 1 and max(x) > 0: elif a == 1 and x[1] > 0.95:
resized_frame = cv2.resize(frame, (64, 64)) resized_frame = cv2.resize(frame, (64, 64))
cv2.putText(frame, text="Short Tile Defect Detected", org=(50, 50), cv2.putText(frame, text="Short Tile Defect Detected", org=(50, 50),
color=(0, 0, 255), color=(0, 0, 255),
......
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