plutoyuxie / Reconstruction-by-inpainting-for-visual-anomaly-detection

This is an unofficial implementation of Reconstruction by inpainting for visual anomaly detection (RIAD).
91 stars 20 forks source link

Gradient Magnitude Map #12

Open bgiebl opened 1 year ago

bgiebl commented 1 year ago

The gradient magnitude map is defined as $g(\mathbf{I}) = \sqrt{(\mathbf{I} \mathbf{h}_x) + (\mathbf{I} \mathbf{h}_y)}$

Why are you using g_I = edge_filter(median_filter(x)) in lines 35 and 36 in gms_loss.py instead?