deblur-models / README.md
levxme's picture
Upload deblur models (ONNX w16 + MediaPipe) and model card
dadc8b8 verified
|
Raw History Blame Contribute Delete
3.56 kB
metadata
license: other
license_name: per-file-see-table
license_link: https://huggingface.co/levxme/deblur-models/blob/main/NOTICE.md
library_name: onnx
tags:
  - onnx
  - onnxruntime-web
  - webgpu
  - image-restoration
  - deblurring
  - denoising
  - super-resolution
  - face-restoration

deblur-models

ONNX and MediaPipe model files used by a browser-based photo deblurring app (WebGPU, onnxruntime-web). Everything runs on the user's own device. This repository only hosts the files the app downloads once and caches.

Use: personal, non-commercial, open-source. The models are the work of the authors listed below; please credit them. One model (CodeFormer) is licensed for non-commercial use only, so do not use this repository for commercial work. The app repository will be linked here later.

Files

file size original model authors paper / repo licence what changed
restormer-defocus-w16.onnx 54.9 MB Restormer, single-image defocus deblurring Zamir, Arora, Khan, Hayat, Khan, Yang arXiv 2111.09881, swz30/Restormer MIT ONNX export (opset 17), weights stored as fp16, fp32 compute
restormer-denoise-w16.onnx 54.8 MB Restormer, real image denoising (SIDD) same same MIT same
realesrgan-x2-w16.onnx 33.8 MB Real-ESRGAN RealESRGAN_x2plus (RRDBNet) Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan arXiv 2107.10833, xinntao/Real-ESRGAN BSD-3-Clause ONNX export, dynamic height and width, fp16 weights, fp32 compute
codeformer-w16.onnx 188.7 MB CodeFormer Shangchen Zhou, Kelvin C.K. Chan, Chongyi Li, Chen Change Loy arXiv 2206.11253, sczhou/CodeFormer S-Lab License 1.0, non-commercial only ONNX export, fidelity weight fixed at 0.7, codebook lookup rewritten as ArgMax + Gather (same maths), fp16 weights, fp32 compute
selfie_multiclass_256x256.tflite 16.4 MB MediaPipe Selfie Multiclass segmenter Google model card Apache-2.0 none (unmodified copy)
face_landmarker.task 3.8 MB MediaPipe Face Landmarker Google model card Apache-2.0 none (unmodified copy)

Full licence texts and copyright notices: NOTICE.md.

Input and output

file input output
restormer-*-w16.onnx input float32 [1,3,512,512], RGB 0..1 output same shape, 0..1 (clamp)
realesrgan-x2-w16.onnx input float32 [1,3,h,w], RGB 0..1, h and w even, up to 384 output [1,3,2h,2w] (can overshoot 0..1 slightly; clamp)
codeformer-w16.onnx input float32 [1,3,512,512], RGB in [-1,1], an aligned 512 face crop output same shape, [-1,1]

"w16" means weights are stored as fp16 and cast to fp32 at load; all maths is fp32 (full fp16 compute was visibly wrong on WebGPU for Restormer). Parity against PyTorch fp32 on CPU (onnxruntime 1.19.2, one real 512 crop each): Restormer denoise 107 dB, Real-ESRGAN 83 dB, CodeFormer 80 dB PSNR.

Credits

Restormer: Zamir et al., CVPR 2022. Real-ESRGAN: Wang et al., ICCVW 2021. CodeFormer: Zhou et al., NeurIPS 2022. MediaPipe: Google. All credit for the models belongs to them; this repository only converts the file format.