Open julian24bas opened 3 months ago
As far as I know, the only way to use doctr on gpu is by adding to(device) like this
to(device)
from doctr.models import ocr_predictor, from_hub reco_arch = from_hub('tilman-rassy/doctr-crnn-vgg16-bn-fascan-v1') model = ocr_predictor(det_arch="db_resnet50", reco_arch=reco_arch, pretrained=True).to(device)
So there is no kw to be passed to doctr.
from img2table.ocr import DocTR ocr = DocTR(detect_language=False, kw={"det_arch": "db_resnet50", "reco_arch": reco_arch, "pretrained": True})
Is there another way or could you add a gpu option like this?
ocr = DocTR(detect_language=False, device="cuda", kw={"det_arch": "db_resnet50", "reco_arch": reco_arch, "pretrained": True})
How to use doctr? How to train?
As far as I know, the only way to use doctr on gpu is by adding
to(device)
like thisSo there is no kw to be passed to doctr.
Is there another way or could you add a gpu option like this?