royorel / Lifespan_Age_Transformation_Synthesis

Lifespan Age Transformation Synthesis code
Other
582 stars 132 forks source link

Error in colab #5

Closed quangphap208 closed 4 years ago

quangphap208 commented 4 years ago

Hello! I wanted to test your code in the colab. Error when Downloading backbone Resnet Model parameters

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-10-5473477fe80b> in <module>()
----> 1 data_loader = CreateDataLoader(opt)
      2 dataset = data_loader.load_data()
      3 visualizer = Visualizer(opt)

5 frames
/content/Lifespan_Age_Transformation_Synthesis/data/data_loader.py in CreateDataLoader(opt)
     36     data_loader = AgingDataLoader()
     37     print(data_loader.name())
---> 38     data_loader.initialize(opt)
     39     return data_loader

/content/Lifespan_Age_Transformation_Synthesis/data/data_loader.py in initialize(self, opt)
     11     def initialize(self, opt):
     12         self.opt = opt
---> 13         self.dataset = CreateDataset(opt)
     14         self.dataloader = torch.utils.data.DataLoader(
     15             self.dataset,

/content/Lifespan_Age_Transformation_Synthesis/data/data_loader.py in CreateDataset(opt)
     29     dataset = MulticlassUnalignedDataset()
     30     print("dataset [%s] was created" % (dataset.name()))
---> 31     dataset.initialize(opt)
     32     return dataset
     33 

/content/Lifespan_Age_Transformation_Synthesis/data/multiclass_unaligned_dataset.py in initialize(self, opt)
     98 
     99         if (not self.opt.isTrain) and self.in_the_wild:
--> 100             self.preprocessor = preprocessInTheWildImage(out_size=opt.fineSize)
    101 
    102     def set_sample_mode(self, mode=False):

/content/Lifespan_Age_Transformation_Synthesis/util/preprocess_itw_im.py in __init__(self, out_size)
     48             print('Downloading backbone Resnet Model parameters')
     49             with requests.Session() as session:
---> 50                 download_file(session, resnet_file_spec)
     51 
     52             print('Done!')

/content/Lifespan_Age_Transformation_Synthesis/util/util.py in download_file(session, file_spec, chunk_size, num_attempts)
    102             # Validate.
    103             if 'file_size' in file_spec and data_size != file_spec['file_size']:
--> 104                 raise IOError('Incorrect file size', file_path)
    105             if 'file_md5' in file_spec and data_md5.hexdigest() != file_spec['file_md5']:
    106                 raise IOError('Incorrect file MD5', file_path)

OSError: [Errno Incorrect file size] deeplab_model/R-101-GN-WS.pth.tar
royorel commented 4 years ago

I see that now too...

This problem is due to google drive quota issues.

If you'll comment out this block: https://github.com/royorel/Lifespan_Age_Transformation_Synthesis/blob/ba55a40968611e537f94fb89b701474c39d171a7/util/util.py#L126-L131

and open the downloaded tmp file you'll be able to see the google drive error.

Google drive quotas reset every 24 hours, so if you retry later things should be solved.

There is a workaround for this, but it will take a little while to code. I will post an update once it's resolved.

Meanwhile, the best solution is to wait...

quangphap208 commented 4 years ago

Thanks for your answer!

royorel commented 4 years ago

Issue was fixed in c3bae68