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

feat: Add Easyocr parameter recog_network #613

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

itsainii
Copy link
Contributor

Adding recog_network parameter of EasyOCR to allow users use their own custom recognition model.
This one I have apply pre-commit hook pre-commit run --all-files so I hope it able to merge now.

Issue resolved by this Pull Request:
Resolves #602 #604

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

Copy link

mergify bot commented Dec 17, 2024

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Added this line of code to get recog_network of easyocr parameter
recog_network = self.options.recog_network

Signed-off-by: itsainii <[email protected]>
Added this line in EasyOcrOptions function

recog_network: Optional[str] = 'standard'

Signed-off-by: itsainii <[email protected]>
@itsainii itsainii force-pushed the add_easyocr_parameter branch from 60a3ae1 to 8d6dbd6 Compare December 17, 2024 06:50
@dolfim-ibm dolfim-ibm self-requested a review December 17, 2024 07:50
@dolfim-ibm
Copy link
Contributor

Thanks @itsainii for this contribution!

@dolfim-ibm dolfim-ibm merged commit 3b53bd3 into DS4SD:main Dec 17, 2024
7 checks passed
cau-git pushed a commit that referenced this pull request Dec 17, 2024
* Update easyocr_model.py

Added this line of code to get recog_network of easyocr parameter
recog_network = self.options.recog_network

Signed-off-by: itsainii <[email protected]>

* Update pipeline_options.py

Added this line in EasyOcrOptions function

recog_network: Optional[str] = 'standard'

Signed-off-by: itsainii <[email protected]>

* Add Easyocr recog_network parameter

Signed-off-by: itsainii <[email protected]>

---------

Signed-off-by: itsainii <[email protected]>
Signed-off-by: Christoph Auer <[email protected]>
@simjak
Copy link

simjak commented Dec 20, 2024

@itsainii could you share any example with a custom recognition model?

@itsainii
Copy link
Contributor Author

itsainii commented Dec 20, 2024

@itsainii could you share any example with a custom recognition model?

Do you mean example to use the parameter or the model itself?
In here. There's an example of custom_model folder and how to use it. Then we just specify the parameter like this

pipeline_options.ocr_options = EasyOcrOptions(lang=['en'],recog_network='custom_example')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allowing EasyOCR to use the recog_network parameter
3 participants