@user-f27d88 yes wrp is right. i did it because i can visually differentiate the foldernames on that hdd better that way.
I'm trying to create a small python script which grabs a frame from the pupil world cam via zmq. I subscribed to "frame.world", but once I activate the frame publisher in Pupil I get an error.
Traceback (most recent call last):
File "pupil_test.py", line 60, in <module>
main()
File "pupil_test.py", line 33, in main
topic,payload = subscriber.recv_multipart()
ValueError: too many values to unpack
I'm not that familiar with python. Do you guys have any hints?
The essential code part:
@user-54376c Hi, yes, the zmq messages have at least two frames (topic, and payload) but can contain more. The frame publisher messages are composed of three messages: topic, payload, image data. Extend line 33 like this:
- topic, payload = subscriber.recv_multipart()
+ topic, payload, image_data = subscriber.recv_multipart()
oh alright, thanks a lot!
@user-54376c also check out this example: https://github.com/pupil-labs/pupil-helpers/blob/master/python/recv_world_video_frames.py
For those of you who are interested in using the Pico Flexx. This is a work-in-progress prototype for a Pupil Capture backend: https://github.com/papr/pupil-picoflexx Disclaimer: Its support will be limited and is not stable yet.
hello, are there any tips to increase accuracy? I have tried multiple calibration techniques but the detection is really offset
sorry
wrong channel
Hello, in SteamVR cameraRig instead of Camera(eye) for both eyes, I have Camera (left) and Camera(right) for both the eyes.. In this case what change do I need to make to track my eyes? Do I need to anything while calling PupilGazeTracker.Instance.StartVisualizingGaze()? Should I put a script on both the cameras to update marker.localPosition = PupilData._2D.LeftEyePosition and marker.localPosition = PupilData._2D.RightEyePosition ?
@user-a5f66b This is a question for the π₯½ core-xr channel.
Okay I will post it there.. thanks
Plugins using PySerial module.
Hi, I'm a noob with pupil software so please excuse me if this is a dumb question. I want to write a plugin for pupil-capture, which reads in and timestamps the output from an arduino device through the serial port. I am using linux. I have written a small python script independently from pupil-capture and it works.
To do this I have installed the pyserial python module which is called by import serial.
However when I try to use this as a plugin, i get the error
plugin: Failed to load "serial_read" . Reason 'No module named 'serial'
I have also tried the sys.path.append....
but then it fails at the fcntl module.
How do I get pupil-capture to access these modules?
@user-a82c20 It looks like the pyserial
module didn't be installed correctly. Please make sure:
serial
library is pre-installed, uninstall it. Install the pyserial
library.import serial
in the python REPL to see if it works or not.pip freeze
@user-f27d88 @user-a82c20 My guess is that you are using the Linux bundle, right? The bundled applications are very isolated and are shipped with their own python environment. You have two possibilities:
1. Run from source. Disadvantage: You have to install the dependencies (of which you have some already installed). Advantage: This is the least hacky solution.
2. Keep running the bundle. sys.path.append
is the correct approach here. Run python -c "import sys; print(sys.path)"
for a list of paths that are usually present. Try finding those that are required to find your dependencies.
Thank you @papr , I didn't know that before, maybe we should add a note in our docs about how to import extra module
?
serial
is a special case since it is a system module. Usually it should be enough to add the pip site package path to the sys.path
[email removed] :- I've uninstalled the python-serial packages from ubuntu and reinstalled using pip. changed the sys-path-append() to the pip installed local location.
I'm still getting the fnctl error. So I've run python and imported fcntl to see where it is.
python3
import fcntl fcntl. file Traceback (most recent call last): File "<stdin>, line 1, in <module> AttributeError: module 'fcntl' has no attribute ' file ' fnctl <module 'fcntl' (built-in)>
When I print my usual sys.path I get:
'/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload',
'/Users/papr/.py37/lib/python3.7/site-packages'
My best guess is that fcntl is somewhere in the first three paths.
I've been playing with archlinux and found fcntl in
/usr/lib/python3.7/lib-dynload/
it's a .so file
fcntl is a builtin module cPython
I went the the ubuntu distro and grepped in the lib-dynload . fcntl was mentioned in ossaudiodev.cpython-etc-.so.
So no joy there
@user-a82c20 Wait, adding /usr/lib/python3.7/lib-dynload/
to your plugin's sys.path did not help?
@papr no. π¦
@user-a82c20 I think the easiest way would be to install the remaining dependencies and to run from source.
@user-a82c20 Would you mind describe the current behavior and expected behavior? IIUC, fcntl.file
should raise AttributeError.
I have manages to solve the problem. I did a find for the fcntl*.so file and found nothing. May be it's a weird ubuntu thing. So I downloaded the python3.6 src tarball, compiled it from scratch and installed to
/usr/local/lib/python3.6
I then sys.path.append to the lib-dynload in the new python install. That got me fcntl
Then I sys.path append to the the serial library somewhere in /usr/lib/python3 To get the serial module.
@user-a82c20 Good to know! (I should ask how you install python firstπ )
hello, I'm encountering a similar problem as moek did on February 27th. When I try to open a recording in pupil player, it says "This recording is invalid because it does not contain any valid timestamp files ...". The difference to his problem is, I didn't change any path names. One of the several recording folders does work ( = can be opened), so I don't think It has anything to do with an invalid folder name in the path. Also I'm using pupil capture and ran the hmd-calibration example and windows 10 to generate the recording.
@user-86c436 Which version of Pupil Player you are using, would you mind share the screenshot of the recording folder?
this is the only recording that worked - as you can see, I was able to export the data.
and this is one of the recordings that don't work
they are folders 001 and 002 in the generated "recordings" folder, I'm using pupil version 1.11
Looks like world.fake
didn't create as expect, would you mind share your recording with us by google drive or dropbox.
sure: https://drive.google.com/drive/folders/1bI_8iPsqkMiDWpUhYlxkNDmp7unWI_Et?usp=sharing
@user-86c436 For some reason, the data inside eye0/1_timestamps.npy
is sorted in descending order. ([93.798863 93.807263 93.815663 ... 77.835658 77.844058 77.852458]
) Do you have any idea why it happens?
no π
It maybe a bug, I will check it out later. Did you run player from source of bundle?
Not from source but from the .exe file. Thanks a lot for looking into ist!
I know how to fix it if it is a bug, but I don't know how to build a bundle from the source yet. I think someone can help me to bundle it on next monday.π¬
ok π thank you very much already! You guys provide an awesome support!
@user-f27d88 @user-86c436 this could be a unwated side effect from time syncing. Lisa, are using pupil timesymc?
Hey I am unable to export data via the player.So I have access to the data files via an external hard disk. The folder containing the files from the main system where transformed directly without exporting via pupil player.I have tried to install player on my mac and export the files in the hard disk,but the player is just hanging.
@user-b64d72 please can you confirm that you are using the latest version of Pupil software - https://github.com/pupil-labs/pupil/releases/latest
yes
What are the specs of your macOS machine? OS version, CPU, RAM?
ok, this should be sufficient. What is the size of the recording?
What plugins are enabled in Pupil Player
I am tried dropping the each trial file and not the entire data directory.So not sure whether the size of matters here.
I just checked,the plugin folder is empty
@user-b64d72 what is the size of the recording that "hangs" in Pupil Player?
137.4 MB
ok, and your recording does not have a world video, correct?
yes
the world video files were deleted prior
between these were recoded around a year back so this was recorded with different version of the software I am not sure if that can cause the problem
@user-b64d72 why were the world video files deleted?
the recorded files were deleted after the eye tracking data was extracted.I have sent a mail with sample data and screenshots to the mail id
hi @user-b64d72 please send to [email removed] - we did not yet receive the email
@mpk as far as I'm aware of it, I'm not
Hi, I'm trying to understand how to do background tasks from a plugin. I've copied the background task example from the pupil docs into a example_bt.py file in plugins, and I have had to add in the line
from background_helper import *
so the plugin can use Task_Proxy. However I keep getting the error:-
2019-03-13 10:19:00,066 - world - [ERROR] launchables.world: Process Capture crashed with trace: Traceback (most recent call last): File "launchables\world.py", line 596, in world File "launchables\world.py", line 391, in handle_notifications File "shared_modules\plugin.py", line 340, in add File "C:\Users\MYNAMEHERE\pupil_capture_settings\plugins\example_BT.py", line 23, in init self.proxy = Task_Proxy('Background', example_generator, args=(5., 3.), kwargs={'steps': 50}) File "shared_modules\background_helper.py", line 40, in init AttributeError: 'tuple' object has no attribute 'extend'
What am I misunderstanding/doing wrong?
@user-f27d88 were you able to do any progress with the bug fixing/ bundling?
@user-86c436 I will be fixing/ bundling before the weekend π
ok great π
fixed
how much focus (mm) the pupil camera have?
@user-86c436 timestamps are supposed to be ascending. Did you used the Fake Source in Capture? There is an open issue for that https://github.com/pupil-labs/pupil/issues/1391
@user-f27d88 no I did not. I simply clicked the R button in pupil capture...
@user-86c436 Did you contact to the pupil headset before you using pupil capture? Or you saw some gray frames when you are recording?
@user-f27d88 I'm sorry, I don't understand your questions. Have I contacted the headset in which way? And what kind of grey frames could/ should I have seen during recording?
@user-86c436 Please share your screenshot when you using pupil capture.
this is just before I would start recording + calibration
@user-86c436 Thank you, I will have a look at it tomorrow.
@user-f27d88 Looks like @user-86c436 is using the hmd calibration. The old hmd eyes implementation does reset time explicitly. Multiple time resets in a single recording can lead to non-monotonic timestamps. We can try to readjust the recorded timestamps. But the issue is with the old hmd eyes implementation and not with Capture. Maybe @fxlange can share a bit of his insight here, too.
@papr I actually have the problem with the old hmd-eyes package as well as with the new alpha of hmd-eyes
@user-86c436 Could you please share a recording made with the the alpha?
@papr of course: https://drive.google.com/open?id=1MKV2amkNEYbWpZpEmLqEUOUoyqHb13Eu
@user-86c436 Is the eye1 video still uploading? Also, the eye0 video/timestamps seem to be missing.
@papr Oh yes, sorry, the upload is not finished yet. About eye0: for some reason, that camera doesn't seem to work today. Capture tells me that the initialization failed. I will have to look into that problem, but I hope the missing data that don't prevent us from solving the timestamp problem?
@user-86c436 No, having the eye1 video/timestamps is enough to investigate the issue.
Ok. If it is of any help - I just did a recording without calibration (just looking around in a Unity scene in the project where I imported the hmd-eyes alpha) and this record can be opened by pupil player.
@user-86c436 Thank you, that helps. I will come back to you after looking into the details of your shared recording.
@papr Ok. Thank you a lot for looking into it!
@user-b64d72 I just got notified that your email to data@pupil-labs.com got flagged as spam. This should not happen anymore in the future.
@user-b64d72 Your recording is incomplete. Player is not able to open it since it does not contain any videos. My guess is that they were no transferred correctly to the hard drive when you copied the recording from the main system.
cant install drivers for cam set. pupil labs capture wont run it starts but then closes.
using windows 7
@user-4eb479 Windows 7 is not supported officially. Only Windows 10, macOS and Linux are.
thank you alot for the help!!!
@papr I just found an issue that seems to describe the same problem, according to your guesses: https://github.com/pupil-labs/pupil/issues/1449
@user-86c436 Thank you, I must have missed this one.
@user-54a6a8 Regarding your PR: This is great work! Unfortunately, I do not know how well it translate to our bundling environment. Bundling on Windows is so fragile that I really would prefer to not change the running system. Also, I do not want to start supporting two different installation procedures. Nonetheless, your PR is a valuable resource for people depending on running from source on Windows!
Last week, the aforementioned student said, "I just finished installing Pupil from source following the instructions on their website. I never want to do that again." With these new instructions it took him a fraction of the time and effort. In other words, adopting easier setup instructions will reduce the barrier to entry, which will improve the number and quality of PRs you get, which will improve the quality of the product and probably save you time in the long run.
What's your bundling environment?
@user-54a6a8 Very valid points! We use pyinstaller.
OK. Not today, but I'll try to run pyinstaller and see what problems pop up. Is the goal is to get a 7zip like on the release page? Or is there a different output that is desired?
@user-54a6a8 yes, that would be one of the main goals
A 7zip with an exe file for each application. Ideally, they would share their resources. This is currently not the case.
@user-54a6a8 Ideally, there would be one bat file that generates everything in one go: https://github.com/pupil-labs/pupil/blob/master/deployment/bundle.bat
There are positives and negatives to that. If you want pupil_player to use a new opencv feature but this version of opencv conflicts with pupil_capture then having them separate is best... but yes it's very inefficient.
@user-54a6a8 This would be very difficult to setup for running from source. Also, requiring multiple versions of the same lib should be avoided, generally.
Or better: Running from source already shares multiple resources. The closer the bundle behaviour is to running from source, the better.
OK I'll give it a shot. I'm pretty slow at these kinds of things (I'm juggling many projects), so if someone on your end feels inclined to attempt bundling with my PR then please don't wait for me.
Same here π
Ideally PMD would do something similar in roypy π¦
@user-1f392c Thank you! That is great ground work! Next step would be to read out the lens parameters. They are required for better 3d gaze estimation.
@user-86c436 @user-54a6a8 @user-97591f There should be *.time
files in the matching unity recording folders. Do you still have access to them?
@papr I don't think so, is that generated when recording from the pupil_plugin prefab via the inspector? We only record using the pupil_capture GUI (and later synchronize the events via LSL).
I can generate another invalid recording and to get you the *.time
files if you'd like.
@user-97591f no need, thank you. What data do you need to synchronize with lsl?
Pupil or/and gaze data?
@papr I believe both. One metric we're investigating is reaction time for our task. Although we have object-collision events using the left/right/gaze data from pupil, we've experienced considerable jitter when calculating reaction times from these events. We're working on reconstructing the reaction time using the pupil data. Other metrics that I may look at are saccadic gain, velocity, amplitude and latency. We're also interested in the gaze data but I'm having trouble with the offline gaze calibration - it requires the world video and we do not have that. And thank you for the fix for negative time jumps. I will test it out in the next few days.
@papr in regards to the lens parameters of the pico flexx. What do we need? Something similar to an optical lens, the map of peripheral distortion? I would assume that is dependent on the object distant plain as well.
@papr I've added a wrapper for ICameraDevice.getLensParameters()
, but I don't have access to the camera currently
It's up on github if you'd like to test it
@user-1f392c I will do so.
@papr first, thank you for that script! second, which folders do you mean with "unity recording folders"?
@user-86c436 Never mind if you are not using the data recorded by unity
ok - I'm not π
@user-86c436 What data do you looking to export from Player, btw? Just pupil data or gaze data as well?
@papr I actually only need the pupil diameter, which is pupil data
@user-86c436 ok, great! That means the correction script is sufficient. Please remember to run the offline pupil detection on the corrected recordings in order to get timestamp-corrected pupil data
@user-1f392c I was able to compile your roypy cython wrapper. With a few small changes it worked! This is soooo much better than roypy.
@user-1f392c Also, reading lens parameters from device works like a charm!
I changed a few Capture related things, e.g. delay device settings that are set via a slider. I might have broken the auto-exposure mode though. Not sure π¬
@papr using the exposure slider would cause a crash if used before toggling auto exposure, as init_ui()
appears to execute before init_device()
contrary to my initial expectations
Added a toggle to switch to the IR camera (allowing calibration using printed targets)
Hi, as of your docs, camera images are compressed to fit them through a single usb cable / usb bus. Can you estimate for me the portion of the world camera? How many MB / sec? For integration if the pico flexx camera, 3D point cloud data is about 4MB per sec minimum. I was wondering, while substituting the world camera with the pico flexx, could we still use pupil mobile to get data across?
@user-14d189 By Pupil Mobile, do you refer to the headset or the android app?
@papr I was referring to the android app. I want to estimate for my studies if subjects need to run around with a computer in a back pack or if we can use the android app on a moto Z3 play. If data transfer isn't the problem, I guess bottle neck will be the power supply. Pico Flexx uses 300mW in average.
@user-14d189 Pupil Mobile does not support the PicoFlexx as far as I know.
And if it does, it is not intentional.
You might be able to run a second application responsible for capturing the PicoFlexx stream, next to Pupil Mobile
@papr Currently I assess if it feasible. So I look into size data streams, power supply. It is a huge advantage to run it on a phone and not on a computer. I just get bits and pieces together.
@user-14d189 I am no expert on these low level details. I can just provide further, higher-level constraints.
Hi, I am having trouble trying to get the Task_proxy working. I am sure this is down to my inability to understand the thing, but before I decide to really invest my time in it, does the background task stuff work or is it still in developer prototype territory?
@user-a82c20 Hey, it is in active use and should be working. May I ask how you are planning on using it?
@papr Cool. Basically , I have a signal from a serial port (arduino device). I need to timestamp when that signal changes. So I need a constant reading of its output. I was thinking of continually running a signal reading script as a background task which can then report the change to the main plugin. I'm still very new to pupil-capture etc, but I like it. π
@user-a82c20 Even though Task_Proxy was originally meant to be used with Player, your use case justifies its usage in Capture.
I might have some time to write up a small example later.
Thank you. That would be wonderful. Great work btw.
@user-a82c20 https://gist.github.com/papr/0eaba2bc70755ffb1ad05385a3458a07
Is it intentional that settings are not restored when toggling a pluin?
@user-1f392c yes. Settings persistence is only implemented across different Capture sessions.
@papr Cool thanks. That is very helpful
the Pupil mobile eye tracking headset just arrived, can somebody help me with calibration?
just arrived from shapeways
How would I go about getting my eye tracking data into the web stack?
Real time?