ReMOVE: A Reference-free Metric for Object Erasure

Aditya Chandrasekar, Goirik Chakrabarty, Jai Bardhan, Ramya Hebbalaguppe, Prathosh Ap

TL;DR

This paper introduces ReMOVE, a novel reference-free metric for evaluating object erasure in diffusion-based image editing. Unlike existing metrics that require ground truth images, ReMOVE assesses inpainting quality by comparing feature representations of masked and unmasked regions, aligning well with human perception and outperforming current methods in challenging scenarios.

What Problem Does This Paper Address?

Diffusion models have revolutionized image editing, enabling tasks like object erasure. However, evaluating the success of these erasure operations, especially when no reference image is available (a common practical scenario), is challenging. Existing metrics often rely on ground truth images, which are difficult to obtain at scale. Furthermore, diffusion models can sometimes replace an object with another, rather than seamlessly removing it and reconstructing the background, a nuance that many current metrics fail to distinguish. This ambiguity leads to unreliable evaluations of object erasure efficacy.

Methods

ReMOVE is a reference-free metric that leverages a Vision Transformer (ViT) pre-trained on image segmentation tasks. The core idea is to extract deep feature embeddings for image patches. The process involves:

  1. Image Preprocessing: The input image is optionally cropped (to ensure comparable patch counts between masked and unmasked regions) and normalized.
  2. Feature Extraction: A ViT encoder processes the image to extract patch-wise feature embeddings.
  3. Masking: The provided object mask is resized to match the feature map dimensions.
  4. Feature Segregation: The extracted features are split into two sets: those corresponding to the masked region (object to be erased) and those corresponding to the unmasked background region.
  5. Mean Features: The average feature vector is computed for both the masked and unmasked sets.
  6. REMOVE Calculation: The similarity between the mean masked and mean unmasked feature vectors is calculated using cosine similarity. A higher similarity score indicates better inpainting quality, meaning the inpainted region is more consistent with the background.

Datasets

  • Toy Dataset: A synthetically generated dataset created using 4300 background images from Flickr and 20 masks from the PIE-Bench dataset. Inpaintings were generated using Stable Diffusion Inpaint with various seeds and an empty prompt to introduce variability in quality. This dataset comprises approximately 200,000 images.
  • DEFACTO Dataset: A real-world dataset for object removal, containing ~25,000 input images, inpainting masks, and ground truth tuples. This dataset features more complex scenes and a wider variation in mask sizes compared to the toy dataset.

Key Insights and Ideas

  • Reference-free is Crucial: The paper strongly emphasizes the practical need for reference-free metrics, as ground truth images are often unavailable in real-world editing scenarios.
  • Distinguishing Erasure from Replacement: A key insight is that diffusion models can be prone to replacing objects rather than truly erasing them. ReMOVE's feature-based comparison helps differentiate these outcomes, which is a significant improvement over metrics like CLIPScore.
  • Deep Features Capture Perception: The use of deep features from a ViT is motivated by the idea that these representations better align with human perceptual understanding of image quality than traditional pixel-based metrics.
  • Cropping for Consistency: The paper highlights the importance of a cropping strategy to ensure that the number of masked and unmasked patches are comparable, especially for smaller masks, leading to more reliable evaluations.

Key Results

  • Correlation with LPIPS: The toy experiment demonstrated a strong, monotonic correlation between ReMOVE and LPIPS (a reference-based metric known to align with human perception), where ReMOVE scores decreased as inpainting quality (measured by LPIPS) decreased.
  • Performance on DEFACTO: On the DEFACTO dataset, ReMOVE showed consistent alignment with LPIPS across different mask sizes (small, medium, large).
  • User Study Agreement: A user study revealed that ReMOVE agreed with user preferences 74.7% of the time, slightly outperforming LPIPS (71.9%), despite LPIPS having access to reference information. This suggests ReMOVE captures user preferences effectively.
  • CLIPScore Limitations: The paper demonstrates that CLIPScore (both CS-NR and CS-FR) can be noisy and ineffective, particularly in complex scenes or when distinguishing between object removal and replacement.

Limitations and Future Work

  • Cropping Strategy: While effective, the cropping strategy is an ablation study result. The paper notes that without cropping, ReMOVE produced implausible results on the DEFACTO dataset, indicating its necessity for real-world scenarios.
  • Computational Cost: While not explicitly detailed as a limitation, the use of a ViT for feature extraction implies a certain computational overhead compared to simpler metrics.
  • Future Work: The authors believe ReMOVE will be a valuable tool for researchers and practitioners to evaluate and advance image inpainting techniques, ultimately enhancing their real-world applicability. Further exploration into improving the metric's robustness and efficiency could be future directions.

Summary updated

BibTeX
@inproceedings{chandrasekar2024remove,
  author = {Aditya Chandrasekar and Goirik Chakrabarty and Jai Bardhan and Ramya Hebbalaguppe and Prathosh AP},
  title = {{ReMOVE: A Reference-free Metric for Object Erasure}},
  booktitle = {Workshops @ CVPR},
  year = {2024},
}
Figure