Answer the question
In order to leave comments, you need to log in
Image recognition in PHP - how to overlay decorations on face elements?
Hello.
How can I implement in PHP the imposition of all sorts of effects on a person's photo, depending on the part of the body or face?
Well, for example, make him a halo over his head, or glasses.
For this to happen automatically, you upload the photo to the server, and the server gives it to you, but with glasses))
Thank you.
Answer the question
In order to leave comments, you need to log in
Everything is simple. Find a face or what you need there using a ready-made pre-trained model. Next, overlay your image in the right place using imagemagick.
To apply the desired effect on the face, it is better to find not just the coordinates of the square of the face, but all its points.
Finding faces, etc. on php: https://habr.com/ru/post/358902/
imagecopy: php.net/manual/ru/function.imagecopy.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question