Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Please compile with gpu to EnableGpu() #5781

Open
mole-bai opened this issue Nov 11, 2020 · 2 comments
Open

Please compile with gpu to EnableGpu() #5781

mole-bai opened this issue Nov 11, 2020 · 2 comments

Comments

@mole-bai
Copy link

from paddleocr import PaddleOCR
import cv2

def OCR(img_path):
ocr = PaddleOCR()
result = ocr.ocr(img_path)
return result

file_img = r'1.jpg'
img = cv2.imread(file_img)
results = OCR(file_img)
print(results)

Namespace(cls=False, cls_batch_num=30, cls_image_shape='3, 48, 192', cls_model_dir='/home/jruser/.paddleocr/cls', cls_thresh=0.9, det=True, det_algorithm='DB', det_db_box_thresh=0.5, det_db_thresh=0.3, det_db_unclip_ratio=2.0, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_max_side_len=960, det_model_dir='/home/jruser/.paddleocr/det', enable_mkldnn=False, gpu_mem=8000, image_dir=None, ir_optim=True, label_list=['0', '180'], lang='ch', max_text_length=25, rec=True, rec_algorithm='CRNN', rec_batch_num=30, rec_char_dict_path='./ppocr/utils/ppocr_keys_v1.txt', rec_char_type='ch', rec_image_shape='3, 32, 320', rec_model_dir='/home/jruser/.paddleocr/rec/ch', use_angle_cls=False, use_gpu=True, use_pdserving=False, use_space_char=True, use_tensorrt=False, use_zero_copy_run=False)
E1111 15:42:00.882297 20327 analysis_config.cc:73] Please compile with gpu to EnableGpu()
E1111 15:42:00.969612 20327 analysis_config.cc:73] Please compile with gpu to EnableGpu()

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

@mole-bai
Copy link
Author

那个图片的路径改为绝对路径,但是还是报一样的错

@mole-bai
Copy link
Author

from paddleocr import PaddleOCR
import cv2

def OCR(img_path):
ocr = PaddleOCR()
result = ocr.ocr(img_path)
return result

file_img = r'1.jpg'
img = cv2.imread(file_img)
results = OCR(file_img)
print(results)

Namespace(cls=False, cls_batch_num=30, cls_image_shape='3, 48, 192', cls_model_dir='/home/jruser/.paddleocr/cls', cls_thresh=0.9, det=True, det_algorithm='DB', det_db_box_thresh=0.5, det_db_thresh=0.3, det_db_unclip_ratio=2.0, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_max_side_len=960, det_model_dir='/home/jruser/.paddleocr/det', enable_mkldnn=False, gpu_mem=8000, image_dir=None, ir_optim=True, label_list=['0', '180'], lang='ch', max_text_length=25, rec=True, rec_algorithm='CRNN', rec_batch_num=30, rec_char_dict_path='./ppocr/utils/ppocr_keys_v1.txt', rec_char_type='ch', rec_image_shape='3, 32, 320', rec_model_dir='/home/jruser/.paddleocr/rec/ch', use_angle_cls=False, use_gpu=True, use_pdserving=False, use_space_char=True, use_tensorrt=False, use_zero_copy_run=False)
E1111 15:42:00.882297 20327 analysis_config.cc:73] Please compile with gpu to EnableGpu()
E1111 15:42:00.969612 20327 analysis_config.cc:73] Please compile with gpu to EnableGpu()

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

@mole-bai mole-bai reopened this Nov 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant