Comments (17)
I've started working on testing. I'm using Mocha and Puppeteer.
I'm testing on an instance of webgazerExtractor.js because I can access everything there and eventually adapt the testing framework into something that compares accuracies of different models and regressions.
It's not ready for a PR request but you can see the basic code here:
https://github.com/RobinReborn/WebGazer/blob/testing/test/puppeteer.js
Am open for recommendations of what to test
from webgazer.
@Skylion007 Do you have a particular framework in mind?
from webgazer.
I'm open to suggestions. :)
from webgazer.
I started setting up karma + mocha over on this fork.
It looks like @TristanVALCKE has done work already with Karma + Jasmine in #52 which seems like a good route, too.
from webgazer.
So end2end the demos on the website and the calibration page should be tested and make sure it doesn't error.
Also a lot of low hanging fruit for unit testing the utilities and math functions, but we will likely rewrite those soon. Testing all the regressions modes would be good too.
Since this JavaScript, just testing to make sure the the websites don't error out would be a great improvement.
from webgazer.
Is there a way of generating input for the calibration demo?
from webgazer.
@RobinReborn Isn't that exactly what the dataset extractor does? ;)
from webgazer.
There's some glue needed to train the separate model and then make it work with the UI
from webgazer.
It looks like there are some differences between the current calibration and the study_dot-test.webm videos (based on the .mov file).
Aside from the differences in the size of and graphics of the dots, the dots are presented in an order for the study_dot-test experiment. Current calibration test let's the user pick them in any order except the center one which must be picked last.
So I'll have to change the current calibration test to use the existing dataset to test callibration.
from webgazer.
Oh yeah, I forgot we updated the calibration page. I mean you could record inputs in a similar way and play it back. Does puppeeter not support some similar functionality?
from webgazer.
I'm not sure how I would capture mouse input - and I've discovered that it's difficult to give two programs access to the webcam simultaneously in Ubuntu.
from webgazer.
Puppeter recorder or something similar could work: https://www.checklyhq.com/docs/puppeteer-recorder/
from webgazer.
That doesn't store mouse position.
Could we modify the existing calibration so that the center point can be clicked at any time? We could hide the point from the user.
from webgazer.
So perhaps we should start with a simpler tasks and just have some Unit Testing / Benchmarking for the Regression components? For instance, an easy way to evaluate they don't error / get an accuracy given a video and corresponding data.
from webgazer.
I am working on getting basic tests but the issue is that webgazer has so many dependencies it's not easy to test it at a basic level.
It needs webgl and canvas as well as a DOM.
I'm using puppeteer, and aside from examining the DOM I can also execute javascript on the page. So I can test anything but it will be executed on the videos from webgazerExtract. And anything puppeteer gets from a page is returned as a serializable object so there are some limits to how much I can easily inspect, but I can ensure that the functions work.
from webgazer.
from webgazer.
Right now I have puppeteer working and have managed to send video files as input to the webcam.
I'm using both webgazerExtractClient.html and calibration.html to test webgazer functions. I'm mainly using those pages to execute javascript within an appropriate context, I'm not testing the full functionality of those pages just yet. Benchmarking tests in this context isn't perfect because any results will include the amount of time it takes for the website to respond.
I don't want this PR to be too big so I won't try to get full code coverage. It will include top level webgazer functions (the ones in index.mjs) and some regression tests.
I look forward to any feedback on the testing structure, I did spend some time looking for alternate ways of testing before settling on puppeteer but it's possible that the format I'm writing my tests in isn't the best.
After we agree on the best way of writing the tests it won't be too hard to create new tests, though it will take a lot of work to get 100% code coverage.
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.