X-PLUG / MobileAgent

Mobile-Agent: The Powerful Mobile Device Operation Assistant Family
https://arxiv.org/abs/2406.01014
MIT License
2.3k stars 193 forks source link

ModuleNotFoundError: OCRDetectionPipeline: #10

Open fylingpete opened 4 months ago

fylingpete commented 4 months ago

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 commented 4 months ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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
fredajiang commented 10 hours ago

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

junyangwang0410 commented 6 hours ago

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?