With the advent of the artificial intelligence (AI) era, the beauty camera is widely used, and makeup transfer has attracted increasing attention. In this paper, we propose an adaptive makeup transfer based on the bat algorithm to solve the problem that only a single makeup effect can be transferred. According to the characteristics of makeup style, the algorithm optimizes the weight value to get the appropriate makeup lightness by using the adaptive method. The improved algorithm can not only help to get the optimal weight values in the process of transferring the same makeup style to different targets, but also to transfer different makeup styles to the same target. Moreover, this algorithm can choose the most suitable makeup style and also the most appropriate lightness for a certain person. Experimental results show that the algorithm proposed in the paper has a better effect than the existing algorithm of makeup transfer, and the algorithm can provide users with a suitable makeup style and appropriate lightness.
Bat algorithm, as an optimization strategy of the observation matrix, has been widely used. Observation matrix has a direct impact on the reconstructed signal accuracy as a projection transformation matrix, and it has been widely used in various algorithms. However, for the traditional experimental process, randomly generated observation matrices often result in a larger reconstruction error and unstable reconstruction results. Therefore, it is a challenge to retain more feature information of the original signal and reduce reconstruction error. To obtain a more accurate reconstruction signal and less memory space, it is important to select an effective compression and reconstruction strategy. To solve this problem, an adaptive bat algorithm is proposed to optimize the observation matrix in this paper. For the adaptive bat algorithm, we design a dynamic adjustment strategy of the optimal radius to improve its global convergence ability. The results of our simulation experiments verify that, compared with other algorithms, it can effectively reduce the reconstruction error and has stronger robustness.