feigechuanshu / gfpgan-ncnn Goto Github PK
View Code? Open in Web Editor NEWa naive NCNN implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration
a naive NCNN implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration
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
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 to
ncnn::Mat::reshape(int, int, int, ncnn::Allocator*) const'
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.
could this work on android , inference on android device?
How to compile for Windows?
你好,感谢你的工作
我是一名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
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]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.