csxmli2016 / DFDNet

Blind Face Restoration via Deep Multi-scale Component Dictionaries (ECCV 2020)
915 stars 215 forks source link

Error with FaceAlignment: unexpected EOF #13

Closed robertoll closed 4 years ago

robertoll commented 4 years ago

Hi, I'm getting the following error, any help on it? I've read it's an issue with the models, but I can't find them anywhere...

(DFDNet) C:\DFDNet-whole>python test_FaceDict.py --test_path ./TestData/TestWhole --results_dir ./Results/TestWholeResults --upscale_factor 4 --gpu_ids 0

###################### Now Running the X 4 task ##############################

############################################################################### ####################### Step 1: Crop and Align Face ########################### ###############################################################################

Crop and Align asd2 002.jpg image

############################################################################### ####################### Step 2: Face Landmark Detection ####################### ###############################################################################

Traceback (most recent call last): File "test_FaceDict.py", line 197, in FD = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D,device='cuda:0', flip_input=False) File "E:\anaconda3\envs\DFDNet\lib\site-packages\face_alignment-1.0.1-py3.6.egg\face_alignment\api.py", line 69, in init File "E:\anaconda3\envs\DFDNet\lib\site-packages\face_alignment-1.0.1-py3.6.egg\face_alignment\detection\sfd\sfd_detector.py", line 22, in init File "E:\anaconda3\envs\DFDNet\lib\site-packages\torch\hub.py", line 495, in load_state_dict_from_url return torch.load(cached_file, map_location=map_location) File "E:\anaconda3\envs\DFDNet\lib\site-packages\torch\serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "E:\anaconda3\envs\DFDNet\lib\site-packages\torch\serialization.py", line 772, in _legacy_load deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly) RuntimeError: unexpected EOF, expected 9325805 more bytes. The file might be corrupted.

zacware commented 4 years ago

I think this is the same error I had, but I am away my computer right now to see the exact path ..... there is a .cache folder in a sub directory in your user folder related to torch. I deleted that and then everything worked

robertoll commented 4 years ago

Found it, thanks a lot. It was the .cache folder in the user folder that had a torch folder inside. Deleted it and it began downloading everything again.