Hindi Language support not working
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- machine-learning
Research direction
The report concerns loading a custom Hindi vocab and a locally downloaded crnn_vgg16_bn checkpoint into the ocr_predictor pipeline, so the relevant code is the recognition model construction and state-dict loading in doctr's models package. Reproduce with a Hindi sample image and check whether the predictor output is empty because of the vocab mismatch or the detection step. Done would mean Hindi text is recognized from a documented setup; no comments or linked work exist, so the maintainers' stance is unknown.
Written by the indexing model from the issue text.
Description
from doctr.models import ocr_predictor, crnn_vgg16_bn, db_resnet50 from doctr.io import DocumentFile from doctr.datasets import VOCABS # Vocab copied from the indic-doctr repo vocab = 'ॲऽऐथफएऎह८॥ॉम९ुँ१ं।षघठर॓ॼड़गछिॱटऩॄऑवल५ढ़य़अञसऔयण॑क़॒ौॽशऍ॰ूीऒॊख़उज़ॻॅ३ओऌळनॠ०ेढङ४़ॢग़पऊॐज२डैभझकआदबऋखॾ॔ोइ्धतफ़ईृःा६चऱऴ७-' reco_model = crnn_vgg16_bn(pretrained=False, pretrained_backbone=False, vocab=vocab) # Download: https://github.com/iitb-research-code/indic-doctr/releases/download/model2/crnn_vgg16_bn_hindi.pt local_model_path = "crnn_vgg16_bn_hindi.pt" reco_params = torch.load(local_model_path, map_location="cpu") reco_model.load_state_dict(reco_params) predictor = ocr_predictor(det_arch='db_resnet50',reco_arch=reco_model, pretrained=True) single_img_doc = DocumentFile.from_images("0022-0024_3_5_2.jpg") result = predictor(single_img_doc) print(result.pages[0].export()) # print the result of the first page as a list of #dicts``` I got an empty array with no output for a Hindi image. How to fix? Please help.
Originally posted by @manit2004 in #1617
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 684
- Avg merge
- 20h 40m
- Merged PRs (30d)
- 30
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mindee/doctr
-
ext: tests topic: ci type: enhancement
Difficulty 3/5 Half a day Newbie friendliness 45/100
mindee/doctr#2171 · 1 comment ·
Maintainers usually reply within 1 day
-
Per-task YAML configuration for the reference training scriptsPossibly taken @felixdittrich92 claimed this 22 days ago. Openext: references topic: documentation type: new feature
mindee/doctr#2149 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Release tracker - v1.2.0May be free again @felixdittrich92 claimed this 64 days ago, and no pull request is open. Opencritical
mindee/doctr#2126 · 1 assignee ·
Maintainers usually reply within 1 day
-
[table structure] Extend table structure datasetMay be free again @simont2k claimed this 85 days ago, and no pull request is open. Opentopic: table comprehension
mindee/doctr#2119 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
type: enhancement
Difficulty 5/5 Over a week Newbie friendliness 12/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from gitPossibly taken @MohabMohie claimed this today. Openagentic
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
huggingface/smolagents#3045 ·
Maintainers usually reply within 1 day