| --- |
| license: cc-by-nc-sa-4.0 |
| --- |
| |
| # OpenDV-YouTube |
|
|
| This is the dataset repository of `OpenDV-YouTube` language annotations, including `context` and `command`. For more details, please refer to <a href="https://arxiv.org/abs/2403.09630" target="_blank">GenAD</a> project and <a href="https://github.com/OpenDriveLab/DriveAGI#opendv-youtube" target="_blank">OpenDV-YouTube</a>. |
|
|
| ## Usage |
|
|
| To use the annotations, you need to first download and prepare the data as instructed in <a href="https://github.com/OpenDriveLab/DriveAGI/tree/main/opendv" target="_blank">OpenDV-YouTube</a>. |
|
|
| You can use the following code to load in full OpenDV-YouTube-Train and OpenDV-YouTube-Val annotations respectively. |
|
|
| ```python |
| import json |
| |
| # for train |
| full_annos = [] |
| for split_id in range(10): |
| split = json.load(open("10hz_YouTube_train_split{}.json".format(str(split_id)), "r")) |
| full_annos.extend(split) |
| |
| # for val |
| val_annos = json.load(open("10hz_YouTube_val.json", "r")) |
| ``` |
|
|
| Annotations will be loaded in `full_annos` as a list where each element contains annotations for one video clip. All elements in the list are dictionaries of the following structure. |
|
|
| ``` |
| { |
| "cmd": <int> -- command, i.e. the command of the ego vehicle in the current video clip |
| "blip": <str> -- context, i.e. the BLIP description of the center frame in the current video clip |
| "folder": <str> -- the relative path from the processed OpenDV-YouTube dataset root to the image folder of the video |
| "first_frame": <str> -- the filename of the first frame in the clip. The corresponding file is included in the current video clip. |
| "last_frame": <str> -- the filename of the last frame in the clip. The corresponding file is included in the current video clip. |
| } |
| ``` |