MediaPipe是谷歌开源的机器学习框架,用于处理视频、音频等时间序列数据。
MediaPipe Solutions提供了16个Solutions: 人脸检测、Face Mesh(面部网格)、虹膜、手势、姿态、人体、人物分割、头发分割、目标检测、Box Tracking、Instant Motion Tracking、3D目标检测、特征匹配等。
本周刚开始学习MediaPipe框架,所以今天先记录一下部分准备工作和遇到的一下疑难杂症~
当你在执行 brew install opencv@3 时,你肯定会遇到类似下面的问题:
这是因为缺少对应的依赖库,上面就是缺少了 harfbuzz 库,所以下载好对应的库就可以解决,执行:brew install harfbuzz
之后再遇见一样的错误,还是执行:brew install (缺少的库),直到下载依赖库不再报错,或者执行完一次:1、brew install (缺少的库),无论结果如何,接着执行:2、brew install opencv@3,看opencv@3结果缺少哪个库,然后多次执行1、2两个终端命令,直到执行:brew install opencv@3 不再error,那么执行
显示结果如图:
之后下载python3的six库,一定要注意,在终端上将python3设置为默认,下载完成后,查看安装结果
此时如果你很顺利的输出了以下结果,那么恭喜你,最初的配置已经成功。
但是很不幸的是,我遇到了下面的大坑,
问题很明显是缺少了numpy库
于是我就使用各种终端命令安装numpy,命令显示已经安装上了,然后再执行hello_world语句,依然是相同的报错,然后 import numpy 导入库,发现竟然没有,最后使用下面命令安装:
报错如下:
查看了各种英文,各种尝试都不管用,最后终于在github上理解了原因是什么:Failed pip install for numpy in python 3.9 on macOS using conda,这是一个python的bug!!!在这个版本上安装会失败!!!Failed pip install for numpy in python 3.9 on macOS using conda · Issue #17569 · numpy/numpy · GitHub
于是我更新了python3.10.5的版本:https://www.python.org/ftp/python/3.10.5/python-3.10.5-macos11.pkg
然后再次执行
成功效果如下:
最后再次执行操作语句:
终于让我看到了世界语言:
真是遇到了一个大坑啊,第一步大坑已经迈过去了,距离胜利越来越近了,未完待续~~
整理不易,转载请注明,谢谢