Ncnn with Vulkan implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration
This repository contains the code and pre-trained models for a real-world face restoration algorithm based on the GFPGAN method and optimized for mobile devices using the NCNN framework with a Vulkan backend.
The goal of this project is to develop practical algorithms that can restore the appearance of damaged or low-quality face images, such as those obtained from security cameras, old photographs, or social media profiles. The proposed approach combines the power of deep learning with the speed and efficiency of hardware acceleration, making it suitable for real-time applications on smartphones, drones, or robots.
Make sure submodules are initialized and updated
git submodule update --init --recursive
git clone --recursive https://github.com/onuralpszr/GFPGAN-ncnn-vulkan.git
- CMake version 3.20 or later
- C++17 or above with filesystem support
- Clang-Tidy for code analysis (optional)
- Threads library
- Vulkan SDK
- glslangValidator executable
- OpenCV library
- OpenMP library
- ncnn library
- libwebp library
Configure and build
mkdir -p build && cd build
cmake ..
cmake --build . --parallel $(($(nproc) - 1))
- GFPGANCleanv1-NoCE-C2
- Support ncnn-vulkan
- Convert pth->onnx->ncnn
- Model with colorization
- https://github.com/xinntao/Real-ESRGAN
- https://github.com/TencentARC/GFPGAN
- https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan
- https://github.com/Tencent/ncnn
- https://github.com/Tencent/ncnn/tree/master/tools/pnnx
- https://github.com/pnnx/pnnx
- https://github.com/deepcam-cn/yolov5-face
- https://github.com/derronqi/yolov7-face
- https://github.com/derronqi/yolov8-face
- https://github.com/FeiGeChuanShu/GFPGAN-ncnn
- https://github.com/ultralytics/ultralytics