Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not found GPU in current device. Please check your device or set args.use_gpu as False #4101

Closed
wwf1227 opened this issue Sep 17, 2021 · 5 comments
Assignees

Comments

@wwf1227
Copy link

wwf1227 commented Sep 17, 2021

环境:Mac M1芯片

错误日志:
sysctl: unknown oid 'machdep.cpu.leaf7_features'
/Users/wwf/opt/anaconda3/envs/paddle_env/lib/python3.8/site-packages/skimage/morphology/_skeletonize.py:241: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
0, 1, 1, 0, 0, 1, 0, 0, 0], dtype=np.bool)
/Users/wwf/opt/anaconda3/envs/paddle_env/lib/python3.8/site-packages/skimage/morphology/_skeletonize.py:256: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=np.bool)
Hi, PyCharm
[2021/09/17 18:26:12] root WARNING: version PP-OCRv2 not support cls models, use version PP-OCR instead
Namespace(benchmark=False, cls_batch_num=6, cls_image_shape='3, 48, 192', cls_model_dir='/Users/wwf/.paddleocr/2.3.0.1/ocr/cls/ch_ppocr_mobile_v2.0_cls_infer', cls_thresh=0.9, cpu_threads=10, det=True, det_algorithm='DB', det_db_box_thresh=0.6, det_db_score_mode='fast', det_db_thresh=0.3, det_db_unclip_ratio=1.5, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_limit_side_len=960, det_limit_type='max', det_model_dir='/Users/wwf/.paddleocr/2.3.0.1/ocr/det/ch/ch_PP-OCRv2_det_infer', det_sast_nms_thresh=0.2, det_sast_polygon=False, det_sast_score_thresh=0.5, drop_score=0.5, e2e_algorithm='PGNet', e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_limit_side_len=768, e2e_limit_type='max', e2e_model_dir=None, e2e_pgnet_mode='fast', e2e_pgnet_polygon=True, e2e_pgnet_score_thresh=0.5, e2e_pgnet_valid_set='totaltext', enable_mkldnn=False, gpu_mem=500, help='==SUPPRESS==', image_dir=None, ir_optim=True, label_list=['0', '180'], lang='ch', layout_path_model='lp://PubLayNet/ppyolov2_r50vd_dcn_365e_publaynet/config', max_batch_size=10, max_text_length=25, min_subgraph_size=15, output='./output/table', precision='fp32', process_id=0, rec=True, rec_algorithm='CRNN', rec_batch_num=6, rec_char_dict_path='/Users/wwf/opt/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddleocr/ppocr/utils/ppocr_keys_v1.txt', rec_char_type='ch', rec_image_shape='3, 32, 320', rec_model_dir='/Users/wwf/.paddleocr/2.3.0.1/ocr/rec/ch/ch_PP-OCRv2_rec_infer', save_log_path='./log_output/', show_log=True, table_char_dict_path=None, table_char_type='en', table_max_len=488, table_model_dir=None, total_process_num=1, type='ocr', use_angle_cls=True, use_dilation=False, use_gpu=True, use_mp=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, version='PP-OCRv2', vis_font_path='./doc/fonts/simfang.ttf', warmup=True)
/bin/sh: nvidia-smi: command not found
Traceback (most recent call last):
File "/Users/wwf/PycharmProjects/paddle/main.py", line 37, in
print_hi('PyCharm')
File "/Users/wwf/PycharmProjects/paddle/main.py", line 17, in print_hi
ocr = PaddleOCR(use_angle_cls=True, lang="ch") # need to run only once to download and load model into memory
File "/Users/wwf/opt/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddleocr/paddleocr.py", line 314, in init
super().init(params)
File "/Users/wwf/opt/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddleocr/tools/infer/predict_system.py", line 45, in init
self.text_detector = predict_det.TextDetector(args)
File "/Users/wwf/opt/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddleocr/tools/infer/predict_det.py", line 98, in init
self.predictor, self.input_tensor, self.output_tensors, self.config = utility.create_predictor(
File "/Users/wwf/opt/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddleocr/tools/infer/utility.py", line 164, in create_predictor
raise ValueError(
ValueError: Not found GPU in current device. Please check your device or set args.use_gpu as False

@MissPenguin
Copy link
Collaborator

默认是开启GPU预测,可以加个参数 --use_gpu=False 用CPU预测

@HanGod1
Copy link

HanGod1 commented Sep 22, 2021

默认是开启GPU预测,可以加个参数 --use_gpu=False 用CPU预测

加完之后还是报同样的错

@wwf1227
Copy link
Author

wwf1227 commented Sep 22, 2021

默认是开启GPU预测,可以加个参数 --use_gpu=False 用CPU预测

加完之后还是报同样的错

我的加完之后可以了,你看下新的报错一样吗

@wwf1227
Copy link
Author

wwf1227 commented Sep 22, 2021

默认是开启GPU预测,可以加个参数 --use_gpu=False 用CPU预测

加完之后还是报同样的错

ocr = PaddleOCR(use_angle_cls=True, lang="ch",use_gpu=False)

@SongJ123
Copy link

我部署在jetson上的,cpu可以预测但是gpu的话就not found。如果我非要用gpu要怎么办呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants