face_enhancer / docs /ncnn_conversion.md
kplgpt68's picture
Upload 11 files
d93771f
|
raw
history blame
580 Bytes

Instructions on converting to NCNN models

  1. Convert to onnx model with scripts/pytorch2onnx.py. Remember to modify codes accordingly
  2. Convert onnx model to ncnn model
    1. cd ncnn-master\ncnn\build\tools\onnx
    2. onnx2ncnn.exe realesrgan-x4.onnx realesrgan-x4-raw.param realesrgan-x4-raw.bin
  3. Optimize ncnn model
    1. fp16 mode
      1. cd ncnn-master\ncnn\build\tools
      2. ncnnoptimize.exe realesrgan-x4-raw.param realesrgan-x4-raw.bin realesrgan-x4.param realesrgan-x4.bin 1
  4. Modify the blob name in realesrgan-x4.param: data and output