如何正确使用TFLITE插件1.1.2插件颤动?

发布于 2025-01-21 21:32:38 字数 1108 浏览 0 评论 0原文

我将在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文