Cogito2012 / UString

[ACM MM 2020] Uncertainty-based Traffic Accident Anticipation
MIT License
63 stars 18 forks source link

File type and format of content #8

Closed wukong5777 closed 3 years ago

wukong5777 commented 3 years ago

Hi, thanks for your work. When I run dataloader.py, extract_res101_dad.py and split_dad.py, I find the type and format of the file to load is not clear. The file seems that the loading data is not the annotation file of DAD dataset. What is the format of "all_data", and how is the content ['data']['labels']['det'] like? Thanks in advance.

Cogito2012 commented 3 years ago

@wukong5777 Thanks for your interest in this work! For DAD dataset, the annotations are originally provided by DAD Official and they are grouped into batches (each file contains features and annotations of a batch of 10 files). However, it is more standard to split them into separate files to enable random shuffling during training. To this end, we use the script ./script/split_dad.py to re-organize DAD into our defined data format. For each video sample, we store its annotations and features in a single npz file containing data, det, labels, and ID. The detailed information for each of these 4 items are the same as introduced in CarCrashDataset ReadMe.

After the split_dad.py is applied, the dataloader.py can be used in this repo. Besides, we attempted to use ResNet-101 features to replace the original vgg features from DAD so that extract_res101_dad.py is provided as a helpful tool.

Hope this clarification can help your work. Thanks!