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

ModuleNotFoundError: OCRDetectionPipeline: #10

Open
fylingpete opened this issue Feb 9, 2024 · 3 comments
Open

ModuleNotFoundError: OCRDetectionPipeline: #10

fylingpete opened this issue Feb 9, 2024 · 3 comments

Comments

@fylingpete
Copy link

I get the following error message:

ModuleNotFoundError: OCRDetectionPipeline: No module named 'tf_keras.legacy_tf_layers'

Any ideas how to fix this?

Thank you.

@junyangwang0410
Copy link
Collaborator

This is due to versions of Tensorflow and keras. The OCR model is from modelscope. Using the latest versions of Tensorflow and keras results in incompatibility with the OCR model. Try installing versions of Tensorflow and keras in requirements.txt. If this still reports error, you can continue to write error reports here.

@KrishMehta
Copy link

I'm also having this issue. Which version of TensorFlow and Keras are compatible with the OCR model from modelscope and can be installed on a MacBook with an Apple M1/M2/M3 chip with ARM-based architecture?

@junyangwang0410
Copy link
Collaborator

I'm also having this issue. Which version of TensorFlow and Keras are compatible with the OCR model from modelscope and can be installed on a MacBook with an Apple M1/M2/M3 chip with ARM-based architecture?

You can try the following two methods on MAC:

  1. Modify the requirements.txt: from "TensorFlow==2.9.1" to "tensorflow-macos==2.9"
  2. conda create -n mobileagent python=3.9.11
    Modify the requirements.txt:
    TensorFlow==2.13.0
    keras==2.13.1

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

No branches or pull requests

3 participants