---
title: BOPBTL-scratch-detection-fp32-mlx
canonical_url: "https://www.modelscope.cn/models/mlx-community/BOPBTL-scratch-detection-fp32-mlx"
md_url: "https://www.modelscope.cn/models/mlx-community/BOPBTL-scratch-detection-fp32-mlx.md"
repository: mlx-community/BOPBTL-scratch-detection-fp32-mlx
last_updated: 2026-08-02
license: mit
pipeline_tag: image-to-image
tasks:
  - image-to-image
parameters: 37.6M
tensor_type:
  - F32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 5
stars: 0
tags:
  - mlx
  - image-to-image
  - scratch-detection
  - photo-restoration
---

# BOPBTL-scratch-detection-fp32-mlx

> BOPBTL-scratch-detection-fp32-mlx - mlx-community 在 ModelScope 开源的模型。BOPBTL-scratch-detection-fp32-mlx

mlx-community/BOPBTL-scratch-detection-fp32-mlx 是 ModelScope 魔搭社区上的 37.6M 参数image-to-image模型，采用 mit 许可。

- **Repository**: mlx-community/BOPBTL-scratch-detection-fp32-mlx
- **License**: mit
- **Tasks**: image-to-image
- **Parameters**: 37.6M
- **Tags**: mlx, image-to-image, scratch-detection, photo-restoration
- **Downloads**: 5
- **Stars**: 0
- **Last updated**: 2026-08-02

Source: https://www.modelscope.cn/models/mlx-community/BOPBTL-scratch-detection-fp32-mlx

---

# BOPBTL-scratch-detection-fp32-mlx

The scratch/defect **detector** from Microsoft's *Bringing Old Photos Back to Life*
([microsoft/Bringing-Old-Photos-Back-to-Life](https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life)),
converted for MLX: grayscale photo in → per-pixel damage probability out.

- `UNet(in=1, out=1, depth=4, conv_num=2, wf=6, batch_norm, up_mode="upsample", antialiasing=True)`,
  37,626,177 params, fp32 (150.6 MB — the released 1.90 GiB checkpoint minus its Adam state).
- Keys are the original torch `state_dict` names (NCHW conv layout), including BatchNorm running
  stats and the BlurPool `filt` buffers — consumers transpose per their framework's convention.
- Reference behaviour: short-side-256 (/16-aligned) BICUBIC resize, grayscale, Normalize([.5],[.5]);
  `sigmoid(out) ≥ 0.4` is upstream's mask threshold.

**Swift consumer:** [`xocialize/mlx-bopbtl-swift`](https://github.com/xocialize/mlx-bopbtl-swift) —
parity-locked at **119.8 dB worst** vs fp32 PyTorch (and the reason its forward runs on the CPU
stream is documented there: a measured Metal fp32 conv2d divergence window, not a preference).

## License

MIT — the upstream LICENSE file, all source headers, and README §License (which extends MIT to
"the codes and the pretrained model" verbatim). The training dataset was never released; the model
cannot be retrained or audited.
