R
R
Rustem Saifullin2020-06-25 12:55:32
Image processing
Rustem Saifullin, 2020-06-25 12:55:32

How to write a program that recognizes eyes and faces in a photo?

Hello, I have an idea for a video. And the question arose: how to make the program find eyes for each photo and indicate the position in coordinates? I will be grateful for any advice)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rostislav Tsekhmistro, 2020-06-25
@i_rustem

First you need to choose the algorithm of work and the basis for this task. Such a task can be implemented using opencv or using convolutional neural networks (CNN object detection). If the choice lies in the direction of neural networks, then it is better to use ready-made detector structures (for example, YoLo). It is also advisable to find a ready-made dataset of already marked up photos, for example , mrl.cs.vsb.cz/eyedataset, or mark up the pictures yourself https://towardsdatascience.com/collecting-data-for...
The dataset already contains marked data and block coordinates. When working directly with the trained network and its implementation into the system, you will need to receive a tensor (vector) with marked areas and a class vector from the network output, but for the task of determining one type of objects (eyes), you will not need a class vector

D
dmshar, 2020-06-25
@dmshar

How to write a program that recognizes eyes and faces in a photo? - what wonderful, meaningful questions went to the forum. So, how do you write a program?
Yes, it is elementary to write such a program, just like any other programs are written.
1. We study a suitable programming language. Anyone will do - Python, C++, C#, Julia, Go.... at worst, Java will do.
2. We studymethods or AT LEAST tools for solving your problem (in this case, image recognition from photo-video) created by someone else and kindly provided for wide use. We are studying - i.e. we look, compare which one suits us and which one does not, which one is more convenient to use in our particular case and based on our experience, which one is cheaper to buy, easier to install, easier to integrate, etc.
3. We think about how to embed/use the tools you have learned and the tools you have learned in a program that you will write in the language you have learned.
4. We trainbuilt system - how to do it is different for each of the tools and (what a surprise!) Is described in the documentation for it. In addition, today on the Internet for each of the tools there are several dozen examples of their use in similar projects - we are looking for, studying, applying.
5. After that, we easily and naturally apply our program there and in the way we see fit. At least to recognize faces and eyes, even ears and tails, even wheels and steering wheels.
Everything, as you see, is exactly the same as in solving any problem - STUDY, THINK, APPLY . And you thought that this task is solved somehow differently, and it can be described in three lines in the form of an answer on the forum. Or that some of these steps can be skipped?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question