基于Python的人工智能美颜系统使用PyQt5模块搭建可视化界面,使用Dlib模型(shape_predictor_68_face_landmarks.dat)实现人脸关键点检测和定位,人脸美颜(美白、磨皮、亮眼、红唇等操作)均是在检测到相对应人脸器官后,使用OpenCV模块实现调节亮度、锐化等操作。

效果图如下所示:

基于Python的人工智能美颜系统_编程

项目代码及所需配置文件见网址:https://download.csdn.net/download/m0_38106923/11253733。 

GUI代码如下:

import sys,os
import numpy as np
import cv2
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtGui import QImage,QIcon,QPixmap
from PyQt5.QtWidgets import QFileDialog,QMessageBox
from AIMakeup import Makeup,Face,Organ,NoFace

class Ui_MainWindow(object):
    def __init__(self, MainWindow):