Update app.py
Browse files
app.py
CHANGED
@@ -282,7 +282,7 @@ def run_grounded_sam(input_image, text_prompt, task_type, background_prompt):
|
|
282 |
green_img = alpha_pred[..., None] * image_ori + (1 - alpha_pred[..., None]) * np.array([PALETTE_back], dtype='uint8')
|
283 |
green_img = np.uint8(green_img)
|
284 |
#return [(com_img, 'composite with background'), (green_img, 'green screen'), (alpha_rgb, 'alpha matte')]
|
285 |
-
return com_img, alpha_rgb
|
286 |
|
287 |
def infer(video_in, trim_value, prompt, background_prompt):
|
288 |
print(prompt)
|
@@ -349,7 +349,7 @@ if __name__ == "__main__":
|
|
349 |
gr.Markdown(
|
350 |
"""
|
351 |
# Matting Anything in Video Demo
|
352 |
-
Welcome to the Matting Anything in Video demo and upload your video to get started <br/>
|
353 |
You may open usage details below to understand how to use this demo.
|
354 |
## Usage
|
355 |
<details>
|
|
|
282 |
green_img = alpha_pred[..., None] * image_ori + (1 - alpha_pred[..., None]) * np.array([PALETTE_back], dtype='uint8')
|
283 |
green_img = np.uint8(green_img)
|
284 |
#return [(com_img, 'composite with background'), (green_img, 'green screen'), (alpha_rgb, 'alpha matte')]
|
285 |
+
return com_img, green_img, alpha_rgb
|
286 |
|
287 |
def infer(video_in, trim_value, prompt, background_prompt):
|
288 |
print(prompt)
|
|
|
349 |
gr.Markdown(
|
350 |
"""
|
351 |
# Matting Anything in Video Demo
|
352 |
+
Welcome to the Matting Anything in Video demo by @fffiloni and upload your video to get started <br/>
|
353 |
You may open usage details below to understand how to use this demo.
|
354 |
## Usage
|
355 |
<details>
|