turhancan97 commited on
Commit
b62208c
1 Parent(s): 36a6b78

minor bug fix!

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -58,11 +58,11 @@ def visualize_single_image_no_mode(image_path):
58
  # MAE reconstruction pasted with visible patches
59
  im_paste = img * (1 - mask) + predicted_img * mask
60
 
61
- # resize the image to 96 x 96
62
- img = v2.functional.resize(img[0], (96, 96))
63
- im_masked = v2.functional.resize(im_masked[0], (96, 96))
64
- predicted_img = v2.functional.resize(predicted_img[0], (96, 96))
65
- im_paste = v2.functional.resize(im_paste[0], (96, 96))
66
 
67
  # make the plt figure larger
68
  plt.figure(figsize=(18, 8))
@@ -101,6 +101,7 @@ def visualize_single_image_pca_mode(image_path):
101
  im_paste = img * (1 - mask) + predicted_img * mask
102
 
103
  # remove the batch dimension
 
104
  im_masked = im_masked[0]
105
  predicted_img = predicted_img[0]
106
  im_paste = im_paste[0]
 
58
  # MAE reconstruction pasted with visible patches
59
  im_paste = img * (1 - mask) + predicted_img * mask
60
 
61
+ # remove the batch dimension
62
+ img = img[0]
63
+ im_masked = im_masked[0]
64
+ predicted_img = predicted_img[0]
65
+ im_paste = im_paste[0]
66
 
67
  # make the plt figure larger
68
  plt.figure(figsize=(18, 8))
 
101
  im_paste = img * (1 - mask) + predicted_img * mask
102
 
103
  # remove the batch dimension
104
+ img = img[0]
105
  im_masked = im_masked[0]
106
  predicted_img = predicted_img[0]
107
  im_paste = im_paste[0]