Download Supervision Assets¶
When experimenting with interesting and useful features of the Supervision package, it's important to have some sort of image or video data to experiment with. Luckily for us, Supervision ships with Assets! Assets is a collection of videos that you can utilize to start experimenting with the various features Supervision has to offer. Let's take a look at how to use this resource.
Install Dependencies¶
!pip install -q "supervision[assets]"
Download a Video¶
From here we can download and utilize a video asset directly from a python script! Note below that we're utilizing the method download_assets
to download the VideoAssets.SUBWAY
video to our local directory. This method returns the file path, so we can then utilize this path for additional experimentation. From here, you will see a video asset to experiment with in your local directory.
from supervision.assets import download_assets, VideoAssets
# Download the a video of the subway.
path_to_video = download_assets(VideoAssets.SUBWAY)
With this, we now have a high quality video asset for use in demos. Let's take a look at what we downloaded. Keep in mind that the video preview below works only in the web version of the cookbooks and not in Google Colab.
We're now equipt with a video asset from Supervision to run some experiments on! For more information on available assets, visit the Supervision API Reference. Happy building!