Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pose_tracking_cpu seems stuck when calling landmarks with camera #5547

Open
dingjieliu opened this issue Jul 25, 2024 · 1 comment
Open

pose_tracking_cpu seems stuck when calling landmarks with camera #5547

dingjieliu opened this issue Jul 25, 2024 · 1 comment
Assignees
Labels
legacy:pose Pose Detection related issues os:macOS Issues on MacOS platform:c++ Issues specific to C++ framework in mediapipe platform:ios MediaPipe IOS issues type:bug Bug in the Source Code of MediaPipe Solution

Comments

@dingjieliu
Copy link

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 dingjieliu added the type:bug Bug in the Source Code of MediaPipe Solution label Jul 25, 2024
@dingjieliu
Copy link
Author

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

@kuaashish kuaashish assigned kuaashish and unassigned ayushgdev Jul 26, 2024
@kuaashish kuaashish added os:macOS Issues on MacOS platform:c++ Issues specific to C++ framework in mediapipe legacy:pose Pose Detection related issues platform:ios MediaPipe IOS issues labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:pose Pose Detection related issues os:macOS Issues on MacOS platform:c++ Issues specific to C++ framework in mediapipe platform:ios MediaPipe IOS issues type:bug Bug in the Source Code of MediaPipe Solution
Projects
None yet
Development

No branches or pull requests

3 participants