File size: 3,194 Bytes
b780ea1
0df702e
 
468f7c1
0df702e
 
 
 
 
82eb87c
 
3fb4313
 
 
 
 
 
e6c984b
 
 
 
 
 
 
 
3fb4313
0df702e
 
 
e7d70ad
 
 
28f9673
 
e0c7c4e
 
 
0df702e
 
e7d70ad
 
b780ea1
468f7c1
634fe71
4cfb89e
 
 
a416f75
 
 
 
 
 
 
 
 
 
 
 
 
 
4cfb89e
173b31b
 
 
a1acef4
173b31b
 
 
99a2f33
 
 
a1acef4
99a2f33
 
 
468f7c1
3c937d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8252698
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78e3ee5
 
 
 
 
 
205fb62
78e3ee5
 
 
 
 
 
82eb87c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
language:
- en
license: mit
size_categories:
- 10M<n<100M
task_categories:
- feature-extraction
pretty_name: AnyPattern
tags:
- croissant
dataset_info:
  features:
  - name: Pattern
    dtype: string
  - name: Elaboration
    dtype: string
  - name: Demo_1
    dtype: image
  - name: Demo_2
    dtype: image
  - name: Demo_3
    dtype: image
  - name: Demo_4
    dtype: image
  splits:
  - name: Base
    num_bytes: 22749079.0
    num_examples: 91
  - name: Novel
    num_bytes: 3238945.0
    num_examples: 11
  download_size: 25876361
  dataset_size: 25988024.0
configs:
- config_name: default
  data_files:
  - split: Base
    path: data/Base-*
  - split: Novel
    path: data/Novel-*
---

The dataset proposed in our paper "[AnyPattern: Towards In-context Image Copy Detection](https://arxiv.org/pdf/2404.13788.pdf)".

Please go to [Github](https://github.com/WangWenhao0716/AnyPattern) for the code about how to use this dataset.

Here, we show how to **download** this dataset.


# anypattern_v31
```
for letter in {a..z}; do
  wget https://huggingface.co/datasets/WenhaoWang/AnyPattern/resolve/main/train/anypattern_v31_part_a$letter
done
wget https://huggingface.co/datasets/WenhaoWang/AnyPattern/resolve/main/train/anypattern_v31_part_ba

cat anypattern_v31_part_a{a..z} anypattern_v31_part_ba > anypattern_v31.tar

tar -xvf anypattern_v31.tar
```

# original_images
```
wget https://huggingface.co/datasets/WenhaoWang/AnyPattern/resolve/main/original/train_{0..19}.zip
for z in train_*.zip; do unzip $z; done
mv images/train original_images
```

# reference_images
```
wget https://huggingface.co/datasets/WenhaoWang/AnyPattern/resolve/main/reference/references_{0..19}.zip
for z in references_*.zip; do unzip $z; done
mv images/references reference_images
```


# query_k1_10_v2_test
```
wget https://huggingface.co/datasets/WenhaoWang/AnyPattern/resolve/main/query/query_k1_10_v2_test.tar
tar -xvf query_k1_10_v2_test.tar
```

# query_k1_10_v2_support_select10
```
wget https://huggingface.co/datasets/WenhaoWang/AnyPattern/resolve/main/query/query_k1_10_v2_support_select10.tar
tar -xvf query_k1_10_v2_support_select10.tar
```

# query_k1_10_v2_support_ori_select10
```
wget https://huggingface.co/datasets/WenhaoWang/AnyPattern/resolve/main/query/query_k1_10_v2_support_ori_select10.tar
tar -xvf query_k1_10_v2_support_ori_select10.tar
```

# After downloading and unzipping all these files, we should have such a directory:

```
/path/to/

  anypattern_v31/
    anypattern_v31/
      0_0.jpg
      0_1.jpg
      ...

  original_images/
     T000000.jpg
     T000001.jpg
     ...

  reference_images/
     R000000.jpg
     R000001.jpg
     ...

  query_k1_10_v2_test/
     ...

  query_k1_10_v2_support_select10/
     ...

  query_k1_10_v2_support_ori_select10/
     ...
```


# Citation
```
@inproceedings{
    wang2024AnyPattern,
    title={AnyPattern: Towards In-context Image Copy Detection},
    author={Wang, Wenhao and Sun, Yifan and Tan, Zhentao and Yang, Yi},
    booktitle={arXiv preprint arXiv:2404.13788},
    year={2024},
}
```

# Contact

If you have any questions, feel free to contact [Wenhao Wang](https://wangwenhao0716.github.io/) ([email protected]).