ianhajra commited on
Commit
54271be
·
verified ·
1 Parent(s): 630b95c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -0
README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - image-retrieval
5
+ - copydays
6
+ ---
7
+
8
+ # Dataset Card for Copydays
9
+
10
+ ## Dataset Description
11
+
12
+ **Copydays** is a dataset designed for evaluating copy detection and near-duplicate image retrieval algorithms. It contains images with various modifications to test the robustness of retrieval systems.
13
+
14
+ - **copydays_original**: Original, unmodified images.
15
+ - **copydays_strong**: Images with strong modifications (e.g., cropping, rotation, compression).
16
+
17
+ These datasets are widely used for benchmarking image retrieval systems under challenging conditions.
18
+
19
+ ## Dataset Features
20
+
21
+ Each example contains:
22
+
23
+ - `image` (`Image`): An image file (JPEG or PNG).
24
+ - `filename` (`string`): The original filename of the image (e.g., `200000.jpg`).
25
+ - `split_type` (`string`): The type of split the image belongs to (`original` or `strong`).
26
+ - `block_id` (`int32`): The first 4 digits of the filename, representing the block ID (e.g., `2000` for `200000.jpg`).
27
+ - `query_id` (`int32`): The query ID for query images (-1 for database images).
28
+
29
+ ## Dataset Splits
30
+
31
+ - **queries**: Query images with modifications for evaluation.
32
+ - **database**: Original images used as the database for retrieval.
33
+
34
+ ## Dataset Versions
35
+
36
+ - Version 1.0.0
37
+
38
+ ## Example Usage
39
+
40
+ Use the Hugging Face `datasets` library to load one of the configs:
41
+
42
+ ```python
43
+ import datasets
44
+
45
+ # These are the config names defined in the script
46
+ dataset_configs = ["database", "query"]
47
+
48
+ # Load query split for evaluation
49
+ for i, config_name in enumerate(dataset_configs, start=1):
50
+ # Load query images
51
+ query_dataset = datasets.load_dataset(
52
+ path="copydays.py", # use local dataset script
53
+ name=config_name,
54
+ split="queries",
55
+ trust_remote_code=True,
56
+ )
57
+
58
+ # Load database images
59
+ db_dataset = datasets.load_dataset(
60
+ path="copydays.py", # use local dataset script
61
+ name=config_name,
62
+ split="database",
63
+ trust_remote_code=True,
64
+ )
65
+
66
+ print(f"[{i}] Loaded config '{config_name}' - queries: {len(query_dataset)}, database: {len(db_dataset)}")
67
+
68
+ # Example query
69
+ query_example = query_dataset[0]
70
+ print(f"Query: {query_example['filename']}, Block ID: {query_example['block_id']}, Query ID: {query_example['query_id']}")
71
+ ```
72
+
73
+ ## Dataset Structure
74
+
75
+ - The datasets consist of images downloaded and extracted from official URLs hosted by the Copydays project.
76
+ - The `copydays_original` dataset contains unmodified images.
77
+ - The `copydays_strong` dataset contains images with strong modifications.
78
+
79
+ ## Dataset Citation
80
+
81
+ If you use this dataset, please cite the original paper:
82
+
83
+ ```bibtex
84
+ @inproceedings{jegou2008hamming,
85
+ title={Hamming embedding and weak geometric consistency for large scale image search},
86
+ author={Jegou, Herve and Douze, Matthijs and Schmid, Cordelia},
87
+ booktitle={European conference on computer vision},
88
+ pages={304--317},
89
+ year={2008},
90
+ organization={Springer}
91
+ }
92
+ ```
93
+
94
+ ## Dataset Homepage
95
+
96
+ [Copydays project page](https://thoth.inrialpes.fr/~jegou/data.php.html#copydays)