Skip to content

Commit

Permalink
fix windows model loading issues (#2348)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Sep 2, 2024
1 parent c81e765 commit ae8406f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 222 deletions.
4 changes: 2 additions & 2 deletions notebooks/3D-pose-estimation-webcam/3D-pose-estimation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@
"model_path = Path(BASE_MODEL_NAME).with_suffix(\".pth\")\n",
"onnx_path = Path(BASE_MODEL_NAME).with_suffix(\".onnx\")\n",
"\n",
"ir_model_path = f\"model/public/{model_name}/{precision}/{model_name}.xml\"\n",
"model_weights_path = f\"model/public/{model_name}/{precision}/{model_name}.bin\"\n",
"ir_model_path = Path(f\"model/public/{model_name}/{precision}/{model_name}.xml\")\n",
"model_weights_path = Path(f\"model/public/{model_name}/{precision}/{model_name}.bin\")\n",
"\n",
"if not model_path.exists():\n",
" download_command = f\"omz_downloader \" f\"--name {model_name} \" f\"--output_dir {base_model_dir}\"\n",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -99,7 +98,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -174,7 +172,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -200,7 +197,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -273,7 +269,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -312,7 +307,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -321,7 +315,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -391,7 +384,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -440,7 +432,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand Down Expand Up @@ -486,7 +477,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand Down Expand Up @@ -519,7 +509,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"jupyter": {
Expand Down Expand Up @@ -566,7 +555,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"execution": {
Expand Down Expand Up @@ -698,7 +686,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -740,7 +727,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"jupyter": {
Expand All @@ -754,7 +740,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand Down Expand Up @@ -795,7 +780,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -834,7 +818,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand Down Expand Up @@ -869,7 +852,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand Down Expand Up @@ -1093,7 +1075,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand Down Expand Up @@ -1200,7 +1181,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand All @@ -1217,7 +1197,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -1253,7 +1232,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"tags": []
Expand Down Expand Up @@ -1306,7 +1284,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -1370,182 +1347,7 @@
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"00f134ea2cd44f698a65c6e19eec5887": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"0efbcb2df8c34ac2baf17daf00032484": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLModel",
"state": {
"layout": "IPY_MODEL_15258f9879ec4060bfebe5a7f175ddbc",
"style": "IPY_MODEL_2614315073bd42ae8a4bf07d918df4f9",
"value": "pretrained_model/unet_kits19_state_dict.pth: 100%"
}
},
"15258f9879ec4060bfebe5a7f175ddbc": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"2614315073bd42ae8a4bf07d918df4f9": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLStyleModel",
"state": {
"description_width": "",
"font_size": null,
"text_color": null
}
},
"2c7654bcbec94188a96bf9d786ecb327": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "ProgressStyleModel",
"state": {
"description_width": ""
}
},
"35a1768113b147b1a23dfda69f31ee0f": {
"model_module": "@jupyter-widgets/output",
"model_module_version": "1.0.0",
"model_name": "OutputModel",
"state": {
"layout": "IPY_MODEL_00f134ea2cd44f698a65c6e19eec5887",
"outputs": [
{
"data": {
"text/html": "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Statistics collection <span style=\"color: #729c1f; text-decoration-color: #729c1f\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span> <span style=\"color: #800080; text-decoration-color: #800080\">100%</span> <span style=\"color: #0068b5; text-decoration-color: #0068b5\">69/69</span> β€’ <span style=\"color: #0068b5; text-decoration-color: #0068b5\">0:00:16</span> β€’ <span style=\"color: #0068b5; text-decoration-color: #0068b5\">0:00:00</span>\n</pre>\n",
"text/plain": "Statistics collection \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[38;2;0;104;181m69/69\u001b[0m β€’ \u001b[38;2;0;104;181m0:00:16\u001b[0m β€’ \u001b[38;2;0;104;181m0:00:00\u001b[0m\n"
},
"metadata": {},
"output_type": "display_data"
}
]
}
},
"3f95879a28a24fab97cca44f431f0139": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"4b18ce800dac4a2d9b8f027612a69b72": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HBoxModel",
"state": {
"children": [
"IPY_MODEL_0efbcb2df8c34ac2baf17daf00032484",
"IPY_MODEL_d67b4e32272142e4bdb3354d6a69fcf2",
"IPY_MODEL_fb42224f9f234377a01709d7abf517d4"
],
"layout": "IPY_MODEL_e1b9f1b7a4c642759c77b457d4b37554"
}
},
"51de3acdee29431fab0596ce98cb0073": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"600061fc47e643128bacc52317a0792f": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLStyleModel",
"state": {
"description_width": "",
"font_size": null,
"text_color": null
}
},
"813a5d43c3ec4ba2b22ddc7b4ddfae3a": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "DropdownModel",
"state": {
"_options_labels": [
"CPU",
"AUTO"
],
"description": "Device:",
"index": 1,
"layout": "IPY_MODEL_51de3acdee29431fab0596ce98cb0073",
"style": "IPY_MODEL_e66a2a642d634b6cbe086b7121f2eb0c"
}
},
"85de3a24d92e4deea91e80af0d5d4b63": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"980624b6233b45bbb3c4dad204ca515e": {
"model_module": "@jupyter-widgets/output",
"model_module_version": "1.0.0",
"model_name": "OutputModel",
"state": {
"layout": "IPY_MODEL_85de3a24d92e4deea91e80af0d5d4b63",
"outputs": [
{
"data": {
"text/html": "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Applying Fast Bias correction <span style=\"color: #729c1f; text-decoration-color: #729c1f\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span> <span style=\"color: #800080; text-decoration-color: #800080\">100%</span> <span style=\"color: #0068b5; text-decoration-color: #0068b5\">23/23</span> β€’ <span style=\"color: #0068b5; text-decoration-color: #0068b5\">0:00:00</span> β€’ <span style=\"color: #0068b5; text-decoration-color: #0068b5\">0:00:00</span>\n</pre>\n",
"text/plain": "Applying Fast Bias correction \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[38;2;0;104;181m23/23\u001b[0m β€’ \u001b[38;2;0;104;181m0:00:00\u001b[0m β€’ \u001b[38;2;0;104;181m0:00:00\u001b[0m\n"
},
"metadata": {},
"output_type": "display_data"
}
]
}
},
"add743fcdf0c466ca500dc343a733334": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"d67b4e32272142e4bdb3354d6a69fcf2": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "FloatProgressModel",
"state": {
"bar_style": "success",
"layout": "IPY_MODEL_3f95879a28a24fab97cca44f431f0139",
"max": 7946156,
"style": "IPY_MODEL_2c7654bcbec94188a96bf9d786ecb327",
"value": 7946156
}
},
"e1b9f1b7a4c642759c77b457d4b37554": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"e66a2a642d634b6cbe086b7121f2eb0c": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "DescriptionStyleModel",
"state": {
"description_width": ""
}
},
"fb42224f9f234377a01709d7abf517d4": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLModel",
"state": {
"layout": "IPY_MODEL_add743fcdf0c466ca500dc343a733334",
"style": "IPY_MODEL_600061fc47e643128bacc52317a0792f",
"value": " 7.58M/7.58M [00:01&lt;00:00, 11.2MB/s]"
}
}
},
"state": {},
"version_major": 2,
"version_minor": 0
}
Expand Down
Loading

0 comments on commit ae8406f

Please sign in to comment.