niulx commited on
Commit
622edaa
1 Parent(s): 9f274bd

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -2
main.py CHANGED
@@ -12,7 +12,7 @@ from utils_mask import check_mask_overlap_torch, check_cover_all_torch, visualiz
12
  def run_main(
13
  name="example_tmp",
14
  name_2=None,
15
- mask_list=None,
16
  mask_label_list=None,
17
  image_gt=None,
18
  dpm="sd",
@@ -74,7 +74,11 @@ def run_main(
74
  base_output_folder = "."
75
 
76
  input_folder = os.path.join(base_input_folder, name)
77
-
 
 
 
 
78
  #mask_list, mask_label_list = load_mask(input_folder)
79
  assert mask_list[0].shape[0] == resolution, "Segmentation should be done on size {}".format(resolution)
80
  #try:
 
12
  def run_main(
13
  name="example_tmp",
14
  name_2=None,
15
+ mask_np_list=None,
16
  mask_label_list=None,
17
  image_gt=None,
18
  dpm="sd",
 
74
  base_output_folder = "."
75
 
76
  input_folder = os.path.join(base_input_folder, name)
77
+ mask_list = []
78
+ for mask_np in mask_np_list:
79
+ mask = torch.from_numpy(mask_np)
80
+ mask_list.append(mask)
81
+
82
  #mask_list, mask_label_list = load_mask(input_folder)
83
  assert mask_list[0].shape[0] == resolution, "Segmentation should be done on size {}".format(resolution)
84
  #try: