1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
7.05k stars 1.34k forks source link

Cannot download the model? #62

Closed jaysimon closed 6 years ago

jaysimon commented 6 years ago

When I'm trying the example, I got something below, I suspect it cannot download the model, could you add a link of model?

hw@hw-work:~/workspace/02_work/52-face-aligment/examples$ python detect_landmarks_in_image.py
Traceback (most recent call last):
  File "detect_landmarks_in_image.py", line 8, in <module>
    fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, enable_cuda=False, flip_input=False)
  File "build/bdist.linux-x86_64/egg/face_alignment/api.py", line 106, in __init__
  File "/home/hw/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 267, in load
    return _load(f, map_location, pickle_module)
  File "/home/hw/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 410, in _load
    magic_number = pickle_module.load(f)
cPickle.UnpicklingError: invalid load key, '<'.
1adrianb commented 6 years ago

If the download was somehow interrupted you can clear the models using face_alignment.remove_models() and then try again. Thanks!

leepand commented 6 years ago

the same problem, and I used face_alignment.remove_models() , and got the following info:

import face_alignment face_alignment.remove_models() Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'remove_models'

1adrianb commented 6 years ago

@leepand you need to first to create the object:

fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, enable_cuda=False, flip_input=False)
fa.remove_models()
leepand commented 6 years ago

@1adrianb thank you for quick response ,when do this then got the following info:

import face_alignment fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, enable_cuda=False, flip_input=False) Traceback (most recent call last): File "", line 1, in File "build/bdist.macosx-10.7-x86_64/egg/face_alignment/api.py", line 106, in init File "/Users/leepand/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 229, in load return _load(f, map_location, pickle_module) File "/Users/leepand/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 384, in _load deserialized_objects[key]._set_from_file(f, offset) RuntimeError: unexpected EOF. The file might be corrupted. fa.remove_models() Traceback (most recent call last): File "", line 1, in NameError: name 'fa' is not defined

1adrianb commented 6 years ago

@leepand please try to clone the repository again and resintall it. Afterward please remove this folder: {path_to_home}/.face_alignment

Edwardmark commented 6 years ago

I met the same problem, any clues@leepand@1adrianb

1adrianb commented 6 years ago

@Edwardmark can you please try the suggestion from my last comment? Can you access my website however? If not I will try to upload the models to onedrive.

Edwardmark commented 6 years ago

@1adrianb I cannot access you website, I donnot know why. Thanks for your reply.

1adrianb commented 6 years ago

Try to download them from here: https://uniofnottm-my.sharepoint.com/:f:/g/personal/adrian_bulat_nottingham_ac_uk/Ev4KqgFQ5ENLsoy_plCiSLQBH-lxaoPLINqpNuSrhYcm8w?e=WnvCaW and then move the .tar files to {path_to_home}/.face_alignment

Edwardmark commented 6 years ago

@1adrianb Thank you! I have solved this issue by manually downloading the face_detector and face_alignment model. Your passion and politeness impress me, thank you very much! Best, Edward

Code-Beast commented 6 years ago

@1adrianb I can't find ./face_alignment in my home directory, do you know why?

Edwardmark commented 6 years ago

@Code-Beast just mkdir solved it

jaysimon commented 6 years ago

If you are Chinese, this model is easy to download as Thunder VIP, If you need ,I can help to upload to Baiduyun

Code-Beast commented 6 years ago

Thanks a lot. My problem is already solved!

------------------ Original ------------------ From: simon notifications@github.com Date: Wed,May 2,2018 5:56 PM To: 1adrianb/face-alignment face-alignment@noreply.github.com Cc: Code-Beast gyf1209732389@hotmail.com, Mention mention@noreply.github.com Subject: Re: [1adrianb/face-alignment] Cannot download the model? (#62)

If you are Chinese, this model is easy to download as Thunder VIP, If you need ,I can help to upload to Baiduyun

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/1adrianb/face-alignment/issues/62#issuecomment-385925861, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWLa5EU3PthPCmBXShnTKN8znTVa3Vlvks5tuYKxgaJpZM4TZ3ml.

Code-Beast commented 6 years ago

@Edwardmark Thanks!

jaysimon commented 6 years ago

this is the link of model, you can download and put them into ~/.facealigment/data link:https://pan.baidu.com/s/15ap3uhfOA2hG8x9v3P13OA pw:84om

ekinim commented 3 years ago

When I import the face_alignment, it kills the kernel. What should I do? what may the problem be? Thanks for any help.