snicolau commited on
Commit
0444efc
Β·
verified Β·
1 Parent(s): eb0ec9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -82,8 +82,8 @@ def get_mask(img, num_people_keep, dilate_kernel_size):
82
  eliminate_instances = people_instances[num_people_keep:]
83
 
84
  # Generate mask
85
- blank_mask = np.ones((image.shape[0],img.shape[1]), dtype=np.uint8) * 255
86
- full_mask = np.zeros((image.shape[0],img.shape[1]), dtype=np.uint8) * 255
87
 
88
  for instance_mask in eliminate_instances.pred_masks:
89
  full_mask = full_mask + blank_mask*instance_mask.to("cpu").numpy()
 
82
  eliminate_instances = people_instances[num_people_keep:]
83
 
84
  # Generate mask
85
+ blank_mask = np.ones((img.shape[0],img.shape[1]), dtype=np.uint8) * 255
86
+ full_mask = np.zeros((img.shape[0],img.shape[1]), dtype=np.uint8) * 255
87
 
88
  for instance_mask in eliminate_instances.pred_masks:
89
  full_mask = full_mask + blank_mask*instance_mask.to("cpu").numpy()