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

opencv-contrib-python-headless as requirement #3403

Closed
maxstrobel opened this issue Jun 7, 2022 · 6 comments
Closed

opencv-contrib-python-headless as requirement #3403

maxstrobel opened this issue Jun 7, 2022 · 6 comments
Assignees
Labels
platform:python MediaPipe Python issues type:feature Enhancement in the New Functionality or Request for a New Solution

Comments

@maxstrobel
Copy link

System information (Please provide as much relevant information as possible)

  • MediaPipe Solution (you are using): Python wheel
  • Programming language : Python
  • Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state:

Currently opencv-contrib-python is installed as requirement. If you want to use mediapipe inside a Docker container huge images are required, because of GUI dependencies.

Proposal: Use opencv-contrib-python-headless as requirement, which is slimmer & works without the heavy dependencies.

Will this change the current api? How?

No.

Who will benefit with this feature?

Python users that develop / deploy inside Docker containers.

Please specify the use cases for this feature:

Development / deployment of the Python mediapipe package inside Docker containers.

Any Other info:

@maxstrobel maxstrobel added the type:feature Enhancement in the New Functionality or Request for a New Solution label Jun 7, 2022
@kuaashish kuaashish added the platform:python MediaPipe Python issues label Jun 8, 2022
@kuaashish
Copy link
Collaborator

Hi @maxstrobel, Could you please provide the steps to reproduce and more information about the issue. Thank you

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Jun 21, 2022
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@sureshdagooglecom sureshdagooglecom removed stat:awaiting response Waiting for user response stale labels Jul 5, 2022
@gentnm
Copy link

gentnm commented Aug 22, 2022

@kuaashish I just ran into the same problem. I can provide some steps to reproduce the issue and give some further information.

mediapipe currently has opencv-python-contrib as a dependency which starting with version 4.3.0.38 is not working in headless environments anymore (cf. opencv/opencv-python#370) . So in a docker setup, mediapipe won't be working anymore.

Therefore it would be nice to either use the headless version in all cases or to also be able to specify a headless version for mediapipe.

Build a docker image with

FROM python:3.9-slim
RUN pip install mediapipe

ENTRYPOINT [ "python" , "-c"]
CMD [ "import mediapipe" ]

and then execute:
docker build -t mediapipe-test . && docker run mediapipe-test

@gentnm
Copy link

gentnm commented Sep 2, 2022

@kuaashish @sureshdagooglecom

Is it possible to reopen this or should I open a new issue?

@kuaashish
Copy link
Collaborator

Hi @gentnm, Please raise a new issue with mentioning the reference of this issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:python MediaPipe Python issues type:feature Enhancement in the New Functionality or Request for a New Solution
Projects
None yet
Development

No branches or pull requests

4 participants