def ctpnSource():
DEMO_IMAGE_DIR = "img/"
NET_DEF_FILE = "CTPN/models/deploy.prototxt"
MODEL_FILE = "CTPN/models/ctpn_trained_model.caffemodel"
caffe.set_mode_gpu()
caffe.set_device(cfg.TEST_GPU_ID)
# initialize the detectors
text_proposals_detector = TextProposalDetector(CaffeModel(NET_DEF_FILE, MODEL_FILE))
text_detector = TextDetector(text_proposals_detector)
return text_detector
评论列表
文章目录