You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/02-benchmarks/inference-time.md
+92-42Lines changed: 92 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,46 +3,84 @@ title: Inference Time
3
3
---
4
4
5
5
:::warning
6
-
Times presented in the tables are measured as consecutive runs of the model. Initial run times may be up to 2x longer due to model loading and initialization.
6
+
Times presented in the tables are measured as consecutive runs of the model.
7
+
Initial run times may be up to 2x longer due to model loading and
8
+
initialization.
7
9
:::
8
10
9
11
## Classification
10
12
11
13
:::info
12
-
Times presented below are _model inference times only_ and do not include time taken for pre-processing (e.g. image resizing, normalization) or post-processing (e.g. image resizing) which are dependent on input size.
14
+
Inference times are measured directly from native C++ code, wrapping only the
15
+
model's forward pass, excluding input-dependent pre- and post-processing (e.g.
16
+
image resizing, normalization) and any overhead from React Native runtime.
13
17
:::
14
18
15
-
| Model | iPhone 17 Pro (Core ML) [ms]| Google Pixel 10 (XNNPACK) [ms]|
Times presented below are _model inference times only_ and do not include time taken for pre-processing (e.g. image resizing, normalization) or post-processing (e.g. image resizing) which are dependent on input size.
35
+
Inference times are measured directly from native C++ code, wrapping only the
36
+
model's forward pass, excluding input-dependent pre- and post-processing (e.g.
37
+
image resizing, normalization) and any overhead from React Native runtime.
38
+
:::
39
+
40
+
:::info
41
+
For this model all input images, whether larger or smaller, are resized before
42
+
processing. Resizing is typically fast for small images but may be noticeably
43
+
slower for very large images, which can increase total time.
24
44
:::
25
45
26
-
| Model | iPhone 17 Pro (Core ML) [ms]| Google Pixel 10 (XNNPACK) [ms]|
| SSDLITE_320_MOBILENET_V3_LARGE (Core ML FP32) | 18 | - |
50
+
| SSDLITE_320_MOBILENET_V3_LARGE (Core ML FP16) | 8 | - |
29
51
30
52
## Style Transfer
31
53
32
54
:::info
33
-
Times presented below are _model inference times only_ and do not include time taken for pre-processing (e.g. image resizing, normalization) or post-processing (e.g. image resizing) which are dependent on input size.
55
+
Inference times are measured directly from native C++ code, wrapping only the
56
+
model's forward pass, excluding input-dependent pre- and post-processing (e.g.
57
+
image resizing, normalization) and any overhead from React Native runtime.
34
58
:::
35
59
36
-
| Model | iPhone 17 Pro (Core ML) [ms]| Google Pixel 10 (XNNPACK) [ms]|
| STYLE_TRANSFER_RAIN_PRINCESS (Core ML FP32) | 100 | - |
83
+
| STYLE_TRANSFER_RAIN_PRINCESS (Core ML FP16) | 150 | - |
46
84
47
85
## OCR
48
86
@@ -127,38 +165,50 @@ Benchmark times for text embeddings are highly dependent on the sentence length.
127
165
## Image Embeddings
128
166
129
167
:::info
130
-
Times presented below are _model inference times only_ and do not include time taken for pre-processing (e.g. image resizing, normalization) or post-processing (e.g. image resizing) which are dependent on input size.
168
+
Inference times are measured directly from native C++ code, wrapping only the
169
+
model's forward pass, excluding input-dependent pre- and post-processing (e.g.
170
+
image resizing, normalization) and any overhead from React Native runtime.
131
171
:::
132
172
133
173
:::info
134
-
Image embedding benchmark times are measured using 224×224 pixel images, as required by the model. All input images, whether larger or smaller, are resized to 224×224 before processing. Resizing is typically fast for small images but may be noticeably slower for very large images, which can increase total time.
174
+
For this model all input images, whether larger or smaller, are resized before
175
+
processing. Resizing is typically fast for small images but may be noticeably
176
+
slower for very large images, which can increase total time.
135
177
:::
136
178
137
-
| Model | iPhone 17 Pro (XNNPACK) [ms]| Google Pixel 10 (XNNPACK)[ms]|
Times presented below are _model inference times only_ and do not include time taken for pre-processing (e.g. image resizing, normalization) or post-processing (e.g. image resizing) which are dependent on input size.
187
+
Inference times are measured directly from native C++ code, wrapping only the
188
+
model's forward pass, excluding input-dependent pre- and post-processing (e.g.
189
+
image resizing, normalization) and any overhead from React Native runtime.
190
+
:::
191
+
192
+
:::info
193
+
For this model all input images, whether larger or smaller, are resized before
194
+
processing. Resizing is typically fast for small images but may be noticeably
195
+
slower for very large images, which can increase total time.
146
196
:::
147
197
148
-
| Model | iPhone 17 Pro (XNNPACK) [ms]| Google Pixel 10 (XNNPACK)[ms]|
0 commit comments