Git Product home page Git Product logo

optimeyes's People

Contributors

benknight135 avatar lukeallen avatar okbalefthanded 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

optimeyes's Issues

tuning the model

Hi Luke,

How can I tune the model?
On the code you say something about tuning parameter lines which are:

IRIS_RADIUS = gray.shape[0]*.75/2
magThreshold = magnitudeSquared.mean()*.6
isDark = gray< (gray.mean()*.8)

What would it means if I increase or decrease the decimal numbers?

Getting any error in getoffset

Hi, I am using Python 3.6.5
While am running the code I am getting the below error. Tried to change the that float value in the getoffset function but still am Getting that error please help me in debugging.

Traceback (most recent call last):
File "E:\praneeta\eye gaze\optimeyes-master\optimeyes-master\eyeDetect.py", line 726, in
main()
File "E:\praneeta\eye gaze\optimeyes-master\optimeyes-master\eyeDetect.py", line 656, in main
pupilOffsetXYList = getOffset(frame, allowDebugDisplay=True)
File "E:\praneeta\eye gaze\optimeyes-master\optimeyes-master\eyeDetect.py", line 474, in getOffset
cv2.circle(output, pupilXYList[eyeIndex], 3, (255,0,0),thickness=1) #BGR format
TypeError: integer argument expected, got float

Loading Saved Model

Hi @adam-jensen!
First off, awesome work so far.

I'm trying to use your library to predict gaze coordinates using a serialized (trained) model. Your original code has the resultsXY list written to csv. Can we use the .csv (or serialized pickle object) to instantiate a resultXYpxpy list, and then add a single frames gaze coordinates to make a prediction?

More specifically, what would be neccesary to do so? Is it just loading the old models crosshair.result (HT, etc?) Let me know if I can clarify anything, I'll submit some code examples when I get time to.

EDIT: To give some context, I'm trying to change my window focus based on which window the gaze is on. I'd like to train a model on startup and store the necessary variables to disk. Then, when the modified eyeDetect.py is called, it loads the variables into file before grabbing a frame, and returning x, y coordinates. I'd then like to use those with a window manager (i3wm) to grab the workspace and focus it.

xfeatures2d not found

detector = cv2.xfeatures2d.SURF_create(hessianThreshold, nOctaves, nOctaveLayers, extended, upright) in eyeDetect.py file
AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d'
I am using opencv version 4.1.0 and getting this error.
How do I solve this?

Trying to run this project but when I try 'python setup.py bdist_wheel' got 'scikit-build could not get a working generator for your system. Aborting build.' error

Installed Visual Studio 2022 Community and added C++ and Python workloads. What components should I install to make this work?
Thanks.
Full out:

-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19042.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19042.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
See also "C:/workspace/dev/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".


--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 17 2022 x64 v143)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 17 2022 x64 v143)" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "Visual Studio 17 2022 x64 v143" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 17 2022 x64 v143" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 16 2019 x64 v142)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 16 2019 x64 v142)" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "Visual Studio 16 2019 x64 v142" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 16 2019 x64 v142" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "Visual Studio 15 2017 x64 v141" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 15 2017 x64 v141" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 17 2022 x64 v143)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 17 2022 x64 v143)" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v142)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v142)" generator - failure
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator - failure
--------------------------------------------------------------------------------

Error with ClassyVirtualReferencePoint.py

Hello,

The error is the follow:
When I run the file eyeDetect.py in python 2.7 I get the error:

File "C:\Users\xxx\Desktop\xxx\optimeyes-master\ClassyVirtualReferencePoint.py", line 140, in getReferencePoint
if img != None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

When I ruin it, it opens a new window for 5 seconds but after it closes and I get the error mentioned.

The whole execution is:

python eyeDetect.py
[ INFO:0] Initialize OpenCL runtime...
0
-3
multiplyProbImages aborting - zero overlap. Offset and matrices:
[-56.59 77.42]
(37L, 48L)
(37L, 48L)
rejecting double eye
rejecting non-level eyes
2
-1
3
-8
4
-1
6
-4
-2
-3
6
0
5
-3
rejecting double eye
-10
-9
Traceback (most recent call last):
File "eyeDetect.py", line 724, in
main()
File "eyeDetect.py", line 654, in main
pupilOffsetXYList = getOffset(frame, allowDebugDisplay=True)
File "eyeDetect.py", line 546, in getOffset
refXY = virtualpoint.getReferencePoint(keypoints, descriptors, face, leftEye_rightEye[0], leftEye_rightEye[1], imgToDrawOn)
File "C:\Users\xxx\Desktop\xxx\optimeyes-master\ClassyVirtualReferencePoint.py", line 140, in getReferencePoint
if img != None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Can you help me

Query regarding the multiple face and pupil detection

Hi
I dnt think this is an issue but facing a problem. When two persons are in front off the camera means one person face and the other person pupils are detected. Also the angle of the camera also matters in this when camera is kept in certain angle its not detected exactly.

Can you please tell me how to over come this problem??

Thanks in advance.

Update to newer OpenCV versions (>=3.0.0)

Starting from OpenCV 3, the non-free algorithms (patented algorithms) have been moved to opencv-contrib repo that is not shipped with the standard binaries and source, the code has to be built. In the following we'll provide the necessary steps to update the optimeyes code in Windows to work with newer versions of the library.

  1. Building OpenCV >= 3.0.0 with CMake and Visual Studio:
    follow the steps explained in this stackoverflow reply:
    http://stackoverflow.com/questions/37517983/opencv-install-opencv-contrib-on-windows

  2. Once the installation of OpenCV is done, proceed to optimeyes:
    In my forked repo, I pushed the code I slightly edited to use OpenCV 3:
    https://github.com/okbalefthanded/optimeyes
    clone the project and run eyeDetect.py

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.