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

Allowing EasyOCR to use the recog_network parameter #602

Closed
itsainii opened this issue Dec 16, 2024 · 1 comment · Fixed by #613
Closed

Allowing EasyOCR to use the recog_network parameter #602

itsainii opened this issue Dec 16, 2024 · 1 comment · Fixed by #613
Labels
enhancement New feature or request

Comments

@itsainii
Copy link
Contributor

itsainii commented Dec 16, 2024

In EasyOCR, there is a parameter called recog_network that allows users to load their own custom recognition models. You can find the related documentation here and here.

I wanted to add this parameter to the EasyOCR model code and tried the following:

In easyocr_model.py:
I added the line below in the Reader class:
recog_network = self.options.recog_network

image

In pipeline_options.py:
I updated the EasyOcrOptions class by adding this line:
recog_network: Optional[str] = 'standard'

image

This is how I used the parameter in the pipeline:
pipeline_options.ocr_options = EasyOcrOptions(lang=['en'], recog_network='custom_example')

Let me know if you have any question or suggestion.

@itsainii itsainii added the enhancement New feature or request label Dec 16, 2024
@cau-git
Copy link
Contributor

cau-git commented Dec 16, 2024

@itsainii That looks interesting! Could you please make a pull request with the code changes? Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants