消息类型“ MediaPipe.CalculatorOptions”没有名称“ ext”的字段

发布于 2025-02-07 01:57:55 字数 531 浏览 3 评论 0原文

我试图根据基于高级计算机视觉编写程序编写程序 Mediapipe。 我有Apple M1处理器,所以我已经为此安装了MediaPipe-Sillicon和OpenCV-Python。

那是我的程序代码:

    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)

以及我的相机灯打开2-3秒,然后收到错误消息。 这是错误消息:消息类型“ MediaPipe.CalculatorOptions”没有名为“ Ext”的字段。

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".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淑女气质 2025-02-14 01:57:55

在 最新版本的Protobuf和MediaPipe-Silicon的问题。

降级Protobuf至3.20.1或更低。

跑步

pip uninstall protobuf
pip install protobuf==3.20.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文