1

Im trying to write program from course about Advanced Computer Vision based on mediapipe. I have Apple M1 processor, so I've installed mediapipe-sillicon for that and opencv-python.

That's my program code:

    import cv2
    import mediapipe as mp

    import time

cap = cv2.VideoCapture(0)

mpHands = mp.solutions.hands
hands = mpHands.Hands()

while True:
  success, img = cap.read()
  imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
  results = hands.process(imgRGB)

cv2.imshow("Image", img)
cv2.waitKey(1)

And also my camera lights on for 2-3 seconds, and after that I get error message. And that's error message: Message type "mediapipe.CalculatorOptions" has no field named "ext".

Shmukli
  • 11
  • 2

1 Answers1

1

Look at the readme at https://github.com/cansik/mediapipe-silicon

There is an issue with the latest version of protobuf and mediapipe-silicon.

Downgrade protobuf to 3.20.1 or lower.

Running

pip uninstall protobuf
pip install protobuf==3.20.1

worked for me.

Nicol Visser
  • 91
  • 1
  • 3