Inception-CoreML icon indicating copy to clipboard operation
Inception-CoreML copied to clipboard

Does the execution time includes image pre-processing?

Open atrah22 opened this issue 8 years ago • 4 comments

Hi,

Does the execution time includes the image pre-processing time to input to first layer + inception-v3 model execution time + post processing time?

For example, tensorflow benchmark model shows the execution time of only the CNN model execution without and pre image processing or post processing. I was looking for such execution time benchmarking.

atrah22 avatar Oct 16 '17 02:10 atrah22

In this app, the execution time also includes the time needed to schedule the Vision request (which in turn calls Core ML), the preprocessing, the neural network, the post-processing of the results, and running the UI update on the main thread.

hollance avatar Oct 16 '17 12:10 hollance

Thankyou for the quick response. Is it possible to measure the execution time of the "neural network" only from the 1st input layer layer to the last layer ?

atrah22 avatar Oct 18 '17 08:10 atrah22

Add this line:

    let elapsed = CACurrentMediaTime() - startTimes.remove(at: 0)

to requestDidComplete() to get the best possible estimate.

hollance avatar Oct 18 '17 17:10 hollance

You can have a view of the time executed by CoreML using Instruments App

RaulSa avatar Feb 25 '18 00:02 RaulSa