arXiv:2609.03475cs.CVSep 2026

Manuscript Offprint

arXiv:2609.03475

SafeRestore: Detector-Relative Risk Certificates for Selective Industrial Image Restoration

Shaoliang Yang, Jun Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Industrial inspection pipelines often restore a measured image before a detector acts on it, yet restoration can suppress detector-supported defect structure or create clean-region activations. We formulate restoration as a selective action problem over the measured display, five restored candidates, and review. SafeRestore ranks candidates with action-specific fitted scores, chooses a gate on threshold-tuning data, and evaluates the fixed gate on a disjoint certification sample with two one-sided exact binomial bounds: one for the positive-conditional evidence-loss incident rate and one for the all-accepted excess-activation incident rate. The guarantee is marginal for one policy fixed before its certification outcomes are observed, under an image-level i.i.d. working model. In a retrospective split-sample study of 4,591 public Carinthia-S images, the protocol yields auditable risk–coverage behavior. The primary all-action policy passes in one of five training repetitions (12.0% ± 26.9% pass-gated test coverage when failures count as zero), whereas fixed bicubic and reduced-complexity variants pass more often. On reserved morphologies, evidence-loss incidence rises to 81.1–90.3%, and KolektorSDD lacks both detector competence and enough positive certification images for the stated target. The contribution is therefore an auditable, detector-relative framework for deciding when a transformed image may be returned automatically and when review remains necessary—not a claim that adaptive routing outperforms simpler policies on the present evidence.

Keywords selective image restoration · exact binomial certification · industrial inspection · defect segmentation · abstention · uncertainty quantification

1 Introduction

Image restoration changes the observation on which an inspection decision is made. A transformation that improves visual sharpness or average reconstruction fidelity can still suppress a small defect, and a learned prior can introduce structure that activates a downstream detector [1, 2, 3]. These two failures have different operational consequences and are poorly summarized by PSNR or SSIM when the relevant structure occupies a small fraction of the image.

In an inspection pipeline, restoration is therefore a decision problem rather than only a reconstruction problem. For each observation, the pipeline may retain the measured display, return one of several restored candidates, or assign the case to review. The useful question is not only which candidate has the best mean quality, but whether a fixed policy has enough held-out evidence to return any candidate automatically while keeping two distinct incident rates below stated limits. Task-oriented restoration addresses downstream utility [4, 5, 6]; selective prediction and risk-control methods address abstention and finite-sample calibration [7, 8, 9]. SafeRestore joins these perspectives at the level of the returned image action.

SafeRestore is a detector-relative selective-restoration protocol. Its action set contains the raw display and five fixed or learned restorations. For each action, class-balanced logistic models produce two fitted ranking scores from detector and consistency features. One score ranks evidence-loss risk—detector recall falling below a specified floor on a

∗^{*}Corresponding author: jwang22@scu.edu.

PREPRINT

defect-positive image. The other ranks excess-activation risk—clean-region detector activation exceeding a specified threshold. The scores select an action and order images for gating; they are ranking scores, not calibrated probabilities. A gate is chosen on one data role and evaluated once on a disjoint certification role using separate one-sided exact binomial bounds (Figure 1).

The risk populations matter. Evidence loss is meaningful only on defect-positive images, whereas excess activation is defined on the clean region of every accepted image. Pooling clean images into the evidence-loss denominator would make apparent performance depend mechanically on defect prevalence. SafeRestore therefore records different denominators for the two endpoints, reports positive and clean coverage separately, and supplies a prevalence-standardized expression for excess-activation risk when the intended operating mixture differs from the study mixture.

RANK ONE DISPLAY FOR EACH IMAGE

Figure

Figure 1: SafeRestore separates action ranking from policy certification. The raw display and restored candidates receive two fitted ranking scores (not calibrated probabilities). Their worst normalized score selects the displayed candidate and defines a gate. A held-out certification sample supplies exact bounds for evidence loss among accepted positives and excess activation among all accepted images. The policy passes only when both upper bounds are at or below their targets; a passing fixed policy then returns its selected action, and all other cases are assigned to review.

The statistical statement is deliberately narrow. For one policy fixed before its certification outcomes are observed, an image-level i.i.d. working model and a Bonferroni allocation across the two endpoints yield a finite-sample bound on false certification. The statement is marginal for that policy. It does not cover choosing whichever detector/restorer seed, action pool, or ablation happens to pass. The empirical study therefore reports five marginal certificates as a sensitivity analysis and does not select a passing seed for deployment.

The contribution is a protocol, not a new restoration network or generic conformal theorem. Compact restorers and detectors are used as reproducible testbeds for the decision layer. On a retrospective split of 4,591 public Carinthia-S SEM image–mask pairs [10], the primary all-action policy passes in only one of five training repetitions, while fixed bicubic and several simpler variants pass more often. Certification therefore exposes training sensitivity and withholds automatic return when evidence is insufficient. Reserved morphologies and KolektorSDD further show where the nominal certificate does not transfer. Relationship to our earlier study of whether super-resolution preserves defect evidence [11] is summarized once in Table 1; the present estimand and records are new, but the Carinthia-S identity inventory is shared.

PREPRINT

The contributions are:

  1. a detector-relative formulation of selective restoration with separate evidence-loss and excess-activation populations, component coverages, and an explicit prevalence-standardized activation risk;

  2. a reproducible rank–tune–certify procedure with a finite-sample false-certification statement for one fixed policy, an explicit boundary on cross-policy selection, and record-level evidence sufficient to reconstruct every certificate; and

  3. a five-repetition public-data study that reports risk–coverage behavior, compares every fixed action with adaptive pools, foregrounds the strongest simplifications, and diagnoses failure under stronger endpoints, limited certification evidence, reserved morphologies, and a second public dataset—and shows that the observed pass/fail pattern is unchanged under the examined alternative bound constructions.

References (45)