software-dev


user-b91cdf 07 February, 2022, 07:57:25

Good Morning everyone,

currently i am starting a recording remotly via the network API and i am also setting a pupil timestamp. Is the pupil timestamp a set via "pupil_remote.send_string("T " + str(time.time()))" set in all created data files (gaze_position.csv, fixation.csv, world_timestamps after exporting via pupil player)? Or is it only set in the pupil_postions.csv ?

Cobe

nmt 07 February, 2022, 10:37:31

Hi @user-b91cdf. That command resets current Pupil time. All data subsequently produced will share this new time base. May I ask, why are you modifying Pupil Time in your script?

user-b91cdf 07 February, 2022, 10:47:58

Thanks Neil! I am gathering GPS, illuminance data and another recording via a raspberry pi. For Time Synchronization i am setting the Pupil Timestamp to the system time of the raspberry pi. 🙂

nmt 07 February, 2022, 11:21:42

Thanks for clarifying. Depending on how much temporal accuracy you need, you might want to account for network latency associated with script–Pupil Capture communications. Further details in this example script that calculates the offset between a custom "local" clock and the clock used in Pupil Core software in real time: https://github.com/pupil-labs/pupil-helpers/blob/6e2cd2fc28c8aa954bfba068441dfb582846f773/python/simple_realtime_time_sync.py

user-b91cdf 07 February, 2022, 12:22:01

Thanks ! I'll have a look

user-97e6bb 12 February, 2022, 05:37:53

Hello, I just submitted a pull request that should allow the very useful pupil-detectors library to be installed in an anaconda environment, using the binaries installed by anaconda for opencv and eigen3. I hope this can minimize installation complexity; it works for me on Mac and Linux machines! Happy to chat here or via github about the PR.

papr 14 February, 2022, 10:39:03

Thank you for your contribution. Please see my review on github.

user-f1e685 14 February, 2022, 05:08:18

Hi! I have some questions about the code for gaze mapping in 3d! Is there someone specific I should talk to?

user-6e1219 14 February, 2022, 07:33:27

Hello all, I am trying to create a LSL using Pupil labs LSL plugin python file but i am getting an error No module named 'plugin' Can anyone help me out with this error ?

papr 14 February, 2022, 10:39:56

3D Gaze Mapping questions

user-97e6bb 14 February, 2022, 17:21:59

👍

user-74ef51 15 February, 2022, 12:08:24

Hi! I need to extract how open the eye is i.e. I want to measure the distance from bottom eyelid to top eyelid in the center of the eye. How can I best achieve this? Is there already a solution for this? Should I create a new plugin or can I maybe extend the pupil algorithm? Algorithm suggestions?

user-a79c8f 16 February, 2022, 14:55:37

Hello,

I am currently working on a pupil detection project using open cv and python. I found out about pupil labs while doing research for the project. And I thought of asking my question here in the discord channel.

I am not using any pupil labs software as of now, instead I am trying to do pupil detection on my own using open cv. My current code is able to detect the pupil when the subject is looking in a forward direction. But the code finds it difficult when the pupil is looking in the left/right, up/down direction or when the eye blinks (see images).

Current pipeline used for detection:-

  1. Image capture (infrared) from camera feed
  2. Conversion of image into grayscale
  3. Selecting region of interest manually and cropping
  4. Applying CLAHE filter for enhancing the image
  5. Using manual threshold
  6. Applying Hough circles of specific size to find circle in the image
  7. Labelling the circle on the input image

I think I have reached a roadblock with the current implementation and I need to change the structure of the pipeline to detect pupil in left/right and up/down locations. Therefore, if you can suggest some new ideas or points that I am missing, it would be really helpful. Some alternative ideas which I thought of was using adaptive threshold and creating different models of Houghcircles for different usecases. Any kind of feedback is welcome Thanks again

Chat image Chat image Chat image Chat image Chat image Chat image Chat image

papr 16 February, 2022, 16:08:02

Hi, depending on Hough circles is probably your performance bottle neck. If the pupil is occluded or elliptic (as it is the case when not looking straight into the cameras) the algorithm fails.

Is developing your own algorithm a requirement for your experiment? Otherwise, check out our 2d pupil detection algorithm here https://github.com/pupil-labs/pupil-detectors/ (implementation) and here https://arxiv.org/pdf/1405.0006.pdf (tech report)

user-a79c8f 17 February, 2022, 20:44:06

Thank you for the reply. Yes, I think the shape of pupil will change, when pupil is not looking towards the camera. And a better solution will be an ellipse fitting instead of circle. Hough circles seemed easier to implement at that time so I went with it. I will have a look at the links provided.

I actually read the paper before starting to work on the project. It also uses a pipeline similar to my simplified version, but with canny edge detection, histogram analysis for pupil and ellipse fitting. It was really interesting and I got a lot of insight about the topic by reading it.

user-cb599e 17 February, 2022, 20:12:01

Hi, I am investigating the possibility of tracking 2 pupils in the same video feed (thus in the same eye process). How easy do you think that could be implemented ? From the code it seems that having 2 detector plugins running in the same process, fed with 2 different ROIs should be possible with some refactoring of the code (now detectors are kind of singletons). WDYT? Of course, another option could be to re-detect one of the eyes offline.

papr 18 February, 2022, 07:45:31

Technically, this should be possible. You might need to create a subclass of the 2d detector s.t. you can differentiate the results from both detectors.

See here on how to write a custom detector https://docs.pupil-labs.com/developer/core/plugin-api/#pupil-detection-plugins

The detector is unique by_class by default. You might need to overwrite the attribute in your subclass https://docs.pupil-labs.com/developer/core/plugin-api/#plugin-class-attributes

user-cb599e 18 February, 2022, 14:33:00

Thanks for the pointers! That is really helpful.

user-b28eb5 24 February, 2022, 14:21:47

Hello, I am trying to read the video from the Pupil Core in real time in Python with the Examples in https://pupil-labs-realtime-api.readthedocs.io/en/latest/examples/simple.html#simple-discovery-example, but I can't find anything, how can I do it?

papr 24 February, 2022, 14:23:28

Hi, you are referring to our new Realtime API for Pupil Invisible. You can find more about the Pupil Core Realtime API here https://docs.pupil-labs.com/developer/core/network-api/ You can use this example to receive video from Pupil Capture https://github.com/pupil-labs/pupil-helpers/blob/master/python/recv_world_video_frames_with_visualization.py

user-b28eb5 24 February, 2022, 14:31:35

Okay thank you, is there any way to receive the video without Pupil Capture?

papr 24 February, 2022, 14:33:31

You can access the Pupil Core cameras using UVC (the video camera USB protocol). The recommended packages would be https://github.com/pupil-labs/libuvc (low level access library) and its Python wrapper https://github.com/pupil-labs/pyuvc See the Pupil Capture source installation instructions for details about these two libs https://github.com/pupil-labs/pupil/tree/master/docs

End of February archive