1、mediapiple 編譯
cmd命令:bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu
解釋: -c opt: release ,dbg: debug;
--define MEDIAPIPE_DISABLE_GPU=1 不使用GPU;
mediapipe/examples/desktop/hand_tracking: BUILD文件路徑(mediapipe-master作為cd目錄);
hand_tracking_cpu BUILD文件里要編譯的庫,如下:
2、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\modules\palm_detection,BUILD文件
配置文件(palm_detection_cpu運行參考)
3、依據以上這些可以考慮自己單獨封裝某個網絡的接口調用。