I am attempting to use a *.tflite model (which I created using Custom Vision on Microsoft Azure) in a Xamarin.Android project. However, when I use the following code:
ObjectDetector.ObjectDetectorOptions objoptions = ObjectDetector.ObjectDetectorOptions.InvokeBuilder().SetScoreThreshold(0.6f).Build();
ObjectDetector objdetector = ObjectDetector.CreateFromFileAndOptions(Application.Context, "model.tflite", objoptions);
I receive the following error:
java.lang.RuntimeException: Error occurred when initializing ObjectDetector: Input tensor has type kTfLiteFloat32: it requires specifying NormalizationOptions metadata to preprocess input images.
Everything I have been able to find on adding metadata to the *.tflite file is written in Python so I have been unable to use them with Xamarin.Android. Can anybody help me?