gkaguirrelab / transparentTrack

Determine pupil size and gaze location in IR video of the eye
MIT License
16 stars 9 forks source link

Cannot Run DEMO_eyeTracking to Completion #155

Closed cbain00 closed 2 years ago

cbain00 commented 2 years ago

Hi,

I am attempting to run DEMO_eyeTracking with all toolboxes fully installed.

Right now, I am running into an error where the code tries to access the GazeCal01_sceneGeometry.mat file in the TOME_processing folder, however, it does not exist within the folder.

I have been looking through files to see where the file was supposed to be downloaded, however, I have been unable to locate where this file is supposed to be created. Am I missing something?

The error is below:

Error using load
Unable to read file
'C:\Users\opt-omlab\Documents\MATLAB\DEMO_eyeTracking\TOME_processing\session2_spatialStimuli\TOME_3020\050517\EyeTracking\GazeCal01_sceneGeometry.mat'.
No such file or directory.

Error in fitPupilPerimeter (line 155)
    load(p.Results.sceneGeometryFileName,'sceneGeometry');

Error in runVideoPipeline (line 320)
            eval(funCalls{ff});

Error in DEMO_eyeTracking (line 226)
runVideoPipeline( pathParams, ...

Thanks, Christopher Bain

gkaguirre commented 2 years ago

Christopher -- Thanks for identifying this failure of the demo. This is not the only problem with the DEMO, which had fallen behind the code base in this and in other ways. I have now updated the demo and fixed a couple of small bugs which allows the demo to run all the way through on my machine. Note that the "estimateSceneGeometry" step can take some time (e.g., 10-15 minutes on an 8 core MacBook pro).

Please let me know if this works for you.

https://github.com/gkaguirrelab/transparentTrack/pull/156

cbain00 commented 2 years ago

Dr. Aguirre,

Thank you very much for your help. Your corrections did seem to fix the issue almost completely. I had to remove line 415 from estimateSceneParams where the code attempts to use saveModelFitPlot. This line for some reason was trying to access a variable that didn't exist, however, after removing it all other files are generated and the code runs to completion.

Outside the scope of this question, however, in the final fit video the model eye created does not seem to contain an iris and the colors that appear on the video seem dim. Is this normal?

finalfit screenshot

Thank you very much again,

Christopher Bain

gkaguirre commented 2 years ago

I'll see if I can resolve the bug with saving the modelFitPlot (which is quite informative as to the quality of the scene parameter estimation).

The image you posted is how the fit video should appear. The settings for saving this do not include the iris, but you could modify lines 97 and 98 of makeFitVideo.m to add this component.

The model eye is superimposed on the video image but with some degree of transparency. The value for this alpha transparency varies depending upon the quality of the model fit on that frame (dim for bad fit). You can control the degree of transparency by adjusting the parameter value pupilRMSERangeAlphaScaler in makeFitVideo.m.

cbain00 commented 2 years ago

Understood,

I made the edits for the iris and the code was able to generate an iris for the final fit. Also, I believe I was looking at the wrong image when I made the comment about dimness of the model eye overlay, right now it is appearing very vividly.

I believe this solves all of the issues I encountered. Once again, thank you very much for help and responsiveness!