brownhci / WebGazer

WebGazer.js: Scalable Webcam EyeTracking Using User Interactions
https://webgazer.cs.brown.edu
Other
3.48k stars 524 forks source link

Failed to fetch saved models in example #314

Open nickcalarco66 opened 11 months ago

nickcalarco66 commented 11 months ago

Hello,

I cloned the repo locally and started the application per the instructions.

When attempting to go through the "Calibration on Empty Page" live demo, I'm getting console errors related to tfhub.dev resources failing to fetch the models being used.

Screenshot 2023-07-26 at 10 25 39 AM

I'm not sure if there was some change recently, but I'm unable to try either of the live demos.

Thanks!

jeffhuang commented 11 months ago

Can you verify if the live demo on the webgazer website works? If so, then it's just that when you run on localhost, the CORS policy doesn't allow you to access the facemesh model online. So it's not really an issue for deployed setups. I've been wanting to take that offline for various reasons, so if you want to give it a try, feel free.

nickcalarco66 commented 11 months ago

I just tried on the live demo (https://webgazer.cs.brown.edu/collision.html), and it's happening there as well.

sfahmadzadeh commented 6 months ago

I have the same problem. Could you find any solution?

ncalarco commented 6 months ago

No solution - it appears that the site that hosts the models periodically goes down (https://www.tensorflow.org/hub) or is unable to resolve the models. It usually corrects itself within a day or so.

We've looked at the facemesh library that webgazer is using, I believe there is a way to pass the models in yourself, however, you'd need to fork webgazer to implement it.

If you look here, you can see that the model url's are stored statically.

If you look here, this is where the load process is defined which webgazer uses.

Our plan was to host the models somewhere outside tfhub, fork webgazer and define the path/url to our local models which would end the dependency of tfhub always being available - we just haven't had the time to try this yet.

For reference, I believe webgazer initializes facemesh here.