forked from 1stNode/ocr_services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
32 lines (23 loc) · 838 Bytes
/
main.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
26
27
28
29
30
31
32
# coding=utf-8
import os
import sys
if os.getcwd() not in sys.path:
sys.path.append(os.getcwd())
import cv2
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
from service.income_service import IncomeService
from service.cheque_service import ChequeService
from service.rec_service import RecService
if __name__ == "__main__":
income_image = cv2.imread('test_datas/002.jpg')
cheque_image = cv2.imread('test_datas/001.jpg')
image = cv2.imread('test_datas/0_0.jpg')
rec_service = RecService()
r_result = rec_service.image_pred([image])
print(r_result)
cheque_service = ChequeService()
c_result = cheque_service.image_pred([cheque_image])
print(c_result)
income_service = IncomeService()
i_result = income_service.image_pred([income_image])
print(i_result)