MobileAgent icon indicating copy to clipboard operation
MobileAgent copied to clipboard

ModuleNotFoundError: OCRDetectionPipeline:

Open fylingpete opened this issue 1 year ago • 6 comments

I get the following error message:

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

Any ideas how to fix this?

Thank you.

fylingpete avatar Feb 09 '24 15:02 fylingpete

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.

junyangwang0410 avatar Feb 09 '24 15:02 junyangwang0410

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?

KrishMehta avatar Jun 07 '24 15:06 KrishMehta

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

junyangwang0410 avatar Jun 07 '24 15:06 junyangwang0410

I also having the same problem. How was the issue finally resolved? If I use the author's version, it prompts that it cannot find the appropriate version of the required environment. The screenshots is: image

fredajiang avatar Jul 03 '24 02:07 fredajiang

I also having the same problem. How was the issue finally resolved? If I use the author's version, it prompts that it cannot find the appropriate version of the required environment. The screenshots is: image

Hello, what operating system are you using?

junyangwang0410 avatar Jul 03 '24 06:07 junyangwang0410

I also having the same problem. How was the issue finally resolved? If I use the author's version, it prompts that it cannot find the appropriate version of the required environment. The screenshots is: image

Hello, what operating system are you using?

The operating system of my computer is Windows 10. I have already solved this problem in another discussion. I adjusted the version of Python with the command: conda create -n mobileagent python=3.10.6 TensorFlow==2.9.1 keras==2.9.0 Thanks a lot!

fredajiang avatar Jul 04 '24 01:07 fredajiang