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

Why the model predicted so slow on ios device? #58

Open
allrightzhu opened this issue Apr 2, 2020 · 17 comments
Open

Why the model predicted so slow on ios device? #58

allrightzhu opened this issue Apr 2, 2020 · 17 comments

Comments

@allrightzhu
Copy link

TensorFlow.js 1.7.0
tfjs-wechat plugin 0.0.9
WeChat 7.0.12
WeChat base API 2.10.4
WeChat IDE v1.02.1911180

I tried to run blazeface model on miniprogram,but I found that it predicted very slow on ios,this is my data about predicted time:
IDE:15ms , android(MI 6): 40ms ios(iphone 6s): 460ms

But if I runed the blazeface model on web,like safari, the predicted time was fast.

@pyu10055
Copy link
Collaborator

pyu10055 commented Apr 2, 2020

@allrightzhu can you share the wechat app for blazeface?

@allrightzhu
Copy link
Author

@allrightzhu can you share the wechat app for blazeface?

Yes,which email can I send?

@pyu10055
Copy link
Collaborator

pyu10055 commented Apr 2, 2020

@allrightzhu can you share it here? If you prefer more secure way, you can create a private github project and add me to the project. Thanks!

@allrightzhu
Copy link
Author

@allrightzhu can you share it here? If you prefer more secure way, you can create a private github project and add me to the project. Thanks!

Ok,I invited you.

@pyu10055
Copy link
Collaborator

pyu10055 commented Apr 3, 2020

@allrightzhu I tried your facemesh demo on iphoneXR the console output indicates around 20ms, blazeface is slower at 30ms

@allrightzhu
Copy link
Author

@allrightzhu I tried your facemesh demo on iphoneXR the console output indicates around 20ms, blazeface is slower at 30ms

OK,maybe my iphone6s is too old,I'll try it on more devices.

@pyu10055
Copy link
Collaborator

@allrightzhu please let us know how did go, thanks.

@Starsky-Synlitec
Copy link

I had the similar problem.
On Android device, it runs fast, but it can not recieve any message from the UI.
On Iphone device, it runs slow, but it can recieve message from UI like button.

@Starsky-Synlitec
Copy link

@pyu10055 I also invited you to my project, you can check it out.

@smallSix6
Copy link

@allrightzhu您可以在这里分享吗?如果您希望使用更安全的方式,则可以创建一个私有github项目并将我添加到该项目中。谢谢!

好吧,我邀请你。

@allrightzhu can you share it here? If you prefer more secure way, you can create a private github project and add me to the project. Thanks!

Ok,I invited you.

Can you add me to the project too? Thanks!

@pyu10055
Copy link
Collaborator

@GaussRieman
Copy link

Maybe it's not due to tfjs, instead the camera frame difference between iphone and android should be blamed for this. Note that the camera frame resolution on android is a constant 384288, while on iphone, as instruction says, it varies from 480p to 1080p, and 720p (1080720) as default.

One useful way to improve is setting the camera resolution low in camera label.

Hope it's helpful.

@1161735054
Copy link

@allrightzhu can you share it here? If you prefer more secure way, you can create a private github project and add me to the project. Thanks!

Ok,I invited you.

I am doing a similar project with you,can you please show me your code too?

@anthann
Copy link

anthann commented Oct 30, 2020

JSCore on iOS has no jit. So that in many scenarios V8 on Android is outperformed. Not sure if it's related to this case.

@tenderzada
Copy link

@allrightzhu您可以在这里分享吗?如果您希望使用更安全的方式,则可以创建一个私有github项目并将我添加到该项目中。谢谢!

好吧,我邀请你。

@allrightzhu can you share it here? If you prefer more secure way, you can create a private github project and add me to the project. Thanks!

Ok,I invited you.

Can you add me to the project too? Thanks!

Can you add me to the project too? Thanks!

@aizigao
Copy link

aizigao commented Apr 21, 2024

ios mini program run in jsCore without jit
小程序开启 useExperimentalWorker 可以开启JIT 然后运行wasm 的效率就和安卓差不多了,但是用了 useExperimentalWorker 就不能用 wx.createSharedArrayBuffer 创建共享内存了 传输数据时非常耗资源

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

9 participants