haritsahm commited on
Commit
3a0c9d4
·
1 Parent(s): 8c5fd52

Update image preprocessing using cv2

Browse files
Files changed (1) hide show
  1. main.py +3 -0
main.py CHANGED
@@ -125,6 +125,9 @@ def predict_bilateral(files):
125
 
126
  for path in filtered_files:
127
  image = np.array(Image.open(str(path)))
 
 
 
128
  images.append(image)
129
 
130
  images = np.asarray(images).astype(np.float32)
 
125
 
126
  for path in filtered_files:
127
  image = np.array(Image.open(str(path)))
128
+ image = cv2.normalize(
129
+ image, None, 0, 255, cv2.NORM_MINMAX, dtype=cv2.CV_8U)
130
+
131
  images.append(image)
132
 
133
  images = np.asarray(images).astype(np.float32)