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

How long does it take to predict an image #4

Closed
liu6381810 opened this issue Jul 10, 2017 · 4 comments
Closed

How long does it take to predict an image #4

liu6381810 opened this issue Jul 10, 2017 · 4 comments

Comments

@liu6381810
Copy link

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?

@hollance
Copy link
Owner

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).

@liu6381810
Copy link
Author

@hollance So 20fps means in which device? I think iP7p is much faster than iP6.And have you ever tested the speed?

@hollance
Copy link
Owner

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.

@liu6381810
Copy link
Author

@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.
I will close this question soon.Thank you!

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

2 participants