-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding countgd as default counting tool * fix mypy errors * added viz for counting tool * adjust call * fix bbox coords outside the image, countgd return types * fix return values from countgd endpoint * correct output format for cgd * adapt countgd + dev integration test * add model * linter * linter * fixed keys in the example string, add suppot for multi-class --------- Co-authored-by: Dayanne Fernandes <dayannefernandesc@gmail.com>
- Loading branch information
1 parent
e699553
commit 103832d
Showing
10 changed files
with
328 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import skimage as ski | ||
|
||
from vision_agent.tools import ( | ||
countgd_counting, | ||
countgd_example_based_counting, | ||
) | ||
|
||
|
||
def test_countgd_counting() -> None: | ||
img = ski.data.coins() | ||
result = countgd_counting(image=img, prompt="coin") | ||
assert len(result) == 24 | ||
|
||
|
||
def test_countgd_example_based_counting() -> None: | ||
img = ski.data.coins() | ||
result = countgd_example_based_counting( | ||
visual_prompts=[[85, 106, 122, 145]], | ||
image=img, | ||
) | ||
assert len(result) == 24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.