Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with FaceAlignment: unexpected EOF #13

Closed
robertoll opened this issue Aug 17, 2020 · 2 comments
Closed

Error with FaceAlignment: unexpected EOF #13

robertoll opened this issue Aug 17, 2020 · 2 comments

Comments

@robertoll
Copy link

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
Copy link

zacware commented Aug 17, 2020

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants