simonarvin / eyeloop

EyeLoop is a Python 3-based eye-tracker tailored specifically to dynamic, closed-loop experiments on consumer-grade hardware.
GNU General Public License v3.0
479 stars 68 forks source link

Blink threshold is hardcoded #24

Open cfculhane opened 3 years ago

cfculhane commented 3 years ago

Currently the blink threshold is hardcoded inside the engine.Engine class, ideally this should be a param passed in so an external user can adjust it. Alternatively, a method could be written to take in an expected number of blinks, and adjust the blink threshold to match the expected number (so you could run through a small sample of video on the same subject to attain the threshold, then set that threshold to process the rest of the dataset)

simonarvin commented 3 years ago

I think adjusting the threshold to a small video sample could work. Often, contrasts, facial appearance etc. have an effect on how blinks affect the (mono)chromatic distribution. In mice, blinking causes a less pronounced shift in mean/std than in human (based on my trials). Both are very distinct, however.

As you suggest, we should make the param user adjustable too.

cfculhane commented 3 years ago

Yeah, I'll have a tinker. Supplying the parameters would be an easy first step, but writing some sort of interactive tuning model would be a bit trickier, as the user would have to supply information about an expected number of blinks, and time stamps.

Thinking a bit more, a simpler input could be to have a separate blink video to test against, supplied by the user, which then generates an updated parameter file that could be used against further application runs.