一、实现的效果展示:
![](http://43.138.69.59/wp-content/uploads/2023/04/2-754x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/3-1-754x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/4-1-754x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/5-754x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/6-754x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/8-1-754x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/9-1-754x1024.jpg)
二、环境配置
conda create -n haircolor python=3.8
conda activate haircolor
pip install tensorflow==2.10.0 -i https://mirror.baidu.com/pypi/simple
pip install opencv-python -i https://mirror.baidu.com/pypi/simple
pip install pillow -i https://mirror.baidu.com/pypi/simple
pip install dlib-19.19.0-cp38-cp38-win_amd64.whl
三、图片变色运行
python demo.py
四、视频实时变色运行
python live_demo.py