remote-calibrator 0.3.0 → 0.5.0-beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +29 -19
  3. package/homepage/example.js +9 -3
  4. package/i18n/fetch-languages-sheets.js +5 -4
  5. package/lib/RemoteCalibrator.min.js +1 -1
  6. package/lib/RemoteCalibrator.min.js.LICENSE.txt +1 -1
  7. package/lib/RemoteCalibrator.min.js.map +1 -1
  8. package/package.json +15 -15
  9. package/src/WebGazer4RC/.gitattributes +10 -0
  10. package/src/WebGazer4RC/LICENSE.md +15 -0
  11. package/src/WebGazer4RC/README.md +142 -0
  12. package/src/WebGazer4RC/gnu-lgpl-v3.0.md +163 -0
  13. package/src/WebGazer4RC/gplv3.md +636 -0
  14. package/src/WebGazer4RC/package-lock.json +1133 -0
  15. package/src/WebGazer4RC/package.json +28 -0
  16. package/src/WebGazer4RC/src/dom_util.mjs +27 -0
  17. package/src/WebGazer4RC/src/facemesh.mjs +150 -0
  18. package/src/WebGazer4RC/src/index.mjs +1235 -0
  19. package/src/WebGazer4RC/src/mat.mjs +301 -0
  20. package/src/WebGazer4RC/src/params.mjs +29 -0
  21. package/src/WebGazer4RC/src/pupil.mjs +109 -0
  22. package/src/WebGazer4RC/src/ridgeReg.mjs +104 -0
  23. package/src/WebGazer4RC/src/ridgeRegThreaded.mjs +161 -0
  24. package/src/WebGazer4RC/src/ridgeWeightedReg.mjs +125 -0
  25. package/src/WebGazer4RC/src/ridgeWorker.mjs +135 -0
  26. package/src/WebGazer4RC/src/util.mjs +348 -0
  27. package/src/WebGazer4RC/src/util_regression.mjs +240 -0
  28. package/src/WebGazer4RC/src/worker_scripts/mat.js +306 -0
  29. package/src/WebGazer4RC/src/worker_scripts/util.js +398 -0
  30. package/src/WebGazer4RC/test/regression_test.js +182 -0
  31. package/src/WebGazer4RC/test/run_tests_and_server.sh +24 -0
  32. package/src/WebGazer4RC/test/util_test.js +60 -0
  33. package/src/WebGazer4RC/test/webgazerExtract_test.js +40 -0
  34. package/src/WebGazer4RC/test/webgazer_test.js +160 -0
  35. package/src/WebGazer4RC/test/www_page_test.js +41 -0
  36. package/src/const.js +3 -0
  37. package/src/core.js +8 -0
  38. package/src/css/distance.scss +40 -0
  39. package/src/css/panel.scss +32 -1
  40. package/src/distance/distance.js +4 -4
  41. package/src/distance/distanceCheck.js +115 -0
  42. package/src/distance/distanceTrack.js +99 -41
  43. package/src/{interpupillaryDistance.js → distance/interPupillaryDistance.js} +14 -12
  44. package/src/gaze/gazeTracker.js +16 -1
  45. package/src/i18n.js +1 -1
  46. package/src/index.js +2 -1
  47. package/src/panel.js +32 -3
  48. package/webpack.config.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remote-calibrator",
3
- "version": "0.3.0",
3
+ "version": "0.5.0-beta.3",
4
4
  "description": "Useful calibration tools for remote psychophysics experiments.",
5
5
  "main": "lib/RemoteCalibrator.min.js",
6
6
  "directories": {
@@ -31,28 +31,28 @@
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.15.8",
33
33
  "autoprefixer": "^10.3.7",
34
- "babel-loader": "^8.2.2",
34
+ "babel-loader": "^8.2.3",
35
35
  "clean-webpack-plugin": "^4.0.0",
36
- "css-loader": "^6.4.0",
36
+ "css-loader": "^6.5.0",
37
37
  "css-minimizer-webpack-plugin": "^3.1.1",
38
38
  "cssnano": "^5.0.8",
39
- "eslint": "^7.32.0",
40
- "eslint-webpack-plugin": "^3.0.1",
39
+ "eslint": "^8.1.0",
40
+ "eslint-webpack-plugin": "^3.1.0",
41
41
  "express": "^4.17.1",
42
- "googleapis": "^88.2.0",
43
- "husky": "^7.0.2",
44
- "lint-staged": "^11.2.3",
45
- "nodemon": "^2.0.13",
42
+ "googleapis": "^89.0.0",
43
+ "husky": "^7.0.4",
44
+ "lint-staged": "^11.2.6",
45
+ "nodemon": "^2.0.14",
46
46
  "postcss-loader": "^6.2.0",
47
47
  "prettier": "^2.4.1",
48
- "sass": "^1.43.2",
48
+ "sass": "^1.43.4",
49
49
  "sass-loader": "^12.2.0",
50
- "style-loader": "^3.3.0",
50
+ "style-loader": "^3.3.1",
51
51
  "svg-inline-loader": "^0.8.2",
52
52
  "terser-webpack-plugin": "^5.2.4",
53
53
  "url-loader": "^4.1.1",
54
- "webpack": "^5.58.2",
55
- "webpack-cli": "^4.9.0",
54
+ "webpack": "^5.60.0",
55
+ "webpack-cli": "^4.9.1",
56
56
  "webpack-modules": "^1.0.0",
57
57
  "xlsx": "^0.17.3"
58
58
  },
@@ -62,10 +62,10 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "animate.css": "^4.1.1",
65
- "device-detector-js": "^2.2.10",
65
+ "device-detector-js": "^3.0.0",
66
66
  "platform": "^1.3.6",
67
67
  "react-fast-compare": "^3.2.0",
68
- "sweetalert2": "^11.1.8",
68
+ "sweetalert2": "^11.1.9",
69
69
  "tinycolor2": "^1.4.2",
70
70
  "tone": "^14.7.77"
71
71
  }
@@ -0,0 +1,10 @@
1
+ # Handle line endings automatically for files detected as text
2
+ # and leave all files detected as binary untouched.
3
+ * text=auto
4
+
5
+ # Force the following filetypes to have unix eols, so Windows does not break them
6
+ *.* text eol=lf
7
+ *.png binary
8
+ *.jpg binary
9
+ *.eot binary
10
+ *.ttf binary
@@ -0,0 +1,15 @@
1
+ WebGazer.js - Scalable browser-based webcam eye tracking
2
+
3
+ Copyright (C) 2021 Brown HCI Group
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ See the GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -0,0 +1,142 @@
1
+ # [WebGazer.js](https://webgazer.cs.brown.edu)
2
+
3
+ WebGazer.js is an eye tracking library that uses common webcams to infer the eye-gaze locations of web visitors on a page in real time. The eye tracking model it contains self-calibrates by watching web visitors interact with the web page and trains a mapping between the features of the eye and positions on the screen. WebGazer.js is written entirely in JavaScript and with only a few lines of code can be integrated in any website that wishes to better understand their visitors and transform their user experience. WebGazer.js runs entirely in the client browser, so no video data needs to be sent to a server. WebGazer.js can run only if the user consents in giving access to their webcam.
4
+
5
+ * [Official website](https://webgazer.cs.brown.edu)
6
+ * [API Docs](https://github.com/brownhci/WebGazer/wiki/Top-Level-API)
7
+
8
+ ## Features
9
+
10
+ * Real time gaze prediction on most major browsers
11
+ * No special hardware; WebGazer.js uses your webcam
12
+ * Self-calibration from clicks and cursor movements
13
+ * Easy to integrate with a few lines of JavaScript
14
+ * Swappable components for eye detection
15
+ * Multiple gaze prediction models
16
+ * Useful video feedback to user
17
+
18
+ ## Build the repository
19
+
20
+ If you want to build the repository from source follow these instructions:
21
+
22
+ # Ensure NodeJS is downloaded: https://nodejs.org/en/download/
23
+ git clone https://github.com/brownhci/WebGazer.git
24
+ cd WebGazer
25
+ #install the dependencies
26
+ npm install
27
+ #build the project
28
+ npm run build
29
+
30
+ <!-- To use the webgazer script in the head of an HTML file add the `async` tag to ensure the clmtrackr does not collapse to a slower version -->
31
+
32
+ ## Examples
33
+
34
+ Examples of how WebGazer.js works can be found [here](https://webgazer.cs.brown.edu/#examples).
35
+
36
+ ### to use on any website
37
+
38
+ ```
39
+ <script src="webgazer.js" type="text/javascript" >
40
+ ```
41
+
42
+ ### to use in any modern framework
43
+
44
+ ````
45
+ const webgazer = require('webgazer'); // npm package 'webgazer' is sync with this repository
46
+ ````
47
+
48
+ or you can you do
49
+
50
+ ````
51
+ import webgazer from 'webgazer'
52
+ ````
53
+
54
+ ### How to run the Example HTML files
55
+
56
+ Within the /www directory there are two example HTML files:
57
+
58
+ * `calibration.html`: This example includes additional user feedback, such as a 9-point calibration sequence, accuracy measurements and an informative help module.
59
+ * `collision.html`: This example contains a game where the user can move an orange ball with their eyes, which in turn collides with blue balls.
60
+
61
+ To run the example files as a server:
62
+
63
+ # Clone the repository and download NodeJS using the steps listed above
64
+ # Move into the www directory and download the additional dependencies
65
+ cd www
66
+ npm install
67
+ # Run the webpage index.html as a server
68
+ npm run serve
69
+
70
+ ## Browser Support
71
+
72
+ The following browsers support WebGazer.js:
73
+
74
+ * Google Chrome
75
+ * Microsoft Edge
76
+ * Mozilla Firefox
77
+ * Opera
78
+ * Safari
79
+
80
+ ## Publications
81
+
82
+ _**Note:** The current iteration of WebGazer no longer corresponds with the WebGazer described in the following publications and which can be found [here](https://github.com/brownhci/WebGazer/tree/2a4a70cb49b2d568a09362e1b52fd3bd025cd38d)._
83
+
84
+ @inproceedings{papoutsaki2016webgazer,
85
+ author = {Alexandra Papoutsaki and Patsorn Sangkloy and James Laskey and Nediyana Daskalova and Jeff Huang and James Hays},
86
+ title = {{WebGazer}: Scalable Webcam Eye Tracking Using User Interactions},
87
+ booktitle = {Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI-16)},
88
+ pages = {3839--3845},
89
+ year = {2016},
90
+ organization={AAAI}
91
+ }
92
+
93
+ @inproceedings{papoutsaki2017searchgazer,
94
+ author = {Alexandra Papoutsaki and James Laskey and Jeff Huang},
95
+ title = {SearchGazer: Webcam Eye Tracking for Remote Studies of Web Search},
96
+ booktitle = {Proceedings of the ACM SIGIR Conference on Human Information Interaction \& Retrieval (CHIIR)},
97
+ year = {2017},
98
+ organization={ACM}
99
+ }
100
+
101
+ @inproceedings{papoutsaki2018eye,
102
+ author={Papoutsaki, Alexandra and Gokaslan, Aaron and Tompkin, James and He, Yuze and Huang, Jeff},
103
+ title={The eye of the typer: a benchmark and analysis of gaze behavior during typing.},
104
+ booktitle={Proceedings of the 2018 ACM Symposium on Eye Tracking Research \& Applications (ETRA)},
105
+ pages={16--1},
106
+ year={2018},
107
+ organization={ACM}
108
+ }
109
+
110
+
111
+
112
+ ## Who We Are
113
+
114
+ * Alexandra Papoutsaki
115
+ * Aaron Gokaslan
116
+ * Ida De Smet
117
+ * Xander Koo
118
+ * James Tompkin
119
+ * Jeff Huang
120
+
121
+ ## Other Collaborators
122
+
123
+ * Nediyana Daskalova
124
+ * James Hays
125
+ * Yuze He
126
+ * James Laskey
127
+ * Patsorn Sangkloy
128
+ * Elizabeth Stevenson
129
+ * Preston Tunnell Wilson
130
+ * Jack Wong
131
+
132
+ ### Acknowledgements
133
+
134
+ Webgazer is developed based on the research that is done by Brown University, with recent work at Pomona College. The work of the calibration example file was developed in the context of a course project with the aim to improve the feedback of WebGazer. It was proposed by Dr. Gerald Weber and his team Dr. Clemens Zeidler and Kai-Cheung Leung.
135
+
136
+ This research is supported by NSF grants IIS-1464061, IIS-1552663, and the Brown University Salomon Award.
137
+
138
+ ## License
139
+
140
+ Copyright (C) 2021 [Brown HCI Group](http://hci.cs.brown.edu)
141
+
142
+ Licensed under GPLv3. Companies have the option to license WebGazer.js under LGPLv3 while their valuation is under $1,000,000.
@@ -0,0 +1,163 @@
1
+ GNU Lesser General Public License
2
+ =================================
3
+
4
+ _Version 3, 29 June 2007_
5
+ _Copyright © 2007 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_
6
+
7
+ Everyone is permitted to copy and distribute verbatim copies
8
+ of this license document, but changing it is not allowed.
9
+
10
+
11
+ This version of the GNU Lesser General Public License incorporates
12
+ the terms and conditions of version 3 of the GNU General Public
13
+ License, supplemented by the additional permissions listed below.
14
+
15
+ ### 0. Additional Definitions
16
+
17
+ As used herein, “this License” refers to version 3 of the GNU Lesser
18
+ General Public License, and the “GNU GPL” refers to version 3 of the GNU
19
+ General Public License.
20
+
21
+ “The Library” refers to a covered work governed by this License,
22
+ other than an Application or a Combined Work as defined below.
23
+
24
+ An “Application” is any work that makes use of an interface provided
25
+ by the Library, but which is not otherwise based on the Library.
26
+ Defining a subclass of a class defined by the Library is deemed a mode
27
+ of using an interface provided by the Library.
28
+
29
+ A “Combined Work” is a work produced by combining or linking an
30
+ Application with the Library. The particular version of the Library
31
+ with which the Combined Work was made is also called the “Linked
32
+ Version”.
33
+
34
+ The “Minimal Corresponding Source” for a Combined Work means the
35
+ Corresponding Source for the Combined Work, excluding any source code
36
+ for portions of the Combined Work that, considered in isolation, are
37
+ based on the Application, and not on the Linked Version.
38
+
39
+ The “Corresponding Application Code” for a Combined Work means the
40
+ object code and/or source code for the Application, including any data
41
+ and utility programs needed for reproducing the Combined Work from the
42
+ Application, but excluding the System Libraries of the Combined Work.
43
+
44
+ ### 1. Exception to Section 3 of the GNU GPL
45
+
46
+ You may convey a covered work under sections 3 and 4 of this License
47
+ without being bound by section 3 of the GNU GPL.
48
+
49
+ ### 2. Conveying Modified Versions
50
+
51
+ If you modify a copy of the Library, and, in your modifications, a
52
+ facility refers to a function or data to be supplied by an Application
53
+ that uses the facility (other than as an argument passed when the
54
+ facility is invoked), then you may convey a copy of the modified
55
+ version:
56
+
57
+ * **a)** under this License, provided that you make a good faith effort to
58
+ ensure that, in the event an Application does not supply the
59
+ function or data, the facility still operates, and performs
60
+ whatever part of its purpose remains meaningful, or
61
+
62
+ * **b)** under the GNU GPL, with none of the additional permissions of
63
+ this License applicable to that copy.
64
+
65
+ ### 3. Object Code Incorporating Material from Library Header Files
66
+
67
+ The object code form of an Application may incorporate material from
68
+ a header file that is part of the Library. You may convey such object
69
+ code under terms of your choice, provided that, if the incorporated
70
+ material is not limited to numerical parameters, data structure
71
+ layouts and accessors, or small macros, inline functions and templates
72
+ (ten or fewer lines in length), you do both of the following:
73
+
74
+ * **a)** Give prominent notice with each copy of the object code that the
75
+ Library is used in it and that the Library and its use are
76
+ covered by this License.
77
+ * **b)** Accompany the object code with a copy of the GNU GPL and this license
78
+ document.
79
+
80
+ ### 4. Combined Works
81
+
82
+ You may convey a Combined Work under terms of your choice that,
83
+ taken together, effectively do not restrict modification of the
84
+ portions of the Library contained in the Combined Work and reverse
85
+ engineering for debugging such modifications, if you also do each of
86
+ the following:
87
+
88
+ * **a)** Give prominent notice with each copy of the Combined Work that
89
+ the Library is used in it and that the Library and its use are
90
+ covered by this License.
91
+
92
+ * **b)** Accompany the Combined Work with a copy of the GNU GPL and this license
93
+ document.
94
+
95
+ * **c)** For a Combined Work that displays copyright notices during
96
+ execution, include the copyright notice for the Library among
97
+ these notices, as well as a reference directing the user to the
98
+ copies of the GNU GPL and this license document.
99
+
100
+ * **d)** Do one of the following:
101
+ - **0)** Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+ - **1)** Use a suitable shared library mechanism for linking with the
109
+ Library. A suitable mechanism is one that **(a)** uses at run time
110
+ a copy of the Library already present on the user's computer
111
+ system, and **(b)** will operate properly with a modified version
112
+ of the Library that is interface-compatible with the Linked
113
+ Version.
114
+
115
+ * **e)** Provide Installation Information, but only if you would otherwise
116
+ be required to provide such information under section 6 of the
117
+ GNU GPL, and only to the extent that such information is
118
+ necessary to install and execute a modified version of the
119
+ Combined Work produced by recombining or relinking the
120
+ Application with a modified version of the Linked Version. (If
121
+ you use option **4d0**, the Installation Information must accompany
122
+ the Minimal Corresponding Source and Corresponding Application
123
+ Code. If you use option **4d1**, you must provide the Installation
124
+ Information in the manner specified by section 6 of the GNU GPL
125
+ for conveying Corresponding Source.)
126
+
127
+ ### 5. Combined Libraries
128
+
129
+ You may place library facilities that are a work based on the
130
+ Library side by side in a single library together with other library
131
+ facilities that are not Applications and are not covered by this
132
+ License, and convey such a combined library under terms of your
133
+ choice, if you do both of the following:
134
+
135
+ * **a)** Accompany the combined library with a copy of the same work based
136
+ on the Library, uncombined with any other library facilities,
137
+ conveyed under the terms of this License.
138
+ * **b)** Give prominent notice with the combined library that part of it
139
+ is a work based on the Library, and explaining where to find the
140
+ accompanying uncombined form of the same work.
141
+
142
+ ### 6. Revised Versions of the GNU Lesser General Public License
143
+
144
+ The Free Software Foundation may publish revised and/or new versions
145
+ of the GNU Lesser General Public License from time to time. Such new
146
+ versions will be similar in spirit to the present version, but may
147
+ differ in detail to address new problems or concerns.
148
+
149
+ Each version is given a distinguishing version number. If the
150
+ Library as you received it specifies that a certain numbered version
151
+ of the GNU Lesser General Public License “or any later version”
152
+ applies to it, you have the option of following the terms and
153
+ conditions either of that published version or of any later version
154
+ published by the Free Software Foundation. If the Library as you
155
+ received it does not specify a version number of the GNU Lesser
156
+ General Public License, you may choose any version of the GNU Lesser
157
+ General Public License ever published by the Free Software Foundation.
158
+
159
+ If the Library as you received it specifies that a proxy can decide
160
+ whether future versions of the GNU Lesser General Public License shall
161
+ apply, that proxy's public statement of acceptance of any version is
162
+ permanent authorization for you to choose that version for the
163
+ Library.