R
R
Roman2019-03-06 11:30:27
PHP
Roman, 2019-03-06 11:30:27

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

2 answer(s)
V
Vladimir Goncharov, 2019-03-06
@procode

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

O
OstriySous, 2019-03-06
@OstriySous

GB most likely, but I'm not sure.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question