Coder Social home page Coder Social logo

pupil-labs / pupil Goto Github PK

View Code? Open in Web Editor NEW
1.4K 112.0 671.0 30.6 MB

Open source eye tracking

Home Page: https://pupil-labs.com

License: GNU Lesser General Public License v3.0

Shell 0.07% Python 99.91% PowerShell 0.02%
pupil eye-tracking open-source

pupil's Introduction

Pupil

Pupil Labs - Pupil Core software: open source eye tracking platform.

Open source eye tracking platform.

Pupil is a project in active, community driven development. Pupil Core mobile eye tracking hardware is accessible, hackable, and affordable. The software is open source and written in Python and C++ when speed is an issue.

Our vision is to create tools for a diverse group of people interested in learning about eye tracking and conducting their eye tracking projects.

Chat with us on Discord.

Users

Download the latest Pupil Core Apps: Pupil Capture, Pupil Player, Pupil Service

You don't need to know how to write code to use Pupil. Download the latest apps!

Read the Pupil Core user guide.

Developers

There are a number of ways you can interact with Pupil Core software as a developer:

  • Use the API: Use the network based real-time API to communicate with Pupil over the network and integrate with your application.
  • Develop a Plugin: Plugins are loaded at runtime from the app bundle. Note: if your plugin requires Python libraries that are not included in the application bundle, then you will need to run from source.
  • Run from Source: Can't do what you need to do with the network based api or plugin? Then get ready to dive into the inner workings of Pupil and run from source!

All setup and dependency installation instructions are contained in this repo. All other developer documentation is here.

Installing Dependencies and Code

To run the source code, you will need Python 3.7 or newer! We target Python 3.11 in our newer bundles and we recommend you to do the same.

Note: It is recommended to install the requirements into a virtual environment.

Note: On arm64 macs (e.g. M1 MacBook Air), use the python3.*-intel64 binary to create the virtual environment. We do not yet provide arm64-native wheels for the Pupil Core dependencies.

git clone https://github.com/pupil-labs/pupil.git
cd pupil
git checkout develop
python -m pip install -r requirements.txt

If you have trouble installing any of the dependencies, please see the corresponding code repository for manual installation steps and troubleshooting.

Linux

USB Access

To grant Pupil Core applications access to the cameras, run

echo 'SUBSYSTEM=="usb",  ENV{DEVTYPE}=="usb_device", GROUP="plugdev", MODE="0664"' | sudo tee /etc/udev/rules.d/10-libuvc.rules > /dev/null
sudo udevadm trigger

and ensure that your user is part of the plugdev group:

sudo usermod -a -G plugdev $USER
Audio Playback

The sounddevice package depends on the libportaudio2 library:

sudo apt install libportaudio2

Run Pupil

cd pupil_src
python main.py capture # or player/service

macOS 12 Monterey and newer

Note: Due to technical limitations on macOS 12 Monterey and newer, Pupil Capture and Pupil Service need to be started with administrator privileges to get access to the video camera feeds. To do that, prepend the python command with sudo. E.g.,:

sudo python main.py capture

Command Line Arguments

The following arguments are supported:

Flag Description
-h, --help Show help message and exit.
--version Show version and exit.
--debug Display debug log messages.
--profile Profile the app's CPU time.
-P PORT, --port PORT (Capture/Service) Port for Pupil Remote.
--hide-ui (Capture/Service) Hide UI on startup.
<recording> (Player) Path to recording.

License

All source code written by Pupil Labs is open for use in compliance with the GNU Lesser General Public License (LGPL v3.0). We want you to change and improve the code -- make a fork! Make sure to share your work with the community!

pupil's People

Contributors

bpinsard avatar cboulay avatar chingt avatar christopher22 avatar ckbaumann avatar cpicanco avatar emredog avatar euryalus avatar fneitzel avatar kadie123 avatar marc-tonsen avatar michaelbarz avatar mikelgg93 avatar mkassner avatar moiri avatar n-m-t avatar nathakits avatar papr avatar patrickfuerst avatar pfaion avatar polynomialdivision avatar pre-commit-ci[bot] avatar qandrew avatar romanroibu avatar sbalk avatar siqube avatar smurakami avatar snleu avatar willpatera avatar windsooon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pupil's Issues

Win bundles for v0.4

  • make a pyinstaller bundle for pupil player
  • make a pyinstaller bundle for pupil capture

World and Eye default fps.

Hi everyone, hereby I will argue against the 24-30 fps default. Why not 30-30 fps as a default?

Currently, the default for world camera is 24 fps while the eye is 30 fps. With out-of-the-box configurations (v0.3.9.6) and good pupil detection, these fps's defaults gives us approximately 1-2 gaze positions for each world frame. Indeed, this 24-30 default provides a nice visualization, for example, the vis_circle plugin generates 1-2 circles with a non appealing flickering behavior, and when color alpha blend is set to 255, no flicker at all.

On the other hand, a 30-30 fps gives us 0-1 gaze positions, hence increased flickering. Despite of it, a 30-30 fps would reduce data loss, as well as avoid one to make additional filtering in order to, for example a) decide which gaze point is the most precise point for a particular frame b) if precision is not a concern, decide if you take both points, the first, the second, a relative mean, and so on.

So, why not 30-30 fps as a default?

Best,
Rafael

Installing on windows

Hello,

I followed these instructions:
https://github.com/pupil-labs/pupil/wiki/Dependencies-Installation-Windows

After going through all these steps and trying to run capture/main.py, I get:
RuntimeError, 'GLFW library not found'

When I look at the instructions for GLFW, there appear to be some mistakes:
There is no folder 'llib-mingw', only a folder 'lib-mingw'.
Furthermore it says: 'regsvr32 GLFW.dll'. But GLFW.dll does not exist. The lib-mingw folder includes a file glfw3.dll, but when trying 'regsvr32 glfw3.dll' I get this error:
'the module 'glfw3.dll' was loaded but the entry-point dllregisterserver was not found' and still the same error when running capture/main.py...

Pupil Capture - AttributeError: 'Logger' object has no attribute 'Exception'

recently, after stopping the recording, the following error appears, and the scene camera view freezes. it's currently happening almost every time. recorded videos appear to be in intact though

Traceback (most recent call last):
File "", line 144, in
File "", line 137, in main
File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/world", line 340, in world
File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/plugin", line 42, in alive
File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/recorder", line 173, in cleanup
File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/recorder", line 154, in stop_and_destruct
AttributeError: 'Logger' object has no attribute 'Exception'

machine: Ubuntu 12.10, i686, 3.5.0-49-generic
pupil_capture_v0.3.9_Linux_i686

Scan_path climbing pupils bug

Hey guys,

Please, take a look at the following pictures:

screenshot from 2015-01-08 21 46 45
screenshot from 2015-01-08 21 47 02
screenshot from 2015-01-08 21 47 15
screenshot from 2015-01-08 21 47 30
screenshot from 2015-01-08 21 47 44
screenshot from 2015-01-08 21 48 02
screenshot from 2015-01-08 21 48 15
screenshot from 2015-01-08 21 48 27
screenshot from 2015-01-08 21 48 40
screenshot from 2015-01-08 21 48 52
screenshot from 2015-01-08 21 49 04
screenshot from 2015-01-08 21 49 18
screenshot from 2015-01-08 21 49 31

Past pupils are climbing the image.

You can replicate this incremental behavior of past pupil positions by successive seeking the to an earlier frame.

EDIT 1: Player version 0.3.7.4, scan_path code unchanged.

Avoid Permission Conflicts

Hi everyone,

First of all, this does not seem to be a high priority one, since all you need to do to solve this kind of conflicts is give appropriate permissions to Pupil, for example:

  • open your file manager program with sudo or as root, right click on Pupil Folder, go to "Permissions" tab and change Pupil folder permissions to something like " Access: Read and Write";
  • running Pupil with 'sudo' or as root 'su -';
  • change credential using a command line instruction... and so on.

Right now, Pupil does not have functionality to manage user credentials in order to avoid permission conflicts (such as "Permission denied" : #3
) that could be raised when trying to write some data files if you are running with less privilege user credentials.

This is specially true if you are like me and for some unknown reason configured your git credential to the root and got used to use 'sudo' on every git command, including a possible unnecessary 'sudo git clone'.

But, of course, there may be legitimated circumstances when permission conflicts may occur.

Best.

ImportError: libIlmImf.so.6: cannot open shared object file: No such file or directory

I'm trying to run the Pupil Program in Ubuntu 12.10 (x64) in Parallels (VM Application) on a Macbook Air (mid-2013 model) by running:

$ python main.py

but I get the following error:

Traceback (most recent call last):
  File "main.py", line 79, in <module>
    from eye import eye
  File "/home/psycho/pupil-shit/pupil/pupil_src/capture/eye.py", line 20, in <module>
    from methods import *
  File "/home/psycho/pupil-shit/pupil/pupil_src/shared_modules/methods.py", line 16, in <module>
    import cv2
ImportError: libIlmImf.so.6: cannot open shared object file: No such file or directory

I've closely followed setup instructions and installed all dependencies. There's another discussion about this error going on here, but it isn't of much help.

Also, I've tried running the player in the v0.3.4 release (as mentioned in the thread linked above) and it does work. But i don't need the compiled player, I need the code to work.

Any ideas? Would really appreciate any help I could get.

What about an update to the 'developer guide - plugins'?

Hey guys,

What about an update to the "plugins" section of the developer guide, including basic information about how to make a "player" plugin? Please, sorry for that if it is not about time to do it for some reason.

Right now, it states that "To run your plugin all you need to do is import and add it to the plugins list in world.py". So, you could give some tips on how interact with some (standard) player plugins. I'm saying that because I was a little bit lost when trying to make my player plugin works with the exporter.py. After some time trying to understand the whole thing, and receiving "[Warning] Plugin X could not be loaded in exporter", I imported and added it to the player.py and exporter.py plugin lists and everything works just fine.

Best!

redefine recording data format

  • pupil_positons should only hold pupil positions (add field to indicate left/right eye), use np.rec_array
  • add gaze_positons.npy file with gaze positions
  • use mp4 instead of avi container
  • update documentation

v0.4.0 - Simple gaze mapper can't pickle mapping function

When attempting to save session settings for plugins in world.py after a successful calibration with Screen Marker Calibration, I get a PicklingError : Can't pickle <type 'function'> and session settings for world is therefore not saved.

It appears that this bug originates in the Simple_Gaze_Mapper plugin get_init_dict because of passing a function map_fn which is not pickelable.

Request. Screen Calibration Delay.

Hey guys,

Regarding the On Screen Calibration Method, the first 'Collect Point' is being shown suddenly and consistently gives the worst results to me. Subsequent points (inducing 'smooth pursue' before them) consistently gives better results.

What about wait some time (say, a 1-2 s delay) before collecting any data during the first point? Just like a two time traffic signal, yellow(not collecting)-green(collecting). I'm a little bit curious about what would happen If such a delay were applied before each point instead the "smooth pursue".

Or just present it two times and ignoring it at first? This way you ensure that every point had an "smooth pursue" before it.

Best.

v0.4.x Monochrome EyeCam?

If i pull the slider in the EyeCamMenu of 'hue' and 'saturisation' - Nothing happens.
The EyeCam image stays monochrome.

Log pupil diameter by default

Hi,

it seems at the moment pupil diameter is not logged by default. I suggest to do so given that this may be important for an increasing number of users and applications.

V4L2 VideoCapture always uses V4L2_PIX_FMT_BGR24

Even though there's logic to prefer MJPG or YUYV if available, VideoCapture always uses V4L2_PIX_FMT_BGR24 due to line:

self.v4l2_format.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24

Also, later on in the read-method this format is assumed for the buffer.

The jpeg compression really seems to be needed for two cameras to run in one USB controller at any resolution, even with the 0x80 quirk. Doing the JPEG handling here seems to save us from patching the uvcvideo-module.

I can get MJPG working with a following quick hack, although it'll probably break other formats:

--- a/pupil_src/shared_modules/uvc_capture/linux_video/v4l2_capture/__init__.py
+++ b/pupil_src/shared_modules/uvc_capture/linux_video/v4l2_capture/__init__.py
@@ -15,9 +15,12 @@ This file contains bindings to a webcam capture module that works with v4l2 and
 from ctypes import *
 from numpy.ctypeslib import ndpointer
 import numpy as np
+from PIL import Image
+from cStringIO import StringIO
 import os,sys
 #logging
 import logging
+
 logger = logging.getLogger(__name__)

 class CameraCaptureError(Exception):
@@ -216,7 +219,8 @@ class VideoCapture(object):
         self.v4l2_format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE
         self.v4l2_format.fmt.pix.width       = size[0]
         self.v4l2_format.fmt.pix.height      = size[1]
-        self.v4l2_format.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24
+        #self.v4l2_format.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24
+        self.v4l2_format.fmt.pix.pixelformat = v4l2_fourcc(*self.prefered_format)
         self.v4l2_format.fmt.pix.field       = V4L2_FIELD_ANY
         if (-1 == dll.xioctl(self.device, VIDIOC_S_FMT, byref(self.v4l2_format))):
             self._close()
@@ -376,8 +380,10 @@ class VideoCapture(object):
                 # if ( self.ts > timestamp) or 1:
                 #     print "%s %s" %(self.src_str, self.get_time_monotonic()-timestamp)
                 buf_ptr = cast(buf_ptr,POINTER(c_uint8*buf.bytesused))
+
                 img = np.frombuffer(buf_ptr.contents,c_uint8)
-                img.shape = (self.v4l2_format.fmt.pix.height,self.v4l2_format.fmt.pix.width,3)
+                #img.shape = (self.v4l2_format.fmt.pix.height,self.v4l2_format.fmt.pix.width,3)
+               img = np.array(Image.open(StringIO(img.data)))
                 return Frame(timestamp, img)
             else:
                 logger.warning("Frame corrupted skipping it")

bug 1: at start up, eye camera shows up and closes quickly, world camera closes with error ending.

OS/machine
ubuntu 12.10, 64-bit, 3.7 GiB (RAM), 69.1 GB (hard)
processor Intel® Core™ i3 CPU M 370 @ 2.40GHz × 4
graphics Intel® Ironlake Mobile


release version
pupil-0.3.7.1.tar.gz (source), but same bug from
pupil-0.3.7.tar.gz (source)


rafael@rafael-B14HM21:~$ sudo '/home/rafael/Documents/pupil-0.3.7.1/run_capture'
[sudo] password for rafael:
starting PUPIL capture python script
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, *_self._kwargs)
File "/home/rafael/Documents/pupil-0.3.7.1/pupil_src/capture/eye.py", line 233, in eye
result = pupil_detector.detect(frame,user_roi=u_r,visualize=bar.display.value == 2)
File "/home/rafael/Documents/pupil-0.3.7.1/pupil_src/capture/pupil_detectors/canny_detector.py", line 416, in detect
e = cv2.fitEllipse(np.concatenate(sc[s]))
ValueError: 0-d arrays can't be concatenated
WORLD Process [WARNING] uvc_capture.linux_video.v4l2_capture : Failed to retrieve frame from /dev/video1 , Retrying
WORLD Process [WARNING] uvc_capture.linux_video.v4l2_capture : Failed to retrieve frame from /dev/video1 , Retrying
WORLD Process [WARNING] uvc_capture.linux_video.v4l2_capture : Failed to retrieve frame from /dev/video1 , Retrying
Traceback (most recent call last):
File "main.py", line 140, in
main()
File "main.py", line 133, in main
world(g_pool,world_src,world_size)
File "/home/rafael/Documents/pupil-0.3.7.1/pupil_src/capture/world.py", line 277, in world
frame = cap.get_frame()
File "/home/rafael/Documents/pupil-0.3.7.1/pupil_src/shared_modules/uvc_capture/linux_video/v4l2_capture/init.py", line 347, in read
return self.read(retry-1)
File "/home/rafael/Documents/pupil-0.3.7.1/pupil_src/shared_modules/uvc_capture/linux_video/v4l2_capture/init.py", line 347, in read
return self.read(retry-1)
File "/home/rafael/Documents/pupil-0.3.7.1/pupil_src/shared_modules/uvc_capture/linux_video/v4l2_capture/init.py", line 347, in read
return self.read(retry-1)
File "/home/rafael/Documents/pupil-0.3.7.1/pupil_src/shared_modules/uvc_capture/linux_video/v4l2_capture/init.py", line 320, in read
Attach each camera to a single USB Controller, this may solve the problem."%self.src_str)
Exception: Capture Error: Could not communicate with camera at: /dev/video1 Attach each camera to a single USB Controller, this may solve the problem.
__

EYE Process: 2014-01-28 18:42:15,742 - uvc_capture.linux_video.v4l2_capture - INFO - Size on /dev/video0: 640x360
EYE Process: 2014-01-28 18:42:15,747 - uvc_capture.linux_video.v4l2_capture - INFO - Framerate on /dev/video0: 1/30
EYE Process: 2014-01-28 18:42:15,946 - uvc_capture - INFO - Camera selected: Microsoft® LifeCam HD-5000 (u with id: 0
__

World Process: 2014-01-28 18:42:15,130 - uvc_capture.linux_video.v4l2_capture - DEBUG - Compiling now.
World Process: 2014-01-28 18:42:15,138 - uvc_capture.linux_video.v4l2_capture - DEBUG - Compiler status: make: Nothing to be done for `make_all'.

World Process: 2014-01-28 18:42:15,139 - uvc_capture.linux_video.v4l2_capture - DEBUG - Compiling done.
World Process: 2014-01-28 18:42:15,153 - c_methods - DEBUG - Compiling now.
World Process: 2014-01-28 18:42:15,162 - c_methods - DEBUG - Compiler status: make: Nothing to be done for `make_all'.

World Process: 2014-01-28 18:42:15,163 - c_methods - DEBUG - Compiling done.
World Process: 2014-01-28 18:42:16,071 - uvc_capture.linux_video.v4l2_capture - DEBUG - Formats exposed by [['YUYV'], ['MJPG'], ['RGB3'], ['BGR3'], ['YU12'], ['YV12']]: /dev/video1
World Process: 2014-01-28 18:42:16,072 - uvc_capture.linux_video.v4l2_capture - DEBUG - Fromat choosen: MJPG
World Process: 2014-01-28 18:42:16,092 - uvc_capture.linux_video.v4l2_capture - INFO - Size on /dev/video1: 1280x720
World Process: 2014-01-28 18:42:16,113 - uvc_capture.linux_video.v4l2_capture - INFO - Framerate on /dev/video1: 1/24
World Process: 2014-01-28 18:42:16,113 - uvc_capture.linux_video.v4l2_capture - DEBUG - Sizes avaible on /dev/video1 [(640L, 480L), (160L, 120L), (176L, 144L), (320L, 176L), (320L, 240L), (432L, 240L), (352L, 288L), (544L, 288L), (640L, 360L), (752L, 416L), (800L, 448L), (864L, 480L), (960L, 544L), (1024L, 576L), (800L, 600L), (1184L, 656L), (960L, 720L), (1280L, 720L), (1392L, 768L), (1504L, 832L), (1600L, 896L), (1280L, 960L), (1712L, 960L), (1792L, 1008L), (1920L, 1080L)]
World Process: 2014-01-28 18:42:16,114 - uvc_capture.linux_video.v4l2_capture - DEBUG - Rates avaible on /dev/video1 @ (1280L, 720L): [(1L, 30L), (1L, 24L), (1L, 20L), (1L, 15L), (1L, 10L), (2L, 15L), (1L, 5L)]
World Process: 2014-01-28 18:42:16,122 - uvc_capture - INFO - Camera selected: HD Webcam C525 (u with id: 1
World Process: 2014-01-28 18:42:16,680 - world - INFO - No calibration found.
World Process: 2014-01-28 18:44:31,080 - uvc_capture.linux_video.v4l2_capture - WARNING - Failed to retrieve frame from /dev/video1 , Retrying
World Process: 2014-01-28 18:44:33,083 - uvc_capture.linux_video.v4l2_capture - WARNING - Failed to retrieve frame from /dev/video1 , Retrying
World Process: 2014-01-28 18:44:35,085 - uvc_capture.linux_video.v4l2_capture - WARNING - Failed to retrieve frame from /dev/video1 , Retrying
World Process: 2014-01-28 18:44:35,086 - uvc_capture.linux_video.v4l2_capture - INFO - Closed: /dev/video1

bilateral software

make pupil capture load in bilateral mode when two eye camera are detected.

Pupil Player - Exception: Bad value [position ...]

sometimes i get the following exception when trying to load a recorded session with pupil player. it looks like it's trying to seek to a position after the end of the recording. this problem can be resolved by deleting the "player_settings" directory.

./pupil_player /home/mpi/Downloads/Pupil_Capture/recordings/2014_07_31/002/
ERROR(AntTweakBar) >> Bad value
ERROR(AntTweakBar) >> Bad value [position ...]
Traceback (most recent call last):
File "", line 478, in
File "", line 389, in main
File "/home/mkassner/pupil/deploy_player/build/bundle/out00-PYZ.pyz/vis_circle", line 54, in init_gui
File "/home/mkassner/pupil/deploy_player/build/bundle/out00-PYZ.pyz/atb", line 198, in init
File "/home/mkassner/pupil/deploy_player/build/bundle/out00-PYZ.pyz/atb", line 773, in define
File "/home/mkassner/pupil/deploy_player/build/bundle/out00-PYZ.pyz/atb", line 20, in check_error
Exception: Bad value [position ...]

machine: Ubuntu 12.10, i686, 3.5.0-49-generic

Mac OS bundle performance and problems.

The bundle of Pupil Capture and Player does not perform as desired on MacOS. We are currently facing compatibility issues and performance issues (because the ffmpeg backend does not seem to be used when running as bundled app.)

Question. shared_modules/circle_detector.py

Hey, guys.

Have you tried this on line 17?

edges = cv2.adaptiveThreshold(gray_img, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 5, -3)

Instead,

edges = cv2.adaptiveThreshold(gray_img, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 7, 7)

Don't know exactly why, but I'm getting better detection and better calibration with subtractions in the C constant.

Could you say something about it? Is there a better way than trial and error to determine these two last values?

Love this project 👍

Best,

Probleme installing on Windows

Hi !

After installing, many errors occurs. I'v been trying debugging with some "print" in the code.

First : gcc (unrecognized option)

gcc: unrecognized option -shared' cc1.exe: Invalid option64'
methods.c: In function filter': methods.c:151: parse error beforewindow_lower'
methods.c:92: warning: unused variable min_h' methods.c:94: warning:h' might be used uninitialized in this function
methods.c:94: warning: i' might be used uninitialized in this function methods.c:94: warning:j' might be used uninitialized in this function
methods.c:103: warning: h' might be used uninitialized in this function methods.c:156: warning:h' might be used uninitialized in this function
methods.c: In function ring_filter': methods.c:218: parse error beforewindow_lower'
make: [methods.so] Error 1 (ignored)

Second : the file "pupil\pupil_src\shared_modules\c_methods__init__.py" can't compile "methods.so".

Traceback (most recent call last):
File "main.py", line 80, in
from eye import eye
File "c:\Users\Admin\Documents\DEV\eye-tracking\pupil\pupil_src\capture\eye.py
", line 23, in
from pupil_detectors import Canny_Detector,MSER_Detector,Blob_Detector
File "c:\Users\Admin\Documents\DEV\eye-tracking\pupil\pupil_src\capture\pupil_
detectors__init__.py", line 27, in
from canny_detector import Canny_Detector
File "c:\Users\Admin\Documents\DEV\eye-tracking\pupil\pupil_src\capture\pupil_
detectors\canny_detector.py", line 27, in
from c_methods import eye_filter
File "c:\Users\Admin\Documents\DEV\eye-tracking\pupil\pupil_src\shared_modules
\c_methods__init__.py", line 61, in
raise Exception("c-methods Error could not compile binary.")
Exception: c-methods Error could not compile binary.

Thanks

World Window Crashing on Stop Recording

Hey Guys,

Running from the source (.zip downloaded from the release 0.3.9.1 and pupil-master) with sublime text 2. Data files were not lost.

cal_pt_cloud.npy
gaze_positions.npy
timestamps.npy
info.csv (Capture Software Version "unknow").
world.avi

Traceback (most recent call last):
  File "/home/rafael/Documents/pupil-0.3.9.1/pupil_src/capture/main.py", line 144, in <module>
    main()
  File "/home/rafael/Documents/pupil-0.3.9.1/pupil_src/capture/main.py", line 137, in main
    world(g_pool,world_src,world_size)
  File "/home/rafael/Documents/pupil-0.3.9.1/pupil_src/capture/world.py", line 340, in world
    g_pool.plugins = [p for p in g_pool.plugins if p.alive]
  File "/home/rafael/Documents/pupil-0.3.9.1/pupil_src/shared_modules/plugin.py", line 42, in alive
    self.cleanup()
  File "/home/rafael/Documents/pupil-0.3.9.1/pupil_src/capture/recorder.py", line 173, in cleanup
    self.stop_and_destruct()
  File "/home/rafael/Documents/pupil-0.3.9.1/pupil_src/capture/recorder.py", line 154, in stop_and_destruct
    logger.Exception("Could not save metadata. Please report this bug!")
AttributeError: 'Logger' object has no attribute 'Exception'
[Finished in 557.2s]

The GUI does not work properly on Retina Displays

The mouse position the application gets differs from the real one, so in order to use this, I have to go around moving the mouse, and guessing its processed position based on the GUI mouseover highlights. I'm running the app from source. I can provide more details about my environment, but I have the feeling this is a global problem with retina displays and their weird superhigh resolution. Anyone else saw this issue?

generalize gaze mapping

  • remove mapping fn
  • add mapping plugin base class (derived form plugin class)
  • change calibration classes to replace mapping plugin instead of mapping fn
  • remove gaze from pupil_positons and use event instead

request on pupil_capture with eye_src and world_src with *.avi

Hi,

To run pupil_capture with videos you just need to comment out and write a couple of lines:

#eye_src = ["Microsoft", "6000","Integrated Camera"]
#world_src = ["Logitech Camera","(046d:081d)","C510","B525", "C525","C615","C920","C930e"]
eye_src = "eye_video_path"
world_src = "world_video_path"

It's convenient to run extensive tests so, as a simple request, an option to loop or just a key short-cut to reward the videos would be nice, uh?

Best

Edit1: Please, where is written "It's convenient to run extensive tests", reads "It's convenient to debug, developing",

v0.4.x Request for old 'Calibration Debug View' ?

In version 0.3.x has been a checkbox in the WorldCamMenu for an overlay that showed the calibration points relating to the screensize. So you could see, in which area the calibration was good and bad.

I can't find that in 0.4. Is it possible to reimplement it?

Segmentation fault when calibrating more than once

I run the script from source, calibrate fine, and if I start calibration a second time, I get this:

./run_capture: line 4: 78144 Segmentation fault: 11  python main.py

I'm using OS X 10.9 on a Macbook Pro Retina.

I have seen a few variations of this. For example, if I run the app using multi screen (laptop screen + external LCD), this crash happens if I calibrate on the laptop first, and then on the external LCD. But it does not crash if I calibrate multiple times on the LCD.

I'll test a bit more, and will report with more details about the exact behavior that triggers the problem. But I wanted to post this first to check if anyone else saw this problem too.

marker_tracking branch missing file + docs?

Hey, I tried marker_tracking branch and I stumbled upone a couple issues:

  1. shared_modules/gl_utils/vertex_buffer.py is missing; so running the app gives an error. Copying it from Master fixes the issue.
  2. I plan to review all the code on this branch so I'll eventually figure it, but... are there some docs explaining how to use this?

plug-in dependency loader

  • add mechanism to specify plugins that should be loaded because they are required by another plugin.
  • investigate replacing plugin.order with something more sophisticated.

3d pose estimation from markers

this is implemented as a proof of concept. It need to be done cleanly and with line documentation because it will become a fundamental.

pupil_capture_v0.3.9.3_Linux_i686.zip fails to find OpenGL

Launching the pupil_capture (Arch Linux updated today, i686) results in a error pasted in the end of this post. This may be due to incompability of PyOpenGL 3.0 < rc1 with PyInstaller (see here). Running the git master works on the same setup.

sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook
sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook
sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook
Traceback (most recent call last):
  File "<string>", line 80, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/eye", line 17, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/atb", line 16, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/atb.raw", line 20, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.GL", line 2, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.raw.GL", line 6, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.raw.GL.constants", line 7, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.platform", line 36, in <module>
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.platform", line 27, in _load
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.plugins", line 14, in load
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.plugins", line 28, in importByName
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.platform.glx", line 8, in <module>
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/OpenGL.platform.glx", line 20, in GLXPlatform
ImportError: ('Unable to load OpenGL library', 'GL: cannot open shared object file: No such file or directory', 'GL', None)

Pupil positions being dragged by moving world (Player)

Hey guys,

I have noticed that with scan-path opened, all pupil positions are dragged in accord with and as the world camera image moves. I think that this behavior could be useful to tracking the world image for past pupils in some range. Please, could you confirm this behavior? Did I describe it correctly or is there no such a thing?

If yes, I think that some kind of distinction should be created between current pupils and past pupils, to avoid artifacts. For example, despite the fact one were fixedly looking at a cellphone, his fingers will cross over his gaze positions with some chance. If, for some reason, there was a high chance of a such thing, an analysis of his behavior might led to think that he was looking a lot to his fingers. But he was not.

Hope this helps,

Best,
Rafael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.