yfeng95 / PRNet

Joint 3D Face Reconstruction and Dense Alignment with Position Map Regression Network (ECCV 2018)
http://openaccess.thecvf.com/content_ECCV_2018/papers/Yao_Feng_Joint_3D_Face_ECCV_2018_paper.pdf
MIT License
4.95k stars 947 forks source link

run_basics issue #21

Open wungemach opened 6 years ago

wungemach commented 6 years ago

Hi,

When running the 'run_basics.py' file, I get the following error:

Traceback (most recent call last): File "run_basics.py", line 13, in prn = PRN(is_dlib = False, is_opencv=False) TypeError: init() got an unexpected keyword argument 'is_opencv'

A quick look at the code shows that api.PRN does not take in an argument 'is_opencv'. Am I missing something simple here? Removing this argument gives me a separate error:

Traceback (most recent call last): File "run_basics.py", line 52, in write_obj(os.path.join(save_folder, name + '.obj'), vertices, colors, prn.triangles) #save 3d face(can > open with meshlab) File "/Users/weston/Projects/PRNet/utils/write.py", line 37, in write_obj f.write(s) TypeError: a bytes-like object is required, not 'str'

Thanks for your help!

kylemcdonald commented 6 years ago

i also got TypeError: a bytes-like object is required, not 'str' but i think it's because i was testing with python 3.6 and not python 2.7.

wungemach commented 6 years ago

Thanks for the help!

Being sure to run with python 2.7 I am now getting a separate error:

File "/Users/wungemach/Projects/PRNet/api.py", line 25, in init self.face_detector = dlib.cnn_face_detection_model_v1( AttributeError: 'module' object has no attribute 'cnn_face_detection_model_v1'

rosenb0rg commented 6 years ago

I'm having the same error.

I'm running demo.py in a conda env, with python 2.7. Looking at some other threads it seems like it's an issue with the dlib version, but I get all sorts of dependency contradictions when I try to upgrade dlib past 19.4 (cnn_face_detection came in after dlib 19.5). Specifically, dlib conflicts with tensorflow-gpu 1.7 and subprocess32.

Any way to use gpu w/o the dependency conflict?

  File "/home/tom/local/src/PRnet/api.py", line 25, in __init__
    self.face_detector = dlib.cnn_face_detection_model_v1(
AttributeError: 'module' object has no attribute 'cnn_face_detection_model_v1'
yfeng95 commented 6 years ago

@wungemach Sorry, I forgot to modify run_basic. I've fixed it. @wungemach @rosenb0rg About the error with dlib, please try pip install dlib==19.5.0. @kylemcdonald, please point out which line occured this error?

rosenb0rg commented 6 years ago

Thanks - should have thought of that... That seems to resolve first error, but now I'm getting this:


Traceback (most recent call last):
  File "demo.py", line 151, in <module>
    main(parser.parse_args())
  File "demo.py", line 25, in main
    prn = PRN(is_dlib = args.isDlib) 
  File "/home/tom/local/src/PRNet/api.py", line 26, in __init__
    detector_path)
Boost.Python.ArgumentError: Python argument types in
    cnn_face_detection_model_v1.__init__(cnn_face_detection_model_v1, str)
did not match C++ signature:
    __init__(_object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
rosenb0rg commented 6 years ago

This seems to have been resolved by updating to dlib 19.9 with pip

thank you - for this project. It's really helpful. I'm a filmmaker and trying to use to to do some face tracking / compositing

wungemach commented 6 years ago

I can't seem to get the version of dilb updated correctly. I keep getting the following error:

(PRNet_env) DN0a1e2e76:PRNet weston$ pip install dilb==19.9 Collecting dilb==19.9 Could not find a version that satisfies the requirement dilb==19.9 (from versions: ) No matching distribution found for dilb==19.9

I get a similar error when trying to install other versions. I am also using a conda virtual environment.

cclauss commented 6 years ago

@wungemach Typo: dlib != dilb

fashionguy commented 3 years ago

image hello, I run the command, no error, but there is no result. I feel puzzled. Anyone can help me, please.