antoinelame / GazeTracking

👀 Eye Tracking library easily implementable to your projects
MIT License
1.85k stars 505 forks source link

How to use it to detect pupils in pictures #18

Open 1554367650 opened 4 years ago

1554367650 commented 4 years ago

Hello, I have used your code to detect the pupil direction in the picture, and then I can only detect the left and right sides, but not the top and bottom.The pointer of the left eye is slightly off . May I ask you to modify yours values of number of self.horizontal_ratio()?

antoinelame commented 4 years ago

Hello!

I can only detect the left and right sides, but not the top and bottom.

The detection of top/bottom is more complicated because the distance between the top and the bottom is shorter than the distance between the right and the left.

I didn't code is_top() and is_botton() but I provided a vertical_ratio() function to get the vertical position with a ratio. The extreme top is 0.0, the center is 0.5 and the extreme bottom is 1.0. However, I think the accuracy of this ratio is quite low, it depends of your usages.

The pointer of the left eye is slightly off. May I ask you to modify yours values of number of self.horizontal_ratio()

Please share with me the values that work for you!

1554367650 commented 4 years ago

dear Antoine   Hello, I've been testing the eyes of several people on a computer program these days. Based on their results, the data were summarized. But I don't know if it's true or not.This applies to the people around me I want to share it with you!     def is_right(self):         """Returns true if the user is looking to the right"""         print("HR:",self.horizontal_ratio())         if self.pupils_located:             return self.horizontal_ratio() <= 0.542

    def is_left(self):         """Returns true if the user is looking to the left"""         print("HR:", self.horizontal_ratio())         if self.pupils_located:             return self.horizontal_ratio() >= 0.75   I think you can use it as a reference.Also, I come from China, maybe our Chinese eyes are different from your European eyes, so the Numbers are not the same! A silly question. You can explain that to me.

what do  eye_left.pupil.x  ,eye_left.pupil.y  mean?  I don't know which unit that cross represents...... Don't laugh at me... I would like to make a judgment of the upper and lower parts of the eyeball recently. Do you have any Suggestions? I think we can modify the value of the vertical_ratio to solve the question. I don't know if i can Look forward to your reply! XD   Best,Adile.

发自我的iPhone

------------------ Original ------------------ From: Antoine Lamé <notifications@github.com> Date: Sun,Aug 25,2019 1:25 PM To: antoinelame/GazeTracking <GazeTracking@noreply.github.com> Cc: 1554367650 <1554367650@qq.com>, Author <author@noreply.github.com> Subject: Re: [antoinelame/GazeTracking] How to use it to detect pupils in pictures (#18)

Hello!

I can only detect the left and right sides, but not the top and bottom.

The detection of top/bottom is more complicated because the distance between the top and the bottom is shorter than the distance between the right and the left.

I didn't code is_top() and is_botton() but I provided a vertical_ratio() function to get the vertical position with a ratio. The extreme top is 0.0, the center is 0.5 and the extreme bottom is 1.0. However, I think the accuracy of this ratio is quite low, it depends of your usages.

The pointer of the left eye is slightly off. May I ask you to modify yours values of number of self.horizontal_ratio()

Please share with me the values that work for you!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.