vision-agent 0.2.154__py3-none-any.whl → 0.2.155__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vision_agent/tools/tools.py +9 -5
- {vision_agent-0.2.154.dist-info → vision_agent-0.2.155.dist-info}/METADATA +1 -1
- {vision_agent-0.2.154.dist-info → vision_agent-0.2.155.dist-info}/RECORD +5 -5
- {vision_agent-0.2.154.dist-info → vision_agent-0.2.155.dist-info}/LICENSE +0 -0
- {vision_agent-0.2.154.dist-info → vision_agent-0.2.155.dist-info}/WHEEL +0 -0
vision_agent/tools/tools.py
CHANGED
@@ -700,18 +700,22 @@ def countgd_counting(
|
|
700
700
|
{'score': 0.98, 'label': 'flower', 'bbox': [0.44, 0.24, 0.49, 0.58},
|
701
701
|
]
|
702
702
|
"""
|
703
|
-
|
703
|
+
buffer_bytes = numpy_to_bytes(image)
|
704
|
+
files = [("image", buffer_bytes)]
|
704
705
|
prompt = prompt.replace(", ", " .")
|
705
|
-
payload = {"
|
706
|
+
payload = {"prompts": [prompt], "model": "countgd"}
|
706
707
|
metadata = {"function_name": "countgd_counting"}
|
707
|
-
resp_data = send_task_inference_request(
|
708
|
+
resp_data = send_task_inference_request(
|
709
|
+
payload, "text-to-object-detection", files=files, metadata=metadata
|
710
|
+
)
|
711
|
+
bboxes_per_frame = resp_data[0]
|
708
712
|
bboxes_formatted = [
|
709
713
|
ODResponseData(
|
710
714
|
label=bbox["label"],
|
711
|
-
bbox=list(map(lambda x: round(x, 2), bbox["
|
715
|
+
bbox=list(map(lambda x: round(x, 2), bbox["bounding_box"])),
|
712
716
|
score=round(bbox["score"], 2),
|
713
717
|
)
|
714
|
-
for bbox in
|
718
|
+
for bbox in bboxes_per_frame
|
715
719
|
]
|
716
720
|
filtered_bboxes = filter_bboxes_by_threshold(bboxes_formatted, box_threshold)
|
717
721
|
return [bbox.model_dump() for bbox in filtered_bboxes]
|
@@ -18,7 +18,7 @@ vision_agent/tools/__init__.py,sha256=u41fm9KGX1s9DWzVAGnuungEooxH4X8fSDk5hjXvDi
|
|
18
18
|
vision_agent/tools/meta_tools.py,sha256=FN2oMhXzCzSzmk6Na6uKw1r5-CGO3lCk94izcWNFKwA,25167
|
19
19
|
vision_agent/tools/prompts.py,sha256=V1z4YJLXZuUl_iZ5rY0M5hHc_2tmMEUKr0WocXKGt4E,1430
|
20
20
|
vision_agent/tools/tool_utils.py,sha256=FTSboDmYPQLmIhsc9FeydcrdRZU6huBZKnyBmm0VsHE,8196
|
21
|
-
vision_agent/tools/tools.py,sha256=
|
21
|
+
vision_agent/tools/tools.py,sha256=3T5h9dewsqkKu66BlNdBwXnEKNCBl0_FhdHwTNYQolI,78471
|
22
22
|
vision_agent/tools/tools_types.py,sha256=Qijj5NmY6_Aq1fYwuQYf3J1TAQYTz_1mWkX3Dq4d4e0,2339
|
23
23
|
vision_agent/utils/__init__.py,sha256=7fMgbZiEwbNS0fBOS_hJI5PuEYBblw36zLi_UjUzvj4,244
|
24
24
|
vision_agent/utils/exceptions.py,sha256=booSPSuoULF7OXRr_YbC4dtKt6gM_HyiFQHBuaW86C4,2052
|
@@ -27,7 +27,7 @@ vision_agent/utils/image_utils.py,sha256=rm9GfXvD4JrjnqKrP_f2gfq4SzmqYC0IdC1kKwd
|
|
27
27
|
vision_agent/utils/sim.py,sha256=ZuSS07TUXFGjipmiQoY8TKRmSes7XXCdtU9PI8PC1sw,5609
|
28
28
|
vision_agent/utils/type_defs.py,sha256=BE12s3JNQy36QvauXHjwyeffVh5enfcvd4vTzSwvEZI,1384
|
29
29
|
vision_agent/utils/video.py,sha256=xbMEoRk13l4fHeQlbvMQhLCn8RNndYmsDhUf01TUeR8,4781
|
30
|
-
vision_agent-0.2.
|
31
|
-
vision_agent-0.2.
|
32
|
-
vision_agent-0.2.
|
33
|
-
vision_agent-0.2.
|
30
|
+
vision_agent-0.2.155.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
31
|
+
vision_agent-0.2.155.dist-info/METADATA,sha256=lueDmQRoKz_BUNDRApWHxege_xxXnPI117OBh1nZJcg,13758
|
32
|
+
vision_agent-0.2.155.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
33
|
+
vision_agent-0.2.155.dist-info/RECORD,,
|
File without changes
|
File without changes
|