cvdfoundation / kinetics-dataset

716 stars 92 forks source link

extracting into subdirectories rather than everything in one dir #9

Open torehl opened 2 years ago

torehl commented 2 years ago

The extract.sh untar everything to one folder. Isn't it better to extract it into its destination folder? I.e.

$ more ../extract2.sh for file in *.tar.gz; do mkdir -p "${file%.tar.gz}" tar -zxf "$file" -C "${file%.tar.gz}" done

and extract with 

DeepMind/Kinetics-600/train$ bash ../extract2.sh k600_train_path.txt

 gives 

drwxr-sr-x 2 torel users 993 Apr 29 2018 abseiling/ -rw-r--r-- 1 torel users 2000227200 Apr 17 12:49 abseiling.tar.gz drwxr-sr-x 2 torel users 708 Apr 29 2018 acting in play/ -rw-r--r-- 1 torel users 930025532 Apr 17 12:49 acting in play.tar.gz drwxr-sr-x 2 torel users 649 Apr 29 2018 adjusting glasses/

Brgds,

acherstyx commented 2 years ago

I have written a program to achieve that for the Kinetics-400 dataset, see kinetics-dataset-downloader. After that, the dataset can be loaded with the data loader from torchvision.datasets.Kinetics-400.