# Image-Level Anti-Personnel Landmine Detection Using Deep Learning in Long-Wave Infrared Images
## 3 Methods
### Mitigating Spurious Features via Image Inpainting Augmentation  
Existing studies have shown that deep image classifiers trained with a single supervision label often heavily rely on spurious background features, patterns unrelated to the target foreground, possibly leading to fault predictions based on these cues [48; 49; 50]. This issue is particularly prominent in both CNN-based and ViT-based ImageNet pre-trained models when the models make a prediction on the images where the size of foreground object is small and the location of foreground object is far from the center [50]. This suggests that classifiers fine-tuned on the AP landmine dataset may also strongly rely on spurious features, given that AP landmines occupy a small portion of the image and are typically not centrally located. Therefore, the trained models will not generalize well to unseen background images.  
Rather than employing specialized techniques [49] to reduce reliance on spurious features in prediction results, we propose a simple image augmentation strategy inspired by a recent approach for analyzing the influence of spurious features in ImageNet pre-trained models [50]. Specifically, we first annotate bounding boxes around AP landmines in all positive images from the AP landmine dataset. It is important to note that this annotation process does not require strict guidelines or validation to minimize label noise [21]; the annotated regions need only be sufficiently large to encompass the AP landmine. The selected regions are then inpainted using the well-known image inpainting model, LaMa [51], to create synthetic landmine-free images, which are subsequently used to augment the landmine-free image set. Examples of original AP landmine images and their inpainted  
Figure 4: A simple framework for extracting a single image-level feature from input images is illustrated. First, visual features are extracted using a pre-trained vision foundation model. These features are then processed through an attention-based MIL module that emphasizes discriminative features to derive a final feature appropriate for classifying AP landmine images. The top flow illustrates the process of obtaining the image-level feature for the positive class, while the bottom flow shows the corresponding process for the negative class.  
counterparts are shown in Figure 5. For clarity, we refer to the train set augmented by duplicating real landmine-free images (as described in Section 2) as the **duplicated train set** and, and the train set that includes both synthetic (i.e., inpainted version of AP landmine images in the train set) and real landmine-free images as the **inpainting-augmented train set**.  
An additional purpose in constructing the synthetic landmine-free dataset is to enable quantitative interpretation of classification results. A common approach to model interpretability involves generating heatmaps that highlight regions most influential to the model's predictions [52, 53]. However, these methods are qualitative, require human supervision, and can be noisy, thus making their judgements potentially unreliable [48]. To complement heatmap-based interpretations, we leverage our synthetic landmine-free images for a more objective analysis. Regardless of whether the model is trained on the duplicated or inpainting-augmented train set, we can evaluate its predictions on synthetic landmine-free images that correspond to AP landmine images in the test set. Since the model has never encountered these inpainted versions during training, a high probability of positive classification suggests a strong reliance on spurious features, whereas low positive predictions imply that the model is focusing more appropriately on features related to AP landmines.