CVCUDA version of FaceStoreHelper, suitable for super-resolution, face restoration, and other face extraction and reattachment procedures.
This project is designed to extract faces from images, perform image restoration/super-resolution operations, and then merge the restored face back into the original image. The code provides a simple, fast, and accurate method for face extraction and merging back into the original image, suitable for various application scenarios.
We have undertaken a comprehensive rewrite of the original OpenCV implementation, replacing all serial CPU operations with their corresponding CVCUDA operators. This optimization enables our project to leverage the power of GPU acceleration, resulting in significantly improved performance and efficiency in computer vision tasks. By harnessing CVCUDA's capabilities, we have successfully enhanced the processing speed of our application, providing a more responsive and robust user experience.
- Widely applicable for post-processing of face image super-resolution/restoration networks, such as GFPGAN and CodeFormer.
Before running this project, please make sure the following dependencies are installed:
pip install nvcv_python-0.3.1-cp38-cp38-linux_x86_64.whl
download the checkpoints and put it into ./checkpoint link: https://pan.baidu.com/s/1ZPfLnXS5oGDawqualhXCrQ?pwd=psya password: psya
- Clone this repository:
git clone https://github.com/your-username/your-repo.git
- Enter the project directory:
cd your-repo
- Run the script:
Generate resource packs that provide codeformer with the necessary face landmarks and affine transformation matrices
python gen_resource_pkg.py
inference with cvcuda accelerated codeformer network
python cvcuda_facestorehelper.py --input_path = your_images_path
- The program will save the images with extracted faces in the specified path and draw the restored faces on the original images.
- If you encounter any problems, you can report them in this project's GitHub Issue.
- If you want to contribute code, please follow these steps:
- Clone this repository.
- Create a new branch:
git checkout -b new-feature
- Make changes and commit:
git commit -m 'Add some feature'
- Push to the remote branch:
git push origin new-feature
- Submit a pull request.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. Please read the LICENSE file for more information.
Code contributor: Junli Deng, Xueting Yang, Xiaotian Ren
- Contact Author Name: Jason Zhaoxin Fan
- Contact Author Email: [email protected]
- Any other contact information: psyai.com
This project incorporates the following methods:
-
CVCUDA: Project Link
-
GFPGAN: Project Link
-
CodeFormer: Project Link
We invite you to join Psyche AI Inc to conduct cutting-edge research and business implementation together. At Psyche AI Inc, we are committed to pushing the boundaries of what's possible in the fields of artificial intelligence and computer vision, especially their applications in avatars. As a member of our team, you will have the opportunity to collaborate with talented individuals, innovate new ideas, and contribute to projects that have a real-world impact.
If you are passionate about working on the forefront of technology and making a difference, we would love to hear from you. Please visit our website at Psyche AI Inc to learn more about us and to apply for open positions. You can also contact us by [email protected].
Let's shape the future together!!