12345678910111213141516 |
- from textbbx import net,imgproc,test_net,args,refine_net,getResult
- import os,cv2
- from DeepModel import DeePredict
- def text_model(image_path):
- image = imgproc.loadImage(image_path)
- bboxes, polys, score_text = test_net(net, image, args.text_threshold, args.link_threshold, args.low_text,
- args.cuda, args.poly, refine_net)
- return getResult(polys)
- # print(text_model(r"D:\试卷切割\img\5.png"))
|