add dataset.py

This commit is contained in:
chun 2023-12-24 13:00:59 +08:00
parent 9a0103ff51
commit c0d0c337f4

View File

@ -17,8 +17,8 @@ def main():
print('tar -xf ./Dataset/ILSVRC2012_img_{}.tar -C {}'.format(phase, path))
os.system('tar -xf ./Dataset/ILSVRC2012_img_{}.tar -C {}'.format(phase, path))
for tar in os.listdir(path):
print('tar -xf {}/{} -C {}/{}'.format(path, tar, path, tar))
os.system('tar -xf {}/{} -C {}/{}'.format(path, tar, path, tar))
print('tar -xf {}/{} -C {}/{}'.format(path, tar, path, tar.split('.')[0]))
os.system('tar -xf {}/{} -C {}/{}'.format(path, tar, path, tar.split('.')[0]))
os.remove('{}/{}'.format(path, tar))