Creating Video Datasets

Get started with video datasets using Deep Lake.

How to convert a video dataset to Deep Lake format

This tutorial is also available as a Colab Notebookarrow-up-right

Video datasets are becoming increasingly common in Computer Vision applications. This tutorial demonstrates how to convert a simple video classification dataset into Deep Lake format. Uploading videos in Deep Lake is nearly identical as uploading images, aside from minor differences in sample compression that are described below.

circle-exclamation

Create the Deep Lake Dataset

The first step is to download the small dataset below called running walking.

file-archive
7MB
animals object detection dataset

The dataset has the following folder structure:

data_dir
|_running
    |_video_1.mp4
    |_video_2.mp4
|_walking
    |_video_3.mp4
    |_video_4.mp4

Now that you have the data, let's create a Deep Lake Dataset in the ./running_walking_deeplake folder by running:

Next, let's inspect the folder structure for the source dataset ./running_walking to find the class names and the files that need to be uploaded to the Deep Lake dataset.

Finally, let's create the tensors and iterate through all the images in the dataset in order to upload the data in Deep Lake.

circle-exclamation
circle-exclamation

Inspect the Deep Lake Dataset

Let's check out the first frame in the second sample from this dataset.

You've successfully created a video dataset in Activeloop Deep Lake.

Congrats! You just created a video classification dataset! 🎉

Last updated

Was this helpful?