Skip to content

Commit bee1bcf

Browse files
authored
-Old code had some deprecated code. Updated the (#4809)
notebook to update the deprecated code. -wget lines were failing, added --no-check-certificate flag to fix the issue.
1 parent df06d14 commit bee1bcf

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

build_and_train_models/sm-object_detection_birds/sm-object_detection_birds.ipynb

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
},
4242
{
4343
"cell_type": "markdown",
44-
"metadata": {},
44+
"metadata": {
45+
"jp-MarkdownHeadingCollapsed": true
46+
},
4547
"source": [
4648
"## Introduction\n",
4749
"\n",
@@ -105,7 +107,7 @@
105107
"source": [
106108
"import sys\n",
107109
"\n",
108-
"!{sys.executable} -m pip install opencv-python\n",
110+
"!{sys.executable} -m pip install opencv-python--headless\n",
109111
"!{sys.executable} -m pip install mxnet"
110112
]
111113
},
@@ -129,7 +131,7 @@
129131
"import sagemaker\n",
130132
"\n",
131133
"bucket = sagemaker.Session().default_bucket()\n",
132-
"prefix = \"DEMO-ObjectDetection-birds\"\n",
134+
"prefix = \"demo-object-detection-birds\"\n",
133135
"\n",
134136
"print(\"s3://{}/{}/\".format(bucket, prefix))"
135137
]
@@ -405,6 +407,7 @@
405407
"cell_type": "code",
406408
"execution_count": null,
407409
"metadata": {
410+
"scrolled": true,
408411
"tags": []
409412
},
410413
"outputs": [],
@@ -847,6 +850,7 @@
847850
"cell_type": "code",
848851
"execution_count": null,
849852
"metadata": {
853+
"scrolled": true,
850854
"tags": []
851855
},
852856
"outputs": [],
@@ -1089,11 +1093,11 @@
10891093
},
10901094
"outputs": [],
10911095
"source": [
1092-
"!wget -q -O multi-goldfinch-1.jpg https://t3.ftcdn.net/jpg/01/44/64/36/500_F_144643697_GJRUBtGc55KYSMpyg1Kucb9yJzvMQooW.jpg\n",
1093-
"!wget -q -O northern-flicker-1.jpg https://upload.wikimedia.org/wikipedia/commons/5/5c/Northern_Flicker_%28Red-shafted%29.jpg\n",
1094-
"!wget -q -O northern-cardinal-1.jpg https://cdn.pixabay.com/photo/2013/03/19/04/42/bird-94957_960_720.jpg\n",
1095-
"!wget -q -O blue-jay-1.jpg https://cdn12.picryl.com/photo/2016/12/31/blue-jay-bird-feather-animals-b8ee04-1024.jpg\n",
1096-
"!wget -q -O hummingbird-1.jpg http://res.freestockphotos.biz/pictures/17/17875-hummingbird-close-up-pv.jpg"
1096+
"!wget -q --no-check-certificate -O multi-goldfinch-1.jpg https://t3.ftcdn.net/jpg/01/44/64/36/500_F_144643697_GJRUBtGc55KYSMpyg1Kucb9yJzvMQooW.jpg\n",
1097+
"!wget -q --no-check-certificate -O northern-flicker-1.jpg https://upload.wikimedia.org/wikipedia/commons/5/5c/Northern_Flicker_%28Red-shafted%29.jpg\n",
1098+
"!wget -q --no-check-certificate -O northern-cardinal-1.jpg https://cdn.pixabay.com/photo/2013/03/19/04/42/bird-94957_960_720.jpg\n",
1099+
"!wget -q --no-check-certificate -O blue-jay-1.jpg https://cdn12.picryl.com/photo/2016/12/31/blue-jay-bird-feather-animals-b8ee04-1024.jpg\n",
1100+
"!wget -q --no-check-certificate -O hummingbird-1.jpg http://res.freestockphotos.biz/pictures/17/17875-hummingbird-close-up-pv.jpg"
10971101
]
10981102
},
10991103
{
@@ -1283,6 +1287,7 @@
12831287
"cell_type": "code",
12841288
"execution_count": null,
12851289
"metadata": {
1290+
"scrolled": true,
12861291
"tags": []
12871292
},
12881293
"outputs": [],
@@ -1960,9 +1965,9 @@
19601965
],
19611966
"celltoolbar": "Tags",
19621967
"kernelspec": {
1963-
"display_name": "Python 3 (MXNet 1.9 Python 3.8 CPU Optimized)",
1968+
"display_name": "Python 3 (ipykernel)",
19641969
"language": "python",
1965-
"name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-west-2:236514542706:image/mxnet-1.9-cpu-py38-ubuntu20.04-sagemaker-v1.0"
1970+
"name": "python3"
19661971
},
19671972
"language_info": {
19681973
"codemirror_mode": {
@@ -1974,7 +1979,7 @@
19741979
"name": "python",
19751980
"nbconvert_exporter": "python",
19761981
"pygments_lexer": "ipython3",
1977-
"version": "3.8.10"
1982+
"version": "3.11.11"
19781983
}
19791984
},
19801985
"nbformat": 4,

0 commit comments

Comments
 (0)