mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

pose_tracking_cpu seems stuck when calling landmarks with camera

Open dingjieliu opened this issue 1 year ago • 1 comments
trafficstars

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

Yes

OS Platform and Distribution

iOS 14.3.1

Mobile device if the issue happens on mobile device

MacBook Air M1

Browser and version if the issue happens on browser

no browser

Programming Language and version

C++

MediaPipe version

v0.10.11

Bazel version

6.5.0rc1

Solution

Pose

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

returning output image is ok. returning landmarks seems stuck in a dead lock.

Describe the expected behaviour

returning both output image and landmarks.

Standalone code/steps you may have used to try to get what you need

auto ret = graph.Initialize(config_vec, tem_vec);
    if (!ret.ok()) {
        spdlog::error("[BootstrapHelper::boot_strap]: Initialize the calculator graph failed with {}.", (std::string)ret.message());
        return;
    }

    poller = graph.AddOutputStreamPoller("output_video");
    poller_lmk = graph.AddOutputStreamPoller("pose_landmarks");

    spdlog::info("[BootstrapHelper::boot_strap]: Start running the calculator graph.");
    if(!graph.StartRun({}).ok()) {
        spdlog::error("[BootstrapHelper::boot_strap]: StartRun failed!");
        return;
    };

    absl::Status ret = graph.AddPacketToInputStream(
        "input_video", mediapipe::Adopt(mp_input_frame.release()).At(mediapipe::Timestamp(frame_timestamp_us)));

    mediapipe::Packet packet;
    if (!poller->Next(&packet)) {
        spdlog::error("[BootstrapHelper::boot_strap]: poller next failed!");
        return mediapipe::NormalizedLandmarkList();
    }

    // std::ignore = packet.Get<mediapipe::ImageFrame>();

    mediapipe::Packet packet_lmk;
    if (!poller_lmk->Next(&packet_lmk)) {
        spdlog::error("[BootstrapHelper::boot_strap]: poller_lmk next failed!");
        return mediapipe::NormalizedLandmarkList();
    }

Other info / Complete Logs

returning output_video and landmarks with reading jpg: good.

only returning output_video with camera: good.
returning output_video and landmarks with camera: bad.

dingjieliu avatar Jul 25 '24 13:07 dingjieliu

only returning output_video with reading jpg: good.
only returning landmarks with reading jpg: bad.

dingjieliu avatar Jul 26 '24 02:07 dingjieliu

Hi @dingjieliu,

Apologies for the delayed response. Could you please let us know if this issue is still ongoing or if it has been resolved on your end?

Thank you!!

kuaashish avatar Sep 13 '24 08:09 kuaashish

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Sep 21 '24 01:09 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar Sep 28 '24 01:09 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Sep 28 '24 01:09 google-ml-butler[bot]