πŸ’» software-dev


user-bab6ad 01 April, 2019, 09:39:29

hi everyone! I have a question where I did not really find the answer: I want to start a few plugins over the IPC backbone (to be exact the blink and fixation plugins (is saccades also a plugin, then that also)). I found in the source code that there exist a plugin call, but I am not sure what the endpoint is. Especially I want to make sure over IPC that these plugins are active when I start a recording (which I also do over a script)... Any help would be awesome ^_^

papr 01 April, 2019, 09:43:37

@user-bab6ad This is an example on how to start the Frame Publisher via the IPC: https://github.com/pupil-labs/pupil-helpers/blob/master/python/recv_world_video_frames.py#L32 Just change name and args appropriately for fixation and blink detector

user-bab6ad 01 April, 2019, 09:44:13

@papr perfect, thanks!

user-304e96 03 April, 2019, 08:18:59

Hi everyone, I have a problem with the pupil player: when I drop the recording folder in the program I see the eye camera, but I don't see the world camera. I only see a white background and the green circle of the eye. I am sure that the world camera was working when I made the recordings, as a matter of fact i can play the video "world.mp4" in the recording folder. This "world.mp4" is of 3,6 Gb. I made the recording 7 months ago and now I am using the 1.11 version of the player but I tried also the 1.8. Can you help me?

user-304e96 03 April, 2019, 09:45:57

Chat image

user-304e96 03 April, 2019, 09:49:42

Chat image

user-c1220d 03 April, 2019, 11:52:59

hi everyone, i would like ask which is the syncro priciple implemented in the syncronization in player. World camera is working at 60Hz (actually less, is it normal???) while eye cameras are 120Hz, so i wonder if there is a kind of interpolation in the world camera data or some samples from the eye camera are lost

papr 03 April, 2019, 12:21:37

@user-c1220d Each process (world and eyes) records their own video with their own timestamps (using a synchronized clock). Later, Player correlates the eye timestamps to the world timestamps, i.e. it maps each eye timestamp to its closest world timestamp. At 60Hz world and 120Hz eye frame rate this results in assigning two eye timestamps to each world timestamp on average. The gaze visualizer displays all gaze data (whose timestamps are inferred from the eye timestamps) that is correlated to the currently displayed frame in Player. There is no data dropped or lost.

The frame rate set in the camera settings is a rough upper bound. If your computer resources are strained, e.g. if you run the fingertip detection without GPU acceleration, then the process will start dropping frames.

papr 03 April, 2019, 12:22:07

@user-304e96 if you say that you can play the video, what do you mean by that? Do you mena by using e.g. VLC?

user-304e96 03 April, 2019, 12:28:42

@papr Yes, I use VLC. Anyway I solved the problem: in the folders there were some mistaken files that I eliminated, now the recordings work. (The mistaken file maybe were generated when i zipped the folders) Thank you.

user-54376c 04 April, 2019, 12:51:35

As you are really open source friendly, would it be a possibility that you release the source code of the Pupil Mobile app? πŸ˜ƒ

wrp 04 April, 2019, 13:00:16

@user-54376c the PM Android app will remain closed source. While we would like to make as many things as we can open, it is not possible for us (from a business and code perspective) to open source PM Android app.

user-54376c 04 April, 2019, 13:07:20

Alright, thanks for the quick answer!

mpk 04 April, 2019, 15:33:52

@user-54376c the app does have an open network protocoll so you can write clients and also other android apps to get the app data!

user-54376c 04 April, 2019, 16:14:43

Yeah, we were just thinking of extending it for a project.

user-1ddb42 08 April, 2019, 22:57:49

Hello πŸ˜ƒ

user-1ddb42 08 April, 2019, 23:03:52

Could anyone please help me and my college? We can't seem to make pupil capture recognise out Inter Realsense D400 cameras on ubuntu nor window.

user-41f1bf 10 April, 2019, 01:12:48

Hi @user-1ddb42 , I am afraid Realsense is windows only

user-b5c63f 11 April, 2019, 04:10:26

Hi πŸ˜ƒ

Does anyone happen to have some documentation or an API for the methods specified in the plugin guide (github.com/pupil-labs/pupil-docs/blob/master/developer-docs/plugin-guide.md)?

Namely, the methods: cleanup(self) deinit_ui(self) init_ui(self) __init__(self, g_pool)

user-1f392c 11 April, 2019, 04:46:41

@user-b5c63f The Plugin class has some documentation https://github.com/pupil-labs/pupil/blob/master/pupil_src/shared_modules/plugin.py#L25

user-e6aab8 11 April, 2019, 05:18:29

Hi,

user-e6aab8 11 April, 2019, 05:24:15

Requesting help to capture most recent world frame without buffering. I have managed to acquire real time stream for an external application, however when I process the images (due to processing requirements I can only process 1 frame per .8 seconds) delay starts increasing. wondering if there's a way I could acquire the most recent frame after I have processed the frame at hand??? any help would be appreciated...

papr 11 April, 2019, 06:19:32

@user-e6aab8 When you are done with the first frame, try receive all newly available frames, drop all but the last one and process it.

user-e6aab8 12 April, 2019, 00:52:28

thanks Papr for your response; I, in fact, am trying this however probably not the right way, any possibility of referring me to some example?

papr 12 April, 2019, 09:09:53

@user-e6aab8 you can send me your code and I will have a short look at it

user-d75a35 12 April, 2019, 22:22:30

do you know where the bundled software app looks for modules to upload for plugins.? I'm trying to import tensorflow and matplotlib and even though they are both installed the plugin won't upload because it says there are no modules named tensoflow and matplotlib . can anyone help me out?

UPDATE: i was able to resolve the above error by following the instructions here: https://github.com/pupil-labs/pupil/issues/646#issuecomment-282051794 but now i'm getting an error that "no module named xml.dom found" even thought it comes with python?? any help would be really appreciated!!

user-1f392c 15 April, 2019, 00:17:58

@user-d75a35 did you change the path to python3's dist-packages instead of python2 as in the comment?

user-e6aab8 15 April, 2019, 02:14:07

thanks papr, OI

user-e6aab8 15 April, 2019, 02:14:31

I've sent the code to you through direct message

user-26fef5 15 April, 2019, 14:58:27

Hi there, I got a quick question regarding reading realsense data from the ipc backbone, especially through ZMQ and the framepublisher plugin. Is the depth_frame part of any dictionary or frame that is published ? I get the frame.world and can extract that frame, but i dont see any depth_frame related key (or am i missing something)?

papr 15 April, 2019, 15:10:25

@user-26fef5 No, this data is not published via ZMQ. You will have to extend this example plugin [1] to publish the data, similar to the Frame_Publisher plugin.

[1] https://gist.github.com/papr/0f13943e2aebd768ab6b1508d466caae

user-26fef5 15 April, 2019, 15:10:57

I see. Thanks for the Info

user-d75a35 15 April, 2019, 17:51:41

hey @user-1f392c i did

user-1f392c 15 April, 2019, 23:59:59

@user-d75a35 just to confirm, you don't have any modules/scripts with the same name xml?

user-54a6a8 18 April, 2019, 14:57:46

@papr Let me know if you have a moment to chat about the negative timediffs when going binocular -> monocular.

user-a6cc45 23 April, 2019, 18:48:14

Hi, I'm making a custom plugin for Pupil Player and I'm wondering how can I access the directory path of recording which was dropped to Player?

For example: I'm have recording \HOME\recordings\2019_03_25\002 and I need this path in my custom plugin for reading exported data from \HOME\recordings\2019_03_25\002\exports\001\surfaces

papr 23 April, 2019, 19:18:39

@user-a6cc45 g_pool.rec_dir

user-a6cc45 24 April, 2019, 09:57:53

Hi, I want to import "reportlab" module in my plugin, so I installed it (in c:\users\jolka\appdata\local\programs\python\python36\lib\site-packages (3.5.19)) by "pip install reportlab" command but I get error while running Pupil Player: "No module named: 'reportlab' " How can I solve this problem (on Windows)?

papr 24 April, 2019, 10:26:48

@user-a6cc45 are you running from bundle?

user-a6cc45 24 April, 2019, 10:42:19

Yes, I have my plugin file in c:\users\jolka\pupil_player_settings\plugins

papr 24 April, 2019, 10:45:11

Please install report lab into the same folder @user-a6cc45

user-a6cc45 24 April, 2019, 11:28:02

I tried to install it using this command: pip install --target=C:\Users\Jolka\pupil_player_settings\plugins reportlab (I also added to PYTHONPATH this directory)

and now I have different errors: player - [WARNING] plugin: Failed to load 'Pillow-6.0.0.dist-info'. Reason: 'No module named 'Pillow-6'' player - [WARNING] plugin: Failed to load 'reportlab-3.5.19.dist-info'. Reason: 'No module named 'reportlab-3''

papr 24 April, 2019, 11:30:19

@user-a6cc45 The bundle is an isolated python environment. You will have to install all dependencies for reportlab into the plugins folder.

user-88b739 24 April, 2019, 15:33:11

Hello, i don't if it was asked before but it is possible to get 3d diameter of pupil in unity application with 2d calibration, because 3d calibration did only mess for us... Like subscription to topic or etc... Thank you for any answer πŸ˜ƒ

papr 24 April, 2019, 15:40:36

@user-88b739 Please checkout the hmd-eyes-alpha which supports 3d calibration properly

user-88b739 24 April, 2019, 15:42:42

@papr Thank you for answer! Yeah i was browsing the branch, but problem is here, i am using pupil-labs eye trackers for htc Vive (VR) and it's for my final thesis and deadline is near (few days) and i got already some implementations for 2d calib (such as area of interest), not sure if i can easily just switch 3d calib and it will work as 2d

papr 24 April, 2019, 15:43:47

@user-88b739 ok, I understand. With 3d diameter, you mean the pupils' diameters in mm instead of pixels, correct?

papr 24 April, 2019, 15:46:21

Technically, you can run the 3d pupil detection (giving you 3d pupil diameter in mm) while running the 2d HMD calibration.

user-88b739 24 April, 2019, 15:56:44

@papr what i meant, or as i understand it... you are right i mean 3d diameter which is in mm instead of 2d which is in arbitrary units, because i wan't to get rid of bad calculation of diameter caused by angle of my eye, or where i'm looking at

user-88b739 24 April, 2019, 15:57:52

to avoid this -> "Imagine that a participant looks directly at the lens of a video- based eye tracker. The pupil is then recorded as a near-perfect circle. Now imagine that the participant makes an eye movement to the right, thus causing the eye ball to rotate, changing the angle from which the eye tracker records the pupil, and causing the horizontal diameter of the pupil (as recorded) to decrease. In other words, pupil size as recorded by the eye tracker decreases, even though pupil size really did not change."

user-88b739 24 April, 2019, 16:00:30

@papr Unity -> in code i'm subscribing to topic by PupilTools.SubscribeTo("pupil."); //or "gaze" but it is returning only 2d diameter in those arbitrary units

papr 24 April, 2019, 19:35:13

@user-88b739 I think either hmd-eyes or the hmd calibration plugin enables 2d detection. You need to set it to 3d mode afterwards manually.

user-88b739 25 April, 2019, 05:32:56

@papr Can i set it to 3D and still use it as 2D, for gaze point etc.? Because iam using it 2d as raycast to hit some choosen object (aoi)

papr 25 April, 2019, 06:10:21

@user-88b739 yes, the mapping uses the back projected 2d norm_pos of the pupil datum to generate a 2d gaze point, while the Pupil datum has all 3d fields

user-5f8042 25 April, 2019, 14:31:33

Hi, when working with pupil diameter. Do you extract the baseline pupil diameter to each sample or to the pupil diameter average of the period you are analyzing? Thanks

user-a6cc45 26 April, 2019, 07:59:25

Hello, Did anyone used matplotlib in custom plugin? I'm having a problem with this module while running from bundle and I need help.

papr 26 April, 2019, 08:26:41

@user-a6cc45 Based on your last comment regarding the missing _path module: The bundle only includes the built-in Python modules that it requires. If _path is a built-in module but is usually not required by the bundle, then Matplotlib will not work with the bundle.

papr 26 April, 2019, 08:27:07

@user-a6cc45 You will only be able to use Matplotlib if you run from source.

user-a6cc45 26 April, 2019, 08:39:11

@papr thank you for response, I will try run from source πŸ˜‰

papr 26 April, 2019, 08:39:34

@user-a6cc45 I hope you are not using Windows. If you do, good luck!

user-a6cc45 26 April, 2019, 08:42:35

@papr unfortunately I do use Windows 😜
Is it a good idea to install VirtualBox and run from source on Linux ?

papr 26 April, 2019, 08:43:15

@user-a6cc45 You might not be able to access the cameras via the Virtual Machine πŸ˜•

papr 26 April, 2019, 08:43:38

But booting Linux from a USB-Stick might work

user-3f53d1 26 April, 2019, 12:04:11

@papr Is there an easy way/built in way to receive camera images in pupil capture (i.e. world frame) from a source not run by pupil itself? e.g. Instead of using the realsense2_backend, I access and set up realsense with my own script, and pass the colour frame data to pupil capture somehow?

papr 26 April, 2019, 13:14:20

@user-3f53d1 Not yet, but we will have a backend soon that is compatible with the Frame Publisher format

user-54a6a8 26 April, 2019, 13:33:24

@papr I'd like to figure out the LSL plugin today if possible. Are the monocular data and binocular data effectively different timeseries? If so then I think they would be better represented in different streams.

papr 26 April, 2019, 13:33:47

@user-54a6a8 No, they are the same data stream

papr 26 April, 2019, 13:34:30

@user-54a6a8 Pupil data is placed in a queue, and Capture will try to build pairs.

user-3f53d1 26 April, 2019, 13:34:56

@papr nice! In the meantime - any recommendations on accessing gaze data in realsense2_backend? I'm trying to run the get_distance method on the gaze point, but gaze data is not accessible as an event on the backend.

user-54a6a8 26 April, 2019, 13:35:12

@papr So why does the timestamp jump backwards in time when going from a binocular sample to a monocular sample?

papr 26 April, 2019, 13:35:56

@user-54a6a8 probably because the mapping is buggy? I do not know. This is the matching algorithm: https://github.com/pupil-labs/pupil/blob/master/pupil_src/shared_modules/calibration_routines/gaze_mappers.py#L95-L140

user-54a6a8 26 April, 2019, 13:39:25

OK thanks I'll see what I can do. Do you happen to have a mode to simulate eye data so you can test without having a pair of eyeballs in the loop?

papr 26 April, 2019, 13:41:00

@user-54a6a8 no, unfortunately, not.

papr 26 April, 2019, 13:41:43

But this should be easy to build. Make a Python script that reads known pupil data and publishes it using the pupil topic

user-54a6a8 26 April, 2019, 13:42:27

Alternatively, is this same code called during offline gaze mapping? (not that I've figured out how to use our calibration offline...)

papr 26 April, 2019, 13:45:52

@user-54a6a8 It is, but it might behave slightly different since the pupil data is published much faster

user-a6cc45 27 April, 2019, 13:33:12

Hi, I'm trying to run Pupil Player from source on Windows, I've already installed all dependencies described in dev docs, but i'm getting this error:

C:\work\pupil\pupil_src>python main.py player
player - [ERROR] launchables.player: Process player_drop crashed with trace:
Traceback (most recent call last):
  File "C:\work\pupil\pupil_src\launchables\player.py", line 703, in player_drop
    import update_methods as um
  File "C:\work\pupil\pupil_src\shared_modules\update_methods.py", line 20, in <module>
    from scipy.interpolate import interp1d
  File "C:\Python36\lib\site-packages\scipy\interpolate\__init__.py", line 175, in <module>
    from .interpolate import *
  File "C:\Python36\lib\site-packages\scipy\interpolate\interpolate.py", line 20, in <module>
    import scipy.linalg
  File "C:\Python36\lib\site-packages\scipy\linalg\__init__.py", line 190, in <module>
    from .misc import *
  File "C:\Python36\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
    from .blas import get_blas_funcs
  File "C:\Python36\lib\site-packages\scipy\linalg\blas.py", line 214, in <module>
    from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.

Any ideas?

user-a6cc45 27 April, 2019, 13:37:27

when I run Pupil Capture i get different error:

 C:\work\pupil\pupil_src>python main.py capture
world - [INFO] launchables.world: Application Version: 1.11.50
world - [INFO] launchables.world: System Info: User: Jolka, Platform: Windows, Machine: jola-laptop77, Release: 10, Version: 10.0.16299
world - [INFO] pupil_detectors.build: Building extension modules...
cl : Command line warning D9025 : overriding '/W3' with '/w'
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9025 : overriding '/W3' with '/w'
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9025 : overriding '/W3' with '/w'
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9025 : overriding '/W3' with '/w'
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1104
world - [ERROR] launchables.world: Process Capture crashed with trace:
Traceback (most recent call last):
  File "C:\work\pupil\pupil_src\launchables\world.py", line 132, in world
    import pupil_detectors
  File "C:\work\pupil\pupil_src\shared_modules\pupil_detectors\__init__.py", line 18, in <module>
    build_cpp_extension()
  File "C:\work\pupil\pupil_src\shared_modules\pupil_detectors\build.py", line 32, in build_cpp_extension
    ret = sp.check_output(build_cmd).decode(sys.stdout.encoding)
  File "C:\Python36\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "C:\Python36\lib\subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\Python36\\python.exe', 'setup.py', 'install', '--install-lib=C:\\work\\pupil\\pupil_src\\shared_modules']' returned non-zero exit status 1.

world - [INFO] launchables.world: Process shutting down. 
user-a6cc45 27 April, 2019, 13:40:01

I tried to rebuild setup by C:\work\pupil\pupil_src\shared_modules\pupil_detectors>python setup.py build but it didn't work (see file in attachment)

setup_build_error.txt

user-a6cc45 27 April, 2019, 14:05:11

I've noticed that in error logs there isboost_python3-vc140-mt-1_64.lib file name but in MSVC configuration in C:\work\boost\tools\build\src\user-config.jam i have:

# -------------------
# MSVC configuration.
# -------------------

# Configure msvc (default version, searched for in standard locations and PATH).
# using msvc ;

# Configure specific msvc version (searched for in standard locations and PATH).
using msvc : 14.1 ;

I thought that it's about version and I rebuilt setup again but i got: LINK : fatal error LNK1257: code generation failed error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1257

papr 27 April, 2019, 14:06:36

@user-a6cc45 please try to use an older scipy version, which one are you currently using?

user-a6cc45 27 April, 2019, 14:21:02

@papr scipy-1.2.1

user-a6cc45 27 April, 2019, 14:42:53

@papr you were right, I did pip install scipy==1.2.0 and Pupil Player started correctly, but after dropping recording dir it returned error (see attachment)

player_error.txt

papr 27 April, 2019, 14:47:04

@user-a6cc45 could you try 0.18?

papr 27 April, 2019, 14:49:02

@papr never mind. This issue is not related to scipy

user-a6cc45 27 April, 2019, 16:11:27

I tried rebuild boost.python and while running b2 --with-python link=shared address-model=64 I got many warnings like Unknown compiler version - please run the configure tests and report the results C:\work\boost\boost/python/detail/caller.hpp(55): warning C4244: 'return': conversion from 'Py_ssize_t' to 'unsigned int', possible loss of data but build was successful...

then when I try: python setup.py build I get errors - see attached file

build_setup.txt

user-a6cc45 28 April, 2019, 10:18:04

Can someone help me fix my problem with running from source on Windows (described above)? Please πŸ˜ƒ

user-5d12b0 28 April, 2019, 17:49:50

Hi @user-a6cc45, have you tried the instructions I provided in my PR? I just updated them recently to make them a little more robust. You'll need to checkout my fork/branch for this to work. https://github.com/pupil-labs/pupil/pull/1455

papr 28 April, 2019, 17:50:34

Hi, not yet. Unfortunately, I won't be able to check it out before the end of next week πŸ˜•

user-5d12b0 28 April, 2019, 17:50:53

@user-8779ef If you have time, I'd really like your opinion on this issue: https://github.com/pupil-labs/pupil/issues/1493

user-5d12b0 28 April, 2019, 17:59:10

@papr The previous message was for @user-a6cc45 .

I understand that you can't merge the build system updates until it is compatible with the deployment system. Unfortunately I have a lot less experience with deployment than with building, so this is a difficult job for me with no tangible benefit (I would never use the deployment system). I'm hoping that someone on your end will find time to work it out.

user-a6cc45 28 April, 2019, 18:17:11

@user-5d12b0 thank you for response, I'll try it asap πŸ˜ƒ

user-8779ef 29 April, 2019, 11:29:32

@user-5d12b0 Gotcha. Today is a busy day, but I'll try and spend some cycles on this tomorrow.

user-8779ef 29 April, 2019, 11:30:05

@user-5d12b0 Do you have any test data or something with which you're able to test the logic offline?

user-54a6a8 29 April, 2019, 14:17:55

@user-8779ef : https://gist.github.com/cboulay/7b13d074730d454c9a3e29e91c0a8956 This uses a data folder that was recorded while running hmd-eyes. The calibration was done while recording, so the notification data has the calibration info.

user-54a6a8 29 April, 2019, 14:18:20

oh wow, any way to make my face smaller in the discord app?

papr 29 April, 2019, 14:19:02

πŸ˜… Not that I know of

user-54a6a8 29 April, 2019, 14:23:11

@papr Other than the method in my script above, is there a way to do "Offline Calibration" for hmd-eyes data? i.e. if there is no world video?

papr 29 April, 2019, 14:25:49

@user-54a6a8 Currently not. We are planning on being able to stream the POV of the HMD to Capture and record it in Capture. This way one gets a world video and one can use manual annotations to define reference locations.

papr 29 April, 2019, 14:26:42

Additionally, one could add a feature to offline calibration to read the calibration data notification for reference locations

user-54a6a8 29 April, 2019, 14:27:18

Is that guaranteed to always be stored somewhere?

user-54a6a8 29 April, 2019, 14:27:43

If someone calibrates before recording, are the notifications still saved?

user-8779ef 29 April, 2019, 14:29:10

@papr That's a sexy want. The uncompressed video will be massive, and it will be a challenge to compress the POV in real-time without introducing latency. I hope it works, though πŸ˜ƒ

user-54a6a8 29 April, 2019, 14:32:15

@papr Really what I would like to be able to do is re-process the eye video offline to get better pupil data (using better ROI, thresholds, etc) and to re-do the calibration with the re-processed pupil data. For that workflow it is absolutely necessary to record in pupil capture during calibration. Is that currently a best-practices recommendation? (If it isn't, then there's not much point in adding the offline re-calibration to Pupil Player)

user-a6cc45 29 April, 2019, 14:44:05

@user-5d12b0 I've followed your instructions on https://github.com/pupil-labs/pupil/pull/1455 but while installing pupil I get the following error - see attachment

installing_pupil.txt

user-a6cc45 29 April, 2019, 14:46:44

should I change this line:

to

?

user-54a6a8 29 April, 2019, 14:49:08

For my instructions to work, you will have to at least check out my branch. You can do that with git remote add cboulay https://github.com/cboulay/pupil.git; git fetch cboulay; git checkout cboulay/win_vcpkg_build You'll probably also want to merge in some other changes: git merge cboulay/build_when_necessary

user-54a6a8 29 April, 2019, 14:50:26

But, you'll still get that error. It's specifically described in the instructions but it's buried deep and is just a small link. Read here: https://github.com/pupil-labs/pupil/issues/1331#issuecomment-430418074

user-54a6a8 29 April, 2019, 14:57:30

I've updated the instructions with the above details.

user-a6cc45 29 April, 2019, 14:57:37

First command worked, but second gave error:

(pupil) C:\Users\Jolka\pupil>git checkout cboulay/win_vcpkg_build
error: pathspec 'cboulay/win_vcpkg_build' did not match any file(s) known to git

:/

user-54a6a8 29 April, 2019, 14:58:43

I may have typed the git command wrong. I was going from memory. Hold on...

user-54a6a8 29 April, 2019, 15:00:12

I maybe forgot a git fetch cboulay in there

user-d230c0 29 April, 2019, 15:57:39

hello everyone i just started development in pupil and would like some guidance i would be very grateful if anyone is able to help

user-e08fba 29 April, 2019, 15:58:57

I can try to help

user-d230c0 29 April, 2019, 15:59:17

would u mind if i send you i private message?

user-e08fba 29 April, 2019, 15:59:24

Yea

user-e08fba 29 April, 2019, 15:59:42

You can

user-54a6a8 29 April, 2019, 16:06:46

@user-a6cc45 I'm going to close discord soon. How did it go?

user-a6cc45 29 April, 2019, 16:07:08

@user-54a6a8 I don't know why pupil player shows error about not valid recording when I drop recording directory to it :/

user-54a6a8 29 April, 2019, 16:11:23

@user-a6cc45 Are you using hmd-eyes? You can probably search the history in that channel and find the conversation. The short version is that in the old version, running hmd-calibration would reset the pupil clock, so the timestamps have a large negative jump and pupil player doesn't know what to do with it. Pablo wrote a script to correct such recordings.

user-54a6a8 29 April, 2019, 16:14:17

Found it: https://gist.github.com/papr/c945076fa0fbea9c679646a335509486

user-a6cc45 29 April, 2019, 16:50:49

@user-54a6a8 if hmd-eyes means using AR or VR that my response is - no, I don't use it.

papr 29 April, 2019, 16:53:07

@user-a6cc45 please do not drag the video file onto player but the folder containing it

user-a6cc45 29 April, 2019, 16:55:17

@papr I'm dragging whole recording directory and when I run bundle version it works, but when I run from source - it doesn't 😦

user-a6cc45 29 April, 2019, 18:50:03

The error message in Pupil Player window (after dropping rec_dir into it) says: Oops! That was not a valid recording..

user-d230c0 29 April, 2019, 18:58:54

is there i central database where people put out their code they make for pupil

user-d28f08 29 April, 2019, 20:27:37

@user-54a6a8 thank you πŸ˜ƒ as jolkaf I've been struggling to run pupil from source for 2 days so I followed your instructions and it works. Now the issue is very low performance - in bundle version I have 720p 30fps on world and 1 eye camera easily, but in source version world cam has 15 fps and eye cam 1-2 fps. Is it driver related or something?

user-a6cc45 30 April, 2019, 13:53:58

@user-d28f08 Did you have that problem with not valid recording as I descriibed above?

user-d28f08 30 April, 2019, 14:57:37

@user-a6cc45 I have not tried working with pupil player yet, I'll give you feedback later

user-54a6a8 30 April, 2019, 15:50:20

@user-d28f08 In my instructions I don't include pyrealsense. You might want to try pip install pyrealsense2 and see if that helps.

user-54a6a8 30 April, 2019, 15:51:25

@user-a6cc45 Are you using a debugger? Can you break before that error and see why it thinks it is not a valid recording?

user-d28f08 30 April, 2019, 16:17:43

@user-54a6a8 it helped, now it's ok. I have another problem - when I choose 2D or 3D detection, the eye cam window closes and I cannot open it again; eye cam works only when detection is disabled.

user-54a6a8 30 April, 2019, 16:21:22

My student is encountering the same problem. let me look into it...

user-54a6a8 30 April, 2019, 16:25:23

It's working for me on my computer. One difference with his setup is that he couldn't get PyCharm to accept the PATH variable for some reason. Even if he sets it exactly as I did, the console still reports a different path when checking with os.getenv('PATH')

user-54a6a8 30 April, 2019, 16:26:15

I've also never installed anything pyrealsense2 related, while he did (then pip uninstalled, but maybe there's something else lingering...)

user-d28f08 30 April, 2019, 16:26:27

2D detection is working somehow, I just need to start pupil capture with detection disabled and then choose 2d

user-d28f08 30 April, 2019, 16:26:56

3D is not working this way

user-54a6a8 30 April, 2019, 16:44:37

@user-d28f08 As I didn't use pyrealsense2, I didn't add explicit instructions to build the cython_methods module. Just now I've added those instructions. However, that would have stopped you sooner if that was the problem. You probably built it during the first launch without realizing. So I don't think that's it.

user-54a6a8 30 April, 2019, 16:45:36

I have the Vive add-on. It's working for me right now with 3d detection. All I can suggest is that you try to use a debugger and figure out why the eye windows are closing.

user-d28f08 30 April, 2019, 16:47:54

Futher check - 2D detection is working even when I start capture with it, the problem is only with 3D. I'll try to use a debbuger as you suggest

user-a6cc45 30 April, 2019, 16:56:24

@user-54a6a8 my logs after dropping rec_dir:

(pupil) C:\Users\Jolka\pupil\pupil_src>python main.py player
player - [INFO] video_capture: Install pyrealsense to use the Intel RealSense backend
player - [INFO] cython_methods.build: Building extension modules...
player - [INFO] launchables.player: Session setting are from a  different version of this app. I will not use those.
player - [ERROR] player_methods: Could not read info.csv file: Not a valid Pupil recording.
player - [ERROR] launchables.player: 'C:\Users\Jolka\recordings\2019_03_25\002' is not a valid pupil recording

How can I get more detailed info? In PyCharm?

user-54a6a8 30 April, 2019, 17:11:20

Does the folder have info.csv?

user-54a6a8 30 April, 2019, 17:12:33

But @user-a6cc45 , yes I would use PyCharm to debug. You should be able to use any IDE that you like. Getting the paths set correctly is the hardest part.

user-a6cc45 30 April, 2019, 17:12:37

Chat image

user-a6cc45 30 April, 2019, 17:13:46

info.csv content

Chat image

user-54a6a8 30 April, 2019, 17:14:20

I added the instruction to pip install csv_utils recently. Maybe you followed the instructions before I added csv_utils to the list of pip packages that need to be installed.

user-a6cc45 30 April, 2019, 17:15:47

@user-54a6a8 I already have it installed ; )

user-a6cc45 30 April, 2019, 17:24:22

player.log content:

2019-04-30 19:23:18,675 - MainProcess - [DEBUG] root: Unknown command-line arguments: []
2019-04-30 19:23:18,675 - MainProcess - [DEBUG] os_utils: Disabling idle sleep not supported on this OS version.
2019-04-30 19:23:20,045 - player - [INFO] video_capture: Install pyrealsense to use the Intel RealSense backend
2019-04-30 19:23:20,061 - player - [INFO] cython_methods.build: Building extension modules...
2019-04-30 19:23:21,381 - player - [INFO] launchables.player: Session setting are from a  different version of this app. I will not use those.
user-5d12b0 30 April, 2019, 17:30:04

That looks fine. You’ll have to put a break mark before the log line where it fails to load the csv, then try to figure out why it can’t load it.

user-a6cc45 30 April, 2019, 17:56:30

Chat image

user-a6cc45 30 April, 2019, 17:57:37

It somehow cannot invoke read_key_value_file method

Chat image

user-54a6a8 30 April, 2019, 18:07:13

It's probably the version of csv_utils

user-a6cc45 30 April, 2019, 18:07:28

I have installed csv-utils-0.1.1

user-54a6a8 30 April, 2019, 18:10:43

oh wait. There is a csv_utils in pupil itself. Maybe we should not install a separate csv_utils.

user-54a6a8 30 April, 2019, 18:11:06

pip uninstall csv_utils

user-54a6a8 30 April, 2019, 18:11:08

Sorry about that.

user-54a6a8 30 April, 2019, 18:11:33

I had added that line after receiving an error about not having csv_utils, but that was probably a path error (not finding the internal csv_utils) rather than a missing library.

user-a6cc45 30 April, 2019, 18:16:30

@user-54a6a8 You're right, it worked, but I got:

player - [INFO] launchables.player: Session setting are from a  different version of this app. I will not use those.
player - [INFO] launchables.player: Starting new session with 'C:\Users\Jolka\recordings\2019_03_25\002'
player - [INFO] update_methods: Updating meta info
player - [INFO] update_methods: Checking for world-less recording
player - [INFO] video_capture: Install pyrealsense to use the Intel RealSense backend
player - [INFO] cython_methods.build: Building extension modules...
player - [ERROR] launchables.player: Process Player crashed with trace:
Traceback (most recent call last):
  File "C:\Users\Jolka\pupil\pupil_src\launchables\player.py", line 91, in player
    from plugin_manager import Plugin_Manager
  File "C:\Users\Jolka\pupil\pupil_src\shared_modules\plugin_manager.py", line 14, in <module>
    from calibration_routines import Calibration_Plugin, Gaze_Mapping_Plugin
  File "C:\Users\Jolka\pupil\pupil_src\shared_modules\calibration_routines\__init__.py", line 13, in <module>
    from .screen_marker_calibration import Screen_Marker_Calibration
  File "C:\Users\Jolka\pupil\pupil_src\shared_modules\calibration_routines\screen_marker_calibration.py", line 28, in <module>
    from .finish_calibration import finish_calibration
  File "C:\Users\Jolka\pupil\pupil_src\shared_modules\calibration_routines\finish_calibration.py", line 19, in <module>
    from .optimization_calibration import bundle_adjust_calibration
  File "C:\Users\Jolka\pupil\pupil_src\shared_modules\calibration_routines\optimization_calibration\__init__.py", line 13, in <module>
    from .calibration_methods import bundle_adjust_calibration
ImportError: DLL load failed: The specified module could not be found.

player - [INFO] launchables.player: Process shutting down.
user-54a6a8 30 April, 2019, 19:00:29

@user-a6cc45 The DLL load failed is because the dll that it's trying to load can't find a DLL it depends on. This is because you're missing something from the PATH. Are you running this from a terminal window or from PyCharm (or other IDE)?

user-54a6a8 30 April, 2019, 19:03:13

@user-d28f08 My student is having the exact same problem; 2D works but 3D doesn't. We've narrowed it down to launchables/eye.py when g_pool.pupil_detector = new_detector(g_pool), where new_detector is a reference to the Detector_3D class. So trying to init the Detector_3D class crashes the eye process. One difference between the student's computer and my computer is that I am using an NVidia GPU and he is on an AMD GPU, so he had a different version of PyTorch than I did (not GPU-enabled). Are you using an AMD GPU? Or at least a non-nvidia GPU?

user-d28f08 30 April, 2019, 19:04:20

I'm on Nvidia GeForce

user-54a6a8 30 April, 2019, 19:04:30

well that's not it.

user-54a6a8 30 April, 2019, 19:05:26

The other possibility is that I recently rebased win_vcpk_build against pupil master. I think the computer I'm on is using a slightly older version of the main pupil source...

user-54a6a8 30 April, 2019, 19:08:23

Never mind, they are using the same version.

user-54a6a8 30 April, 2019, 19:08:47

I don't know, I'm stumped as to why it's not working. Unfortunately the crash is happening in the compiled module so I can't debug it.

user-d28f08 30 April, 2019, 19:15:40

I can use 2D detection as well for my project. In bundle version 3D detection works without any problem. I've noticed that I'm using 1.11.4 bundle version and 1.12.13 source; maybe some differences between these versions cause this problem.

user-a6cc45 30 April, 2019, 19:19:50

@user-54a6a8 I used PyCharm, but later, when I tried to run in Anaconda Prompt the error was the same

user-54a6a8 30 April, 2019, 19:24:26

@user-a6cc45 Make sure your vcpkg\installed\x64-windows\bin folder is on the PATH (echo %PATH% to check)

user-54a6a8 30 April, 2019, 19:24:59

And, from your anaconda prompt, use run_capture.bat as this also modifies the PATH

user-54a6a8 30 April, 2019, 19:27:40

Let me know if that still doesn't work. If it does work then copy the result of echo %PATH% to your clipboard and figure out how to add it to PyCharm (if you have need to debug in PyCharm)

user-54a6a8 30 April, 2019, 19:29:06

@user-d28f08 We've narrowed it down to this line: https://github.com/pupil-labs/pupil/blob/master/pupil_src/shared_modules/pupil_detectors/detector_3d.pyx#L64

user-54a6a8 30 April, 2019, 19:33:04

@user-d28f08 Unfortunately that is initializing a class that is defined almost entirely in C++. That's going to be pretty hard to debug. Let's hope when @papr gets to work tomorrow morning that he has some insight because maybe this is something they've seen before.

user-d28f08 30 April, 2019, 19:34:13

@user-54a6a8 thank you for information, I'm looking forward for futher info

user-a6cc45 30 April, 2019, 19:39:46

@user-54a6a8 It worked - hallelujah! πŸ˜„ I've checked my PATH and added <vcpkg\installed\x64-windows>\bin to it, and ran run_capture.bat as you said. Thank you very much for helping me!

I have one more question: where should I put python file with my Plugin? in shared_modeules folder?

user-54a6a8 30 April, 2019, 19:40:41

You're making a new plugin? I think they go in pupil\capture_settings\plugins (or pupil\player_settings\plugins)

user-54a6a8 30 April, 2019, 19:43:54

I'll be around tomorrow. Good luck!

user-a6cc45 30 April, 2019, 19:46:57

@user-54a6a8 sorry, my bad, I put my plugin in wrong folder πŸ˜› You're right, it should be in <home dir>\pupil\player_settings\plugins

End of April archive