From: the heart of machine
Sometimes, we need to cover some people’s tattoos to avoid being imitated. Sometimes people just simply wonder what some big stars would look like without tattoos. Vijish madhavan, a machine learning researcher from India, recently developed an open source machine learning tool skinddeep to meet our needs.
Netizens also use this tool to deal with some pictures of people with heavy tattoos, and the effect is not bad.
The author of the project, vijish madhavan, came up with a plan to do the project after watching the Canadian singer Justin Bieber’s MV “anyone”. Justin Bieber, with the help of a makeup artist, spent hours covering all of his tattoos.
The effect of MV video is very perfect, because the production of video output is very difficult, so the project author chooses the image to process. The starting point of this project is whether deep learning is competent for this job, and how is it compared with Photoshop?
Some people will ask, why don’t you just remove the tattoo? Photoshop can produce very good results, but the problem is that using Photoshop requires professional knowledge. If you use PS to process tattoos, you may need to spend several hours to decorate the whole image.
Let’s take a look at the effect first? The tattoo of American basketball player Allen Iverson was removed with this model.
In the figure below, the first line input image, the second line output image, the output result obviously feels that the tattoo has been removed.
There are a lot of images of dense tattoos on the face, as well as other decorations. The tattoo removal effect of AI is also very good
Compared with professional image processing software Photoshop, the effect is also good
It seems that the effect of skindeep is not bad, but if the tattoo is colored, there will be some residual traces.
According to the author’s introduction, a large number of image pairs are needed to complete this project. Because there is no suitable data set, most of the training content is completed by using synthetic data
- Firstly, the image pairs of apdrawing data set are superimposed with some images of background tattoo removal design, which are implemented by Python OpenCV;
- Drawing data set has line art pairs, which can simulate tattoo lines, which will help the model to learn and delete these lines;
- For the whole body image, the author uses the previous project Artline, and superimposes the output image with the input image;
- ImageDraw.Draw It is used with forest green color code and randomly placed on the body image, similar to fast.ai Crappify in;
- Photoshop is also used to place tattoos on objects that need to be bent and angled.
This project is sponsored by fast . AI library, you need to install fastai 1 . 0 . Version 61 (and its dependent libraries), and pytorch 1 . six . 0, higher version is not supported.
The quickest way to try this project is on colab:
Its output is limited to 500 pixels.
Although the machine learning model of tattoo removal doesn’t look complicated, in the real world, there are still some “mapping errors” sometimes. The builder of the project said that due to the lack of data set support, the capacity of data set used for training is limited. In addition, if someone has a color tattoo, I’m afraid AI can’t recognize it at present.
If this effect is made into a website or a filter of beauty app, it would be great. Finally, can skinddeep tattoo people in reverse? The effect of “try on” may be on fire.
Open source outpostShare popular, interesting and practical open source projects everyday. Participate in the maintenance of 100000 + star’s open source technology resource library, including python, Java, C / C + +, go, JS, CSS Node.js , PHP,. Net, etc.