-
Notifications
You must be signed in to change notification settings - Fork 134
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
预测结果始终不变 #172
Comments
document.getElementById('photo') 返回的 dom 类型是什么? |
按照这里的demo来实现的 // Import @paddlejs/paddlejs-core
import { Runner } from '@paddlejs/paddlejs-core';
// Import the registered WebGL backend.
import '@paddlejs/paddlejs-backend-webgl';
const runner = new Runner({
modelPath: '/model/mobilenetv2', // model path, e.g. http://xx.cc/path, http://xx.cc/path/model.json, /localModelDir/model.json, /localModelDir
feedShape: { // input shape
fw: 256,
fh: 256
},
fill?: '#fff' // fill color when resize image, default value is #fff
});
// init runner
await runner.init();
// predict and get result
const res = await runner.predict(mediadata, callback?); 这里 没写 mediadata 到底是一个dom还是其它的什么类型,dom 是 canvas还是img,如果是数据的话是不是需要转到0-1的区间内。 |
media data 可以 HTMLImageElement | HTMLVideoElement | HTMLCanvasElement |
按照上面这样,给的是 HTMLImageElement ,但结果好像没对。 |
你的模型可以上传一下吗? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用 paddleClass训练了一个多分类模型(5个分类),在python后端正常,转成js的版本后,预测结果始终一样,数据预处理看上去正常
The text was updated successfully, but these errors were encountered: