forked from wenoptics/moon-alignment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtunetest.py
25 lines (18 loc) · 819 Bytes
/
tunetest.py
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
import logging
from timeit import timeit
import cv2
from find import FindMainObject
img_ori = cv2.imread(
# 'E:\\tmp\\Eclipse-20180131\\chosen\\moon\\output\\JPEG\\DSC01425.jpg'
'E:\\tmp\\Eclipse-20180131\\chosen\\moon\\output\\JPEG\\DSC01325.jpg'
# 'E:\\tmp\\Eclipse-20180131\\chosen\\moon\\output\\JPEG\\DSC01367.jpg'
# 'E:\\tmp\\Eclipse-20180131\\chosen\\moon\\output\\JPEG\\DSC01332.jpg'
)
t = FindMainObject(force_resize_preview_w=500)
# t.run_pipeline_final(img_ori)
# for _ in range(5):
# print(timeit('t.run_pipeline_final(img_ori)', number=1, globals=globals()))
logging.basicConfig(level=logging.DEBUG, format='%(name)-12s %(levelname)-8s %(message)s')
t.run_pipeline_tuning(img_ori)
for _ in range(5):
print(timeit('t.run_pipeline_final(img_ori)', number=1, globals=globals()))