-
Notifications
You must be signed in to change notification settings - Fork 0
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
Paddle OCR Parser #64
Conversation
…r characters. This PR adds a classification_sequence_message that returns a sequence of charecters corresponding to maximum probability in the sequence. The message has optional parameters to remove duplicates and ignore background class indexes. In addition this PR also adds a PaddleOCR Parser, which utilizes the classification_sequence message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I already checked most of this code in #62 and left comments there (which were taken in consideration for this version).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one docstring comment.
Test Results140 tests 140 ✅ 1s ⏱️ Results for commit 245145a. |
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
Paddle OCR model outputs a sequence of classification probabilities for each possible character at each sequence step.
This PR adds a general postprocessing function,
classification_sequence_message
, that can be used for this model and similar ones. Theclassification_sequence_message
finds the class (in the case of OCR: characters) with the maximum probability at each sequence step. It can optionally remove unwanted classes (such as padding, background, or blank characters) from the sequence, as well as concatenate them into words in the case of characters or into sentences in the case of complete words. The return type is adepthai_nodes.Classification
message. Unit tests have also been added.ppocr.PaddleOCRParser
utilizes this message for the PaddleOCR model.