Comments (9)
https://github.com/tanyiok1234/waifu2x_srmd-ncnn-vulkan-termux-binary
from srmd-ncnn-vulkan.
啥时间更新预编译的ncnn-android-vulkan-lib?
想在手机上跑跑超分的模型,APK里面。
不过好像需要下面的几个库...
ncnn-android-vulkan-lib/${ANDROID_ABI}/libglslang.a
ncnn-android-vulkan-lib/${ANDROID_ABI}/libOGLCompiler.a
ncnn-android-vulkan-lib/${ANDROID_ABI}/libOSDependent.a
ncnn-android-vulkan-lib/${ANDROID_ABI}/libSPIRV.a)
from srmd-ncnn-vulkan.
https://github.com/Tencent/ncnn/releases/tag/20200616
from srmd-ncnn-vulkan.
多谢大神!
from srmd-ncnn-vulkan.
@nihui 帮忙看看是啥问题吧。
在手机上跑了下,512x512的输入
模型load需要2s多,process时间6s多。输出的结果也不太对,保存的图是黑的...
如果用原图尺寸的话,3xxx X 2xxx跑一下时间更久,要几十秒
大概的调用是这样的:
// ncnn from bitmap
ncnn::Mat in = ncnn::Mat::from_android_bitmap_resize(env, bitmap, ncnn::Mat::PIXEL_BGR2RGB,512,512);
int c = 3;
ncnn::Mat out = ncnn::Mat(512 * scale, 512 * scale, (size_t)c, c);
BSTLOGE("before proc out width = %d, height = %d", out.w, out.h);
srmd.process(in, out);
BSTLOGE("out width = %d, height = %d", out.w, out.h);
// ncnn to bitmap
out.to_android_bitmap(env, outBitmap, ncnn::Mat::PIXEL_RGB);
我是在linux上面编译通了这套代码,生成好些*_int8s.spv.hex.h,*_fp16s.spv.hex.h的头文件,然后把这些头文件放在Android工程里面。会不会这些头文件与运行环境有关,在手机上需要专门生成一下?
from srmd-ncnn-vulkan.
tilesize太大了?
from srmd-ncnn-vulkan.
这段代码获取的heap_budget是一千多, tilesize就设成了200;
if (tilesize == 0)
{
uint32_t heap_budget = ncnn::get_gpu_device(gpuid)->get_heap_budget();
// more fine-grained tilesize policy here
if (model.find(PATHSTR("models-srmd")) != path_t::npos)
{
if (heap_budget > 2600)
tilesize = 400;
else if (heap_budget > 740)
tilesize = 200;
else if (heap_budget > 250)
tilesize = 100;
else
tilesize = 32;
}
}
from srmd-ncnn-vulkan.
@mychina75 请问能移植到android不?
from srmd-ncnn-vulkan.
不太行...
from srmd-ncnn-vulkan.
Related Issues (13)
- Compile error: missing "include <locale.h>" in main.cpp
- -j 2:2:2 causes my single-GPU system to entirely crash
- Deblur request
- scale=1
- Your Results in New Super-Resolution Benchmarks
- strange behavior
- 16bit
- [Unrelated request for ESRGAN] HOT 6
- Wrong number of arguments to ncnn API functions? HOT 2
- Feature request: support for input and output pipes?
- 关于srmd 模型param文件里的一个问题 HOT 2
- vkEnumeratePhysicalDevices failed -3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srmd-ncnn-vulkan.