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

AI示例运行失败/云开发等问题 解决方案 #139

Open
DeMeng33 opened this issue May 29, 2024 · 1 comment
Open

AI示例运行失败/云开发等问题 解决方案 #139

DeMeng33 opened this issue May 29, 2024 · 1 comment

Comments

@DeMeng33
Copy link

DeMeng33 commented May 29, 2024

辛辛苦苦运行起来了 总结一下过程给后人乘凉:

下载代码阶段问题参考 #125

运行AI阶段:

  1. 云开发问题:用不着云开发修改classify.js代码
    找到 wx.cloud.init();注释掉,下文用到了wx.cloud.downloadFile替换为wx.downloadFile({ url: fileID,

  2. 下载模型资源出错:
    他提供的 cloudPath 是他云开发环境中的资源,我环境哪tm有这东西,所以请链接到这里onnx/models,换对应的资源,请注意cloudPathmodelPath的文件名保持一致

  3. 上条中onnx/models资源跑不起来:
    请参考daquexian/onnx-simplifier,他提供了一个转换模型网站convertmodel.com,请从onnx转成onnx。然后下载,本地起一个nginx也好、扔服务器、oss也好替换上条中的cloudPath

  4. 程序运行卡住,一直没结果的:
    请在classify.js中搜索async detect(frame)函数,将他的catch方法从alert替换为reject(error),保证index.jsthis.classifier.detect的继续执行。

@DeMeng33
Copy link
Author

仅限/pages/ai/mobilenet。 那个int8的不知道mobilenetv2_qat用的哪里的模型。欢迎告知,想试一下

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

No branches or pull requests

1 participant