Howdy, Stranger!

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

Supported by

Super slow performance and video freezing in an eye-tracking experiment

Hi All,

I am working on an eye-tracking experiment, where I want to display videos in open-sesame (3.2.5) and collect gaze data through Tobii tx300. I am using the pygaze plugin in OS. I seem to get things working, but the experiment seems to be running pretty slow, and the video display sometimes freezes in the last frame before moving on. I am not sure what is causing this lagging, as the task is not supposed to be super computationally demanding, it is just a passive view task. I have tried switching the backends, the psychopy backend doesn't show the video. And while the pygame and experiment backends work, it freezes often, which is not ideal, as I am left wondering if the gaze data will be recorded correctly. The experiment runs fine in a simple dummy mode.

Any ideas of solutions are appreciated.
Thank you,
Helio

Comments

  • Hi Helio,

    If I understand correctly, the video plays back smoothly in dummy mode, but things become laggy if you enable the Tobii. Is that right?

    If so, that suggests that some part of the Tobii software slows things down. This could be either the Tobii SDK itself, or the implementation of PyGaze. Looking at the source code, PyGaze indeed continuously collects and logs gaze data from the Tobii, which I imagine can slow things down.

    @Edwin Any thoughts?

    Cheers!
    Sebastiaan

  • Hi all,

    Sounds like an accurate diagnosis, @sebastiaan! Tobii did their own implementation, so you might be able to ask the Devs about it on GitHub, @heliocuve.

    You can open an issue there, and tag them. (Or open the issue, and I will tag them.)

    Cheers,
    Edwin

  • Thank you @sebastiaan and @Edwin for your comments. I will loop in the devs.

    Cheers!
    Helio

  • Hi, again @sebastiaan and @Edwin.

    So, I found out that if I put a blank sketchpad between the video stimuli and the pygaze_log, it seems to solve the lag in the video display, and now the only lag is caused by the pygaze_log as @sebastiaan suggested. Is there a way to specify exactly which variables are to be logged in the pygaze_log file, so that I can potentially reduce the amount of stuff being written to the gaze file, and hopefully this reduces the lag during the pygaze_log period.

    Another question, is it a problem if I move the pygaze_stop_recording to before the pygaze_log? I realized that the gaze data is still being recorded during the lag period where py_gaze logs the variables. So stopping the tracker earlier would perhaps make the file a little bit cleaner? if I have to log a lot of variables?

    Thank you again!
    Cheers!
    Helio

  • Is there a way to specify exactly which variables are to be logged in the pygaze_log file, so that I can potentially reduce the amount of stuff being written to the gaze file, and hopefully this reduces the lag during the pygaze_log period.

    Yes, you can disable the 'Automatically log all variables' option and then explicitly indicate what you want to log, like so:

    var response [response]
    var condition [condition]
    

    Another question, is it a problem if I move the pygaze_stop_recording to before the pygaze_log? I realized that the gaze data is still being recorded during the lag period where py_gaze logs the variables. So stopping the tracker earlier would perhaps make the file a little bit cleaner? if I have to log a lot of variables?

    I'm not sure if stopping the recording will also prevent log messages from being written. For the EyeLink it would, but for the Tobii it may be different. Why don't you give it a shot?

    Cheers!
    Sebastiaan

  • To give a more specific answer to your second question:

    Before calling the stop_recording function, data is streamed and logged (in a local buffer). When you call it, the buffer is synced to disk (to the log file). By calling the log function, you're writing directly* to the log file (as opposed to adding your message to e.g. a Queue), and thus it doesn't interfere with or is dependent on the active streaming of samples.

    TL;DR You're fine logging outside of start_recording to stop_recording.

    * Small print: It is not actually directly, as it's still writing to a local buffer (which will be wiped during e.g. a crash or loss of power). Once you call stop_recording or close, the data is synced to disk (and thus will persist beyond crash power outage). Fortunately, if OpenSesame crashes, the close function is called automatically, and thus all data should be saved anyways.

  • thanks loads guys! I got this part working smoothly now.

    cheers!
    Helio

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