|
| 1 | +# Using Kineics 400 |
| 2 | +This directory contains helpers to use the [Kinetics 400](https://github.com/cvdfoundation/kinetics-dataset) dataset with this |
| 3 | +repository's VideoFrameDataset dataloader. Download it from [this URL](https://github.com/cvdfoundation/kinetics-dataset). |
| 4 | + |
| 5 | +### 1. Dataset Overview |
| 6 | +When you download the Kinetics 400 dataset, it comes in the following format: |
| 7 | +- An `.mp4` video file for every video |
| 8 | +- A `.csv` file for the training, validation, and testing annotations |
| 9 | + |
| 10 | +To use VideoFrameDataset with Kinetics 400, we need to |
| 11 | +1. Create a folder for every `.mp4` file that contains the RGB frames of that video. |
| 12 | +2. Turn each `.csv` file into an `annotations.txt` file, as described in the main README of this repository. |
| 13 | + |
| 14 | +### 2. Processing |
| 15 | +Doing (1) and (2) from above, is very easy if you use the python scripts provided in this directory. |
| 16 | +- For (1), make sure that all `.mp4` files (trainin, validation, and testing) are located in a single and the same |
| 17 | +directory. Run the script `videos_to_frames.py` and make sure that you set the file paths |
| 18 | +correctly inside of the script. This will probably take ~10 hours for Kinetics 400. |
| 19 | +- For (2), run the script `process_annotation_file.py` once for each annotation `.csv` and make sure that you |
| 20 | +set the file paths correctly inside of the script. You also must have completed step (1), |
| 21 | +before you are able to run this script. |
| 22 | + |
| 23 | +NOTE: The processed training, validation, and testing files that step (2) outputs, are uploaded here as well. |
| 24 | +You can directly use these and skip step (2). However, after completing step (1), you might have |
| 25 | +to run (2) yourself, to create these three annotation files yourself, in case there is some discrepancy between |
| 26 | +the way `videos_to_frames.py` extracts RGB frames on my machine compared to on yours (This is very likely. I |
| 27 | +recommend running step 2 yourself). |
| 28 | + |
| 29 | +### 3. Done |
| 30 | +That's it! You should then have a folder on your disk `RGB` that contains all videos in individual RGB |
| 31 | +frames, and the three annotation files. This is all you need to use VideoFrameDataset and start training |
| 32 | +on Kinetics 400! |
0 commit comments