psychoinformatics-de / remodnav

Robust Eye Movement Detection for Natural Viewing
Other
59 stars 16 forks source link

Eye-Gaze data is already in Degrees. #45

Closed AlfredLTennyson closed 1 year ago

AlfredLTennyson commented 1 year ago

https://github.com/psychoinformatics-de/remodnav/issues/44

Hello. Thanks a ton and apologies for the late response. I used %%shell in colab and i think it did work. %%shell remodnav "T_Trial1.tsv" \ "remo_out" 1.0 1000.0

But, now i am getting a weird error .

Traceback (most recent call last): File "/usr/local/bin/remodnav", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/remodnav/__init__.py", line 148, in main 'min_blink_duration', 'dilate_nan', 'median_filter_length', File "/usr/local/lib/python3.7/dist-packages/remodnav/clf.py", line 855, in preproc data['x'][mask] = np.nan ValueError: cannot convert float NaN to integer

Though I did look at the previous query of the same sort,but i am not able to implement it as my gaze data is already in degrees.

AlfredLTennyson commented 1 year ago

https://github.com/AlfredLTennyson/eye_gaze_data_for_1_trial/blob/main/T_Trial1.tsv

here is the data file. Thanks a ton in advance.

adswa commented 1 year ago

Thanks for attaching a sample file and the exact command and traceback! I only glanced at the file, but the last 8000 samples of the ~12000 samples in total seem to be all empty. Before diving deeper into this I wanted to ask if this valid, or an artifact of some sort?

AlfredLTennyson commented 1 year ago

It is normal because the participant finished the task early. You can remove them. Thanks a ton again.

AlfredLTennyson commented 1 year ago

I would like to mention that participants were told to make saccades away from the screen. Attaching the graphs of eyeX vs eyeY for 10 such trials. Those large saccades to the upper left corner are the ones that were made outside of the screen.

image

AlfredLTennyson commented 1 year ago

Also the velocities (for eyeX) are plotted below in (degrees/sec). There are large peaks which seem to be blinks but arent. I did not find the missing dots in that time frame. image Just mentioning,becoz i think your algorithm will definitely remove it.

AlfredLTennyson commented 1 year ago

Please do click on the graphs to see the units of x and y axis.

AlfredLTennyson commented 1 year ago

I have attached the above images so that you get the feel of what kind of data mine is. And the gaze data is already in degrees of visual angle.

AlfredLTennyson commented 1 year ago

And stimuli were static.

AlfredLTennyson commented 1 year ago

This is the eyeX plot vs time. image

AlfredLTennyson commented 1 year ago

https://github.com/AlfredLTennyson/eye_gaze_data_for_1_trial/blob/main/Untitled8.ipynb This is the google colab file, in which i have implemented simple I-VT algorithm. The results are wrong.

AlfredLTennyson commented 1 year ago

Hello! hope everything is fine. Is my problem solvable?

adswa commented 1 year ago

Hello! hope everything is fine. Is my problem solvable?

Hey! As GitHub tells me that this is your first set of issues ever I wanted to take a minute to point something out that may not be obvious. Software maintenance is very often, also here, essentially volunteer time that people need to squeeze in between their regular full-time job, looming deadlines, private life, etc. I can see how you need the problem solved, and its certainly absolutely okay to ping people for updates after a certain while, but there for sure will be people out there who could feel like being stepped on their toes - consider that its a weekend and also still a pandemic which in so many cases doubled peoples private care work (or also frequently just knocks people out sick for a while) before pinging. :)

That being said, I looked into it, and I think the issue is just an extra column and row in your data. remodnav reads in the first and second column as x and y, but your files' first column seems to be an index (0, 1, 2, 3, ...) and there also is the '0' '1' header in the first row. If you reformat your file to look like this, things run smoothly: https://gist.github.com/adswa/81cbdbdd4f635c22384c3748b4b5d34a#file-t_trial1-tsv

This is the classification result I'm seeing without any parameter tweaking: Screenshot from 2022-10-16 13-35-11

You can take a look at the available parameters and see if there are some that might be tweaked based on the nature of your data and task to get better performance. Hope that helps!

AlfredLTennyson commented 1 year ago

I apologize for being incessant. I did not take into consideration your point of view. Please take care. Again really sorry. May i ask just to be sure that you just fed the modified data into the command line call of remodnav without tweaking the px2deg hyper-parameter? Please take your time. I apologize again for the trouble. And i am grateful for your help. Happy weekend. Thanks and sorry again.

AlfredLTennyson commented 1 year ago

image

Thanks a ton. I got the same result as yours. I am grateful. Please Take care. Enjoy the weekend. :)