Skip to content

Commit

Permalink
add dataset download script
Browse files Browse the repository at this point in the history
  • Loading branch information
davelindell committed Jan 2, 2022
1 parent bda3389 commit 6576052
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions download_datasets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import gdown
import zipfile
import subprocess
import urllib.request

# nerf
print('Downloading blender dataset')
gdown.download("https://drive.google.com/uc?id=18JxhpWD-4ZmuFKLzKlAw-w5PpzZxXOcG", './data/nerf_synthetic.zip')

print('Extracting ...')
with zipfile.ZipFile('./data/nerf_synthetic.zip', 'r') as f:
f.extractall('./data/')

print('Generating multiscale nerf dataset')
subprocess.run(['python', 'convert_blender_data.py', '--blenderdir', './data/nerf_synthetic'])

print('Downloading SDF datasets')
gdown.download("https://drive.google.com/uc?id=1xBo6OCGmyWi0qD74EZW4lc45Gs4HXjWw", './data/gt_armadillo.xyz')
gdown.download("https://drive.google.com/uc?id=1Pm3WHUvJiMJEKUnnhMjB6mUAnR9qhnxm", './data/gt_dragon.xyz')
gdown.download("https://drive.google.com/uc?id=1wE24AZtXS8jbIIc-amYeEUtlxN8dFYCo", './data/gt_lucy.xyz')
gdown.download("https://drive.google.com/uc?id=1OVw0JNA-NZtDXVmkf57erqwqDjqmF5Mc", './data/gt_thai.xyz')

print('Downloading image dataset')
urllib.request.urlretrieve('http://www.cs.albany.edu/~xypan/research/img/Kodak/kodim19.png', './data/lighthouse.png')

print('Done!')

0 comments on commit 6576052

Please sign in to comment.