How to enable GPU for ocr_predictor? #1560
Chin-Shan-Hong
started this conversation in
General
Replies: 1 comment 27 replies
-
you should wrap the whole predicator:
|
Beta Was this translation helpful? Give feedback.
27 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using "db_mobilenet_v3_large" and "crnn_mobilenet_v3_small" for OCR task. And I'm using CUDA 12.1 and NVIDIA GeForce RTX 3060.
model = ocr_predictor(det_arch='db_mobilenet_v3_large', reco_arch='crnn_mobilenet_v3_small', pretrained=True, assume_straight_pages=True, det_bs=8, reco_bs=1024).cuda()
I tried to add cuda() but have encountered AttributeError: 'OCRPredictor' object has no attribute 'cuda'
How can I enable GPU to speed up the OCR task?
Beta Was this translation helpful? Give feedback.
All reactions