Skip to content

Commit

Permalink
fixed bug in prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Jul 9, 2024
1 parent e277003 commit c23df33
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vision_agent/agent/vision_agent_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,23 @@
- Use the 'owl_v2' tool with the prompt 'person' to detect and count the number of people in the image.
plan2:
- Load the image from the provided file path 'image.jpg'.
- Use the 'florencev2_object_detection' tool to detect common objects in the image, including people.
- Use the 'grounding_sam' tool with the prompt 'person' to detect and count the number of people in the image.
- Count the number of detected objects labeled as 'person'.
plan3:
- Load the image from the provided file path 'image.jpg'.
- Use the 'loca_zero_shot_counting' tool to count the dominant foreground object, which in this case is people.
```python
from vision_agent.tools import load_image, owl_v2, florencev2_object_detection, loca_zero_shot_counting
from vision_agent.tools import load_image, owl_v2, grounding_sam, loca_zero_shot_counting
image = load_image("image.jpg")
owl_v2_out = owl_v2("person", image)
florencev2_out = florencev2_object_detection(image)
gsam_out = grounding_sam("person", image)
gsam_out = [{{k: v for k, v in o.items() if k != "mask"}} for o in gsam_out]
loca_out = loca_zero_shot_counting(image)
loca_out = loca_out["count"]
final_out = {{"owl_v2": owl_v2_out, "florencev2_object_detection": florencev2_out, "loca_zero_shot_counting": loca_out}}
print(final_out)
```
Expand Down

0 comments on commit c23df33

Please sign in to comment.