brownhci / WebGazer

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

Minimal working example of webgazer #332

Open ink-pot-monkey opened 4 months ago

ink-pot-monkey commented 4 months ago

Hello,

I am trying to get a minimal working of web gazer up and running for a project, but unfortunately have hit a brick wall.

I've added the web gazer library as a script on the website and am running .begin on the top-level web gazer object which starts the script, but I never get any data from the gazeListener

I have set up a minimal repo here: https://gitlab.com/palebluebytes/minimal-webgazer Which is hosted: https://webgazer.palebluebytes.xyz/

Is there any chance you could point out to me what I am doing wrong? It would be great to add this as an example to the documentation as well.

Screenshot from 2024-01-31 12-35-00

Thanks for democratising Webcam eye tracking!

jeffhuang commented 4 months ago

Can you try making your minimal example based on the calibration.html or collision.html examples in the www/ folder?

ink-pot-monkey commented 4 months ago

This was based on the calibration.html, and I had another go at it yesterday to try and get it working was scratching my end for ages until I realised that to start everything there needs to be a mouse click on the page!

The simple example is now working (without any changes) but out of curiosity why is this necessary? I couldn't find a reference to this in any of the documentation.

ariadys commented 3 months ago

@thomassdk I'm curious, why does your face tracking work so well? is that resolution problem? i've 720p webcam on my local it doesn't work well, face tracking is still a mess. Maybe there's something missing, can you tell me?

ink-pot-monkey commented 3 months ago

Sorry the delay in getting back to you, not sure about the divergence in face tracking. One way to track down whether this is a hardware issue is checking if the face tracking is the same using your local one and the one hosted at https://webgazer.palebluebytes.xyz/

If that is the same then it is most likely a hardware issue otherwise must be some software problem

jeffhuang commented 4 weeks ago

This was based on the calibration.html, and I had another go at it yesterday to try and get it working was scratching my end for ages until I realised that to start everything there needs to be a mouse click on the page!

The simple example is now working (without any changes) but out of curiosity why is this necessary? I couldn't find a reference to this in any of the documentation.

Sorry for the late reply. The idea behind WebGazer is that calibration is needed to map your gaze to the screen. This can either be done implicitly (as your web visitors are using the web page) or explicitly (a specific calibration process). So the click is one calibration point, and more clicks will continue to train the model.