Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #15

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div align="center">
<img alt="vision_agent" height="200px" src="https://github.com/landing-ai/vision-agent/blob/main/assets/logo.jpg?raw=true"
</div>
<img alt="vision_agent" height="200px" src="https://github.com/landing-ai/vision-agent/blob/main/assets/logo.jpg?raw=true">

# 🔍🤖 Vision Agent

[![](https://dcbadge.vercel.app/api/server/wPdN8RCYew?compact=true&style=flat)](https://discord.gg/wPdN8RCYew)
![ci_status](https://github.com/landing-ai/vision-agent/actions/workflows/ci_cd.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/vision-agent.svg)](https://badge.fury.io/py/vision-agent)
![version](https://img.shields.io/pypi/pyversions/vision-agent)
</div>


Vision Agent is a library for that helps you to use multimodal models to organize and structure your image data. Check out our discord for roadmaps and updates!
Expand Down
7 changes: 3 additions & 4 deletions tests/test_llm.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import pytest

from vision_agent.llm.llm import OpenAILLM
from vision_agent.tools import CLIP
from vision_agent.tools.tools import GroundingDINO
from vision_agent.tools import CLIP, GroundingDINO, GroundingSAM

from .fixtures import openai_llm_mock # noqa: F401

Expand Down Expand Up @@ -54,6 +53,6 @@ def test_generate_detector(openai_llm_mock): # noqa: F811
def test_generate_segmentor(openai_llm_mock): # noqa: F811
llm = OpenAILLM()
prompt = "Can you generate a cat segmentor?"
segmentor = llm.generate_detector(prompt)
assert isinstance(segmentor, GroundingDINO)
segmentor = llm.generate_segmentor(prompt)
assert isinstance(segmentor, GroundingSAM)
assert segmentor.prompt == "cat"
2 changes: 1 addition & 1 deletion vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class GroundingDINO(ImageTool):
'Example 2: User Question: "Can you detect the person on the left?" {{"Parameters":{{"prompt": "person on the left"}}\n'
'Exmaple 3: User Question: "Can you build me a tool that detects red shirts and green shirts?" {{"Parameters":{{"prompt": "red shirt. green shirt"}}}}\n'
"The tool returns a list of dictionaries, each containing the following keys:\n"
" - 'lable': The label of the detected object.\n"
" - 'label': The label of the detected object.\n"
" - 'score': The confidence score of the detection.\n"
" - 'bbox': The bounding box of the detected object. The box coordinates are normalize to [0, 1]\n"
"An example output would be: [{'label': ['car'], 'score': [0.99], 'bbox': [[0.1, 0.2, 0.3, 0.4]]}]\n"
Expand Down
Loading