Skip to content

abdo-eldesokey/mind-the-glitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mind-the-Glitch

The official implementation for the Neurips 2025 paper "Mind-the-Glitch: Visual Correspondence for Detecting Inconsistencies in Subject-Driven Image Generation"

Teaser Image

🚀 Release Status

  • Model Release - Pre-trained MTG model weights and inference code
  • Training Code - Training scripts and configuration files
  • Training Dataset - Automated dataset generation pipeline and curated dataset
  • Evaluation Benchmark - Benchmark evaluation code and metrics

📦 Installation

Prerequisites

  • Python 3.8+
  • CUDA-compatible GPU (recommended)

Setup Environment

  1. Clone the repository with submodules:
git clone --recursive https://github.com/abdo-eldesokey/mind-the-glitch.git
cd mind-the-glitch
  1. Create and activate a conda environment:
conda create -n mtg python=3.11
conda activate mtg
  1. Install PyTorch with CUDA support:
pip install torch==2.5.1 torchvision==0.20.1 --index-url https://download.pytorch.org/whl/cu124
  1. Install remaining dependencies:
pip install -r requirements.txt
  1. Initialize submodules (if not cloned recursively):
git submodule update --init --recursive
  1. Install Grounded-Segment-Anything:
git clone https://github.com/IDEA-Research/Grounded-Segment-Anything.git
cd Grounded-Segment-Anything
pip install --no-build-isolation -e GroundingDINO
cd ..

🎯 Getting Started

The easiest way to get started with Mind-the-Glitch is through our interactive playground notebook:

jupyter notebook notebooks/playground.ipynb

This notebook demonstrates:

  • Loading the pre-trained MTG model
  • Running inference on sample images
  • Visualizing the disentangled features and visual correspondence.

📚 Citation

If you find this work useful for your research, please cite our paper:

@inproceedings{eldesokey2025mindtheglitch,
  title={Mind-the-Glitch: Visual Correspondence for Detecting Inconsistencies in Subject-Driven Generation},
  author={Eldesokey, Abdelrahman and Cvejic, Aleksandar and Ghanem, Bernard and Wonka, Peter},
  booktitle={Advances in Neural Information Processing Systems},
  year={2025}
}

About

The official implementation for "Mind-the-Glitch: Visual Correspondence for Detecting Inconsistencies in Subject-Driven Image Generation" (NeruIPS 2025)

Resources

Stars

Watchers

Forks

Contributors