/realcugan-ncnn-webassembly

基于Wasm的动漫图片超分辨率处理

Primary LanguageJavaScriptMIT LicenseMIT

RealCUGAN-ncnn-webassembly

本项目使用Web Assembly技术,基于ncnn运行Real-CUGAN模型。目前只能使用CPU进行计算。

Real-CUGAN 是一个使用百万级动漫数据进行训练的,结构与Waifu2x兼容的通用动漫图像超分辨率模型。它支持2x\3x\4x倍超分辨率,其中2倍模型支持4种降噪强度与保守修复,3倍/4倍模型支持2种降噪强度与保守修复。

代码实现上深度参考了nihui大佬的realcugan-ncnn-vulkanncnn-webassembly-nanodet

使用

网站地址: https://real-cugan.animesales.xyz/

目前不支持iOS,Android请在独立浏览器内打开,PC推荐使用最新版本的Chrome或Firefox。

How to build

  1. 安装emscripten
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.13
./emsdk activate 3.1.13

source emsdk/emsdk_env.sh # 或者添加到.zshrc等地方
  1. 构建项目:
git clone https://github.com/hanfengsan/realcugan-ncnn-webassembly.git
cd realcugan-ncnn-webassembly

git submodule update --init
sh build.sh

go run local_server.go

然后打开: http://localhost:8000