Trang Dang commited on
Commit
3614812
1 Parent(s): 8dbb7a8
Files changed (1) hide show
  1. run.py +1 -2
run.py CHANGED
@@ -3,7 +3,6 @@ import torch
3
  import numpy as np
4
  import app
5
  import os
6
- from patchify import patchify
7
  from PIL import Image
8
 
9
 
@@ -32,7 +31,7 @@ def pred(src):
32
  my_sam_model = SamModel(config=model_config)
33
  # #Update the model by loading the weights from saved file.
34
  my_sam_model.load_state_dict(torch.load("sam_model.pth", map_location=torch.device('cpu')))
35
-
36
  new_image = np.array(Image.open(src))
37
  inputs = processor(new_image, return_tensors="pt")
38
  my_sam_model.eval()
 
3
  import numpy as np
4
  import app
5
  import os
 
6
  from PIL import Image
7
 
8
 
 
31
  my_sam_model = SamModel(config=model_config)
32
  # #Update the model by loading the weights from saved file.
33
  my_sam_model.load_state_dict(torch.load("sam_model.pth", map_location=torch.device('cpu')))
34
+ print(src)
35
  new_image = np.array(Image.open(src))
36
  inputs = processor(new_image, return_tensors="pt")
37
  my_sam_model.eval()