Skip to content

Commit fd04fbf

Browse files
authored
Change TensorFlow Hub links to Kaggle models (#1482)
* Change TensorFlow Hub links to Kaggle models Signed-off-by: Ilya Trushkin <[email protected]> * Update links for direct download Signed-off-by: Ilya Trushkin <[email protected]> --------- Signed-off-by: Ilya Trushkin <[email protected]>
1 parent 9cf7886 commit fd04fbf

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

notebooks/002-openvino-api/002-openvino-api.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
"source": [
337337
"from pathlib import Path\n",
338338
"\n",
339-
"tflite_model_url = 'https://tfhub.dev/tensorflow/lite-model/inception_v4_quant/1/default/1?lite-format=tflite'\n",
339+
"tflite_model_url = 'https://www.kaggle.com/models/tensorflow/inception/frameworks/tfLite/variations/v4-quant/versions/1?lite-format=tflite'\n",
340340
"tflite_model_path = Path('model/classification.tflite')\n",
341341
"\n",
342342
"download_file(tflite_model_url, filename=tflite_model_path.name, directory=tflite_model_path.parent)"

notebooks/119-tflite-to-openvino/119-tflite-to-openvino.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"tflite_model_path = model_dir / \"efficientnet_lite0_fp32_2.tflite\"\n",
120120
"\n",
121121
"ov_model_path = tflite_model_path.with_suffix(\".xml\")\n",
122-
"model_url = \"https://tfhub.dev/tensorflow/lite-model/efficientnet/lite0/fp32/2?lite-format=tflite\"\n",
122+
"model_url = \"https://www.kaggle.com/models/tensorflow/efficientnet/frameworks/tfLite/variations/lite0-fp32/versions/2?lite-format=tflite\"\n",
123123
"\n",
124124
"download_file(model_url, tflite_model_path.name, model_dir)"
125125
]

notebooks/120-tensorflow-object-detection-to-openvino/120-tensorflow-instance-segmentation-to-openvino.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
"\n",
133133
"openvino_ir_path = ir_model_dir / f\"{model_name}.xml\"\n",
134134
"\n",
135-
"tf_model_url = \"https://tfhub.dev/tensorflow/mask_rcnn/inception_resnet_v2_1024x1024/1?tf-hub-format=compressed\"\n",
135+
"tf_model_url = \"https://www.kaggle.com/models/tensorflow/mask-rcnn-inception-resnet-v2/frameworks/tensorFlow2/variations/1024x1024/versions/1?tf-hub-format=compressed\"\n",
136136
"\n",
137137
"tf_model_archive_filename = f\"{model_name}.tar.gz\""
138138
]

notebooks/120-tensorflow-object-detection-to-openvino/120-tensorflow-object-detection-to-openvino.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
"\n",
133133
"openvino_ir_path = ir_model_dir / f\"{model_name}.xml\"\n",
134134
"\n",
135-
"tf_model_url = \"https://tfhub.dev/tensorflow/faster_rcnn/resnet50_v1_640x640/1?tf-hub-format=compressed\"\n",
135+
"tf_model_url = \"https://www.kaggle.com/models/tensorflow/faster-rcnn-resnet-v1/frameworks/tensorFlow2/variations/faster-rcnn-resnet50-v1-640x640/versions/1?tf-hub-format=compressed\"\n",
136136
"\n",
137137
"tf_model_archive_filename = f\"{model_name}.tar.gz\""
138138
]

notebooks/126-tensorflow-hub/126-tensorflow-hub.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"source": [
114114
"IMAGE_SHAPE = (224, 224)\n",
115115
"IMAGE_URL, IMAGE_PATH = \"https://storage.googleapis.com/download.tensorflow.org/example_images/grace_hopper.jpg\", \"data/grace_hopper.jpg\"\n",
116-
"MODEL_URL, MODEL_PATH = \"https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/classification/5\", \"models/mobilenet_v2_100_224.xml\""
116+
"MODEL_URL, MODEL_PATH = \"https://www.kaggle.com/models/google/mobilenet-v1/frameworks/tensorFlow2/variations/100-224-classification/versions/2\", \"models/mobilenet_v2_100_224.xml\""
117117
]
118118
},
119119
{
@@ -421,7 +421,7 @@
421421
],
422422
"source": [
423423
"%pip install -q tensorflow tensorflow_hub \"opencv-python\" numpy matplotlib\n",
424-
"%pip install -q \"openvino==2023.2.0.dev20230922\""
424+
"%pip install -q \"openvino>=2023.2.0\""
425425
]
426426
},
427427
{
@@ -456,7 +456,7 @@
456456
"STYLE_IMAGE_URL = \"https://upload.wikimedia.org/wikipedia/commons/b/b4/Vassily_Kandinsky%2C_1913_-_Composition_7.jpg\"\n",
457457
"STYLE_IMAGE_PATH = \"./data/Vassily_Kandinsky%2C_1913_-_Composition_7.jpg\"\n",
458458
"\n",
459-
"MODEL_URL = \"https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2\"\n",
459+
"MODEL_URL = \"https://www.kaggle.com/models/google/arbitrary-image-stylization-v1/frameworks/tensorFlow1/variations/256/versions/2\"\n",
460460
"MODEL_PATH = \"./models/arbitrary-image-stylization-v1-256.xml\""
461461
]
462462
},

notebooks/269-film-slowmo/269-film-slowmo.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@
238238
" x1=tf.keras.layers.Input(shape=(None, None, 3)),\n",
239239
" time=tf.keras.layers.Input(shape=(1)),\n",
240240
")\n",
241-
"film_layer = hub.KerasLayer(\"https://tfhub.dev/google/film/1\")(inputs)\n",
241+
"model_url = \"https://www.kaggle.com/models/google/film/frameworks/tensorFlow2/variations/film/versions/1\"\n",
242+
"film_layer = hub.KerasLayer(model_url)(inputs)\n",
242243
"film_model = tf.keras.Model(inputs=inputs, outputs=film_layer)"
243244
]
244245
},

0 commit comments

Comments
 (0)