GFPGAN-ncnn - a naive NCNN implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration

Overview

GFPGAN-ncnn

a naive ncnn implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration

model support:

1.GFPGANCleanv1-NoCE-C2

All models are available in Baidu Pan (i4xb)

TODO:

1.whole image restore
2.windows gui demo
3.support ncnn-vulkan
4.model with colorization

Result



Reference

1.https://github.com/xinntao/Real-ESRGAN
2.https://github.com/TencentARC/GFPGAN
3.https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan
3.https://github.com/Tencent/ncnn
4.https://github.com/deepcam-cn/yolov5-face

Comments
  • Can not link target, missing file ncnn.lib

    Can not link target, missing file ncnn.lib

    OS: Windows 10 21H1 Build tool: Visual Studio 2019

    Commands:

    mkdir build
    cd build
    cmake ..
    cmake --build .
    

    Result:

    LINK : fatal error LNK1104: 无法打开文件“ncnn.lib” [D:\GFPGAN-ncnn\build\ncnn_gfpgan.vcxproj]
    
    opened by Sg4Dylan 2
  • Change model files location (outside to baidu)

    Change model files location (outside to baidu)

    Hello, I can't download the models you made from baidu website because I don't live in China, please put them somewhere so people can download easier as well.

    opened by onuralpszr 3
  • GFPGANv1.3.pth

    GFPGANv1.3.pth

    Hi. Thank You for your work. Could you help me convert new GFPGANv1.3.pth model to onnx format? Because I get errors in convert process convering GFPGANv1.3.pth to ONNX

    opened by magicse 0
  • undefined reference to `ncnn::Mat::reshape(int, int, int, ncnn::Allocator*) const'

    undefined reference to `ncnn::Mat::reshape(int, int, int, ncnn::Allocator*) const'

    Comiler Mingw-w64 here log with errors

    [100%] Linking CXX executable Z:\AI_SDK\CPP_GFPGAN\GFPGAN-ncnn-main\ncnn_gfpgan. exe "C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\ncnn_gfpg an.dir\link.txt --verbose=1 "C:\Program Files\CMake\bin\cmake.exe" -E rm -f CMakeFiles\ncnn_gfpgan.dir/objec ts.a C:\mingw64\bin\ar.exe qc CMakeFiles\ncnn_gfpgan.dir/objects.a @CMakeFiles\ncnn_g fpgan.dir\objects1.rsp C:\mingw64\bin\x86_64-w64-mingw32-g++.exe -std=c++11 -pie -fPIE -fPIC -Wall -O3 -fopenmp -O3 -DNDEBUG -Wl,--whole-archive CMakeFiles\ncnn_gfpgan.dir/objects.a -Wl,--no-whole-archive -o Z:\AI_SDK\CPP_GFPGAN\GFPGAN-ncnn-main\ncnn_gfpgan.exe -Wl,--out-implib,Z:\AI_SDK\CPP_GFPGAN\GFPGAN-ncnn-main\libncnn_gfpgan.dll.a -Wl, --major-image-version,0,--minor-image-version,0 @CMakeFiles\ncnn_gfpgan.dir\link libs.rsp C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw 32/bin/ld.exe: CMakeFiles\ncnn_gfpgan.dir/objects.a(gfpgan.cpp.obj):gfpgan.cpp:( .text+0x13e): undefined reference to ncnn::Net::Net()' C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw 32/bin/ld.exe: CMakeFiles\ncnn_gfpgan.dir/objects.a(gfpgan.cpp.obj):gfpgan.cpp:( .text+0xcc0): undefined reference toncnn::Mat::reshape(int, int, int, ncnn::Allocator*) const'

    opened by magicse 1
  • 如何生成ncnn的模型文件呢

    如何生成ncnn的模型文件呢

    你好,感谢你的工作 我是一名ncnn初学者,我在mac上做了简单修改,成功运行了你的代码 现在我想学习下如何ncnn模型文件是如何转成功的呢?

    我目前的步骤为: 1、按如下修改GFPGan的stylegan2_clean_arch.py 中的代码

            # noise injection
            if noise is None:
                b, _, h, w = out.shape
                # noise = out.new_empty(b, 1, h, w).normal_()
                # noise = torch.empty(b, 1, h, w).cuda()
                # nn.init.normal_(noise)
                noise = torch.randn(b, 1, h, w).cuda()
    

    2、将GFPGANCleanv1-NoCE-C2.pth 转为了onnx 3、然后应用了python -m onnxsim model.onnx model-sim.onnx 4、./onnx2ncnn model-sim.onnx encoder.param encoder.bin 报错

    Gather not supported yet!
     \# axis=1
    zsh: segmentation fault  ./onnx2ncnn model-sim.onnx encoder.param encoder.bin
    
    opened by miaofeng01 3
Owner
FeiGeChuanShu
FeiGeChuanShu
Swapping face using Face Mesh with TensorFlow Lite

demo.mp4 Aiine Transform (アイン変換) Swapping face using FaceMesh. (could be used to unveil masked faces) Tested Environment Computer Windows 10 (x64) + V

iwatake 17 Apr 26, 2022
The SCRFD face detection, depends on ncnn library and opencv

The SCRFD face detection, depends on ncnn library and opencv

null 157 Jan 5, 2023
Android face detect and segmentation by ncnn

Android face detect and segmentation by ncnn

null 118 Dec 29, 2022
Deploy SCRFD, an efficient high accuracy face detection approach, in your web browser with ncnn and webassembly

ncnn-webassembly-scrfd open https://nihui.github.io/ncnn-webassembly-scrfd and enjoy build and deploy Install emscripten

null 42 Nov 16, 2022
RealSR-NCNN-Android is a simple Android application that based on Realsr-NCNN & Real-ESRGAN.

RealSR-NCNN-Android Real-ESRGAN is a Practical Algorithms for General Image Restoration. RealSR-NCNN-Android is a simple Android application that base

null 272 Jan 3, 2023
OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation

Build Type Linux MacOS Windows Build Status OpenPose has represented the first real-time multi-person system to jointly detect human body, hand, facia

null 25.6k Dec 29, 2022
This is a sample ncnn android project, it depends on ncnn library and opencv

This is a sample ncnn android project, it depends on ncnn library and opencv

null 248 Jan 6, 2023
fast face classification

Fast Face Classification (F²C)—— An Efficient Training Approach for Very Large Scale Face Recognition Training on ultra-large-scale datasets is time-c

null 70 Jan 4, 2023
This is the code of our paper An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicity.

Fast Face Classification (F²C) This is the code of our paper An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicit

null 33 Jun 27, 2021
Face tracking plugin for OBS Studio

OBS Face Tracker Plugin Introduction This plugin provide a filter for face detection and face tracking for mainly a speaking person. This plugin emplo

Norihiro Kamae 198 Dec 31, 2022
Chunky pixel watch face for SQFMI's Watchy

pxl999 Pxl999 is a chunky pixel watch face for SQFMI's Watchy. This watch face features live weather updates every 30 minutes and NTP syncing twice a

null 28 Apr 17, 2022
Fast and robust face tracking addon for openFrameworks based on YOLO5Face

ofxFaceTracker3 Working in progress Fast and robust face tracking addon for openFrameworks based on YOLO5Face and ONNX Runtime. Features Fast and robu

Yuya Hanai 13 Nov 6, 2022
NCNN+Int8+YOLOv4 quantitative modeling and real-time inference

NCNN+Int8+YOLOv4 quantitative modeling and real-time inference

pengtougu 20 Dec 6, 2022
Reactive Light Training Module used in fitness for developing agility and reaction speed.

Hello to you , Thanks for taking interest in this project. Use case of this project is to help people that want to improve their agility and reactio

null 6 Dec 14, 2022
Python and C++ implementation of "MarkerPose: Robust real-time planar target tracking for accurate stereo pose estimation". Accepted at LXCV Workshop @ CVPR 2021.

MarkerPose: Robust Real-time Planar Target Tracking for Accurate Stereo Pose Estimation This is a PyTorch and LibTorch implementation of MarkerPose: a

Jhacson Meza 47 Nov 18, 2022
Visual odometry package based on hardware-accelerated NVIDIA Elbrus library with world class quality and performance.

Isaac ROS Visual Odometry This repository provides a ROS2 package that estimates stereo visual inertial odometry using the Isaac Elbrus GPU-accelerate

NVIDIA Isaac ROS 339 Dec 28, 2022
Strong Othello AI based on Egaroucid4, which got 1st place in the world

Egaroucid5 Strong Othello AI based on Egaroucid4, which got 1st place in the world Abstract Egaroucid5 is an Othello AI. You can play light version of

Takuto Yamana 35 Dec 18, 2022
With deep learning to neuroscience world with shield for jetson nano - JNEEG (In progress)

With deep learning to neuroscience world with shield for jetson nano - JNEEG (In progress)

Ildaron 23 Dec 11, 2022
Deep Learning API and Server in C++11 support for Caffe, Caffe2, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE

Open Source Deep Learning Server & API DeepDetect (https://www.deepdetect.com/) is a machine learning API and server written in C++11. It makes state

JoliBrain 2.4k Dec 30, 2022