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

ValueError: Task runner is currently not running. #5365

Closed
mcdonasd1212 opened this issue May 1, 2024 · 5 comments
Closed

ValueError: Task runner is currently not running. #5365

mcdonasd1212 opened this issue May 1, 2024 · 5 comments
Assignees
Labels
os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:python MediaPipe Python issues task:pose landmarker Issues related to Pose Landmarker: Find people and body positions type:support General questions

Comments

@mcdonasd1212
Copy link

mcdonasd1212 commented May 1, 2024

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

Yes

OS Platform and Distribution

Ubuntu 22.04.4 LTS

MediaPipe Tasks SDK version

0.10.11

Task name (e.g. Image classification, Gesture recognition etc.)

Pose Landmark Detection

Programming Language and version (e.g. C++, Python, Java)

Python

Describe the actual behavior

Task runner is not currently running when

frame_timestamp_ms = mp.Timestamp.from_seconds(timestamps).value
mp_image = mp.Image(image_format=mp.ImageFormat.SRGB, data=image)

results = pose.detect_for_video(mp_image, frame_timestamp_ms)

Describe the expected behavior

results = pose.detect_for_video(mp_image, frame_timestamp_ms)

This command crashes and returns the ValueError: Task runner is currently not running

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

The legacy solution works:

 self.mp_pose = mp.solutions.pose
  self.pose_detector = self.mp_pose.Pose(static_image_mode=False, min_detection_confidence=0.5,
                                          min_tracking_confidence=0.5)

The current version does not:

options = PoseLandmarkerOptions(
    base_options=BaseOptions(model_asset_path=model_path),
    running_mode=VisionRunningMode.VIDEO)

with PoseLandmarker.create_from_options(options) as pose_replay:
        pose_replay

Other info / Complete Logs

pose <mediapipe.tasks.python.vision.pose_landmarker.PoseLandmarker object at 0x7f992c2b08d0>

  File "/lib/python3.11/site-packages/mediapipe/tasks/python/vision/core/base_vision_task_api.py", line 119, in _process_video_data
    return self._runner.process(inputs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Task runner is currently not running.
@mcdonasd1212 mcdonasd1212 changed the title Task runner is currently not running. valueError: Task runner is currently not running. May 1, 2024
@mcdonasd1212 mcdonasd1212 changed the title valueError: Task runner is currently not running. ValueError: Task runner is currently not running. May 1, 2024
@mcdonasd1212
Copy link
Author

@schmidt-sebastian it seems like there should be an easy answer, any advise?

@kuaashish kuaashish added os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:python MediaPipe Python issues task:pose landmarker Issues related to Pose Landmarker: Find people and body positions type:support General questions labels May 2, 2024
@kuaashish
Copy link
Collaborator

Hi @mcdonasd1212,

Apologies for the delayed response. Could you kindly share more details, including the standalone code you are using and the Python version, to help us reproduce the issue and gain a better understanding?

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label May 7, 2024
Copy link

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 github-actions bot added the stale label May 15, 2024
Copy link

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

Copy link

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

@kuaashish kuaashish removed stat:awaiting response Waiting for user response stale labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:python MediaPipe Python issues task:pose landmarker Issues related to Pose Landmarker: Find people and body positions type:support General questions
Projects
None yet
Development

No branches or pull requests

2 participants