mediapipe: ValidatedGraphConfig Initialization Failed
OS Platform and Distribution
MacOS ARM
Compiler version
No response
Programming Language and version
Python 3.11.8
Installed using virtualenv? pip? Conda?(if python)
virtualenv pip
MediaPipe version
0.10.10
Bazel version
7.0.2
XCode and Tulsi versions (if iOS)
15.2
Android SDK and NDK versions (if android)
No response
Android AAR (if android)
None
OpenCV version (if running on desktop)
4.9.0
Describe the problem
It gives me errors everytime I run anything that relates to mediapipe. CV runs great, but when trying to use hands = mpHands.Hands(), hands = mp.solutions.hands, I get the error. Is it because I’m running on Mac ARM? I
Complete Logs
/Users/usera/Documents/Development/Apps/prj/.venv/bin/python /Users/usera/Documents/Development/Apps/prj/main.py
2024-02-24 17:53:59.478 python[83108:17726527] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
Traceback (most recent call last):
File "/Users/usera/Documents/Development/Apps/prj/main.py", line 8, in <module>
hands = mpHands.Hands()
^^^^^^^^^^^^^^^
File "/Users/usera/Documents/Development/Apps/prj/.venv/lib/python3.11/site-packages/mediapipe/python/solutions/hands.py", line 114, in __init__
super().__init__(
File "/Users/usera/Documents/Development/Apps/prj/.venv/lib/python3.11/site-packages/mediapipe/python/solution_base.py", line 248, in __init__
self._graph = calculator_graph.CalculatorGraph(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: ValidatedGraphConfig Initialization failed.
ImageToTensorCalculator: ; RET_CHECK failure (mediapipe/calculators/tensor/image_to_tensor_calculator.cc:144) ValidateOptionOutputDims(options) returned INTERNAL: ; RET_CHECK failure (./mediapipe/calculators/tensor/image_to_tensor_utils.h:136) options.has_output_tensor_float_range() || options.has_output_tensor_int_range() || options.has_output_tensor_uint_range()Output tensor range is required.
ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options.
ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options.
ImageToTensorCalculator: ; RET_CHECK failure (mediapipe/calculators/tensor/image_to_tensor_calculator.cc:144) ValidateOptionOutputDims(options) returned INTERNAL: ; RET_CHECK failure (./mediapipe/calculators/tensor/image_to_tensor_utils.h:136) options.has_output_tensor_float_range() || options.has_output_tensor_int_range() || options.has_output_tensor_uint_range()Output tensor range is required.
ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options.
ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options.
SplitTensorVectorCalculator: The number of output streams should match the number of ranges specified in the CalculatorOptions.
Process finished with exit code 1
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Reactions: 4
- Comments: 28
I was able to replicate this error on an M1 mac with 3.11.7, running mediapipe 0.10.10, trying to run mediapipe holistic pose estimation. Downgrading to 0.10.9 fixed this issue.
It appears to happen on intel macs too, as I only tested the upgrade while trying to fix an issue from someone running 0.10.10 on an intel mac
@kuaashish thanks for the response. Maybe it’s best if mediapipe adds a deprecation warning when trying to run code like this? It seems even for solutions that are still maintained (hands, pose), they fail with a calculator graph error. Checking the documentation, it seems there’s new code recommended on for the maintained solutions:
But accessing the old method like
from mediapipe.python.solutions.pose import Pose; Pose()
is still possible, it just gives you a calculator graph error.I think the expected behavior would be either an import error when trying to import the solutions this way, or a logged warning that this is no longer the proper way of calling this solution.
Thanks for the tip. I was facing the same issue on my M3 Mac and downgrading mediapipe to 0.10.9 did resolve it.
The legacy solutions seem to work with 0.10.13 on Mac again 😃
Thanks a lot, downgrading mediapipe to 0.10.9 worked for me as well. I’ve Macbook Air M1.
@kuaashish Is any work being done on this? The past two releases on mac error when trying to use any of the legacy solutions. Will this be fixed or are the legacy solutions deprecated?
Below is the full error message. The list of errors seems relatively straightforward, although I’m not familiar enough with the inner workings of mediapipe to tackle it myself.