Skip to content

Commit

Permalink
[A] Add testing benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyr-sh committed Mar 26, 2024
1 parent 36fe218 commit 33768bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_benchmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import docsaidkit as D
from docclassifier import DocClassifier

DIR = D.get_curdir(__file__)

classifier = DocClassifier(
register_root='/home/shayne/workspace/DocClassifier/data/private/RegisterCard',
model_cfg='20240326'
)

fs = D.get_files(DIR.parent / 'benchmark' /
'jpn_driver_color_benchmark_dataset', suffix=['.jpg'])
for f in fs:
img = D.imread(f)
print(f' 定義為:{f.parent.name},預測為:{classifier(img)[0]}')

0 comments on commit 33768bd

Please sign in to comment.