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
{{ message }}
This repository was archived by the owner on Oct 14, 2023. It is now read-only.
| `http-trigger-onnx-model``| This function demonstrates running an inferrence against an ONNX model. | HTTP | NONE | HTTP |
5
+
|`http-trigger-onnx-model`| This function demonstrates running an inference using an ONNX model. It is triggered by an HTTP request. See _[Try it out](#try-it-out)_ for usage. | HTTP | NONE | HTTP |
6
6
7
-
The style transfer model used in this function is called _Rain Princess_ and is downloaded from the [ONNX Model Zoo][3]. Artistic style transfer models mix the content of an image with the style of another image. Examples of the styles can be seen [here][4].
7
+
The style transfer model used in this function is called _Rain Princess_. It is downloaded from the [ONNX Model Zoo][3].
8
+
9
+
Artistic style transfer models mix the content of an image with the style of another image. Examples of the styles can be seen [here][4].
8
10
9
11
Open Neural Network Exchange (ONNX) is an open standard format for representing machine learning models. ONNX is supported by a community of partners who have implemented it in many frameworks and tools.
10
12
@@ -18,23 +20,11 @@ This example is probably not going to age well. However the pun stands on its ow
18
20
19
21
## Dependencies
20
22
```
21
-
Pillow=7.0.0
23
+
Pillow==7.0.0
22
24
onnxruntime==1.1.0
23
25
numpy==1.18.1
24
26
```
25
27
26
-
## Logging includes model metadata
27
-
28
-
```
29
-
[1/19/20 8:00:25 PM] Python HTTP trigger function processed a request.
30
-
[1/19/20 8:00:25 PM] Model metadata:
31
-
[1/19/20 8:00:25 PM] Graph name: torch-jit-export
32
-
[1/19/20 8:00:25 PM] Model version: 9223372036854775807
33
-
[1/19/20 8:00:25 PM] Producer: pytorch
34
-
[1/19/20 8:00:25 PM] Preprocessing image...
35
-
[1/19/20 8:00:25 PM] Running inference on ONNX model...
36
-
```
37
-
38
28
## Configuration
39
29
As specified in `functions.json`, this function is triggered by an HTTP request. It expects a POST request with raw image bytes (JPEG/PNG/whatever the Pillow library can open). Output is an HTTP response with the resulting styled transferred image (JPEG encoded).
0 commit comments