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

Please add model maker support macos #4088

Closed
lucasjinreal opened this issue Feb 12, 2023 · 13 comments
Closed

Please add model maker support macos #4088

lucasjinreal opened this issue Feb 12, 2023 · 13 comments
Assignees
Labels
platform:apple silicon apple silicon chip platform:python MediaPipe Python issues task::all All tasks of MediaPipe type:modelmaker Issues related to creation of custom on-device ML solutions

Comments

@lucasjinreal
Copy link

OS Platform and Distribution

macos

Compiler version

No response

Programming Language and version

python

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

No response

Bazel version

No response

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

No response

Describe the problem

A bug happened!


pip install mediapipe-model-maker==0.1.0.2                  main
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Collecting mediapipe-model-maker==0.1.0.2
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/15/51/a116ce4c42224eaf9f8d193f53e9b951a4b8e5cd90a3e403145e299cd59e/mediapipe_model_maker-0.1.0.2-py3-none-any.whl (7.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 2.1 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement mediapipe==0.9.0.1 (from mediapipe-model-maker) (from versions: none)
ERROR: No matching distribution found for mediapipe==0.9.0.1

Complete Logs

pip install mediapipe-model-maker==0.1.0.2                  main
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Collecting mediapipe-model-maker==0.1.0.2
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/15/51/a116ce4c42224eaf9f8d193f53e9b951a4b8e5cd90a3e403145e299cd59e/mediapipe_model_maker-0.1.0.2-py3-none-any.whl (7.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 2.1 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement mediapipe==0.9.0.1 (from mediapipe-model-maker) (from versions: none)
ERROR: No matching distribution found for mediapipe==0.9.0.1
@lucasjinreal lucasjinreal added the type:build/install For Build and Installation issues label Feb 12, 2023
@ayushgdev ayushgdev added platform:python MediaPipe Python issues platform:apple silicon apple silicon chip type:modelmaker Issues related to creation of custom on-device ML solutions task::all All tasks of MediaPipe and removed type:build/install For Build and Installation issues labels Feb 13, 2023
@ayushgdev
Copy link
Contributor

@jinfagang
Thanks for digging out this issue. Would you please confirm if the Mac you are using is ARM or intel based?

@ayushgdev ayushgdev added stat:awaiting response Waiting for user response and removed platform:apple silicon apple silicon chip labels Feb 13, 2023
@lucasjinreal
Copy link
Author

arm, I specifcally point out mediapipe-sillicon, this version lagging for a long range of new versions.

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Feb 13, 2023
@ayushgdev
Copy link
Contributor

Hello @jinfagang mediapipe-silicon is not an official package by Google. You can check out this comment.
We are yet to release the official support of MediaPipe for apple silicon PCs.

@ayushgdev ayushgdev added stat:awaiting response Waiting for user response platform:apple silicon apple silicon chip stat:awaiting googler Waiting for Google Engineer's Response and removed stat:awaiting response Waiting for user response labels Feb 13, 2023
@lucasjinreal
Copy link
Author

@ayushgdev does there a time scheduler when will M1 mac support officially?

@ayushgdev
Copy link
Contributor

We don't have any timeline yet @jinfagang

@cikichen
Copy link

cikichen commented Sep 6, 2023

INFO: pip is still looking at multiple versions of mediapipe-model-maker to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install mediapipe-model-maker==0.1.0.2, mediapipe-model-maker==0.1.1.0 and mediapipe-model-maker==0.1.1.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    mediapipe-model-maker 0.1.1.1 depends on mediapipe==0.9.2.1
    mediapipe-model-maker 0.1.1.0 depends on mediapipe==0.9.2.1
    mediapipe-model-maker 0.1.0.2 depends on mediapipe==0.9.0.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

on mac m1

@BjarneHerland
Copy link

Same here on Mac M1.

Note that the "older" tflite-model-maker does not install on Arm-based Macs either and that we are referred here as the "workaround".

Please clean up dependencies to let us use these otherwise nice frameworks! I'd hate to be forced to PyTorch just because of this! 😞

@joezoug
Copy link
Contributor

joezoug commented Nov 28, 2023

@cikichen ,

Can you try to install the latest version of mediapipe-model-maker==0.2.1.3? Mediapipe now supports M1 mac so the error message you are seeing should not apply anymore for the latest release.

@joezoug joezoug added stat:awaiting response Waiting for user response and removed stat:awaiting googler Waiting for Google Engineer's Response labels Nov 28, 2023
@twiceyuan
Copy link

@joezoug
The latest version 0.2.1.3 on my device (Apple Silicon M1 Pro) still cannot be installed. The error message is:

Collecting tf-models-official>=2.13.1 (from mediapipe-model-maker==0.2.1.3)
  Using cached tf_models_official-2.14.2-py2.py3-none-any.whl.metadata (1.4 kB)
  Using cached tf_models_official-2.14.1-py2.py3-none-any.whl.metadata (1.4 kB)
  Using cached tf_models_official-2.14.0-py2.py3-none-any.whl.metadata (1.4 kB)
  Using cached tf_models_official-2.13.2-py2.py3-none-any.whl.metadata (1.4 kB)
  Using cached tf_models_official-2.13.1-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting pyyaml<5.4.0,>=5.1 (from tf-models-official>=2.13.1->mediapipe-model-maker==0.2.1.3)
  Using cached PyYAML-5.3.1.tar.gz (269 kB)
  Preparing metadata (setup.py) ... done
ERROR: Cannot install mediapipe-model-maker because these package versions have conflicting dependencies.

The conflict is caused by:
    tf-models-official 2.15.0 depends on tensorflow-text~=2.15.0
    tf-models-official 2.14.2 depends on tensorflow-text~=2.14.0
    tf-models-official 2.14.1 depends on tensorflow-text~=2.14.0
    tf-models-official 2.14.0 depends on tensorflow-text~=2.14.0
    tf-models-official 2.13.2 depends on tensorflow-text~=2.13.0
    tf-models-official 2.13.1 depends on tensorflow-text~=2.13.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

My python version is 3.10.13

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Nov 28, 2023
@BjarneHerland
Copy link

@cikichen thanks for the hint! However, the problem seems to boil down to the dependency tensorflow-text==2.15.0 which does not provide aarch64-wheels for neither manylinux nor macos, see

https://pypi.org/project/tensorflow-text/2.15.0/#files

@joezoug
Copy link
Contributor

joezoug commented Nov 28, 2023

@BjarneHerland thank you for pointing that out. It seems like you will need to manually build tensorflow-text from source to run on macos. Here is a guide which may help with this process. There are discussions on https://github.com/tensorflow/text as well.

@BjarneHerland
Copy link

@BjarneHerland thank you for pointing that out. It seems like you will need to manually build tensorflow-text from source to run on macos. Here is a guide which may help with this process. There are discussions on https://github.com/tensorflow/text as well.

Thanks for info @joezoug. The guide you refer to is one year old... should be plenty of time for the official distro to catch up. An awful waste of time and cpu if everyone on arm64 must build their own wheels, IMHO 😠

@joezoug
Copy link
Contributor

joezoug commented Nov 29, 2023

@BjarneHerland Just fyi, it seems like tensorflow-text has officially announced that they will not support platforms other than linux and intel-based macs: https://github.com/tensorflow/text#a-note-about-different-operating-system-packages.

I will close this issue now as it seems like the solution requires building tensorflow-text for M1 Macs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:apple silicon apple silicon chip platform:python MediaPipe Python issues task::all All tasks of MediaPipe type:modelmaker Issues related to creation of custom on-device ML solutions
Projects
None yet
Development

No branches or pull requests

7 participants