Closed fishyville closed 1 year ago
@fishyville,
Please import the module 'solutions' not the 'solution', As code structure does not have such class or attribute(Check here) like below:
mpHands-mp.solutions.drawing_utils
However, let us know if still an issue from your end.
oh it kinda fix things but i got this instead:
unsupported operand type(s) for -: 'module' and 'module'
@fishyville,
Please provide the complete standalone code to reproduce the issue from our end? Thank you
mpHands-mp.solutions.drawing_utils
The system are referring to the "drawing_utils"
@fishyville,
We are not able to understand the issue, Please provide the complete steps you are following, Or complete code to reproduce the issue. Thank you
import cv2 import mediapipe as mp from math import hypot from ctypes import cast, POINTER from comtypes import CLSCTX_ALL from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume import numpy as np cap=cv2.VideoCapture (0)#checks for the availability of camera mpHands=mp.solutions.hands#detects fingers hands=mpHands. Hands () #completes the initialization and configuration of the hands and fingers
mpHands-mp.solutions.drawing_utils devices=AudioUtilities.GetSpeakers () interface=devices. Activate (IAudioEndpointVolume. iid,CLSCTX_ALL, None) volume=cast(interface, POINTER(IAudioEndpointVolume))
It shows this:
File "c:\Users\USER\OneDrive\Documents\trial 1\blabla.py", line 12, in
TypeError: unsupported operand type(s) for -: 'module' and 'module'
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
Yes
OS Platform and Distribution
Window
MediaPipe Tasks SDK version
No response
Task name (e.g. Image classification, Gesture recognition etc.)
hand gesture
Programming Language and version (e.g. C++, Python, Java)
python
Describe the actual behavior
Describe the expected behaviour
Standalone code/steps you may have used to try to get what you need
Other info / Complete Logs
No response