Skip to content

Commit

Permalink
dev(narugo): shitty rtdetr result, i wont use that again
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 committed Oct 9, 2024
1 parent 2e77452 commit 8cec3be
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/detect/test_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pprint import pprint

import pytest

from imgutils.detect import detection_similarity
Expand Down Expand Up @@ -51,3 +53,16 @@ def test_detect_with_yolov10(self, model_name: str):
((461, 247, 536, 330), 'head', 0.434),
])
assert similarity >= 0.85

@pytest.mark.parametrize(['model_name'], [
('head_detect_v1.6_l_rtdetr',),
])
def test_detect_with_rtdetr(self, model_name: str):
# ATTENTION: results of rtdetr models are really shitty and unstable
# so this expected result is 100% bullshit
# just make sure the rtdetr models can be properly inferred
detections = detect_heads(get_testfile('genshin_post.jpg'), model_name=model_name)
similarity = detection_similarity(detections, [
((780, 9, 1125, 208), 'head', 0.3077814280986786)
])
assert similarity >= 0.85

0 comments on commit 8cec3be

Please sign in to comment.