Skip to content

Commit

Permalink
feat(notebook): ✨ using supervision[assets] instead of wget download …
Browse files Browse the repository at this point in the history
…in demo notebook

Signed-off-by: Onuralp SEZER <[email protected]>
  • Loading branch information
onuralpszr committed Dec 8, 2023
1 parent 180fdf2 commit 6d3c7f7
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"output_type": "stream",
"text": [
"\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",
"\u001b[?25h0.16.0\n"
"\u001b[?25h0.17.0\n"
]
}
],
Expand Down Expand Up @@ -803,6 +803,15 @@
"**NOTE:** During our demo, we will need some example videos."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install -q supervision[assets]"
]
},
{
"cell_type": "code",
"execution_count": 63,
Expand Down Expand Up @@ -831,9 +840,7 @@
},
"outputs": [],
"source": [
"%cd {HOME}/videos\n",
"\n",
"!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"
"%cd {HOME}/videos"
]
},
{
Expand All @@ -844,7 +851,9 @@
},
"outputs": [],
"source": [
"VIDEO_PATH = f\"{HOME}/videos/vehicle-counting.mp4\""
"from supervision.assets import download_assets, VideoAssets\n",
"download_assets(VideoAssets.VEHICLES)\n",
"VIDEO_PATH = f\"{HOME}/videos/vehicle.mp4\""
]
},
{
Expand Down

0 comments on commit 6d3c7f7

Please sign in to comment.