Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/197.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何在tflite模型上应用元数据?_Android_Tensorflow Lite_Object Detection Api - Fatal编程技术网

Android 如何在tflite模型上应用元数据?

Android 如何在tflite模型上应用元数据?,android,tensorflow-lite,object-detection-api,Android,Tensorflow Lite,Object Detection Api,我正在尝试使用自定义模型启动TF Object detection Android应用程序() 我需要解决这个问题 java.lang.AssertionError: Error occurred when initializing ObjectDetector: Input tensor has type kTfLiteFloat32: it requires specifying NormalizationOptions metadata to preprocess input images

我正在尝试使用自定义模型启动TF Object detection Android应用程序()

我需要解决这个问题

java.lang.AssertionError: Error occurred when initializing ObjectDetector: Input tensor has type kTfLiteFloat32: it requires specifying NormalizationOptions metadata to preprocess input images.
我发现一个建议,我需要在.tflite模型上应用元数据,所以我尝试运行

python tflite_convert.py \ --input_shapes="1,300,300,3" \ --input_arrays=normalized_input_image_tensor \ --output_arrays="TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3" \ --allow_custom_ops \ --saved_model_dir=alexey/saved_model \ --inference_input_type=FLOAT \ --inference_type=FLOAT \ --output_file=detect.tflite
它是在没有任何错误的情况下完成的,但是当我使用这个生成的.tflite启动应用程序时,我得到了与不应用元数据时相同的错误。 所以在我看来,元数据并没有被应用

参考文档。