python-machine-learning-book-3rd-edition icon indicating copy to clipboard operation
python-machine-learning-book-3rd-edition copied to clipboard

can not download tensorflow dataset celeb_a/2.0.1

Open felixt56 opened this issue 3 years ago • 4 comments

Exception has occurred: DownloadError Failed to get url https://drive.google.com/uc?export=download&id=0B7EVK8r0v71pZjFTYXZWM3FlRnM. HTTP code: 404. File "/media/a1/SW/python-machine-learning-book-3rd-edition/ch15/ch15_part2.py", line 44, in celeba_bldr.download_and_prepare() Does anybody had successful download?

felixt56 avatar Mar 17 '22 11:03 felixt56

Arg, yeah, downloading CelebA can sometimes be a bit frustrating. Luckily, you only have to do it once. I just put up some instructions here if that helps: https://github.com/rasbt/python-machine-learning-book-3rd-edition/tree/master/ch15/downloading-celeba

rasbt avatar Mar 17 '22 15:03 rasbt

Thank you so much I've downloaded CelebA and the download_celeba.py is working. I'm sorry, I'm newbee in Python & ML, may be it's trivial, but I can't find how to convert "torchvision.datasets.CelebA" into tf.data.Dataset, that used in ch15_part2.py

felixt56 avatar Mar 23 '22 15:03 felixt56

Hm, I currently can't get it to work either. I think there is an issue with some of the dataset function in the recent TensorFlow / TensorFlow Dataset version (https://github.com/tensorflow/datasets/pull/3056). I wish I could be more helpful but I don't know how to fix this atm. Maybe @vmirly has some ideas?

rasbt avatar Mar 23 '22 18:03 rasbt

I am a beginner, and it took me a day to solve this problem . Seems it is impossible to use download_and_prepare() to download celeb_a for now. But we can do it manually, hope it will help.

  1. You can download dataset manually from http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html, you can ignore the In-The-Wild Images by the way.
  2. Then, put the .txt file and extracted .jpeg file folder into tensorflow_datasets folder. For me it is located at C:\Users\15899\tensorflow_datasets\celeb_a\2.0.1
  3. After that do as https://github.com/rasbt/python-machine-learning-book-3rd-edition/issues/131#issuecomment-769354803 said.
  4. Do not forget to install tensorflow-datasets nightly with !pip install tfds-nightly. After that Restart python console.
  5. Use datasets=tfds.load('celeb_a:2.0.1',download= False) to load it.

mesomer avatar May 20 '22 02:05 mesomer