Skip to content

Commit

Permalink
Merge branch 'main' into fix-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird authored Oct 11, 2024
2 parents 7b2e87f + 5775fdd commit 0cf9b4d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "vision-agent"
version = "0.2.160"
version = "0.2.162"
description = "Toolset for Vision Agent"
authors = ["Landing AI <[email protected]>"]
readme = "README.md"
Expand Down
1 change: 0 additions & 1 deletion vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ def generate_code_from_plan(
code = remove_installs_from_code(cast(str, results["code"]))
test = remove_installs_from_code(cast(str, results["test"]))
working_memory.extend(results["working_memory"]) # type: ignore

execution_result = cast(Execution, results["test_result"])

return {
Expand Down
8 changes: 2 additions & 6 deletions vision_agent/agent/vision_agent_planner_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
```python
import numpy as np
from vision_agent.tools import save_video, extract_frames_and_timestamps, owl_v2_video, florence2_phrase_grounding, florence2_sam2_video_tracking
from vision_agent.tools import extract_frames_and_timestamps, owl_v2_video, florence2_phrase_grounding, florence2_sam2_video_tracking
# sample at 1 FPS and use the first 10 frames to reduce processing time
frames = extract_frames_and_timestamps("video.mp4", 1)
Expand Down Expand Up @@ -125,18 +125,15 @@ def get_counts(preds):
# plan1
owl_v2_out = owl_v2_video("person", frames)
owl_v2_counts = get_counts(owl_v2_out)
save_video(frames, owl_v2_out, "owl_v2_video.mp4")
# plan2
florence2_out = [florence2_phrase_grounding("person", f) for f in frames]
florence2_counts = get_counts(florence2_out)
save_video(frames, florence2_out, "florence2_phrase_grounding.mp4")
# plan3
f2s2_tracking_out = florence2_sam2_video_tracking("person", frames)
remove_arrays(f2s2_tracking_out)
f2s2_counts = get_counts(f2s2_tracking_out)
save_video(frames, f2s2_tracking_out, "florence2_sam2_video_tracking.mp4")
final_out = {{
"owl_v2_video": owl_v2_out,
Expand All @@ -153,15 +150,14 @@ def get_counts(preds):
print(final_out)
print(labels_and_scores)
print(counts)
print("Visualizations saved to owl_v2_video.mp4, florence2_phrase_grounding.mp4, florence2_sam2_video_tracking.mp4")
```
--- END EXAMPLE2 ---
**Instructions**:
1. Write a program to load the media and call each tool and print it's output along with other relevant information.
2. Create a dictionary where the keys are the tool name and the values are the tool outputs. Remove numpy arrays from the printed dictionary.
3. Your test case MUST run only on the given images which are {media}
4. Print this final dictionary and save any visualizations to help the user understand the output.
4. Print this final dictionary.
5. For video input, sample at 1 FPS and use the first 10 frames only to reduce processing time.
"""

Expand Down

0 comments on commit 0cf9b4d

Please sign in to comment.