jasonmayes / Real-Time-Person-Removal

Removing people from complex backgrounds in real time using TensorFlow.js in the web browser
Apache License 2.0
5.17k stars 652 forks source link

how could i use it #13

Closed hujiajie8002 closed 2 years ago

hujiajie8002 commented 3 years ago

I have put it in my webserver apache ,but it doesn‘t work when i open the url by chrome or safari and it real confuse me

zcemycl commented 3 years ago

@hujiajie8002 Please check these links, one is the apache virtualhost with port setup, one is problem with http not allowing you to access camera. https://www.atlantic.net/vps-hosting/host-multiple-websites-on-a-single-server-with-apache-on-ubuntu-18-04/ https://stackoverflow.com/questions/60957829/navigator-mediadevices-is-undefined/66605018#66605018

I believe, your problem is from the camera. If you host it without https, default settings don't allow you to access camera. You can use firefox to set true to media.devices.insecure.enabled and media.getusermedia.insecure.enabled. Then it should work.

jasonmayes commented 2 years ago

If you are not on localhost you must serve the webpage over HTTPS for security reasons as mentioned above. This is required by all modern web browsers for camera / mic access etc. I have a live working demo here as reference: https://glitch.com/~disappearing-people

hujiajie8002 commented 2 years ago

@zcemycl @jasonmayes You're a great help! God bless you.

jasonmayes commented 2 years ago

Most welcome! Happy hacking