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
How long does it take to predict an image #4
Comments
Right now Core ML is in beta, and betas tend to be slow. That said, 20 sec for 100 images is 0.2 sec per image. It should run about 4 times faster, at 0.05 sec per image (which is about 20 fps). |
@hollance So 20fps means in which device? I think iP7p is much faster than iP6.And have you ever tested the speed? |
To see how fast MobileNets can run on your iPhone, get the Forge repo and build the MobileNet target: https://github.com/hollance/forge (if you are on iOS 11, you should check out the xcode9 branch, not the master branch). Forge runs MobileNets on the GPU using MPS. It will get up to about 20 FPS on an iPhone 6. I am not sure if the Core ML version runs on the GPU. It sounds like it does not, which would explain why it is 4x slower than expected. |
@hollance Thanks for you reply.I use this demo to run on iPhone7 ios11.0 it cost 70ms to classify an image.And I don't know it use GPU or CPU. |
Thanks for your work.I think I run your demo successfully now.But I want to know how long does it take to predict an image so I add some code to test the time. And when I loop for 100 times for predict the cat image, it cost about 20s to do this on my iPhone6, But I think it should be faster.So am I wrong?
The text was updated successfully, but these errors were encountered: