different output shape and squash crop mode
Browse files
app.py
CHANGED
@@ -35,6 +35,7 @@ config = resolve_data_config({}, model=vit)
|
|
35 |
config['no_aug'] = True
|
36 |
config['interpolation'] = 'bilinear'
|
37 |
config['crop_pct'] = 1
|
|
|
38 |
transform = create_transform(**config)
|
39 |
|
40 |
# Inference function
|
@@ -92,8 +93,8 @@ demo = gr.Interface(
|
|
92 |
query_image,
|
93 |
#inputs=[gr.Image(), "text", "checkbox", gr.Slider(0, 1, value=0.25)],
|
94 |
inputs=[gr.Image(type='numpy', label='input_img').style(height=340, width=600), "text", "checkbox", gr.Slider(0, 1, value=0.25)],
|
95 |
-
outputs="image",
|
96 |
-
|
97 |
title="Object Detection Using Textual Queries",
|
98 |
description=description,
|
99 |
examples=[
|
|
|
35 |
config['no_aug'] = True
|
36 |
config['interpolation'] = 'bilinear'
|
37 |
config['crop_pct'] = 1
|
38 |
+
config['crop_mode'] = 'squash'
|
39 |
transform = create_transform(**config)
|
40 |
|
41 |
# Inference function
|
|
|
93 |
query_image,
|
94 |
#inputs=[gr.Image(), "text", "checkbox", gr.Slider(0, 1, value=0.25)],
|
95 |
inputs=[gr.Image(type='numpy', label='input_img').style(height=340, width=600), "text", "checkbox", gr.Slider(0, 1, value=0.25)],
|
96 |
+
#outputs="image",
|
97 |
+
outputs=gr.Image(type='numpy', label='output').style(height=600, width=600),
|
98 |
title="Object Detection Using Textual Queries",
|
99 |
description=description,
|
100 |
examples=[
|