LiamKhoaLe commited on
Commit
f6d5295
·
1 Parent(s): 6b36bc1

Add debug on movable mask object

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -429,6 +429,8 @@ def _pipeline(uid,img_path):
429
  seg = cv2.resize(seg_tensor.numpy(), (640, 640), interpolation=cv2.INTER_NEAREST)
430
  print(f"🧪 [{uid}] segmentation input shape: {inputs['pixel_values'].shape}")
431
  water_mask, garbage_mask, movable_mask = build_masks(seg) # movable zone = water and garbage masks
 
 
432
 
433
  # 2- Garbage detection (3 models) → keep centres on water
434
  detections=[]
 
429
  seg = cv2.resize(seg_tensor.numpy(), (640, 640), interpolation=cv2.INTER_NEAREST)
430
  print(f"🧪 [{uid}] segmentation input shape: {inputs['pixel_values'].shape}")
431
  water_mask, garbage_mask, movable_mask = build_masks(seg) # movable zone = water and garbage masks
432
+ cv2.imwrite(f"{OUTPUT_DIR}/{uid}_movable_mask.png", movable_mask * 255)
433
+ print(f"🧩 Saved debug movable_mask: {OUTPUT_DIR}/{uid}_movable_mask.png")
434
 
435
  # 2- Garbage detection (3 models) → keep centres on water
436
  detections=[]