Spaces:
Runtime error
Runtime error
SUSHMANTH REDDY
commited on
Commit
•
dde91d9
1
Parent(s):
8898b7f
Add files via upload
Browse files
onnx_models/explore_and_preprocess_data.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
onnx_models/torch_to_onnx.ipynb
ADDED
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"nbformat": 4,
|
3 |
+
"nbformat_minor": 0,
|
4 |
+
"metadata": {
|
5 |
+
"colab": {
|
6 |
+
"name": "Copy of torch_to_onnx.ipynb",
|
7 |
+
"provenance": [],
|
8 |
+
"collapsed_sections": []
|
9 |
+
},
|
10 |
+
"kernelspec": {
|
11 |
+
"name": "python3",
|
12 |
+
"display_name": "Python 3"
|
13 |
+
},
|
14 |
+
"language_info": {
|
15 |
+
"name": "python"
|
16 |
+
}
|
17 |
+
},
|
18 |
+
"cells": [
|
19 |
+
{
|
20 |
+
"cell_type": "markdown",
|
21 |
+
"metadata": {
|
22 |
+
"id": "xAk44VAUMcI4"
|
23 |
+
},
|
24 |
+
"source": [
|
25 |
+
"### The goal is to export the DevoLearn nucleus segmentation model to ONNX and run inference using ONNX runtime.\n",
|
26 |
+
"\n",
|
27 |
+
"Link to tutorial - https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html"
|
28 |
+
]
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"cell_type": "code",
|
32 |
+
"metadata": {
|
33 |
+
"id": "1cvIRtSg1xPj"
|
34 |
+
},
|
35 |
+
"source": [
|
36 |
+
"!pip install segmentation-models-pytorch\n",
|
37 |
+
"!pip install onnx\n",
|
38 |
+
"!git clone https://github.com/DevoLearn/devolearn.git\n",
|
39 |
+
"!pip install onnxruntime"
|
40 |
+
],
|
41 |
+
"execution_count": null,
|
42 |
+
"outputs": []
|
43 |
+
},
|
44 |
+
{
|
45 |
+
"cell_type": "markdown",
|
46 |
+
"metadata": {
|
47 |
+
"id": "P9r-q1crDZ74"
|
48 |
+
},
|
49 |
+
"source": [
|
50 |
+
"### Import Libraries:"
|
51 |
+
]
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"cell_type": "code",
|
55 |
+
"metadata": {
|
56 |
+
"id": "bo1ngsVb1mhk"
|
57 |
+
},
|
58 |
+
"source": [
|
59 |
+
"import torch\n",
|
60 |
+
"import segmentation_models_pytorch as smp\n",
|
61 |
+
"import torch.onnx\n",
|
62 |
+
"import numpy as np\n",
|
63 |
+
"import onnx\n",
|
64 |
+
"import onnxruntime as ort\n",
|
65 |
+
"\n",
|
66 |
+
"import cv2\n",
|
67 |
+
"import matplotlib.pyplot as plt\n",
|
68 |
+
"from PIL import Image"
|
69 |
+
],
|
70 |
+
"execution_count": null,
|
71 |
+
"outputs": []
|
72 |
+
},
|
73 |
+
{
|
74 |
+
"cell_type": "markdown",
|
75 |
+
"metadata": {
|
76 |
+
"id": "plqmhQ3IDfIg"
|
77 |
+
},
|
78 |
+
"source": [
|
79 |
+
"### Load model:\n",
|
80 |
+
"`model.eval()` sets model to inference mode -\n",
|
81 |
+
"* Normalization layers use running stats.\n",
|
82 |
+
"* deactivate dropout layers"
|
83 |
+
]
|
84 |
+
},
|
85 |
+
{
|
86 |
+
"cell_type": "code",
|
87 |
+
"metadata": {
|
88 |
+
"id": "Ah3kvIEh1fT4"
|
89 |
+
},
|
90 |
+
"source": [
|
91 |
+
"model = torch.load('/content/devolearn/devolearn/cell_nucleus_segmentor/cell_nucleus_segmentation_model.pth', map_location='cpu')\n",
|
92 |
+
"model.eval()"
|
93 |
+
],
|
94 |
+
"execution_count": null,
|
95 |
+
"outputs": []
|
96 |
+
},
|
97 |
+
{
|
98 |
+
"cell_type": "markdown",
|
99 |
+
"metadata": {
|
100 |
+
"id": "ahpQaPJkELZi"
|
101 |
+
},
|
102 |
+
"source": [
|
103 |
+
"### Define sample input `x` :\n",
|
104 |
+
"* The values in this can be random as long as it is the right type and size.\n",
|
105 |
+
"* In this case, `x` is a tensor, that corresponds to a batch of one single channel, 256x256 image.\n",
|
106 |
+
"* Make sure `out` is valid."
|
107 |
+
]
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"cell_type": "code",
|
111 |
+
"metadata": {
|
112 |
+
"id": "v6aHqHs21vSK",
|
113 |
+
"colab": {
|
114 |
+
"base_uri": "https://localhost:8080/"
|
115 |
+
},
|
116 |
+
"outputId": "4b0e31ec-daa2-465b-cb9b-295ff168f904"
|
117 |
+
},
|
118 |
+
"source": [
|
119 |
+
"x = torch.randn(1, 1, 256, 256, requires_grad=False)\n",
|
120 |
+
"out=model(x)"
|
121 |
+
],
|
122 |
+
"execution_count": null,
|
123 |
+
"outputs": [
|
124 |
+
{
|
125 |
+
"output_type": "stream",
|
126 |
+
"text": [
|
127 |
+
"/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)\n",
|
128 |
+
" return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)\n"
|
129 |
+
],
|
130 |
+
"name": "stderr"
|
131 |
+
}
|
132 |
+
]
|
133 |
+
},
|
134 |
+
{
|
135 |
+
"cell_type": "markdown",
|
136 |
+
"metadata": {
|
137 |
+
"id": "J5adRnBxFvr9"
|
138 |
+
},
|
139 |
+
"source": [
|
140 |
+
"### Export model:\n"
|
141 |
+
]
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"cell_type": "code",
|
145 |
+
"metadata": {
|
146 |
+
"id": "Cgn1VgKi30dT",
|
147 |
+
"colab": {
|
148 |
+
"base_uri": "https://localhost:8080/"
|
149 |
+
},
|
150 |
+
"outputId": "4d19e8dc-5344-4c43-8071-ec13c8d665d2"
|
151 |
+
},
|
152 |
+
"source": [
|
153 |
+
"torch.onnx.export(model, # model being run\n",
|
154 |
+
" x, # model input (or a tuple for multiple inputs)\n",
|
155 |
+
" \"nucleus_segmentor.onnx\", # where to save the model (can be a file or file-like object)\n",
|
156 |
+
" export_params=True, # store the trained parameter weights inside the model file\n",
|
157 |
+
" opset_version=11, # the ONNX version to export the model to\n",
|
158 |
+
" do_constant_folding=True, # whether to execute constant folding for optimization\n",
|
159 |
+
" input_names = ['input'], # the model's input names\n",
|
160 |
+
" output_names = ['output'], # the model's output names\n",
|
161 |
+
" dynamic_axes={'input' : {0 : 'batch_size'}, # variable length axes\n",
|
162 |
+
" 'output' : {0 : 'batch_size'}})"
|
163 |
+
],
|
164 |
+
"execution_count": null,
|
165 |
+
"outputs": [
|
166 |
+
{
|
167 |
+
"output_type": "stream",
|
168 |
+
"text": [
|
169 |
+
"/usr/local/lib/python3.7/dist-packages/torch/_tensor.py:575: UserWarning: floor_divide is deprecated, and will be removed in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values.\n",
|
170 |
+
"To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). (Triggered internally at /pytorch/aten/src/ATen/native/BinaryOps.cpp:467.)\n",
|
171 |
+
" return torch.floor_divide(self, other)\n"
|
172 |
+
],
|
173 |
+
"name": "stderr"
|
174 |
+
}
|
175 |
+
]
|
176 |
+
},
|
177 |
+
{
|
178 |
+
"cell_type": "markdown",
|
179 |
+
"metadata": {
|
180 |
+
"id": "RYPqPCKhGRzJ"
|
181 |
+
},
|
182 |
+
"source": [
|
183 |
+
"### Define `expand_dims_twice`:\n"
|
184 |
+
]
|
185 |
+
},
|
186 |
+
{
|
187 |
+
"cell_type": "code",
|
188 |
+
"metadata": {
|
189 |
+
"id": "vfHgRLatcbY3"
|
190 |
+
},
|
191 |
+
"source": [
|
192 |
+
"def expand_dims_twice(arr):\n",
|
193 |
+
" norm=(arr-np.min(arr))/(np.max(arr)-np.min(arr)) #normalize\n",
|
194 |
+
" ret = np.expand_dims(np.expand_dims(norm, axis=0), axis=0)\n",
|
195 |
+
" return(ret)"
|
196 |
+
],
|
197 |
+
"execution_count": null,
|
198 |
+
"outputs": []
|
199 |
+
},
|
200 |
+
{
|
201 |
+
"cell_type": "markdown",
|
202 |
+
"metadata": {
|
203 |
+
"id": "mOY7WkrEI7xi"
|
204 |
+
},
|
205 |
+
"source": [
|
206 |
+
"### Run inference from ONNX file:\n",
|
207 |
+
"The output image below the following cell is inferred from the ONNX model."
|
208 |
+
]
|
209 |
+
},
|
210 |
+
{
|
211 |
+
"cell_type": "code",
|
212 |
+
"metadata": {
|
213 |
+
"id": "dfAoZNQk4l9r",
|
214 |
+
"colab": {
|
215 |
+
"base_uri": "https://localhost:8080/",
|
216 |
+
"height": 305
|
217 |
+
},
|
218 |
+
"outputId": "5f2a4e6c-bb8d-4862-8d7e-a51ec94a26a6"
|
219 |
+
},
|
220 |
+
"source": [
|
221 |
+
"ort_session = ort.InferenceSession('nucleus_segmentor.onnx')\n",
|
222 |
+
"\n",
|
223 |
+
"img = cv2.imread(\"/content/devolearn/devolearn/tests/sample_data/images/nucleus_seg_sample.png\",0)\n",
|
224 |
+
"resized = cv2.resize(img, (256,256),\n",
|
225 |
+
" interpolation = cv2.INTER_NEAREST)\n",
|
226 |
+
"\n",
|
227 |
+
"print(\"dims before expand_dims_twice - \", resized.shape)\n",
|
228 |
+
"img_unsqueeze = expand_dims_twice(resized)\n",
|
229 |
+
"print(\"dims after expand_dims_twice - \", img_unsqueeze.shape)\n",
|
230 |
+
"\n",
|
231 |
+
"onnx_outputs = ort_session.run(None, {'input': img_unsqueeze.astype('float32')})\n",
|
232 |
+
"plt.imshow(onnx_outputs[0][0][0])\n",
|
233 |
+
"plt.show()"
|
234 |
+
],
|
235 |
+
"execution_count": null,
|
236 |
+
"outputs": [
|
237 |
+
{
|
238 |
+
"output_type": "stream",
|
239 |
+
"text": [
|
240 |
+
"dims before expand_dims_twice - (256, 256)\n",
|
241 |
+
"dims after expand_dims_twice - (1, 1, 256, 256)\n"
|
242 |
+
],
|
243 |
+
"name": "stdout"
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"output_type": "display_data",
|
247 |
+
"data": {
|
248 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD8CAYAAACVSwr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAat0lEQVR4nO3deZhcZZn+8e9T1RudztYJ2QMJoUEISAiZEBYRBwSMYiKOCKJEBoiQIDiAM9HB0WFGFAFB/CGYCIojggygRFkkxGB0IJAFyL4vJCFJQ9ZOd5buquf3R59AJyedquqq6lpyf66rrqp+6z2nnpyu3H3W95i7IyLSUiTXBYhI/lEwiEiIgkFEQhQMIhKiYBCREAWDiIRkLRjM7CIzW2Jmy81sQrY+R0Qyz7JxHoOZRYGlwCeBdcBM4HJ3X5jxDxORjMvWGsNwYLm7r3T3vcATwKgsfZaIZFhJlubbF1jb4ud1wOmtdS6zcq+gQ5ZKERGAOra+7+5HJtM3W8GQkJmNBcYCVFDJ6XZerkoROSy87E+tSbZvtjYl1gP9W/zcL2j7gLtPdPdh7j6slPIslSEibZGtYJgJ1JjZQDMrAy4DJmfps0Qkw7KyKeHuTWZ2A/BnIAo84u4LsvFZIpJ5WdvH4O7PA89na/4ikj0681FEQhQMIhKiYBCREAWDiIQoGEQkRMEgIiEKBhEJUTCISIiCQURCFAwiEqJgEJEQBYOIhCgYRCREwSAiIQoGEQlRMIhIiIJBREIUDCISomAQkRAFg4iEKBhEJETBICIhCgYRCVEwiEiIgkFEQhQMIhKiYBCREAWDiIQoGEQkRMEgIiEKBhEJUTCISIiCQURCFAwiElKSzsRmthqoA2JAk7sPM7Nq4HfAAGA1cKm7b02vTBFpT5lYY/iEuw9x92HBzxOAqe5eA0wNfhaRApKNTYlRwKPB60eB0V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ga6H9D2I2BC8HoCcGcO6joHGArMT1QXMBJ4ATBgBPB6HtT6PeDWg/Q9MfgelAMDg+9HtJ3q7A0MDV53BJYG9eTVcj1EnRlbprleYxgOLHf3le6+F3iC5su2890o4NHg9aPA6PYuwN2nA1sOaG6trlHAr73ZDKDLAae0Z1UrtbYmZ5fte+tDDOTVcj1Ena1JeZnmOhiSukQ7xxx4ycxmm9nYoK2nu28IXm8EeuamtJDW6srX5dzmy/az7YAhBvJ2uWZyKISWch0MheBsdx8KfAoYb2bntHzTm9fV8u7QTr7W1UJal+1n00GGGPhAPi3XTA+F0FKugyHvL9F29/XBcy3we5pXwTbtW2UMnmtzV+F+Wqsr75az5+ll+wcbYoA8XK7ZHgoh18EwE6gxs4FmVkbzWJGTc1zTB8ysQzDOJWbWAbiA5svLJwNjgm5jgGdzU2FIa3VNBq4M9qKPALa3WDXOiXy8bL+1IQbIs+XaWp0ZXabtsRc1wR7WkTTvVV0B/Huu6zmgtmNo3pv7NrBgX31AN2AqsAx4GajOQW2P07y62EjzNuPVrdVF817zB4JlPA8Ylge1/k9Qy9zgi9u7Rf9/D2pdAnyqHes8m+bNhLnAW8FjZL4t10PUmbFlqjMfRSQk15sSIpKHFAwiEqJgEJEQBYOIhCgYRCREwSAiIQoGEQlRMIhIyP8HQIdcAQfshXYAAAAASUVORK5CYII=\n",
|
249 |
+
"text/plain": [
|
250 |
+
"<Figure size 432x288 with 1 Axes>"
|
251 |
+
]
|
252 |
+
},
|
253 |
+
"metadata": {
|
254 |
+
"tags": [],
|
255 |
+
"needs_background": "light"
|
256 |
+
}
|
257 |
+
}
|
258 |
+
]
|
259 |
+
},
|
260 |
+
{
|
261 |
+
"cell_type": "code",
|
262 |
+
"metadata": {
|
263 |
+
"id": "YtmfEX4oqbCT"
|
264 |
+
},
|
265 |
+
"source": [
|
266 |
+
""
|
267 |
+
],
|
268 |
+
"execution_count": null,
|
269 |
+
"outputs": []
|
270 |
+
}
|
271 |
+
]
|
272 |
+
}
|
onnx_models/train_segmentation_model.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|