Skip to content

Instantly share code, notes, and snippets.

@GTimothee
Created June 11, 2018 13:04
Show Gist options
  • Save GTimothee/40e260fd459f2195911e12493977b286 to your computer and use it in GitHub Desktop.
Save GTimothee/40e260fd459f2195911e12493977b286 to your computer and use it in GitHub Desktop.
try:
os.chdir(datasetPath)
zipf = zipfile.ZipFile('./../pascal_voc_dataset.zip', 'a', zipfile.ZIP_DEFLATED)
zipdir('ImageSets/', zipf)
zipdir('JPEGImages/', zipf)
zipdir('SegmentationClass/', zipf)
zipf.close()
os.chdir('../')
print('[INFO] Archive successfully built.')
except:
print('[Error] Archive failed to build.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment