shijianjian
commited on
Commit
•
a0e5c83
1
Parent(s):
9e7b99f
updated README.md
Browse files
README.md
CHANGED
@@ -37,10 +37,14 @@ To chain many operators or models into one graph, follow these steps:
|
|
37 |
```python
|
38 |
import numpy as np
|
39 |
from kornia.onnx import ONNXSequential
|
40 |
-
#
|
41 |
-
onnx_seq = ONNXSequential(
|
|
|
|
|
|
|
|
|
42 |
# Prepare some input data
|
43 |
-
input_data = np.random.randn(1, 3,
|
44 |
# Perform inference
|
45 |
outputs = onnx_seq(input_data)
|
46 |
# Print the model outputs
|
|
|
37 |
```python
|
38 |
import numpy as np
|
39 |
from kornia.onnx import ONNXSequential
|
40 |
+
# Chain ONNX models from HuggingFace repo and your own local model together
|
41 |
+
onnx_seq = ONNXSequential(
|
42 |
+
"hf://operators/kornia.color.gray.RgbToGrayscale",
|
43 |
+
"hf://operators/kornia.geometry.transform.affwarp.Resize_512x512",
|
44 |
+
"YOUR_OWN_MODEL.onnx"
|
45 |
+
)
|
46 |
# Prepare some input data
|
47 |
+
input_data = np.random.randn(1, 3, 384, 512).astype(np.float32)
|
48 |
# Perform inference
|
49 |
outputs = onnx_seq(input_data)
|
50 |
# Print the model outputs
|