This script is designed to address the limitations of efficientAD. It captures the binarized images after training, selects the defect regions, and performs background removal. The defect images with the background removed are then merged with the original images. Additionally, a heatmap is generated to facilitate comparison between the three images, helping users to understand the defect areas more clearly.

