Hard to replicate because of many sys.path changes and other peculiarities
Just some comments in my attempt at getting the code working, that might be helpful for others.
There are a lot of sys.path.append strewn throughout the run_demo.py and its imported code and often import same named but different src directories, making it hard to reproduce without fiddling with many paths. In my case, python clearly got confused which src directory should be imported.
For example:
-
sys.path.append("ext/mtcnn-pytorch/")has asrcdir that is imported inface.py - The top dir of the repo has a
srcdir which will be in the path if you run code from there -
sys.path.append("../src")occurs in some other files It would be better if all code is executed from the top directory with no sys.path amendments.
Also, the pretrained model files have module.<some weights>, but the scripts require the module. to be removed. Quick fix: ted_weights = {k[7:]: v for k,v in ted_weights.items() if k.startswith('module.')}
Furthermore, I'm a bit surprised there is not a cpu-only version that simply does inference (without adapting to a particular person), as that would be a quick test for reproducibility. Unlike Nvidia, I don't have that many GPUs lying around ;)
Finally, I got so far that I could calibrate the camera, and fixed some of the landmarks.py code so it ran, but that left me with a blank white screen.
At this point I unfortunately gave up. I'll probably try to implement it or a modified version from scratch.
Thanks for your feedback and for reporting the issues. I would be happy to work with you to resolve them. Could you please personal message me at [email protected] to continue the conversation?