-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
36 lines (23 loc) · 746 Bytes
/
test.py
File metadata and controls
36 lines (23 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from Step1 import api as register
# from Step2 import api as detector
# from Step3 import api as recognizer
import numpy as np
import cv2 as cv
import time
a = f'data/yw_gkxfw_18.jpg'
b = f'data/yw_gkxfw_18_s2.jpg'
img1 = cv.imread(a)
img2 = cv.imread(b)
step1_start = time.time()
base, target = register(img1, img2)
step1_end= time.time()
cv.imwrite('base.jpg', base)
cv.imwrite('target.jpg', target)
# step2_start = time.time()
# cropped_list = detector(base, target)
# step2_end = time.time()
# step3_start = time.time()
# preds, *_ = recognizer(cropped_list)
# step3_end = time.time()
# print(preds)
# print(f'register time: {step1_end-step1_start}s; detect time: {step2_end-step2_start}; recognize time {step3_end-step3_start}')