Henry Scheible commited on
Commit
c0bbbfb
1 Parent(s): 54e4e45

change number of splits

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -106,7 +106,7 @@ def count_barnacles(image_raw, split_num, progress=gr.Progress()):
106
 
107
  print(cropped_image.shape)
108
 
109
- split_num = 5
110
 
111
  x_inc = int(cropped_image.shape[0]/split_num)
112
  y_inc = int(cropped_image.shape[1]/split_num)
@@ -127,8 +127,6 @@ def count_barnacles(image_raw, split_num, progress=gr.Progress()):
127
  # plt.figure()
128
  # plt.imshow(small_image)
129
  # plt.axis('on')
130
- progress(0, desc=f"Encoding crop {r*split_num + c}/{split_num ** 2}")
131
- mask_generator.predictor.set_image(small_image)
132
  progress(0, desc=f"Generating masks for crop {r*split_num + c}/{split_num ** 2}")
133
  masks = mask_generator.generate(small_image)
134
  num_masks = len(masks)
@@ -145,7 +143,7 @@ def count_barnacles(image_raw, split_num, progress=gr.Progress()):
145
 
146
  progress(0, desc="Generating Plot")
147
  # Create a figure with a size of 10 inches by 10 inches
148
- fig = plt.figure(figsize=(10, 10))
149
 
150
  # Display the image using the imshow() function
151
  # plt.imshow(cropped_image)
 
106
 
107
  print(cropped_image.shape)
108
 
109
+ split_num = 3
110
 
111
  x_inc = int(cropped_image.shape[0]/split_num)
112
  y_inc = int(cropped_image.shape[1]/split_num)
 
127
  # plt.figure()
128
  # plt.imshow(small_image)
129
  # plt.axis('on')
 
 
130
  progress(0, desc=f"Generating masks for crop {r*split_num + c}/{split_num ** 2}")
131
  masks = mask_generator.generate(small_image)
132
  num_masks = len(masks)
 
143
 
144
  progress(0, desc="Generating Plot")
145
  # Create a figure with a size of 10 inches by 10 inches
146
+ fig = plt.figure(figsize=(100, 100))
147
 
148
  # Display the image using the imshow() function
149
  # plt.imshow(cropped_image)