如何正确使用TFLITE插件1.1.2插件颤动?
我将在TFLITE的帮助下建立一个垃圾分类扑朔迷离的项目。 Tflite模型可以分类6类
。
垃圾 阵列([1,224,224,3],dtype = int32),'shape_signature':array([-1,224,224,3],dtype = int32),'dtype':< class; class'numpy.float.float.float322 '>,'量化':(0.0,0),'量化_parameters':{'scales':array([],dtype = float32),'Zero_points':array(array([],dtype = int32),'量化_dimension' :0},'Sparsity_Parameters':{}}]
==输出详细信息==
[{'name':'statefulpartitionedcall:0','index','index':499,'shape':array(array([[[ 1,6],dtype = int32),'shape_signature':array([ - 1,6],dtype = int32),'dtype':< class'numpy.float.float32'> gt;量化量0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}} ]
因此,我的问题是如何按照我的模型信息正确设置此代码段的值:
var recognitions = await Tflite.runModelOnImage(
path: filepath, // required
imageMean: 0.0, // defaults to 117.0
imageStd: 255.0, // defaults to 1.0
numResults: 2, // defaults to 5
threshold: 0.2, // defaults to 0.1
asynch: true // defaults to true
);
谢谢
I am going to build a garbage classification flutter project with the help of the tflite. The tflite model can classify 6 classes of garbage.The information below is output and input details:
== Input details ==
[{'name': 'serving_default_input_1:0', 'index': 0, 'shape': array([ 1, 224, 224, 3], dtype=int32), 'shape_signature': array([ -1, 224, 224, 3], dtype=int32), 'dtype': <class 'numpy.float32'>, 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
== Output details ==
[{'name': 'StatefulPartitionedCall:0', 'index': 499, 'shape': array([1, 6], dtype=int32), 'shape_signature': array([-1, 6], dtype=int32), 'dtype': <class 'numpy.float32'>, 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
Therefore, my problem is how can I correctly set the values of this code snippet following my model information:
var recognitions = await Tflite.runModelOnImage(
path: filepath, // required
imageMean: 0.0, // defaults to 117.0
imageStd: 255.0, // defaults to 1.0
numResults: 2, // defaults to 5
threshold: 0.2, // defaults to 0.1
asynch: true // defaults to true
);
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论