stepacool / eye-tracker Goto Github PK
View Code? Open in Web Editor NEWEye tracking using OpenCV, Python.
Eye tracking using OpenCV, Python.
.I installed the python-opencv version in tutorial with pip but I get "AttributeError: module 'cv2' has no attribute 'CascadeClassifier'" I'm on archlinux... any idea ?
I had to change line 33 from:
self.capture = cv2.VideoCapture(cv2.CAP_DSHOW)
to
self.capture = cv2.VideoCapture(0)
in order to work with the built-in webcam on a macbook pro running Mojave.
Exception after executing the file some time:
Traceback (most recent call last):
File "main.py", line 62, in update_frame
right_keypoints, self.previous_right_keypoints, self.previous_right_blob_area = self.get_keypoints(
File "main.py", line 92, in get_keypoints
previous_area = keypoints[0].size
IndexError: too many indices for array
Hello,
Thanks for the great project.
I ran the noGUI ver on my Windows machine & I noticed the detection doesn't pickup unless I raise the threshold to 70 or so.. does that affect the accuracy of the detection alot? Is there a recommended threshold or an ideal setting to give better accuracy?
Also, can I use the code to detect more than 1 face?
thanks,
Hi there,
Get the following errors while attempting following command on Raspberry Pi 3 B+
`sudo python3 main.py
ImportError: libQtGui.so.4: cannot open shared object file: No such file or directory
LibEGL warning: DRI2: failed to authenticate
QStandardPaths: XGD_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
`
Working perfectly. But there is a problem.
When i select the "Blob" slider, the blob does not appear or just appear on the right eye.
And when i select the circle option slider, circle appears on both eyes but are not so correct.
Please help me out as soon as possible that How can i get correct blob and circle as your appeared in the Youtube video.
Hi,
I came across your project and it is well put together!
I'm getting back into python so my skills are rusty.
When I run poetry install, I get this message:
Current Python version (3.12.0) is not allowed by the project (>=3.7,<3.11).
Please change python executable via the "env use" command.
What do you suggest on how to get past this message? I was thinking the easy thing is to install a lower version of py.
Thank you for your help.
Ran into a few snags trying to get the requirements installed on Ubuntu 20.04. After creating the venv, poetry failed to find Qt6. Updating pip with python -m pip install --upgrade pip
then running poetry did the trick, however when running the tracker I get:
(venv) playaspec@Cortex1:~/Documents/Programming/Eye-Tracker/project$ python main.py
Traceback (most recent call last):
File "main.py", line 7, in <module>
from gui.application_window import Window
File "/Users/playaspec/Documents/Programming/Eye-Tracker/project/gui/application_window.py", line 8, in <module>
from video_source import FrameSource
ModuleNotFoundError: No module named 'video_source'
I've also tried cloning the repo into a Conda environment. Both venvs have difficulty finding Qt6 or the right opencv. Is there a missing requirement or environment variable that's preventing the module from being found?
I am getting this error code in running this. I have all the pre-reqs installed.
This application failed to start because it could not find or load the Qt platform plugin "windows".
Available platform plugins are: minimal (from C:\Python27\lib\site-packages\PyQt5\plugins\platforms), offscreen (from C:\Python27\lib\site-packages\PyQt5\plugins\platforms), windows (from C:\Python27\lib\site-packages\PyQt5\plugins\platforms), minimal, offscreen.
Reinstalling the application may fix this problem.
Exception after clicking the start button :
Traceback (most recent call last):
File "main.py", line 45, in update_frame
self.display_image(base_image)
File "main.py", line 100, in display_image
if len(img.shape) == 3:
AttributeError: 'NoneType' object has no attribute 'shape'
Abandon (core dumped)
Traceback (most recent call last):
File "main.py", line 45, in update_frame
self.display_image(base_image)
File "main.py", line 100, in display_image
if len(img.shape) == 3:
AttributeError: 'NoneType' object has no attribute 'shape'
Abort trap: 6
Changed the lines as suggested by 3 other people on the forum to
def start_webcam(self):
if not self.camera_is_running:
self.capture = cv2.VideoCapture(0) # VideoCapture(0) sometimes drops error #-1072875772
if self.capture is None:
self.capture = cv2.VideoCapture(0)
But still this error :--
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream: Device or resource busy
VIDEOIO ERROR: V4L: can't open camera by index 0
Traceback (most recent call last):
File "main.py", line 45, in update_frame
self.display_image(base_image)
File "main.py", line 100, in display_image
if len(img.shape) == 3:
AttributeError: 'NoneType' object has no attribute 'shape'
Aborted (core dumped)
thanks for the great work.
by the way, I have tested the same with an eyeglass and without but it only works with without eyeglasses.
with eye glasses, it not at all detecting the eyes
Note:
i have included the eyeglass HAAR xml file but NO LUCK
AttributeError: module 'cv2.cv2' has no attribute 'drawKeypoints'
(commenting out stops crash, but loses a key feature)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.