Open
Conversation
| if return_response: | ||
| return res | ||
|
|
||
| if return_only_text: |
There was a problem hiding this comment.
- A score is needed to filter the recognition results and corresponded polys.
- The format should be same as other agents
|
|
||
| DEPENDENCIES = ["paddleocr"] | ||
|
|
||
| def __init__(self, languages="en", use_gpu=True, use_angle_cls=False, det=True, rec=True, cls=False, **kwargs): |
There was a problem hiding this comment.
- default value of
use_gpushould be False for better compatibility.
| Whether return only the texts in the OCR results. | ||
| Defaults to `False`. | ||
| """ | ||
| image = self.resized_long(image) |
There was a problem hiding this comment.
It seems that we can not modify target=480, the value is suggested to be an initialization parameter of PaddleOCRAgent class.
|
|
||
| def pad_img_to_longer_edge(self, image): | ||
| max_shape = max(image.shape[0], image.shape[1]) | ||
| out_img = np.ones([max_shape, max_shape, 3]) * 127 |
There was a problem hiding this comment.
127 is also suggested to be set as fixable for some others special situations.
jumpcutjackalope
approved these changes
Jun 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'vd added paddleocr model and test code. Please check whether there is anything to be modified, thx.