Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset download: Couldn't extract ILSVRC2012_img_train/n????????.tar using the script in doc #89

Open
letyrodridc opened this issue Mar 17, 2022 · 1 comment

Comments

@letyrodridc
Copy link

The section dataset download and conversion proposes a script for extracting ILSVRC2012 .tar in the corresponding directory.
Link to the wikipage: https://github.com/google-research/meta-dataset/blob/main/doc/dataset_conversion.md#ilsvrc_2012

Script:

for FILE in *.tar;
do
  mkdir ${FILE/.tar/};
  cd ${FILE/.tar/};
  tar xvf ../$FILE;
  cd ..;
done

It didn't work for me. I used instead:

for FILE in *.tar;
do

  TARGET=`echo "$FILE" | sed 's/\.tar//'`;

  mkdir $TARGET;
  cd ${TARGET};
  tar xvf ../$FILE;
  cd ..;
done
@vdumoulin
Copy link
Collaborator

Thank you for pointing this out! Perhaps there are some differences between shells in how pattern replacement in variables behave? In any case, I'll add a mention of that in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants