Commit 0699d4fd authored by dasharatha.vamshi's avatar dasharatha.vamshi

good sample to no defect

parent 17a8ef89
...@@ -99,7 +99,7 @@ class Welspun_Classifier(ModelWrapper): ...@@ -99,7 +99,7 @@ class Welspun_Classifier(ModelWrapper):
try: try:
frame = obj['frame'] frame = obj['frame']
orig_image = cv2.resize(frame, (3840, 2160)) orig_image = cv2.resize(frame, (224, 224))
frame = self.process_frame(orig_image) frame = self.process_frame(orig_image)
obj['frame'] = cv2.resize(frame, (self.config.get('FRAME_WIDTH'), self.config.get('FRAME_HEIGHT'))) obj['frame'] = cv2.resize(frame, (self.config.get('FRAME_WIDTH'), self.config.get('FRAME_HEIGHT')))
...@@ -179,7 +179,7 @@ class Welspun_Classifier(ModelWrapper): ...@@ -179,7 +179,7 @@ class Welspun_Classifier(ModelWrapper):
mean = [0.485, 0.456, 0.406] mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225] std = [0.229, 0.224, 0.225]
image = image * 1 / 255.0 image = image * 1 / 255.0
image = (image - mean) / std # image = (image - mean) / std
return image return image
def softmax_function(self, vec): def softmax_function(self, vec):
......
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