PRNet icon indicating copy to clipboard operation
PRNet copied to clipboard

run_basics issue

Open YakkAttakk opened this issue 7 years ago • 9 comments
trafficstars

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!

YakkAttakk avatar Apr 30 '18 23:04 YakkAttakk

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.

kylemcdonald avatar May 01 '18 00:05 kylemcdonald

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'

YakkAttakk avatar May 01 '18 00:05 YakkAttakk

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'

rosenb0rg avatar May 01 '18 12:05 rosenb0rg

@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?

yfeng95 avatar May 01 '18 13:05 yfeng95

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 avatar May 01 '18 13:05 rosenb0rg

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

rosenb0rg avatar May 01 '18 13:05 rosenb0rg

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.

YakkAttakk avatar May 03 '18 17:05 YakkAttakk

@wungemach Typo: dlib != dilb

cclauss avatar May 09 '18 09:05 cclauss

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

fashionguy avatar Oct 10 '20 14:10 fashionguy