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
mediapipe_tasks_vision_image_segmenter_imagesegmentergraph__mediapipe_tasks_components_processors_imagepreprocessinggraph__ImageToTensorCalculator #5298
Comments
|
Hi @kinarr, I can replicate the problem in Colab Gist, as indicated by @tarakang. I encounter the same error message: "failed: Unsupported format: 9". For now, this issue does not appear to be specific to macOS. Could you please have look into this issue? From our standpoint, it appears to be a legitimate bug. Thank you!! |
@kuaashish I believe it's caused by the limited Image formats supported by MediaPipe but there should be a way to normalize the inputs so that it can passed to the model. Lemme take a look. |
Oh and there's no need to preprocess the inputs like this: inputs = inputs.astype('float32')
inputs.shape = (1,) + inputs.shape
inputs /= 255 Please see the following for the correct usage of the API: These are C++ API calls but it should be similar for Python. |
@tarakang @kuaashish Here's the working notebook for your reference: https://colab.research.google.com/drive/1B0mPPfcWCyr07CBwXgraBIkdqri5BGff?usp=sharing |
The model card for the MediaPipe Selfie Segmentation model provides essential information about the expected input format for the model. So PTAL here for the respective model cards for each segmentation model: https://developers.google.com/mediapipe/solutions/vision/image_segmenter#multiclass-model As for the input features this should be helpful: https://developers.google.com/mediapipe/solutions/vision/image_segmenter#features |
@tarakang I've added your image utility ( |
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. |
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
MacOS 14.3.1
MediaPipe Tasks SDK version
0.10.9
Task name (e.g. Image classification, Gesture recognition etc.)
selfie_multiclass_hairr
Programming Language and version (e.g. C++, Python, Java)
Python
Describe the actual behavior
An error occurred when I entered the image of type float32
Describe the expected behaviour
It is expected to handle images of type float32
Standalone code/steps you may have used to try to get what you need
Other info / Complete Logs
The text was updated successfully, but these errors were encountered: