fmajer commited on
Commit
4cedd75
·
1 Parent(s): 91b1c4e

added description

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -92,14 +92,19 @@ Best results are obtained using one of these sentences, which were used during t
92
  \n\n
93
  When the binarize option is turned off, model will output propabilities of requested {class} for each patch. When binarize option is turned on
94
  the model will binarize each propability based on set eval_threshold.
 
 
 
 
 
95
  """
96
  demo = gr.Interface(
97
  query_image,
98
  #inputs=[gr.Image(), "text", "checkbox", gr.Slider(0, 1, value=0.25)],
99
- inputs=[gr.Image(type='numpy', label='input_img').style(height=200, width=600), "text", "checkbox", gr.Slider(0, 1, value=0.25),
100
- gr.Radio(["center", "squash", "border"], value='center', label='crop_mode'), gr.Slider(0.7, 1, value=1)],
101
  #outputs="image",
102
- outputs=gr.Image(type='numpy', label='output').style(height=610, width=600),
103
  title="Object Detection Using Textual Queries",
104
  description=description,
105
  examples=[
 
92
  \n\n
93
  When the binarize option is turned off, model will output propabilities of requested {class} for each patch. When binarize option is turned on
94
  the model will binarize each propability based on set eval_threshold.
95
+ \n\n
96
+ Each input image is transformed to size 224x224 so it can be processed by ViT. During this transformation, different
97
+ crop_modes and crop_percentage can be selected. The model was trained using crop_mode='center', crop_pct = 0.9.
98
+ For explanation of different crop_modes, please refer to
99
+ <a href="https://github.com/huggingface/pytorch-image-models/blob/main/timm/data/transforms_factory.py">this</a> website, lines 155-172.
100
  """
101
  demo = gr.Interface(
102
  query_image,
103
  #inputs=[gr.Image(), "text", "checkbox", gr.Slider(0, 1, value=0.25)],
104
+ inputs=[gr.Image(type='numpy', label='input_img').style(height=196, width=600), "text", "checkbox", gr.Slider(0, 1, value=0.25),
105
+ gr.Radio(["center", "squash", "border"], value='center', label='crop_mode'), gr.Slider(0.7, 1, value=0.9)],
106
  #outputs="image",
107
+ outputs=gr.Image(type='numpy', label='output').style(height=600, width=600),
108
  title="Object Detection Using Textual Queries",
109
  description=description,
110
  examples=[