Old-photo scratch detection β€” ONNX for the browser

ONNX export of the scratch detection network from Microsoft's Bringing Old Photos Back to Life (Global/checkpoints/detection/FT_Epoch_latest.pt), for running in the browser with onnxruntime-web.

Used by the free Doetra Photo Restorer to find scratches, cracks and dust automatically before they are repaired.

What changed vs. the original

  • Exported to ONNX (opset 17) with dynamic height/width and the sigmoid included in the graph.
  • Weights stored as fp16 and cast to fp32 inside the graph (β‰ˆ75 MB instead of β‰ˆ150 MB, 99.999% identical masks).

Input / output

Name Shape Notes
Input input [1, 1, H, W] float32 grayscale (gray/255 βˆ’ 0.5) / 0.5; H and W multiples of 16
Output prob [1, 1, H, W] float32 scratch probability; the original uses β‰₯ 0.4

Credits & license

  • Bringing Old Photos Back to Life, Ziyu Wan et al., CVPR 2020 β€” Β© Microsoft Corporation, MIT License.
  • This export is redistributed under the same MIT license.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support