yuragoithf commited on
Commit
8e52ff9
·
1 Parent(s): 039895f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,13 +58,13 @@ def gen_pred(img, model=seg_model):
58
  # pil_image = img.convert('RGB')
59
  # open_cv_image = np.array(pil_image)
60
  # img = open_cv_image[:, :, ::-1].copy()
61
- # # img = cv2.imread("./003e2c95d.jpg")
62
  img = img[::IMG_SCALING[0], ::IMG_SCALING[1]]
63
  img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
64
  img = img/255
65
  img = tf.expand_dims(img, axis=0)
66
  pred = model.predict(img)
67
- pred = np.squeeze(pred, axis=1)
68
  # image = Image.fromarray(np.uint8(cm.plasma(pred)*255))
69
  pil_img = Image.fromarray(pred, 'RGB')
70
  # im = Image.fromarray((pred * 255).astype(np.uint8))
 
58
  # pil_image = img.convert('RGB')
59
  # open_cv_image = np.array(pil_image)
60
  # img = open_cv_image[:, :, ::-1].copy()
61
+ img = cv2.imread("./003e2c95d.jpg")
62
  img = img[::IMG_SCALING[0], ::IMG_SCALING[1]]
63
  img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
64
  img = img/255
65
  img = tf.expand_dims(img, axis=0)
66
  pred = model.predict(img)
67
+ pred = np.squeeze(pred, axis=0)
68
  # image = Image.fromarray(np.uint8(cm.plasma(pred)*255))
69
  pil_img = Image.fromarray(pred, 'RGB')
70
  # im = Image.fromarray((pred * 255).astype(np.uint8))