Spaces:
Running
Running
Fix bug in image loader v3
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ def greet(image, audio):
|
|
62 |
|
63 |
# Localization result
|
64 |
out_dict = model(image_file.to(model.device), audio_driven_embedding, 352)
|
65 |
-
seg = out_dict['heatmap'][
|
66 |
seg_image = ((1 - seg.squeeze().detach().cpu().numpy()) * 255).astype(np.uint8)
|
67 |
seg_image = Image.fromarray(seg_image)
|
68 |
heatmap_image = cv2.applyColorMap(np.array(seg_image), cv2.COLORMAP_JET)
|
@@ -70,8 +70,12 @@ def greet(image, audio):
|
|
70 |
|
71 |
return overlaid_image
|
72 |
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
75 |
|
76 |
demo = gr.Interface(
|
77 |
fn=greet,
|
|
|
62 |
|
63 |
# Localization result
|
64 |
out_dict = model(image_file.to(model.device), audio_driven_embedding, 352)
|
65 |
+
seg = out_dict['heatmap'][0:1]
|
66 |
seg_image = ((1 - seg.squeeze().detach().cpu().numpy()) * 255).astype(np.uint8)
|
67 |
seg_image = Image.fromarray(seg_image)
|
68 |
heatmap_image = cv2.applyColorMap(np.array(seg_image), cv2.COLORMAP_JET)
|
|
|
70 |
|
71 |
return overlaid_image
|
72 |
|
73 |
+
|
74 |
+
title = "Zero-shot sound source localization with ACL"
|
75 |
+
description = "This is simple demo of our WACV'24 paper 'Can CLIP Help Sound Source Localization?'\n"
|
76 |
+
description += "To use it, simply upload an image and corresponding audio to mask (identify in the image)"
|
77 |
+
description += "or use one of the examples below and click 'submit'. Results will show up in a few seconds."
|
78 |
+
|
79 |
|
80 |
demo = gr.Interface(
|
81 |
fn=greet,
|