alexanderkroner / saliency

Contextual Encoder-Decoder Network for Visual Saliency Prediction [Neural Networks 2020]
MIT License
180 stars 48 forks source link

ConnectionResetError: [Errno 104] Connection reset by peer #13

Closed Wmir closed 3 years ago

Wmir commented 3 years ago

Hi alexander, FIrst of all, I would like to appreciate your work and thanks for putting it over GITHUB. while downloading the cat2000 dataset using "python main.py train -d cat2000" the model produces an error i.e. ConnectionResetError: [Errno 104] Connection reset by peer. Although the dataset can be downloaded from the browser, however when using command i.e. "python main.py train -d cat2000" it produces an error. If you have any suggestion please share. Thanks Regards, Wmir

Complete Error ( using Google Colab) :

Downloading CAT2000 dataset...>> Download done... /content/saliency/data/ Traceback (most recent call last): File "/content/saliency/main.py", line 249, in main() File "/content/saliency/main.py", line 243, in main train_model(args.data, paths, config.PARAMS["device"]) File "/content/saliency/main.py", line 74, in train_model iterator = data.get_dataset_iterator("train", dataset, paths["data"]) File "/content/saliency/data.py", line 483, in get_dataset_iterator dataset_class = getattr(current_module, class_name)(data_path) File "/content/saliency/data.py", line 160, in init download.download_cat2000(parent_path) File "/content/saliency/download.py", line 148, in download_cat2000 with zipfile.ZipFile(data_path + "tmp.zip", "r") as zip_ref: File "/usr/lib/python3.7/urllib/request.py", line 276, in urlretrieve block = fp.read(bs) File "/usr/lib/python3.7/http/client.py", line 461, in read n = self.readinto(b) File "/usr/lib/python3.7/http/client.py", line 505, in readinto n = self.fp.readinto(b) File "/usr/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer

alexanderkroner commented 3 years ago

Hey, I could replicate the issue and it turns out that something went wrong with urlretrieve. I replaced the function and you should now be able to download the datasets as expected.

Wmir commented 3 years ago

Thanks for such a quick response, Yes the dataset can be downloaded now.