Initialization Parameters
When loading gazefilter.app, you can use several query parameters to customize the initialization behavior of the application.
startup
The startup
parameter overrides the default behavior for camera connection on application launch.
By default, gazefilter.app does not attempt to connect to a camera automatically when launched for the first time. However, on subsequent launches, if there was a successful camera connection in a previous session, the application will attempt to connect to the most recently used camera.
Values:
true
— attempts to connect to a camera even on first launch,false
— never attempts to connect to a camera automatically.
origin
The origin
parameter provides an extra layer of security by restricting the Gazefilter communicate only with the specified origin.
vfp
The vfp
parameter enables polyfilling for Video Frame API, even if the browser supports it.
Can be useful when the browser’s implementation of the Video Frames API has known bugs or issues.
controls
The controls
parameter customizes which UI control elements are visible.
Values:
none
— hides all controlsfull
orall
— shows all controls (default)- Comma-separated list of controls to show:
devices
— camera device selectionmodels
— model selectionpreview
— preview settingshints
— toggle for UI hintspower
— power togglesettings
— settings and calibrationhelp
— question mark button
visuals
The visuals
parameter allows tweaking UI elements visibility.
Values (comma-separated):
nocorner
— hides the GitHub corner linknofps
— hides the frame rate counter
config
The config
parameter allows customizing the Gazefilter configuration. It accepts either a JSON string or a preset identifier.
Use predefined configurations with simple preset identifiers. You can specify either a detector or shape model preset alone, or combine them:
- Detector presets (use alone or as prefix):
DB
— basic detector,DL
— lightweight detector.
- Shape model presets (use alone or as suffix):
S05
— 5-points face shape model,S20
— 20-points face shape model,S68
— 68-points face shape model.
When combining detector and shape model presets:
- Face detector (DB/DL) must always come first,
- Use a hyphen (-) as separator,
- Add shape model (S05/S20/S68) second.
Examples:
DL
— Light detector only,S20
— 20-points shape model only,DL-S20
— Light detector with 20-points shape model.
For advanced customization, provide a JSON string with configuration overrides:
{
"backend": {
"face_shaper": "models/face-05.shaper.bin",
"face_pinmap": "models/face-05.shaper.json",
"core": {
"pose": {
"keys": [
"nose_bottom",
"left_eye_outer_corner",
"right_eye_outer_corner",
"left_eye_inner_corner",
"right_eye_inner_corner"
]
}
}
}
}
When passing JSON configuration in URL parameters, use a minified string without newlines.
calib
The calib
parameter allows customizing the calibration sequence. It accepts either a preset identifier or a custom sequence definition.
Preset descriptions:
-
quick
— A balanced sequence that requires minimal head movement:- Initial demo point with introduction
- Classic 9-point calibration on gray background
- Comfort break and closer position calibration
- Rectangle pattern calibration on gray background
- Comfort break and farther position calibration
- Classic 9-point calibration on gray background
- Perimeter pattern on white background
- Rectangle pattern on black background
- Final outro message
-
basic
— Standard sequence with head movement variations:- Initial demo point with introduction
- Classic 9-point calibration on gray background
- Left-facing triangle pattern calibration
- Comfort break and right-facing triangle pattern calibration
- Comfort break and closer position rectangle pattern
- Comfort break and farther position classic pattern
- Classic 9-point calibration on white background
- Classic 9-point calibration on black background
- Final outro message
-
long
— Extended sequence with dense patterns:- Initial demo point with introduction
- Dense pattern calibration on gray background
- Left-facing diamond pattern calibration
- Comfort break and right-facing diamond pattern calibration
- Comfort break and closer position perimeter pattern
- Comfort break and farther position classic pattern
- Dense pattern calibration on white background
- Dense pattern calibration on black background
- Final outro message
-
full
— Comprehensive sequence covering all head positions:- Initial demo point with introduction
- Dense pattern calibration on gray background
- Left-facing diamond pattern calibration
- Right-facing diamond pattern calibration
- Bottom-facing diamond pattern (head tilted forward)
- Top-facing diamond pattern (head tilted backward)
- Elevated position triangle pattern
- Lower position triangle pattern
- Left-tilted triangle pattern at top-left
- Right-tilted triangle pattern at top-right
- Body-left triangle pattern
- Body-right triangle pattern
- Close-range perimeter pattern
- Classic pattern from normal distance
- Dense pattern on white background
- Dense pattern on black background
- Final outro message
For custom sequences, each step is defined using this format:
[background][.calibset][~directive]
Where:
background
:white
,gray
,black
, orinterface
(default)calibset
:empty
(default),demo
,classic
,perimeter
,rectangle
,dense
,diamond
directive
: Instruction likeintro
,straight
,comfort
,outro
Important: Point samples are only recorded to the calibration dataset when a non-default background is specified (
white
,gray
, orblack
). Using the defaultinterface
background or no background will show the points but won’t record samples.
Position values for patterns and single points:
- Cardinal:
top
,right
,bottom
,left
- Diagonal:
right-top
,right-bottom
,left-bottom
,left-top
Available directives:
intro
— initial instructionsstraight
— request to face straight aheadtilt-left
— request to tilt head lefttilt-right
— request to tilt head righttilt-forward
— request to move chin downtilt-backward
— request to move chin upturn-left
— request to turn head leftturn-right
— request to turn head rightelevate
— request to move body updescent
— request to move body downmove-left
— request to move body leftmove-right
— request to move body rightmove-closer
— request to move closer to screenmove-farther
— request to move away from screencomfort
— request to return to comfortable positionoutro
— completion message
Some examples of custom sequences:
?calib=demo~intro>white.classic>~outro
?calib=demo~intro>gray.dense>~outro
?calib=demo~intro>gray.rectangle>white.classic>black.diamond>~outro
This creates a sequence with:
- Demo point with intro message
- Classic 9-point calibration on white background
- Final outro message
Initialization Example
You can combine multiple parameters using the &
symbol:
https://gazefilter.app?origin=https://example.com&startup=true&controls=devices,models&vpf
This initialization URL will:
- Attempt to connect to a camera on startup
- Restrict communication to
https://example.com
- Show only the device selection and model selection controls
- Enable Video Frame API polyfilling