mediapipe
mediapipe copied to clipboard
Error message: ERROR: 0:1: '' : version '330' is not supported
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
macOS Sequoia 10.15.1
MediaPipe Tasks SDK version
0.10.15
Task name (e.g. Image classification, Gesture recognition etc.)
Pose landmarker
Programming Language and version (e.g. C++, Python, Java)
Python
Describe the actual behavior
Shader error
Describe the expected behaviour
Success
Standalone code/steps you may have used to try to get what you need
import mediapipe as mp
import cv2
BaseOptions = mp.tasks.BaseOptions
PoseLandmarker = mp.tasks.vision.PoseLandmarker
PoseLandmarkerOptions = mp.tasks.vision.PoseLandmarkerOptions
VisionRunningMode = mp.tasks.vision.RunningMode
options = PoseLandmarkerOptions(
base_options=BaseOptions(
model_asset_path='pose_landmarker.task',
delegate=BaseOptions.Delegate.GPU
),
running_mode=VisionRunningMode.IMAGE,
min_pose_detection_confidence=0.01,
output_segmentation_masks=True,
)
mp_pose = mp.solutions.pose
mp_drawing = mp.solutions.drawing_utils
with PoseLandmarker.create_from_options(options) as landmarker:
image = cv2.imread('img.bmp')
frame = mp.Image(image_format=mp.ImageFormat.SRGBA, data=cv2.cvtColor(image, cv2.COLOR_BGR2RGBA))
results = landmarker.detect(frame)
print(results)
cv2.imshow("", image)
cv2.destroyAllWindows()
Other info / Complete Logs
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1728689838.763588 5507114 gl_context.cc:357] GL version: 2.1 (2.1 Metal - 89.3), renderer: Apple M2 Max
INFO: Created TensorFlow Lite delegate for Metal.
W0000 00:00:1728689841.295845 5507152 landmark_projection_calculator.cc:186] Using NORM_RECT without IMAGE_DIMENSIONS is only supported for the square ROI. Provide IMAGE_DIMENSIONS or use PROJECTION_MATRIX.
E0000 00:00:1728689841.349315 5507158 shader_util.cc:99] Failed to compile shader:
1 #version 330
2 #ifdef GL_ES
3 #define DEFAULT_PRECISION(p, t) precision p t;
4 #else
5 #define DEFAULT_PRECISION(p, t)
6 #define lowp
7 #define mediump
8 #define highp
9 #endif // defined(GL_ES)
10 #if __VERSION__ < 130
11 #define in attribute
12 #define out varying
13 #endif // __VERSION__ < 130
14 in vec4 position; in mediump vec4 texture_coordinate; out mediump vec2 sample_coordinate; void main() { gl_Position = position; sample_coordinate = texture_coordinate.xy; }
E0000 00:00:1728689841.349355 5507158 shader_util.cc:106] Error message: ERROR: 0:1: '' : version '330' is not supported
E0000 00:00:1728689841.349448 5507114 calculator_graph.cc:896] INTERNAL: CalculatorGraph::Run() failed:
Calculator::Process() for node "mediapipe_tasks_vision_pose_landmarker_poselandmarkergraph__mediapipe_tasks_vision_pose_landmarker_multipleposelandmarksdetectorgraph__mediapipe_tasks_vision_pose_landmarker_singleposelandmarksdetectorgraph__TensorsToSegmentationCalculator" failed: ; RET_CHECK failure (mediapipe/calculators/tensor/tensors_to_segmentation_converter_metal.cc:216) upsample_program_Problem initializing the program.
Traceback (most recent call last):
File "/Users/zumpchke/mp_pose.py", line 33, in <module>
results = landmarker.detect(frame)
File "/Users/zumpchke/Library/Python/3.9/lib/python/site-packages/mediapipe/tasks/python/vision/pose_landmarker.py", line 352, in detect
output_packets = self._process_image_data({
File "/Users/zumpchke/Library/Python/3.9/lib/python/site-packages/mediapipe/tasks/python/vision/core/base_vision_task_api.py", line 95, in _process_image_data
return self._runner.process(inputs)
RuntimeError: CalculatorGraph::Run() failed:
Calculator::Process() for node "mediapipe_tasks_vision_pose_landmarker_poselandmarkergraph__mediapipe_tasks_vision_pose_landmarker_multipleposelandmarksdetectorgraph__mediapipe_tasks_vision_pose_landmarker_singleposelandmarksdetectorgraph__TensorsToSegmentationCalculator" failed: ; RET_CHECK failure (mediapipe/calculators/tensor/tensors_to_segmentation_converter_metal.cc:216) upsample_program_Problem initializing the program.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/zumpchke/mp_pose.py", line 38, in <module>
cv2.destroyAllWindows()
File "/Users/zumpchke/Library/Python/3.9/lib/python/site-packages/zumpchke/tasks/python/vision/core/base_vision_task_api.py", line 226, in __exit__
self.close()
File "/Users/zumpchke/Library/Python/3.9/lib/python/site-packages/mediapipe/tasks/python/vision/core/base_vision_task_api.py", line 209, in close
self._runner.close()
RuntimeError: CalculatorGraph::Run() failed:
Calculator::Process() for node "mediapipe_tasks_vision_pose_landmarker_poselandmarkergraph__mediapipe_tasks_vision_pose_landmarker_multipleposelandmarksdetectorgraph__mediapipe_tasks_vision_pose_landmarker_singleposelandmarksdetectorgraph__TensorsToSegmentationCalculator" failed: ; RET_CHECK failure (mediapipe/calculators/tensor/tensors_to_segmentation_converter_metal.cc:216) upsample_program_Problem initializing the program.
This only happens with BaseDelegate GPU.
We will look at this internally.
Hi @zumpchke,
Could you confirm if this issue is still occurring on your end, or it is no longer issue now?
Thank you!!
Was there a change that went in? I did not see a branch
Hi @zumpchke,
We have released a new version, 0.10.18, available on PyPI: mediapipe. Could you try it and let us know if the issue persists? We are currently working on the release notes for version 0.10.18, which will be available on GitHub soon.
Thank you!!
Same issue
% python3 mp_pose.py
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1730794559.216553 5911304 gl_context.cc:357] GL version: 2.1 (2.1 Metal - 89.3), renderer: Apple M2 Max
INFO: Created TensorFlow Lite delegate for Metal.
W0000 00:00:1730794559.439556 5911378 landmark_projection_calculator.cc:186] Using NORM_RECT without IMAGE_DIMENSIONS is only supported for the square ROI. Provide IMAGE_DIMENSIONS or use PROJECTION_MATRIX.
E0000 00:00:1730794559.439628 5911383 shader_util.cc:99] Failed to compile shader:
1 #version 330
2 #ifdef GL_ES
3 #define DEFAULT_PRECISION(p, t) precision p t;
4 #else
5 #define DEFAULT_PRECISION(p, t)
6 #define lowp
7 #define mediump
8 #define highp
9 #endif // defined(GL_ES)
10 #if __VERSION__ < 130
11 #define in attribute
12 #define out varying
13 #endif // __VERSION__ < 130
14 in vec4 position; in mediump vec4 texture_coordinate; out mediump vec2 sample_coordinate; void main() { gl_Position = position; sample_coordinate = texture_coordinate.xy; }
E0000 00:00:1730794559.439656 5911383 shader_util.cc:106] Error message: ERROR: 0:1: '' : version '330' is not supported
E0000 00:00:1730794559.439706 5911304 calculator_graph.cc:898] INTERNAL: CalculatorGraph::Run() failed:
Calculator::Process() for node "mediapipe_tasks_vision_pose_landmarker_poselandmarkergraph__mediapipe_tasks_vision_pose_landmarker_multipleposelandmarksdetectorgraph__mediapipe_tasks_vision_pose_landmarker_singleposelandmarksdetectorgraph__TensorsToSegmentationCalculator" failed: ; RET_CHECK failure (mediapipe/calculators/tensor/tensors_to_segmentation_converter_metal.cc:217) upsample_program_Problem initializing the program.
Hi @zumpchke,
Could you please try running a similar setup to this Colab example (https://colab.sandbox.google.com/github/googlesamples/mediapipe/blob/main/examples/pose_landmarker/python/%5BMediaPipe_Python_Tasks%5D_Pose_Landmarker.ipynb) on your local environment and update us on the status?
Thank you!!
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.
This issue was closed due to lack of activity after being marked stale for past 7 days.