Thursday, October 6, 2022
HomeiOS Developmentios - Issue with Custom Object Detector model from GCP Vision

ios – Issue with Custom Object Detector model from GCP Vision

[ad_1]

My full tech stack is:

  • GCP ML Vision.
  • Exported Model to tflite format (from the same GCP console).
  • XCode for iOS development
  • iPhone 11 pro

I am trying to use a Custom Object detector using MLKit and one model trained in GCP AutoML Vision.
I created the model and exported as tflite file, but when trying to do objectDetector processImage:visionImage, I always get the error:
Error Domain=com.google.visionkit.pipeline.error Code=3 “Pipeline failed to fully start:
CalculatorGraph::Run() failed in Run:
Calculator::Open() for node “BoxClassifierCalculator” failed: #vk Unexpected number of dimensions for output index 0:
got 3D, expected either 2D (BxN with B=1) or 4D (BxHxWxN with B=1, W=1, H=1).”
UserInfo={com.google.visionkit.status=<MLKITvk_VNKStatusWrapper: 0x280841270>, NSLocalizedDescription=Pipeline failed to fully start:
CalculatorGraph::Run() failed in Run:
Calculator::Open() for node “BoxClassifierCalculator” failed: #vk Unexpected number of dimensions for output index 0:
got 3D, expected either 2D (BxN with B=1) or 4D (BxHxWxN with B=1, W=1, H=1).}
.
I have downloaded the mlkit examples from https://github.com/googlesamples/mlkitand there is something similar in the vision project, (to detect birds) when I try to replace my own tflite file, it breaks in the exact same way as in my own project.
I presume the tflite is created in a very different way as MLVision does.
Any insight? (Sorry if this is so obvious, but I’m pretty new to TensorFlow and MLVision)
Thanks in advance

[ad_2]

Source link

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments