Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin tflm #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

plugin tflm #1

wants to merge 1 commit into from

Conversation

Derekduke
Copy link

原有的imx6ull插件修改为tflm插件

@pinxue
Copy link
Contributor

pinxue commented Jul 2, 2022

Reviewers ( @QiwenLi0729 @yc66542260 ) : beside the code inspection, please ensure this plugin is not bound to specific board.

@liqiwenx
Copy link
Member

转换存在问题:

cmmand: python aitools.py --project="D:\RT-ThreadStudio\workspace\art_pi_mnist" --model="D:\RT-ThreadStudio\workspace\art_pi_mnist\mnist.tflite" --model_name=mnist2 --platform=tflm

image

Copy link
Member

@liqiwenx liqiwenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

工具使用出现错误, 经过测试和代码审核, 当前插件适配质量不能满足合入要求

#include <rt_ai_log.h>
#ifdef RT_AI_USE_TFLM

#define tflm_load_model person_detect_init
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该后端适配过于粗糙, API直接对接到了tflm的人形检测demo的函数上. 无法满足框架正常运行要求.

logging.info("{} loading to project successfully...".format(source.name))

def c_model_convert(self, tflm_out , model_path):
c_model_name = model_path[9:-7]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c_model_name = model_path[9:-7] 该部分对于模型路径处理直接使用固定偏移, 无法正常工作

#if model_data_c.exists(): model_data_c.unlink()
print("model_data_c path:" , model_data_c_path)

os.system("xxd -i "+ "./Models/"+c_model_name +".tflite"+" > " +model_data_c_path)
Copy link
Member

@liqiwenx liqiwenx Jul 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该位置调用xxd工具, 在windows环境下无此默认工具, 且工具路径没有做处理, 将工作不正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants