vision-agent 0.0.44__py3-none-any.whl → 0.0.46__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vision-agent
3
- Version: 0.0.44
3
+ Version: 0.0.46
4
4
  Summary: Toolset for Vision Agent
5
5
  Author: Landing AI
6
6
  Author-email: dev@landing.ai
@@ -71,8 +71,8 @@ You can interact with the agents as you would with any LLM or LMM model:
71
71
  ```python
72
72
  >>> import vision_agent as va
73
73
  >>> agent = VisionAgent()
74
- >>> agent("How many apples are in this image?", image="apples.jpg")
75
- "There are 2 apples in the image."
74
+ >>> agent("What percentage of the area of this jar is filled with coffee beans?", image="jar.jpg")
75
+ "The percentage of area of the jar filled with coffee beans is 25%."
76
76
  ```
77
77
 
78
78
  To better understand how the model came up with it's answer, you can also run it in
@@ -86,22 +86,22 @@ You can also have it return the workflow it used to complete the task along with
86
86
  the individual steps and tools to get the answer:
87
87
 
88
88
  ```python
89
- >>> resp, workflow = agent.chat_with_workflow([{"role": "user", "content": "How many apples are in this image?"}], image="apples.jpg")
89
+ >>> resp, workflow = agent.chat_with_workflow([{"role": "user", "content": "What percentage of the area of this jar is filled with coffee beans?"}], image="jar.jpg")
90
90
  >>> print(workflow)
91
- [{"task": "Count the number of apples using 'grounding_dino_'.",
92
- "tool": "grounding_dino_",
93
- "parameters": {"prompt": "apple", "image": "apples.jpg"},
91
+ [{"task": "Segment the jar using 'grounding_sam_'.",
92
+ "tool": "grounding_sam_",
93
+ "parameters": {"prompt": "jar", "image": "jar.jpg"},
94
94
  "call_results": [[
95
95
  {
96
- "labels": ["apple", "apple"],
97
- "scores": [0.99, 0.95],
96
+ "labels": ["jar"],
97
+ "scores": [0.99],
98
98
  "bboxes": [
99
99
  [0.58, 0.2, 0.72, 0.45],
100
- [0.94, 0.57, 0.98, 0.66],
101
- ]
100
+ ],
101
+ "masks": "mask.png"
102
102
  }
103
103
  ]],
104
- "answer": "There are 2 apples in the image.",
104
+ "answer": "The jar is located at [0.58, 0.2, 0.72, 0.45].",
105
105
  }]
106
106
  ```
107
107
 
@@ -113,13 +113,12 @@ you. For example:
113
113
  ```python
114
114
  >>> import vision_agent as va
115
115
  >>> llm = va.llm.OpenAILLM()
116
- >>> detector = llm.generate_detector("Can you build an apple detector for me?")
117
- >>> detector("apples.jpg")
118
- [{"labels": ["apple", "apple"],
119
- "scores": [0.99, 0.95],
116
+ >>> detector = llm.generate_detector("Can you build a jar detector for me?")
117
+ >>> detector("jar.jpg")
118
+ [{"labels": ["jar",],
119
+ "scores": [0.99],
120
120
  "bboxes": [
121
121
  [0.58, 0.2, 0.72, 0.45],
122
- [0.94, 0.57, 0.98, 0.66],
123
122
  ]
124
123
  }]
125
124
  ```
@@ -133,7 +132,9 @@ you. For example:
133
132
  | Crop | Crop crops an image given a bounding box and returns a file name of the cropped image. |
134
133
  | BboxArea | BboxArea returns the area of the bounding box in pixels normalized to 2 decimal places. |
135
134
  | SegArea | SegArea returns the area of the segmentation mask in pixels normalized to 2 decimal places. |
136
- | ExtractFrames | ExtractFrames extracts image frames from the input video. |
135
+ | BboxIoU | BboxIoU returns the intersection over union of two bounding boxes normalized to 2 decimal places. |
136
+ | SegIoU | SegIoU returns the intersection over union of two segmentation masks normalized to 2 decimal places. |
137
+ | ExtractFrames | ExtractFrames extracts frames with motion from a video. |
137
138
 
138
139
 
139
140
  It also has a basic set of calculate tools such as add, subtract, multiply and divide.
@@ -20,7 +20,7 @@ vision_agent/tools/__init__.py,sha256=AKN-T659HpwVearRnkCd6wWNoJ6K5kW9gAZwb8IQSL
20
20
  vision_agent/tools/prompts.py,sha256=9RBbyqlNlExsGKlJ89Jkph83DAEJ8PCVGaHoNbyN7TM,1416
21
21
  vision_agent/tools/tools.py,sha256=aMTBxxaXQp33HwplOS8xrgfbsTJ8e1pwO6byR7HcTJI,23447
22
22
  vision_agent/tools/video.py,sha256=40rscP8YvKN3lhZ4PDcOK4XbdFX2duCRpHY_krmBYKU,7476
23
- vision_agent-0.0.44.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
24
- vision_agent-0.0.44.dist-info/METADATA,sha256=37VbNe7gzshtrljawNTJ4pHR2-rac_-A_sZFQOxFtvI,5324
25
- vision_agent-0.0.44.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
26
- vision_agent-0.0.44.dist-info/RECORD,,
23
+ vision_agent-0.0.46.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
24
+ vision_agent-0.0.46.dist-info/METADATA,sha256=Q5UxkEqKAbnJJtwwFSGhLhobdwhTJF552zsEfKayXz8,5564
25
+ vision_agent-0.0.46.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
26
+ vision_agent-0.0.46.dist-info/RECORD,,