Fig. 2
From: A swin transformer-based hybrid reconstruction discriminative network for image anomaly detection

Process of Image Patch Extraction: original image undergoes binarization to create a mask, which is applied to the original image to extract the object, followed by patch sampling from the extracted region.