Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the core engine initialization and updates to support RapidOCR v3, reorganizing model downloading and preprocessing/postprocessing workflows.
- Adapt PPTableStructurer and TableLabelDecode for new token handling
- Introduce
ModelProcessorfor model path management - Refactor
RapidTableto userapidocrpackage and new dataclass configs
Reviewed Changes
Copilot reviewed 19 out of 35 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| rapid_table/table_structure/pp_structure/post_process.py | Adjusted label decoding and special-token handling |
| rapid_table/main.py | Refactored RapidTable init and CLI entrypoint |
| rapid_table/inference_engine/torch.py | Added stub for Torch inference session |
| rapid_table/inference_engine/onnxruntime/main.py | Updated ONNX Runtime session creation and error handling |
Comments suppressed due to low confidence (2)
rapid_table/main.py:45
- [nitpick] Warning is incomplete/unhelpful; consider clarifying, e.g., 'rapidocr package is not installed; OCR step disabled, only table postprocessing will run.'
logger.warning("rapidocr package is not installed, only table rec")
rapid_table/inference_engine/onnxruntime/main.py:70
- The method is annotated to return
np.ndarraybut callssession.run, which returns aList[np.ndarray]; update the return type or convert the output accordingly.
def __call__(self, input_content: np.ndarray) -> np.ndarray:
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.
No description provided.