Real-ESRGAN-ncnn-vulkan icon indicating copy to clipboard operation
Real-ESRGAN-ncnn-vulkan copied to clipboard

Request: offer sample apps for Android and IOS

Open AndroidDeveloperLB opened this issue 1 year ago • 6 comments

As the title says. It seems this repository should make it possible, because of this:

https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-android https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-ios-on-macos-with-xcode

If you create a sample project (here or somewhere else and link to it), it could be easier for everyone to use it. Please, if you do it, show also how to update it in case there are new versions of the libraries.

I would really appreciate it.

AndroidDeveloperLB avatar Aug 25 '22 17:08 AndroidDeveloperLB

I am not an expert at it.

Wait for someone to help :-)

xinntao avatar Aug 26 '22 02:08 xinntao

@xinntao I'm not either. Even though I do develop for Android, I never used such a library.

AndroidDeveloperLB avatar Aug 26 '22 06:08 AndroidDeveloperLB

@xinntao I've found this: https://github.com/tumuyan/RealSR-NCNN-Android Do you know of it?

AndroidDeveloperLB avatar Aug 26 '22 06:08 AndroidDeveloperLB

I have used Android Native to create APP and it works fine. If you need to know more, you can contact me.

I am still trying to integrate other models (e.g. waifu2x) in my APP, but have encountered some problems, I will open source if the problems are solved.

Sun-ZhenXing avatar Sep 14 '22 15:09 Sun-ZhenXing

@Sun-ZhenXing Please share it on Github.

AndroidDeveloperLB avatar Sep 14 '22 19:09 AndroidDeveloperLB

@AndroidDeveloperLB

Here's a Fact: If you deploy Real-ESRGAN on a mobile device, it will run your mobile device's graphics card at full capacity for several minutes. No other work can be done during that time, and this obviously cannot be used in production.

I have not studied Android development myself, so it may need to be refactored. This is experimental software and not a lot of engineering has been done.

There were too many incompatibilities with the Android NDK and un-debuggable failures when exporting JNI interfaces. So I chose to build the dynamic link library (.so) on Android itself, and it worked. I've built several models using Termux, tested them with Python scripts, and they work fine in Termux. I felt this step was important, so I wanted to write a document describing how to build on Android itself. Obviously this approach is not cross-platform, and I can only run it on arm64-v8a devices.

My Android project is Sun-ZhenXing/Real-ESRGAN-android, but it doesn't include docs for building dynamic link libraries. And it retains the command mode, which invokes the model by command-like means. I hope you can Pull Request to improve it.

Sun-ZhenXing avatar Sep 15 '22 00:09 Sun-ZhenXing