xiazhi1 commited on
Commit
96ec051
1 Parent(s): 8794fc2

remove load ckpt and img from model

Browse files
app.py CHANGED
@@ -9,13 +9,13 @@ from cell_segmentation.inference.inference_cellvit_experiment_monuseg import Inf
9
 
10
  ## local | remote
11
  RUN_MODE = "remote"
12
- if RUN_MODE != "local":
13
- os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/model_best.pth")
14
- ## examples
15
- os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/1.png")
16
- os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/2.png")
17
- os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/3.png")
18
- os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/4.png")
19
 
20
  ## step 1: set up model
21
 
 
9
 
10
  ## local | remote
11
  RUN_MODE = "remote"
12
+ # if RUN_MODE != "local":
13
+ # os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/model_best.pth")
14
+ # ## examples
15
+ # os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/1.png")
16
+ # os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/2.png")
17
+ # os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/3.png")
18
+ # os.system("wget https://huggingface.co/xiazhi/LKCell-demo/resolve/main/4.png")
19
 
20
  ## step 1: set up model
21
 
cell_segmentation/inference/inference_cellvit_experiment_monuseg.py CHANGED
@@ -876,7 +876,6 @@ class MoNuSegInference:
876
  placeholder[: h, 3 * w : 4 * w, :3] = np.asarray(pred_cell_image) / 255
877
 
878
  # plotting
879
- test_image = Image.fromarray((placeholder * 255).astype(np.uint8))
880
  fig, axs = plt.subplots(figsize=(3, 2), dpi=1200)
881
  axs.imshow(placeholder)
882
  axs.set_xticks(np.arange(w / 2, 4 * w, w))
 
876
  placeholder[: h, 3 * w : 4 * w, :3] = np.asarray(pred_cell_image) / 255
877
 
878
  # plotting
 
879
  fig, axs = plt.subplots(figsize=(3, 2), dpi=1200)
880
  axs.imshow(placeholder)
881
  axs.set_xticks(np.arange(w / 2, 4 * w, w))