Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

theeyetribe eyetracker

edited January 2015 in PyGaze

Hi,

I was wondering if anybody had tried to integrate theeyetribe eyetracker into OpenSesame and would like to share his/her knowledge.

We will be trying to find time to work on this and would appreciate to team up. Alternatively we would have some tiny budget for an interested freelancer who is able to deploy a robust solution.

Best,
Daniel

Comments

  • edited 8:21AM

    Hi Daniel,

    Yes, as it happens considerable work has been done on integrating the Eye Tribe into OpenSesame. This functionality is part of PyGaze, which is a general Python library for eye tracking. A set of plug-ins integrates PyGaze into OpenSesame, in a way that is similar to the EyeLink plug-ins. (Essentially, PyGaze is a massive extension of the OpenSesame eyelink plug-ins.)

    Currently, the Eye Tribe works, but there are definitely some rough edges. You can find a discussion here:

    Cheers!
    Sebastiaan

  • edited 8:21AM

    great! Thanks for the info. I definetly need to take a look at how to connect all the things ;)

    Best,
    Daniel

  • edited 8:21AM

    Hi Daniel,

    Thought a HOW TO might be useful:

    1) Download the latest PyGaze version via https://github.com/esdalmaijer/PyGaze (click on Download ZIP, then extract the downloaded zip archive - this will be referred to as 'the downloaded zip archive' in the rest of this post).

    2) Replace the existing PyGaze module with the one you downloaded at step 1. If you have a standalone version, this will be a lot of trouble. The easy way out, is to download the portable version of OpenSesame 2.8.3 for Windows (direct dowload: http://cogsci.nl/esdalmaijer/WinPython-OpenSesame-2.8.3.zip). To replace PyGaze, simply copy everything in the folder 'pygaze' (found in the downloaded zip archive) to the folder 'pygaze' (found in OpenSesame portable, under 'WinPython-OpenSesame-2.8.3/python-2.7.3/Lib/site-packages'). This replaces all of the old contents.

    3) Copy all subfolders except for 'artwork' from the folder 'opensesame_plugins' (found in the downloaded zip archive) to the plugins folder of OpenSesame (found in 'WinPython-OpenSesame-2.8.3/OpenSesame/opensesame-2.8.3').

    4) Start OpenSesame by clicking on opensesame.bat (found in the portable version of OpenSesame). Load one of the examples from the downloaded zip archive (found in examples/opensesame).

    5) Under 'pygaze_init', change the tracker type to 'EyeTribe'.

    6) Run the experiment!

    Troubleshooting:

    • make sure you unzipped everything correctly
    • make sure the PyTribe Server application is running before starting the experiment
    • make sure dummy mode is not turned on, and you selected the correct tracker type in the pygaze_init plug-in

    Please do report back if you run into trouble!

    Good luck!

    Edwin

  • edited 8:21AM

    uh ... ;)

    OK, it is definetly usefull :) I'll try on monday when back in the office.
    Best,
    Daniel

  • edited August 2014

    Hi Edwin,

    so far I think unzipping was fine :) I got the following Qt error when opening your experiments using a portable version:

    QAccessibleWidget::rect:This implementation does not support sublements(ID2 unknown for QWidget)

    I'll try to trace this a little...

    -- edit -- ok. placing the portable version outside the programs folder will run the experiments, but the errror will be listed anyways. might work though.

    i checked your os experiment, besides not knowing what to do i think calibration works fine ;)

  • edited August 2014

    Thanks, Daniel!

    This is very good news! Not sure what to think about the error; also very strange that the experiment keeps running despite it... ( @sebastiaan, any ideas?).

    One of the example experiments (the one with the plug-ins) is simply a structure that you can easily adept to your own needs. The other (with the inline_script) expects you to press the left or right keypad arrow key (depending on where the target appears). Even if you didn't know what to do, after the experiment a CSV should be created with gaze data. Can you confirm this?

    Thanks again for trying everything out!

    Edwin

  • edited August 2014

    hi Edwin,

    unfortunately i cannot confirm. using the plugins experiment example (structured, calibration, fixation dot reaction practice loop, fixation dot reaction experimental loop) i get all reaction time listings beeing "undefined". besides the subject's csv there is no gazedata logged.

    the debug window tells me "function not supported yet".

    the calibration works fine as far as i can say that from the visual feedback. (worst error was 0.38 with glasses or so...)

    edit: maybe this helps the traceback, i get 4 "function not supported yet" during the experiment. 2 per loop, which might be an indicator that recording fails ?

    not sure how to solve this without digging in your code? I used psycho for backend.

  • edited 8:21AM

    Thanks for the info! The "function not supported yet" message arises from a non-implemented function, which shouldn't be a problem in this case. I'll look into the issue as soon as possible!

  • edited September 2014

    hi Edwin,

    any news from this ? I would like to help but I assume some pointing into a direction where to look at would help ?

    Best,
    Daniel

    PS: Did you yourself get this to work ? Maybe its a user mistake of mine ;)

  • edited September 2014

    Hi Daniel,

    Finally had some time to look into this. Funny coincidence: Another Daniel reported a different issue occurring after calibration, which I'm looking into as well.

    Annoyingly, I fail to reproduce both of your issues! The tracker calibrates fine on my Win7 setup, using both the PyGame and PsychoPy back-ends on OpenSesame Portable 2.8.3 and the latest versions of PyGaze and the PyGaze plug-ins for OpenSesame. Firmware version of EyeTribe is 293, Server version is 0.9.41.

    Can you not find an output file for the gaze data at all? It should be named subject-0.tsv (or a different subject number, the tsv bit is important), and it should be saved in the same location as the regular logfile.

    BTW: the "undefined" values in the regular output are normal: these depend on how you fill out the experiment template.

    Thanks!

    Edwin

  • edited 8:21AM

    hi edwin,

    sorry to come back to you that late, its crazy busy around here. I'll try my best to give you substatial info soon.

    best,daniel

  • edited 8:21AM

    Just a quick note to let you guys know that I included PyGaze + the corresponding OpenSesame plug-ins in the latest pre-release of OpenSesame 2.9.0.

    I'm not sure whether I'll include them in the final release. That depends on whether the code stable enough. But for now it's an easy way to try the Eye Tribe with OpenSesame.

  • edited 8:21AM

    Hi y'all.
    I just started fiddling around with OpenSesame/pyGaze using theeyetribe so sorry in case my questions are newbieish. Currently I am trying to get a fixation event using the standard pyGaze template. Looking at the .tsv kogfile there is never any "true" state in the "fix" column regardless what values I chose for saccade velocity or acceleration. That is in line with the observation that having chosen "Fixation triggered" in the pygaze_drift_correct plugin makes the experiment a never ending experience (if it wasn't for the escape key :-) )
    Could it be a sample frequency issue? The .tsv says the samplerate is 30.00 Hz while 60 Hz would be appropriate (I haven't found where that can be configured).
    Btw when comparing the .tsv log with the one that is produced by the theeyetribe server I see that in the later state "7" is regarded as fix:true while state "8" goes for false while in the .tsv it is flase for both states.

    I am using the latest OpenSesame 2.9.1 release which includes pyGaze 0.5.

    Regards
    Digo

  • edited 8:21AM

    Hi Digo,

    To be honest, I don't know what the columns in the output you are referring to are based on. Which means I'm afraid I'll have to point you to the EyeTribe people. I simply take the values that the EyeTribe reports and put them directly into a tsv.

    The detection algorithms do indeed lack accuracy if used on a low sampling rate. To run the EyeTribe Server on a higher sampling rate, do the following:

    1) Create a new batch file:

    • open windows explorer
    • go to C:\Program Files (x86)\EyeTribe\Server
    • right mouse click -> 'New' -> 'Text Document'
    • rename the new document 'run_eyetribe_server_60Hz.bat'.

    2) Right click on your new batch file, and click 'Edit'.

    3) Copy in the following:

    EyeTribe.exe --framerate=60
    

    Now double-click your batch file to run at 60 Hz.

    Good luck!

  • edited November 2014

    Hi Edwin,
    thank you. Sorry for answering that late but I am involved in this only once a week. As I found out the frequency can also be changed by using a config file:
    http://dev.theeyetribe.com/dev/#advanced
    Anyway setting the framerate to anything other than 30 currently produces the error "The Eye Tribe Tracker cannot stream data!"
    This being a device specific problem have posted it in theEyeTribe forum: http://theeyetribe.com/forum/viewtopic.php?f=9&t=363

    Regards

    Digo

  • edited 8:21AM

    Hi Digo,

    I'm sorry to hear about the framerate issue! As you mention, it's a problem of the EyeTribe's software rather than ours. Additionally, I think it might well be platform or version specific, because I can't replicate the issue on any of my Win 7 Pro testing computers.

    Very good that you took to their forum, I hope they find a solution soon! Thanks for bringing this up!

    Best,

    Edwin

  • edited 8:21AM

    Hi Edwin,
    it turned out the framerate issue could be resolved by updating the mainboard's usb driver software...
    Still, the fixation problem remains. Is it possible that the eyetribe server indees does detext a fixation but that somehow is not recognized in the following processes?

    Here is a line from the server log:
    {"category":"tracker","request":"get","statuscode":200,"values":{"frame":{"avg":{"x":942.3127,"y":484.2393},"fix":true,"lefteye":{"avg":{"x":924.0771,"y":459.3401},"pcenter":{"x":0.1506,"y":0.4315},"psize":15.4356,"raw":{"x":895.8666,"y":467.5415}},"raw":{"x":935.0067,"y":484.7750},"righteye":{"avg":{"x":960.5485,"y":509.1385},"pcenter":{"x":0.3882,"y":0.4330},"psize":15.0857,"raw":{"x":974.1469,"y":502.0085}},"state":7,"time":869366513,"timestamp":"2014-12-10 11:49:34.193"}}}

    And here comes the correspondig line from the .tsv file:
    2014-12-10 11:49:34.193 869366513 False 7 935.0067 484.775 942.3127 484.2393 15.26065 895.8666 467.5415 924.0771 459.3401 15.4356 0.1506 0.4315 974.1469 502.0085 960.5485 509.1385 15.0857 0.3882 0.433

    In the server's log there is a fixation event detected ("fix":true) but in the .tsv the fixation column is set to False.

    Am I getting this totally wrong or is the fixation event lost somewhere on the way?

    Thank you.
    Best Regards
    Digo

  • edited 8:21AM

    Hi Digo,

    Thanks for digging into this. I think I've found the problem.

    The following line is part of pytribe.py (line 850):

    'fix': response['values']['frame']['fix']=='true'
    

    Because I, erroneously, assumed the result was going to be a string rather than an actual Boolean. Woops!

    I'll omit the =='true' in future releases. In the meantime, if you want to fix your local distribution, go into the PyGaze source code (python_installation_folder\Lib\site-packages\pygaze_eyetracker\pytribe.py) and change line 851 to the following:

        'fix': response['values']['frame']['fix'],
    

    Good luck!

  • edited 8:21AM

    Hi Edwin,
    thank you! :-)
    I have some programming knowledge, but I am new to python. Python Files in OpenSesame are stored as bytecode (.pyc). I naively tried to compile the pytribe.py file but when using the resulting .pyc file I received an error. Can you point at how to do this the right way?
    Regards
    Digo

  • edited 8:21AM

    Hi Digo,

    There's no need to compile the .py to .pyc. Python will do that for you. So you can just put pytribe.py in the OpenSesame folder (assuming you're running from the official packages).

    Cheers,
    Sebastiaan

  • edited 8:21AM

    Thank you, Sebastian.
    It works.
    Regards, Digo

  • edited December 2015

    Hey everyone,

    I am currently working on a project, which involves linking the EyeTribe with OpenSesame. I am presenting an image with OpenSesame, and later on doing some analysis on the gazedata file (thanks to the pygaze_log item).

    Two problems occurred to me, one of which was actually the same problem hiwi68 had.
    First, the 'fix' variable always appeared to be FALSE.
    Second, there was a timing issue. The end of some trials weren't logged, so when doing analysis some gazedata would be missing.

    The solution for me was, as Edwin suggested, pytribe.py
    I copied the right pytribe.py into "....Program Files\OpenSesame\pygaze_eyetracker\", instead of pytribe.pyc which was located in that folder.
    This did the job. So why am I commenting?

    Thing is, the most recent version of OS (3.0.4, "released on Nov 28, 2015") still includes the wrong file (the pytribe.pyc which i removed), instead of the most recent pytribe.py, which was last fixed by Edwin 6 months ago.

    So my question is; did I do something irrelevant, and was my problem (timing and 'fix' issue) due to something else, and magically disappeared when I put the most recent pytribe.py in the OS folder, or does the newest version op OS still include the pytribe problem?

    If yes, Sebastiaan, you are lead developer of OS right?

    Regards,
    Bert

    PS: I would really like to thank Edwin and Sebastiaan for their work, you guys are amazing!

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games