Spaces:
Running
Running
Update app.py
Browse files
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((
|
86 |
-
full_mask = np.zeros((
|
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()
|