本帖子属于以下条目()
clq
浏览(501) -
2023-06-05 21:13:26 发表
编辑
关键字:
不太成功的 mediapipe 编译过程记录 编译是编译出来了,但对版本有要求,因此不算成功。感觉这种象“资金链”似的项目,实际使用的话风险太高了,其中一个断裂实际上根本无法补救。 ----------------------------------------------- 1. java 1.8 2. python 2.7 3. vs2015 运行库 4. bazel 编译系统。 5. msys2 mingw64 6. 实测不支持 python 2.7 ,用的 python 3.1. 同时要安装 numpy 命令为 pip install numpy 参考 https://numpy.org/install/ 7. 似乎会自己查找到 vs2019 ,不用设置相关路径。 8. opencv 安装在 C:\opencv 下的话也不用设置相关路径。 9. 编译时间大概 30 分钟,不过要下载各种东西,要一整个下午。 10. 参考 https://www.cnblogs.com/WenJXUST/p/15577596.html mediapiple 运行 cmd命令:bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_cpu --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_desktop_live.pbtxt 解释:bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_cpu :hand_tracking_cpu.exe路径 --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_desktop_live.pbtxt :exe运行的配置文件. 因为运行中仍然用到了 mediapipe/xxx 这样的 linux 路径(嵌套了好多层文件,不只是命令行中的那个)所以只能在 MSYS2 MinGW x64 中运行才能正确打开摄像头这些。不过编译的时候不需要 msys2 直接在 windows 命令行下就可以了。 11。 编译命令为 cd /d F:\k2\mediapipe-master >bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu bazel 这些下载后都需要设置路径。具体参考 "MediaPipe in C++" https://google.github.io/mediapipe/getting_started/cpp 更详细的安装要参考 https://google.github.io/mediapipe/getting_started/install.html#installing-on-windows 不过 vs2019 的设置那里其实是不用的。 ---------------------------------------------------------------- 其他算法 1. 这个领域的脉络是:RCNN -> SPPNET -> Fast-RCNN -> Faster-RCNN。关于具体的细节,建议题主还是阅读相关文献吧。 https://blog.csdn.net/forest_world/article/details/52048241 https://blog.csdn.net/forest_world/article/details/53085509 ----------------------------------------------- 2023 1. win11 下要多一些工作。 https://blog.csdn.net/HW140701/article/details/119546019 特别是 set BAZEL_SH=D:\new\msys64\usr\bin\bash.exe 可以知道,是可以通过操纵这个 bash.exe 来达到操作 msys2 的目的的。 2. win11 下要加参数 --action_env PYTHON_BIN_PATH="D:\\Python310\\python.exe" bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="D:\\Python310\\python.exe" mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu 3. bazel 的版本很重要。 目前手头上的代码只能使用 bazel-6.0.0-pre.20220310.1-windows-x86_64.exe 而不能是最新的 6.2.1 4. vs的版本似乎也很重要,vs2022 似乎不支持。 设置路径也没用 set PATH=D:\new\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64;%PATH% 原来应该是用的 vs2019 。我删除 vs2022 后原目录仍然去找 vs2022 ,所以只得把解压的目录另外复制出一份,这样最终才成功找到了 vs2019 4.2 上面那个地址中的指定 vs 版本的 4 个参数是没有用的。我的报找不到 winsock2.h ,所以它是找到了 vc 的,应该是没找到别的路径。 rem //如果有多个 vs 版本的话,还要手工指定。第一个版本是要用 vs2019 的。要改 4 个参数 //不行,没成功 set BAZEL_VS=D:\new\Microsoft Visual Studio\2019\Community set BAZEL_VC=D:\new\Microsoft Visual Studio\2019\Community\VC set BAZEL_VC_FULL_VERSION=14.29.30133 set BAZEL_WINSDK_FULL_VERSION=10.0.19041.685 5. win11 下的运行命令其实是 bazel-bin\mediapipe\examples\desktop\hand_tracking\hand_tracking_cpu --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_desktop_live.pbtxt 即将 "/" 换成了 "\"
NEWBT官方QQ群1: 276678893
可求档连环画,漫画;询问文本处理大师等软件使用技巧;求档softhub软件下载及使用技巧.
但不可"开车",严禁国家敏感话题,不可求档涉及版权的文档软件.
验证问题说明申请入群原因即可.