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

tensorflow_graphics.datasets.modelnet40 #641

Open
taiya opened this issue Aug 13, 2021 · 3 comments
Open

tensorflow_graphics.datasets.modelnet40 #641

taiya opened this issue Aug 13, 2021 · 3 comments

Comments

@taiya
Copy link
Collaborator

taiya commented Aug 13, 2021

Security certificate on the Stanford side is expired, so auto-download of resources fails.

Major hack to get it working in the meantime:

  1. download https://shapenet.cs.stanford.edu/media/modelnet40_ply_hdf5_2048.zip manually
  2. in the download folder, start a server with python3 -m http.server 8080
  3. modify _URL in tensorflow_graphics/datasets/modelnet40/modelnet40.pyto be _URL = 'http://localhost:8080/modelnet40_ply_hdf5_2048.zip'
  4. allow dataset to be built by executing
from tensorflow_graphics.datasets.modelnet40 import ModelNet40
ds_train, info = ModelNet40.load(split='train', with_info=True)
  1. after this, ensure you do not re-download:
data_dir = '~/tensorflow_datasets'
ds_train, info = ModelNet40.load(split='train', with_info=True, data_dir=data_dir, download=False)
@jackd
Copy link
Contributor

jackd commented Aug 13, 2021

Pretty sure this can be resolved using tfds.download.DownloadConfig with verify_ssl=False.

@taiya
Copy link
Collaborator Author

taiya commented Aug 13, 2021

If the error message would have told me that, I would have saved 1h of my time :)
Just left a trace for others that might run into this.

@Conchylicultor perhaps that's something to consider?

In any case, we need to contact the Stanford folks and get this fixed.
That's the primary reason for opening the bug.

@ma7555
Copy link

ma7555 commented Mar 1, 2022

@jackd

Trying with the below code still throws SSL error

from tensorflow_graphics.datasets.modelnet40 import ModelNet40
import tensorflow_datasets as tfds
dl_config = tfds.download.DownloadConfig()
dl_config.verify_ssl = False
dataset = ModelNet40()
dataset.download_and_prepare(download_config=dl_config)

This throws SSL error too

dataset.load(split='train',  download_and_prepare_kwargs={'download_config': dl_config})

Also

tfds.download.DownloadConfig(verify_ssl = False)

throws an unexpected argument error

EDIT:
my bad, was using an older version of TFDS. With v4.5.2 the below code works

import tensorflow_datasets as tfds
from tensorflow_graphics.datasets.modelnet40 import ModelNet40
dl_config = tfds.download.DownloadConfig(verify_ssl=False)
dataset = ModelNet40()
train_ds = dataset.load(split = 'train', download_and_prepare_kwargs={'download_config': dl_config}, with_info=True)

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

No branches or pull requests

3 participants