-
Notifications
You must be signed in to change notification settings - Fork 465
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
Adding more languages for recognition models by default #563
Comments
Hi @felixdittrich92, Just to be clear, we support the French "vocab", not language. The library for now does not include any semantic understanding. For this reason, we took the French vocab as the number of accented characters included in it usually include most european characters. Typically, there is no character in the English vocab that are not included in our "French" vocab. Now, to switch to other vocabs, we will have to wait to stabilize first on this vocab. But the text recognition part will select the appropriate vocab & checkpoint depending the wish of the user. Here are a few options:
The second option looks much better to me I would argue 😅 If the text recognition model encounters characters it has never seen, it will yield very low confidence which can easily be processed accordingly. In any case, this won't be handled before the I hope that answers your question :) |
@fg-mindee |
I may be mixing things but I don't feel like #576 is related to this issue? 🤔 |
@fg-mindee |
@frgfm I think the huggingface integration (sharing models) is enough and it is maybe better to improve the word generator instead of this issue/idea wdyt ? |
Fair point, but I would argue it's different topics:
To close this issue, I think we should decide whether it's a feature design issue (how multiple vocab models should be accessed as pretrained models) or a wider question. Now that we can use HF hub models, I think we'll only have to change the model name to switch to another language. So if that's not about the design part, I'd argue this has been addressed :) |
@frgfm |
I agree :) But we could easily provide some HF Hub contribution guidelines for language (i.e. how you should name your model so that people can use it). "mindee/crnn_vgg16_bn_french" could easily be on the hub for instance |
🚀 The feature
Currently you support only french by default would be great to add more languages directly to choose for example:
model = ocr_predictor(det_arch='db_resnet50', reco_arch='crnn_vgg16_bn', pretrained=True, language='en')
or
reco_arch = crnn_mobilenet_v3_large(pretrained=True, language='de')
What do you think ?
Motivation, pitch
In most cases you need the recognition for a specific language this can be done by training yourself but it would be much easier if some often used languages can be used without own training
Alternatives
Some other ideas:
languages=['en', 'fr', 'de']
Adding ViTSTR #513 (i think i will finish this at the end of the year on my side which will than provide de, en, es, fr in one model - but currently no benchmarks)
Additional context
If you want i can train all current existing models in pytorch for english and german
The text was updated successfully, but these errors were encountered: