Spaces:
Runtime error
Runtime error
jens
commited on
Commit
·
701b155
1
Parent(s):
2d80e04
interactive annotated image
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ with block:
|
|
37 |
input_image = gr.Image(label='Input', type='pil', tool=None) # mirror_webcam = False
|
38 |
sam_encode_btn = gr.Button('Encode', variant='primary')
|
39 |
sam_encode_status = gr.Label('Not encoded yet')
|
40 |
-
masks_annotated_image = gr.AnnotatedImage(label='Segments'
|
41 |
with gr.Column():
|
42 |
pcl_figure = gr.Model3D(label="3-D Reconstruction", clear_color=[1.0, 1.0, 1.0, 1.0])
|
43 |
n_samples = gr.Slider(minimum=1e3, maximum=1e6, step=1e3, default=1e3, label='Number of Samples')
|
@@ -92,7 +92,7 @@ with block:
|
|
92 |
point_labels,
|
93 |
image_edit_trigger]
|
94 |
|
95 |
-
|
96 |
[raw_image, input_image, image_edit_trigger, point_coords, point_labels, point_label_radio],
|
97 |
[raw_image, input_image, point_coords, point_labels, image_edit_trigger], queue=False)
|
98 |
|
|
|
37 |
input_image = gr.Image(label='Input', type='pil', tool=None) # mirror_webcam = False
|
38 |
sam_encode_btn = gr.Button('Encode', variant='primary')
|
39 |
sam_encode_status = gr.Label('Not encoded yet')
|
40 |
+
masks_annotated_image = gr.AnnotatedImage(label='Segments')
|
41 |
with gr.Column():
|
42 |
pcl_figure = gr.Model3D(label="3-D Reconstruction", clear_color=[1.0, 1.0, 1.0, 1.0])
|
43 |
n_samples = gr.Slider(minimum=1e3, maximum=1e6, step=1e3, default=1e3, label='Number of Samples')
|
|
|
92 |
point_labels,
|
93 |
image_edit_trigger]
|
94 |
|
95 |
+
masks_annotated_image.select(on_input_image_select,
|
96 |
[raw_image, input_image, image_edit_trigger, point_coords, point_labels, point_label_radio],
|
97 |
[raw_image, input_image, point_coords, point_labels, image_edit_trigger], queue=False)
|
98 |
|