salesforce / BLIP

PyTorch code for BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation
BSD 3-Clause "New" or "Revised" License
4.86k stars 648 forks source link

When I am trying to do Pretraining using the pretraining dataset given in the repo I am getting this error #107

Open Gokul14092001 opened 2 years ago

Gokul14092001 commented 2 years ago

Start training Traceback (most recent call last): File "pretrain.py", line 173, in main(args, config) File "pretrain.py", line 131, in main train_stats = train(model, data_loader, optimizer, epoch, device, config) File "pretrain.py", line 48, in train for i, (image, caption) in enumerate(metric_logger.log_every(data_loader, print_freq, header)): File "/content/BLIP/utils.py", line 156, in log_every for obj in iterable: File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 681, in next data = self._next_data() File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 721, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/content/BLIP/data/pretrain_dataset.py", line 55, in getitem image = Image.open(ann['url']).convert('RGB')
File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2843, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'https://www.sonshinekitchen.com/wp-content/uploads/2020/03/taco-stuffed-poblano-peppers-11-683x1024.jpg'