ReyaLabColumbia commited on
Commit
77fd202
·
verified ·
1 Parent(s): fe87e38

Upload Colony_Analyzer_AI_zstack2_HF.py

Browse files
Files changed (1) hide show
  1. Colony_Analyzer_AI_zstack2_HF.py +6 -1
Colony_Analyzer_AI_zstack2_HF.py CHANGED
@@ -284,7 +284,12 @@ def main(args):
284
  src_image = np.array(files[x])
285
  roi = cv2.bitwise_and(src_image, src_image, mask=mask)
286
  # Paste the extracted regions onto the destination image
287
- np.copyto(img, roi, where=(mask[..., None] == 255))
 
 
 
 
 
288
  try:
289
  del x, mask, src_image, roi, best, contours
290
  except:
 
284
  src_image = np.array(files[x])
285
  roi = cv2.bitwise_and(src_image, src_image, mask=mask)
286
  # Paste the extracted regions onto the destination image
287
+ print("ROI Shape:", roi.shape)
288
+ print("img Shape:", img.shape)
289
+ print("mask Shape:", mask.shape)
290
+ mask = np.repeat(mask[..., None], 3, axis=2)
291
+ print("mask Shape fixed:", mask.shape)
292
+ np.copyto(img, roi, where=(mask== 255))
293
  try:
294
  del x, mask, src_image, roi, best, contours
295
  except: