Skip to content

[Update] Change OCR model names to mobile versions#210

Merged
GreatV merged 1 commit intoPFCCLab:mainfrom
GreatV:change_model_names
Aug 12, 2025
Merged

[Update] Change OCR model names to mobile versions#210
GreatV merged 1 commit intoPFCCLab:mainfrom
GreatV:change_model_names

Conversation

@GreatV
Copy link
Collaborator

@GreatV GreatV commented Aug 12, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 12, 2025 13:00
@GreatV GreatV changed the title [Update] Change OCR model names to mobile versions for improved perfo… [Update] Change OCR model names to mobile versions Aug 12, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the OCR model configuration to use mobile versions instead of server versions for improved performance. The change switches from PP-OCRv5_server_* models to PP-OCRv5_mobile_* models across multiple OCR initialization points.

Key Changes

  • Replace PP-OCRv5_server_det with PP-OCRv5_mobile_det for text detection
  • Replace PP-OCRv5_server_rec with PP-OCRv5_mobile_rec for text recognition
  • Add explicit model name parameters to the modelChoose method

use_textline_orientation=False,
use_doc_unwarping=False,
text_detection_model_name="PP-OCRv5_mobile_det",
text_recognition_model_name="PP-OCRv5_mobile_rec",
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model names are now hardcoded in multiple places (lines 200, 201, 214, 219, 3395, 3396). Consider defining these as constants at the module level to avoid duplication and make future model updates easier.

Suggested change
text_recognition_model_name="PP-OCRv5_mobile_rec",
text_detection_model_name=TEXT_DETECTION_MODEL_NAME,
text_recognition_model_name=TEXT_RECOGNITION_MODEL_NAME,

Copilot uses AI. Check for mistakes.
@GreatV GreatV merged commit 71fb5d9 into PFCCLab:main Aug 12, 2025
1 check passed
@GreatV GreatV deleted the change_model_names branch August 12, 2025 13:06
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.

2 participants