Pupil Player Problem and Recording

394 views
Skip to first unread message

Rosemarie Geronimo

unread,
Mar 9, 2015, 11:30:47 AM3/9/15
to pupil-...@googlegroups.com
Hi pupil developers,

I'm having a problem regarding using the pupil player (not the latest version). When I try to run the python main.py along with the directory of the recorded folder, I get the following error:

Traceback (most recent call last):
  File "main.py", line 481, in <module>
    main()
  File "main.py", line 206, in main
    rec_version_float = int(filter(type(rec_version).isdigit, rec_version)[:3])/100. #(get major,minor,fix of version)
ValueError: invalid literal for int() with base 10: ''

May I know what is causing this problem? 

Another question is that, when I record the along with the eye, can I also view the real-time recording of the histogram, the min & max graph, etc.. through the player? is it possible?

Here is what I want to view when I do a playback, (see attach file)

Thank you,
Rose
11040350_1018111941536798_438126182_n.jpg

Will Patera

unread,
Mar 9, 2015, 9:51:58 PM3/9/15
to pupil-...@googlegroups.com
Hi Rose, 


Version error
What version of Pupil Player are you using? What version of Pupil Capture did you use to make the recordings? Please see this post -- https://groups.google.com/d/msg/pupil-discuss/4pIIHTcx6Kc/NDSDAoHnTI4J 

The issue is related to the version script. We check the version because we have changed the data format and file naming from v0.3x to v0.4x and need to make that it is backwards compatible. 

Eye video in Pupil Player
We just started working on an eye video overlay plugin for Pupil Player in this branch -- https://github.com/pupil-labs/pupil/tree/player_eye_overlay_video -- your suggestions are greatly appreciated :) 

Regards, 
Will

Rosemarie Geronimo

unread,
Mar 9, 2015, 11:43:25 PM3/9/15
to pupil-...@googlegroups.com
Hi Will,

I'm currently using the version v0.3x. Regarding the "Eye video in Pupil Player", can you also create a plugin for the v0.3x version? If not in  the recording, here is another way to help me, I also saw one of the post regarding eye capturing (heres the link: https://groups.google.com/forum/#!topic/pupil-discuss/4epq1a5CFjw), I just want to know if you can add the graphs (histogram, pupil min and max, etc) when I press the screen cap eye button and not just the plain eye photo?

A Big THANKS,
Rose

Will Patera

unread,
Mar 10, 2015, 8:32:35 AM3/10/15
to pupil-...@googlegroups.com
Hi Rose, 

Please use the most recent version of Pupil Player v0.4.x -- you can download bundles from here: https://github.com/pupil-labs/pupil/releases (or pull latest from master if you are working from source). It is our aim to make sure all current software supports prior formats (backwards compatible), but we do not develop new features for old versions (e.g. v0.3.x).  

I will be working on the Eye Video Overlay plugin for Pupil Player. One option that we are considering, that may be of interest to you, is to load the Pupil Detector plugin in Pupil Player and recreate the algorithm visualization (histogram, detector visualization, pupil min/max). This way users would retain all the original "raw" data from Pupil Capture and then be able to decide how they want to visualize it after the fact in Pupil Player. However, aside from making a nice visualization in one screen, I am not entirely convinced that being able to export videos with the eye video plus algorithm overlay would add clarity to the data captured. 

Could you explain why you want to record the eye video with the algorithm view? A bit more information (or an example) would provide context so that I could understand your constraints/requirements. Perhaps you want to use the eye video with algorithm for human/manual coding?  

Best regards, 
_w    

Rosemarie Geronimo

unread,
Mar 10, 2015, 9:04:25 AM3/10/15
to pupil-...@googlegroups.com

Hi Will,

The reason why I also want the graphs to be shown is because it is one of the requirements of the project that I am working on which is tracking of the changes of eye pupil due to emotional states.

Good thing I found your software. Aside from the actual eye video, it needs to capture and display a graph(algorithm) to track the changes of the eye pupil. I see in your program that the size of the green circle constantly reacts to the pupil size along with the histogram.

Do you have any suggestions?

Thank you,
Rose

--
You received this message because you are subscribed to a topic in the Google Groups "pupil-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pupil-discuss/j_sAx9MXk70/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pupil-discus...@googlegroups.com.
To post to this group, send email to pupil-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pupil-discuss/f449c614-af30-468f-8ed6-24377ec78c77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Will Patera

unread,
Mar 11, 2015, 12:13:21 AM3/11/15
to pupil-...@googlegroups.com
Hi Rose, 

Thanks for the explanation. I think I now have a better understanding of your project. 

If you need to know and use the pupil diameter in realtime, then you can stream this over the network using Pupil Server. Please see this section of the wiki: https://github.com/pupil-labs/pupil/wiki/Pupil-capture#pupil-broadcast-server -- you can copy and paste the code snippet in the wiki (if ZMQ installed) to see what the data looks like. If you only want diameter you could make a minor edit to the code snippet and only show/use diameter with items['diameter']  

Additionally the pupil diameter is saved when you make a recording in pupil_positions.npy file. Please see the Data Format section of the wiki here: https://github.com/pupil-labs/pupil/wiki/Data-format#pupil-positions -- If you want to see changes in pupil diameter you can look directly at the data like so (this requires that you have numpy installed on your machine):

import numpy as np
pupil_positions
=np.load("pupil_positions.npy")
print p[:,5] #this will print the pupil diameters for the entire recording

# you can also save the pupil positions data as a .csv file
# and visualize the data as a graph or animation using another software that can read csv files (e.g spreadsheet, matlab, etc.)
np
.savetxt("/full/path/to/directory/pupil_positions.csv", p, delimiter=",")
   
We can also show and make a visualization of the pupil diameter exportable in Pupil Player, just like shown in the Eye Window. However, (IMHO) the histogram and algorithm visualization are not necessary offline in Pupil Player.   

Best, 
_w


On Tuesday, March 10, 2015 at 8:04:25 PM UTC+7, Rosemarie Geronimo wrote:

Hi Will,

The reason why I also want the graphs to be shown is because it is one of the requirements of the project that I am working on which is tracking of the changes of eye pupil due to emotional states.

Good thing I found your software. Aside from the actual eye video, it needs to capture and display a graph(algorithm) to track the changes of the eye pupil. I see in your program that the size of the green circle constantly reacts to the pupil size along with the histogram.

Do you have any suggestions?

Thank you,
Rose

On Mar 10, 2015 8:32 PM, "Will Patera" wrote:
Hi Rose, 

Please use the most recent version of Pupil Player v0.4.x -- you can download bundles from here: https://github.com/pupil-labs/pupil/releases (or pull latest from master if you are working from source). It is our aim to make sure all current software supports prior formats (backwards compatible), but we do not develop new features for old versions (e.g. v0.3.x).  

I will be working on the Eye Video Overlay plugin for Pupil Player. One option that we are considering, that may be of interest to you, is to load the Pupil Detector plugin in Pupil Player and recreate the algorithm visualization (histogram, detector visualization, pupil min/max). This way users would retain all the original "raw" data from Pupil Capture and then be able to decide how they want to visualize it after the fact in Pupil Player. However, aside from making a nice visualization in one screen, I am not entirely convinced that being able to export videos with the eye video plus algorithm overlay would add clarity to the data captured. 

Could you explain why you want to record the eye video with the algorithm view? A bit more information (or an example) would provide context so that I could understand your constraints/requirements. Perhaps you want to use the eye video with algorithm for human/manual coding?  

Best regards, 
_w    

On Tuesday, March 10, 2015 at 10:43:25 AM UTC+7, Rosemarie Geronimo wrote:
Hi Will,

I'm currently using the version v0.3x. Regarding the "Eye video in Pupil Player", can you also create a plugin for the v0.3x version? If not in  the recording, here is another way to help me, I also saw one of the post regarding eye capturing (heres the link: https://groups.google.com/forum/#!topic/pupil-discuss/4epq1a5CFjw), I just want to know if you can add the graphs (histogram, pupil min and max, etc) when I press the screen cap eye button and not just the plain eye photo?

A Big THANKS,
Rose

--
You received this message because you are subscribed to a topic in the Google Groups "pupil-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pupil-discuss/j_sAx9MXk70/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pupil-discuss+unsubscribe@googlegroups.com.

Rosemarie Geronimo

unread,
Mar 11, 2015, 10:35:14 PM3/11/15
to pupil-...@googlegroups.com
Hi Will,

Thank you for your suggestion! I try your suggestion :D. I have a last concern regarding this matter, can I replace the histogram with another line (pulse-like) graph? like this photo (http://users.ecs.soton.ac.uk/jn2/teaching/lineGraph.png)

To indicate or show whether  the pupil size increases or remains constant.

Thank you for being so helpful,
Rose

Will Patera

unread,
Mar 12, 2015, 5:45:12 AM3/12/15
to pupil-...@googlegroups.com
Hi Rose, 

The histogram that you see in the upper right hand corner of the algorithm view in the Eye window is not a histogram of pupil diameter. The histogram shows the value (or brightness of pixels) within the ROI of the eye video. Please see our technical paper on arxiv.org, pg 4, Figure 4 and the sub-section on the Pupil Detection Algorithm) for further explanation available here: arxiv.org/abs/1405.0006

If you want to visualize the changing size of pupil diameter over time, you can create a graph using your graphing tool of choice from the pupil_positions file converted to .csv -- For example, one could even import the csv file into google sheets or excel and make a chart from the spreadsheet. Here's a super quick example (note that the horizontal axis is not time, but data rows) -- but you could easily convert the monotonic time to or just subtract the start time to see elapsed time: https://docs.google.com/spreadsheets/d/12YjjCaLtZFwHfBkhD5O5CbWRAgSbMFQxrmelKeQnwdo/edit?usp=sharing

Regards, 
_w

Rosemarie Geronimo

unread,
Mar 13, 2015, 3:32:22 PM3/13/15
to pupil-...@googlegroups.com
Hi Will,

I get it now, but, is the timestamp equivalent to the recording time?

Regards,
Rose

Will Patera

unread,
Mar 18, 2015, 12:32:51 AM3/18/15
to pupil-...@googlegroups.com
Hi Rose, 

The timestamp is the time that the image was received by Pupil Capture. Quoted from the data format page on the wiki: "timestamp is the time when the Eye Camera image is received by Pupil_Capture. It is derived from CLOCK_MONOTONIC on Linux and MacOS. This number is the time in seconds (floating point) since the epoch." 

If you haven't already, please check out the data format page on our wiki: https://github.com/pupil-labs/pupil/wiki/Data-format#pupil-positions

For visualization purposes, we have a working example of eye video overlay in Pupil Player in this branch: https://github.com/pupil-labs/pupil/tree/player_eye_overlay_video -- currently it can  not be exported, but it should be done soon :)

Best, 
_w

Will Patera

unread,
Mar 20, 2015, 5:34:26 AM3/20/15
to pupil-...@googlegroups.com
Hi Rose, 

Quick update -- you can now export the videos with the eye video overlaid on the world video (see screenshot). The plugin has not yet been merged with master - but you can test it out by pulling the branch: https://github.com/pupil-labs/pupil/tree/player_eye_overlay_video and running player. 



Best, 
_w

Rosemarie Geronimo

unread,
Mar 21, 2015, 5:53:40 AM3/21/15
to pupil-...@googlegroups.com
Hi Will,

Thank you so much for your kind help. It really helps me a lot. :)

Thank you so much,
Rose
Reply all
Reply to author
Forward
0 new messages