【发布时间】:2022-06-29 15:40:37
【问题描述】:
我正在尝试将面部+眼睛的地标写入终端
我在 demo_run_graph_main 中添加了几行:
#include "mediapipe/calculators/util/landmarks_to_render_data_calculator.pb.h"
#include "mediapipe/framework/formats/landmark.pb.h"
constexpr char kDetectionsStream[] = "face_landmarks_with_iris";
ASSIGN_OR_RETURN(mediapipe::OutputStreamPoller poller_detection,
graph.AddOutputStreamPoller(kDetectionsStream));
mediapipe::Packet detection_packet;
if (!poller_detection.Next(&detection_packet)) break;
auto& output_landmarks = detection_packet.Get<std::vector<::mediapipe::NormalizedLandmarkList>>();
for (const ::mediapipe::NormalizedLandmarkList& normalizedlandmarkList : output_landmarks) {
LOG(INFO) << normalizedlandmarkList.DebugString();
}
我正在使用最新 Mediapipe 版本的 MacOs M1 上运行
我希望程序向我展示面部和虹膜的标志 + 显示带有这些标志的我脸上的实时流
它将所有内容写入INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
然后它就停止了。 一点点调试告诉我,处理需要很长时间
if (!poller_detection.Next(&detection_packet)) break;
那么,我哪里错了?
查看我的完整代码:https://pastebin.com/H8JV6hsM
【问题讨论】:
标签: c++ machine-learning mediapipe