Skip to content

Commit 6d3c7f7

Browse files
committed
feat(notebook): ✨ using supervision[assets] instead of wget download in demo notebook
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
1 parent 180fdf2 commit 6d3c7f7

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

demo.ipynb

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
"output_type": "stream",
227227
"text": [
228228
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/45.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.4/45.4 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
229-
"\u001b[?25h0.16.0\n"
229+
"\u001b[?25h0.17.0\n"
230230
]
231231
}
232232
],
@@ -803,6 +803,15 @@
803803
"**NOTE:** During our demo, we will need some example videos."
804804
]
805805
},
806+
{
807+
"cell_type": "code",
808+
"execution_count": null,
809+
"metadata": {},
810+
"outputs": [],
811+
"source": [
812+
"!pip install -q supervision[assets]"
813+
]
814+
},
806815
{
807816
"cell_type": "code",
808817
"execution_count": 63,
@@ -831,9 +840,7 @@
831840
},
832841
"outputs": [],
833842
"source": [
834-
"%cd {HOME}/videos\n",
835-
"\n",
836-
"!wget --load-cookies /tmp/cookies.txt \"https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1pz68D1Gsx80MoPg-_q-IbEdESEmyVLm-' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p')&id=1pz68D1Gsx80MoPg-_q-IbEdESEmyVLm-\" -O vehicle-counting.mp4 && rm -rf /tmp/cookies.txt"
843+
"%cd {HOME}/videos"
837844
]
838845
},
839846
{
@@ -844,7 +851,9 @@
844851
},
845852
"outputs": [],
846853
"source": [
847-
"VIDEO_PATH = f\"{HOME}/videos/vehicle-counting.mp4\""
854+
"from supervision.assets import download_assets, VideoAssets\n",
855+
"download_assets(VideoAssets.VEHICLES)\n",
856+
"VIDEO_PATH = f\"{HOME}/videos/vehicle.mp4\""
848857
]
849858
},
850859
{

0 commit comments

Comments
 (0)