AnyPattern: Towards In-context Image Copy Detection
Not on the map. Why?
Abstract (arXiv)
This paper explores in-context learning for image copy detection (ICD), i.e., prompting an ICD model to identify replicated images with new tampering patterns without the need for additional training. The prompts (or the contexts) are from a small set of image-replica pairs that reflect the new patterns and are used at inference time. Such in-context ICD has good realistic value, because it requires no fine-tuning and thus facilitates fast reaction against the emergence of unseen patterns. To accommodate the "seen rightarrow unseen" generalization scenario, we construct the first large-scale pattern dataset named AnyPattern, which has the largest number of tamper patterns (90 for training and 10 for testing) among all the existing ones. We benchmark AnyPattern with popular ICD methods and reveal that existing methods barely generalize to novel patterns. We further propose a simple in-context ICD method named ImageStacker. ImageStacker learns to select the most representative image-replica pairs and employs them as the pattern prompts in a stacking manner (rather than the popular concatenation manner). Experimental results show (1) training with our large-scale dataset substantially benefits pattern generalization (+26.66 % μ AP), (2) the proposed ImageStacker facilitates effective in-context ICD (another round of +16.75 % μ AP), and (3) AnyPattern enables in-context ICD, i.e., without such a large-scale dataset, in-context learning does not emerge even with our ImageStacker. Beyond the ICD task, we also demonstrate how AnyPattern can benefit artists, i.e., the pattern retrieval method trained on AnyPattern can be generalized to identify style mimicry by text-to-image models. The project is publicly available at https://anypattern.github.io.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 42 of its 77 references that are in the map. First posted on arXiv 21 Apr 2024.
Builds on
42 of 77 references.
References · 42
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2023Segment Anythingcited by 8,234
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,403
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
30 more
- 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,152
- 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generationcited by 3,300
- 2017Random Erasing Data Augmentationcited by 1,239
- 2018CosFace: Large Margin Cosine Loss for Deep Face Recognitioncited by 971
- 2017In Defense of the Triplet Loss for Person Re-Identificationcited by 786
- 2018AutoAugment: Learning Augmentation Policies from Datacited by 730
- 2020FDA: Fourier Domain Adaptation for Semantic Segmentationcited by 541
- 2021SLIP: Self-supervision meets Language-Image Pre-trainingcited by 436
- 2020Circle Loss: A Unified Perspective of Pair Similarity Optimizationcited by 403
- 2022DiffusionDB: A Large-scale Prompt Gallery Dataset for Text-to-Image Generative Modelscited by 379
- 2022Images Speak in Images: A Generalist Painter for In-Context Visual Learningcited by 318
- 2016Large-Margin Softmax Loss for Convolutional Neural Networkscited by 296
- 2018DropBlock: A regularization method for convolutional networkscited by 262
- 2022Visual Prompting via Image Inpaintingcited by 250
- 2023Glaze: Protecting Artists from Style Mimicry by Text-to-Image Modelscited by 205
- 2022A Self-Supervised Descriptor for Image Copy Detectioncited by 176
- 2020Torchattacks: A PyTorch Repository for Adversarial Attackscited by 158
- 2023What Makes Good Examples for Visual In-Context Learning?cited by 150
- 2023In-Context Learning Unlocked for Diffusion Modelscited by 104
- 2017Multi-style Generative Network for Real-time Transfercited by 61
- 2021The 2021 Image Similarity Dataset and Challengecited by 44
- 2023Exploring Effective Factors for Improving Visual In-Context Learningcited by 43
- 2022Sketch3T: Test-Time Training for Zero-Shot SBIRcited by 34
- 2021Contrastive Learning with Large Memory Bank and Negative Embedding Subtraction for Accurate Copy Detectioncited by 23
- 2020Attentive WaveBlock: Complementarity-enhanced Mutual Networks for Unsupervised Domain Adaptation in Person Re-identification and Beyondcited by 15
- 2021Bag of Tricks and A Strong baseline for Image Copy Detectioncited by 14
- 2022Results and findings of the 2021 Image Similarity Challengecited by 10
- 2022A Benchmark and Asymmetrical-Similarity Learning for Practical Image Copy Detectioncited by 9
- 2022Active Image Indexingcited by 8
- 2021Producing augmentation-invariant embeddings from real-life imagerycited by 6
Built on by
Citing papers per year: 2024: 3; 2025: 1; 2026: 1.
5 papers.
- 2024Replication in Visual Diffusion Models: A Survey and Outlookcited by 11
- 2024TIP-I2V: A Million-Scale Real Text and Image Prompt Dataset for Image-to-Video Generationcited by 9
- 2024Image Copy Detection for Diffusion Modelscited by 4
- 2025Origin Identification for Text-Guided Image-to-Image Diffusion Modelscited by 1
- 2026Tracing Copied Pixels and Regularizing Patch Affinity in Copy Detectioncited by 0
- 2026Tracing Copied Pixels and Regularizing Patch Affinity in Copy Detection19 Feb 2026
- 2025Origin Identification for Text-Guided Image-to-Image Diffusion Models4 Jan 2025
- 2024TIP-I2V: A Million-Scale Real Text and Image Prompt Dataset for Image-to-Video Generation5 Nov 2024
- 2024Image Copy Detection for Diffusion Models30 Sep 2024
- 2024Replication in Visual Diffusion Models: A Survey and Outlook7 Jul 2024