facenet-realtime-face-recognition icon indicating copy to clipboard operation
facenet-realtime-face-recognition copied to clipboard

cannot host in server with mod_wsgi

Open hussainanver52 opened this issue 6 years ago • 1 comments
trafficstars

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

hussainanver52 avatar May 15 '19 02:05 hussainanver52

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.

tamerthamoqa avatar May 17 '19 08:05 tamerthamoqa