leoxiaobin haipingwu commited on
Commit
0c7be59
1 Parent(s): 33ee8e1

add_grounding_example (#2)

Browse files

- add grounding example (1911d59bbc7bb437c1c24e1f0f93eaa438a212f7)


Co-authored-by: Haiping Wu <[email protected]>

Files changed (1) hide show
  1. README.md +10 -0
README.md CHANGED
@@ -169,6 +169,16 @@ prompt = <REGION_PROPOSAL>
169
  run_example(prompt)
170
  ```
171
 
 
 
 
 
 
 
 
 
 
 
172
  for More detailed examples, please refer to [notebook](https://huggingface.co/microsoft/Florence-2-large/blob/main/sample_inference.ipynb)
173
  </details>
174
 
 
169
  run_example(prompt)
170
  ```
171
 
172
+ ### Caption to Phrase Grounding
173
+ caption to phrase grounding task requires additional text input, i.e. caption.
174
+
175
+ Caption to phrase grounding results format:
176
+ {'\<CAPTION_TO_PHRASE_GROUNDING>': {'bboxes': [[x1, y1, x2, y2], ...], 'labels': ['', '', ...]}}
177
+ ```python
178
+ task_prompt = '<CAPTION_TO_PHRASE_GROUNDING>'
179
+ results = run_example(task_prompt, text_input="A green car parked in front of a yellow building.")
180
+ ```
181
+
182
  for More detailed examples, please refer to [notebook](https://huggingface.co/microsoft/Florence-2-large/blob/main/sample_inference.ipynb)
183
  </details>
184