Comments (6)
Thank you! You may have identified a key bug. I'll look into this soon.
from webgazer.
@larsbonczek can you also say under what conditions the exception was thrown? Like had the code been running for a while, or was this a certain configuration?
from webgazer.
This error occurred in an online experiment built using PCIbex. The exception is usually thrown part-way into the experiment (which is quite long).
I took a look at PCIbex' implementation of the eye tracking element and realized that it generates a lot of data points during the calibration process (it emulates a click event multiple times per second). I verified this by checking the number of calibration points saved into the browser's IndexedDB by webGazer. One run of the calibration process generates 602 data points. After that, another calibration step is performed after each step of the experiment. When the error occured, I checked the IndexedDB again and saw that the stored list had reached 700 data points, which matches the window size mentioned above.
I think that due to the large amount of data points that is generated during the calibration process, the data window containing the calibration points fills up quite quickly during the experiment, which triggers the above exception.
Testing this hypothesis is difficult, since PCIbex automatically triggers a re-calibration if the calibration score falls below a certain threshold during the experiment. Before this re-calibration, the data window is cleared, thus preventing the error from occurring. The error only occurs if no re-calibration is required for a sufficient number of steps, which is a rare occurrence.
from webgazer.
I think you're exactly right. weightedXArray and weightedYArray data are being accessed with the trueIndex index in lines 66-67, but lines 68-69 and even 72-73 treat it like a regular array, so there's a mismatch between the index used, once the DataWindow size is about 700 (the default window size)
The bug seems to be introduced in an old commit but the pre-commit code also seems wrong to me (it's push()ing to an array that was already initialized to the correct length)
From just my reading, the pull request seems perfect to me, but someone should test it. An easy way to test might be to reduce the default window size from 700 to 10, and see if the fix does indeed work.
from webgazer.
I'm not familiar with webGazer, so I don't think that I am the right person to test this. Would you be willing to give it a try?
from webgazer.
I'm going to look this over a little bit, maybe give it a brief test, but the PR seems pretty harmless either way. @alexpapster said she'd be able to test it a bit more thoroughly later but I think it's fine to merge in the meantime. Thanks again for investigating Lars.
from webgazer.
Related Issues (20)
- It does not catch when user closed their eyes! it should make the border red when eyes are closed.
- Webgazer stop collecting data on tab change
- Negative viewport coordinates HOT 1
- Failed to fetch saved models in example HOT 4
- showVideo() causing loss of tracking when switched repeatedly on Firefox v116 HOT 3
- How to use removeMouseEventListeners HOT 2
- a question/help needed! HOT 1
- Error caused by not importing files with the ".mjs" extension
- Defining gaze prediction rate? HOT 1
- Attempting to nest WebGazer into a Win32 program to help people with hand defects, encountered some issues
- `getStoredPoints` returning empty lists HOT 3
- Programmatical Click calibration not as good as manual
- Minimal working example of webgazer HOT 5
- Webgazer runs laggy on Android native code HOT 1
- CORS Policy Error
- Multiple mistakes appeared in the code while I was trying to refactor it and enforce type checking. Can someone just answer those questions? HOT 2
- Styles in angular component
- Error fetching tensorflow models HOT 4
- Unexpected Fetch TypeError in WebGazer HOT 3
- webgazer not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webgazer.