facenet-realtime-face-recognition
facenet-realtime-face-recognition copied to clipboard
cannot host in server with mod_wsgi
Hi I added all the dependencies and when i run python server.py, it works perfectly, but when i host it in server and run home page is loaded and when i try to train image or do a prediction it gives error as pnet is not defined. Following is the server setup
apache, mod-wsgi, and all python dependencies as mentioned in ur site,
Any help would be appreciated
Hi hussainanver52,
I am not sure to be honest. Since the server is running the pnet model part of the MTCNN face detection model should be loaded when the server starts. Could you add a screenshot or the log of the entire error?
Edit on 23/8/2020: Refer to this issue https://github.com/tamerthamoqa/facenet-realtime-face-recognition/issues/14
Assuming the issue is the same as the linked issue above:
Running 'python server.py' would fix the issue, running the flask app via the 'flask run' method would not work as the models would be defined in the 'if __ name __ == ' __ main __ ': ' block and the __ name __ variable would not equal '__ main __' in this case.