Add new @Retry() decorator (#7854)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
5f00fbd227
commit
1435f0e9de
9 changed files with 372 additions and 269 deletions
|
|
@ -12,7 +12,7 @@ def test_similarity():
|
|||
exp.create_embeddings_table()
|
||||
similar = exp.get_similar(idx=1)
|
||||
assert len(similar) == 25
|
||||
similar = exp.get_similar(img=ASSETS / 'zidane.jpg')
|
||||
similar = exp.get_similar(img=ASSETS / "zidane.jpg")
|
||||
assert len(similar) == 25
|
||||
similar = exp.get_similar(idx=[1, 2], limit=10)
|
||||
assert len(similar) == 10
|
||||
|
|
@ -24,9 +24,9 @@ def test_similarity():
|
|||
|
||||
def test_det():
|
||||
"""Test detection functionalities and ensure the embedding table has bounding boxes."""
|
||||
exp = Explorer(data='coco8.yaml', model='yolov8n.pt')
|
||||
exp = Explorer(data="coco8.yaml", model="yolov8n.pt")
|
||||
exp.create_embeddings_table(force=True)
|
||||
assert len(exp.table.head()['bboxes']) > 0
|
||||
assert len(exp.table.head()["bboxes"]) > 0
|
||||
similar = exp.get_similar(idx=[1, 2], limit=10)
|
||||
assert len(similar) > 0
|
||||
# This is a loose test, just checks errors not correctness
|
||||
|
|
@ -36,9 +36,9 @@ def test_det():
|
|||
|
||||
def test_seg():
|
||||
"""Test segmentation functionalities and verify the embedding table includes masks."""
|
||||
exp = Explorer(data='coco8-seg.yaml', model='yolov8n-seg.pt')
|
||||
exp = Explorer(data="coco8-seg.yaml", model="yolov8n-seg.pt")
|
||||
exp.create_embeddings_table(force=True)
|
||||
assert len(exp.table.head()['masks']) > 0
|
||||
assert len(exp.table.head()["masks"]) > 0
|
||||
similar = exp.get_similar(idx=[1, 2], limit=10)
|
||||
assert len(similar) > 0
|
||||
similar = exp.plot_similar(idx=[1, 2], limit=10)
|
||||
|
|
@ -47,9 +47,9 @@ def test_seg():
|
|||
|
||||
def test_pose():
|
||||
"""Test pose estimation functionalities and check the embedding table for keypoints."""
|
||||
exp = Explorer(data='coco8-pose.yaml', model='yolov8n-pose.pt')
|
||||
exp = Explorer(data="coco8-pose.yaml", model="yolov8n-pose.pt")
|
||||
exp.create_embeddings_table(force=True)
|
||||
assert len(exp.table.head()['keypoints']) > 0
|
||||
assert len(exp.table.head()["keypoints"]) > 0
|
||||
similar = exp.get_similar(idx=[1, 2], limit=10)
|
||||
assert len(similar) > 0
|
||||
similar = exp.plot_similar(idx=[1, 2], limit=10)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue