Mario Šaško commited on
Commit
89d038a
1 Parent(s): 108a810

Update download url and improve card of `cats_vs_dogs` dataset (#4523)

Browse files

* Update dl url and remove file path info

* Update infos

* Improve card

Commit from https://github.com/huggingface/datasets/commit/f561c53767d961a3578ca291d6ca5e4c2c51dab1

README.md CHANGED
@@ -16,7 +16,9 @@ source_datasets:
16
  - original
17
  task_categories:
18
  - image-classification
19
- task_ids: []
 
 
20
  ---
21
 
22
  # Dataset Card for Cats Vs. Dogs
@@ -50,13 +52,23 @@ task_ids: []
50
 
51
  - **Homepage:** [Cats vs Dogs Dataset](https://www.microsoft.com/en-us/download/details.aspx?id=54765)
52
  - **Repository:**
53
- - **Paper:** [Paper](https://www.microsoft.com/en-us/research/wp-content/uploads/2007/10/CCS2007.pdf)
54
- - **Leaderboard:**
55
  - **Point of Contact:**
56
 
57
  ### Dataset Summary
58
 
59
- A large set of images of cats and dogs. There are 1738 corrupted images that are dropped.
 
 
 
 
 
 
 
 
 
 
60
 
61
  ### Supported Tasks and Leaderboards
62
 
@@ -64,7 +76,7 @@ A large set of images of cats and dogs. There are 1738 corrupted images that are
64
 
65
  ### Languages
66
 
67
- English
68
 
69
  ## Dataset Structure
70
 
@@ -74,9 +86,8 @@ A sample from the training set is provided below:
74
 
75
  ```
76
  {
77
- 'image_file_path': '/root/.cache/huggingface/datasets/downloads/extracted/6e1e8c9052e9f3f7ecbcb4b90860668f81c1d36d86cc9606d49066f8da8bfb4f/PetImages/Cat/1.jpg',
78
  'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x375 at 0x29CEAD71780>,
79
- 'label': 0
80
  }
81
  ```
82
 
@@ -84,7 +95,6 @@ A sample from the training set is provided below:
84
 
85
  The data instances have the following fields:
86
 
87
- - `image_file_path`: a `string` filepath to an image.
88
  - `image`: A `PIL.Image.Image` object containing the image. Note that when accessing the image column: `dataset[0]["image"]` the image file is automatically decoded. Decoding of a large number of image files might take a significant amount of time. Thus it is important to first query the sample index before the `"image"` column, *i.e.* `dataset[0]["image"]` should **always** be preferred over `dataset["image"][0]`.
89
  - `labels`: an `int` classification label.
90
 
@@ -107,27 +117,37 @@ Class Label Mappings:
107
 
108
  ### Curation Rationale
109
 
110
- [More Information Needed]
 
 
 
 
 
 
111
 
112
  ### Source Data
113
 
114
  #### Initial Data Collection and Normalization
115
 
116
- [More Information Needed]
 
 
 
 
117
 
118
  #### Who are the source language producers?
119
 
120
- [More Information Needed]
121
 
122
  ### Annotations
123
 
124
  #### Annotation process
125
 
126
- [More Information Needed]
127
 
128
  #### Who are the annotators?
129
 
130
- [More Information Needed]
131
 
132
  ### Personal and Sensitive Information
133
 
@@ -141,7 +161,11 @@ Class Label Mappings:
141
 
142
  ### Discussion of Biases
143
 
144
- [More Information Needed]
 
 
 
 
145
 
146
  ### Other Known Limitations
147
 
@@ -159,7 +183,7 @@ Class Label Mappings:
159
 
160
  ### Citation Information
161
 
162
- ```
163
  @Inproceedings (Conference){asirra-a-captcha-that-exploits-interest-aligned-manual-image-categorization,
164
  author = {Elson, Jeremy and Douceur, John (JD) and Howell, Jon and Saul, Jared},
165
  title = {Asirra: A CAPTCHA that Exploits Interest-Aligned Manual Image Categorization},
16
  - original
17
  task_categories:
18
  - image-classification
19
+ task_ids:
20
+ - multi-class-image-classification
21
+ paperswithcode_id: cats-vs-dogs
22
  ---
23
 
24
  # Dataset Card for Cats Vs. Dogs
52
 
53
  - **Homepage:** [Cats vs Dogs Dataset](https://www.microsoft.com/en-us/download/details.aspx?id=54765)
54
  - **Repository:**
55
+ - **Paper:** [Asirra: A CAPTCHA that Exploits Interest-Aligned Manual Image Categorization](https://www.microsoft.com/en-us/research/wp-content/uploads/2007/10/CCS2007.pdf)
56
+ - **Leaderboard:** [Dogs vs. Cats](https://www.kaggle.com/competitions/dogs-vs-cats)
57
  - **Point of Contact:**
58
 
59
  ### Dataset Summary
60
 
61
+ A large set of images of cats and dogs. There are 1738 corrupted images that are dropped. This dataset is part of a now-closed Kaggle competition and represents a subset of the so-called Asirra dataset.
62
+
63
+ From the competition page:
64
+
65
+ > The Asirra data set
66
+ >
67
+ > Web services are often protected with a challenge that's supposed to be easy for people to solve, but difficult for computers. Such a challenge is often called a [CAPTCHA](http://www.captcha.net/) (Completely Automated Public Turing test to tell Computers and Humans Apart) or HIP (Human Interactive Proof). HIPs are used for many purposes, such as to reduce email and blog spam and prevent brute-force attacks on web site passwords.
68
+ >
69
+ > Asirra (Animal Species Image Recognition for Restricting Access) is a HIP that works by asking users to identify photographs of cats and dogs. This task is difficult for computers, but studies have shown that people can accomplish it quickly and accurately. Many even think it's fun! Here is an example of the Asirra interface:
70
+ >
71
+ > Asirra is unique because of its partnership with [Petfinder.com](https://www.petfinder.com/), the world's largest site devoted to finding homes for homeless pets. They've provided Microsoft Research with over three million images of cats and dogs, manually classified by people at thousands of animal shelters across the United States. Kaggle is fortunate to offer a subset of this data for fun and research.
72
 
73
  ### Supported Tasks and Leaderboards
74
 
76
 
77
  ### Languages
78
 
79
+ English.
80
 
81
  ## Dataset Structure
82
 
86
 
87
  ```
88
  {
 
89
  'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x375 at 0x29CEAD71780>,
90
+ 'labels': 0
91
  }
92
  ```
93
 
95
 
96
  The data instances have the following fields:
97
 
 
98
  - `image`: A `PIL.Image.Image` object containing the image. Note that when accessing the image column: `dataset[0]["image"]` the image file is automatically decoded. Decoding of a large number of image files might take a significant amount of time. Thus it is important to first query the sample index before the `"image"` column, *i.e.* `dataset[0]["image"]` should **always** be preferred over `dataset["image"][0]`.
99
  - `labels`: an `int` classification label.
100
 
117
 
118
  ### Curation Rationale
119
 
120
+ This subset was to built to test whether computer vision algorithms can beat the Asirra CAPTCHA:
121
+
122
+ From the competition page:
123
+
124
+ > Image recognition attacks
125
+ >
126
+ > While random guessing is the easiest form of attack, various forms of image recognition can allow an attacker to make guesses that are better than random. There is enormous diversity in the photo database (a wide variety of backgrounds, angles, poses, lighting, etc.), making accurate automatic classification difficult. In an informal poll conducted many years ago, computer vision experts posited that a classifier with better than 60% accuracy would be difficult without a major advance in the state of the art. For reference, a 60% classifier improves the guessing probability of a 12-image HIP from 1/4096 to 1/459.
127
 
128
  ### Source Data
129
 
130
  #### Initial Data Collection and Normalization
131
 
132
+ This dataset is a subset of the Asirra dataset.
133
+
134
+ From the competition page:
135
+
136
+ > Asirra is unique because of its partnership with Petfinder.com, the world's largest site devoted to finding homes for homeless pets. They've provided Microsoft Research with over three million images of cats and dogs, manually classified by people at thousands of animal shelters across the United States.
137
 
138
  #### Who are the source language producers?
139
 
140
+ The users of [Petfinder.com](https://www.petfinder.com/).
141
 
142
  ### Annotations
143
 
144
  #### Annotation process
145
 
146
+ The images were annotated by selecting a pet category on [Petfinder.com](https://www.petfinder.com/).
147
 
148
  #### Who are the annotators?
149
 
150
+ The users of [Petfinder.com](https://www.petfinder.com/).
151
 
152
  ### Personal and Sensitive Information
153
 
161
 
162
  ### Discussion of Biases
163
 
164
+ From the paper:
165
+
166
+ > Unlike many image-based CAPTCHAs which are abstract or subjective, Asirra’s challenges are concrete, inoffensive (cute, by some accounts), require no specialized or culturally biased knowledge, and have definite ground truth. This
167
+ makes Asirra less frustrating for humans. Some beta-testers found it fun. The four-year-old child of one asked several times to “play the cat and dog game again.”
168
+
169
 
170
  ### Other Known Limitations
171
 
183
 
184
  ### Citation Information
185
 
186
+ ```bibtex
187
  @Inproceedings (Conference){asirra-a-captcha-that-exploits-interest-aligned-manual-image-categorization,
188
  author = {Elson, Jeremy and Douceur, John (JD) and Howell, Jon and Saul, Jared},
189
  title = {Asirra: A CAPTCHA that Exploits Interest-Aligned Manual Image Categorization},
cats_vs_dogs.py CHANGED
@@ -23,7 +23,7 @@ from datasets.tasks import ImageClassification
23
 
24
  logger = datasets.logging.get_logger(__name__)
25
 
26
- _URL = "https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_3367a.zip"
27
 
28
  _HOMEPAGE = "https://www.microsoft.com/en-us/download/details.aspx?id=54765"
29
 
@@ -44,14 +44,13 @@ _CITATION = """\
44
 
45
 
46
  class CatsVsDogs(datasets.GeneratorBasedBuilder):
47
- VERSION = datasets.Version("0.0.1")
48
 
49
  def _info(self):
50
  return datasets.DatasetInfo(
51
  description=_DESCRIPTION,
52
  features=datasets.Features(
53
  {
54
- "image_file_path": datasets.Value("string"),
55
  "image": datasets.Image(),
56
  "labels": datasets.features.ClassLabel(names=["cat", "dog"]),
57
  }
@@ -76,7 +75,6 @@ class CatsVsDogs(datasets.GeneratorBasedBuilder):
76
  with open(file, "rb") as f:
77
  if b"JFIF" in f.peek(10):
78
  yield str(i), {
79
- "image_file_path": file,
80
  "image": file,
81
  "labels": os.path.basename(os.path.dirname(file)).lower(),
82
  }
23
 
24
  logger = datasets.logging.get_logger(__name__)
25
 
26
+ _URL = "https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_5340.zip"
27
 
28
  _HOMEPAGE = "https://www.microsoft.com/en-us/download/details.aspx?id=54765"
29
 
44
 
45
 
46
  class CatsVsDogs(datasets.GeneratorBasedBuilder):
47
+ VERSION = datasets.Version("1.0.0")
48
 
49
  def _info(self):
50
  return datasets.DatasetInfo(
51
  description=_DESCRIPTION,
52
  features=datasets.Features(
53
  {
 
54
  "image": datasets.Image(),
55
  "labels": datasets.features.ClassLabel(names=["cat", "dog"]),
56
  }
75
  with open(file, "rb") as f:
76
  if b"JFIF" in f.peek(10):
77
  yield str(i), {
 
78
  "image": file,
79
  "labels": os.path.basename(os.path.dirname(file)).lower(),
80
  }
dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"default": {"description": "A large set of images of cats and dogs. There are 1738 corrupted images that are dropped.", "citation": "@Inproceedings (Conference){asirra-a-captcha-that-exploits-interest-aligned-manual-image-categorization,\n author = {Elson, Jeremy and Douceur, John (JD) and Howell, Jon and Saul, Jared},\n title = {Asirra: A CAPTCHA that Exploits Interest-Aligned Manual Image Categorization},\n booktitle = {Proceedings of 14th ACM Conference on Computer and Communications Security (CCS)},\n year = {2007},\n month = {October},\n publisher = {Association for Computing Machinery, Inc.},\n url = {https://www.microsoft.com/en-us/research/publication/asirra-a-captcha-that-exploits-interest-aligned-manual-image-categorization/},\n edition = {Proceedings of 14th ACM Conference on Computer and Communications Security (CCS)},\n}\n", "homepage": "https://www.microsoft.com/en-us/download/details.aspx?id=54765", "license": "", "features": {"image_file_path": {"dtype": "string", "id": null, "_type": "Value"}, "image": {"decode": true, "id": null, "_type": "Image"}, "labels": {"num_classes": 2, "names": ["cat", "dog"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": {"input": "image", "output": "labels"}, "task_templates": [{"task": "image-classification", "image_column": "image", "label_column": "labels"}], "builder_name": "cats_vs_dogs", "config_name": "default", "version": {"version_str": "0.0.1", "description": null, "major": 0, "minor": 0, "patch": 1}, "splits": {"train": {"name": "train", "num_bytes": 7593077, "num_examples": 23410, "dataset_name": "cats_vs_dogs"}}, "download_checksums": {"https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_3367a.zip": {"num_bytes": 824894548, "checksum": "f9553e426bd725354ed3a27e3c6920caadb55c835d1ebd880d2e56d3f1fbb22b"}}, "download_size": 824894548, "post_processing_size": null, "dataset_size": 7593077, "size_in_bytes": 832487625}}
1
+ {"default": {"description": "A large set of images of cats and dogs. There are 1738 corrupted images that are dropped.", "citation": "@Inproceedings (Conference){asirra-a-captcha-that-exploits-interest-aligned-manual-image-categorization,\n author = {Elson, Jeremy and Douceur, John (JD) and Howell, Jon and Saul, Jared},\n title = {Asirra: A CAPTCHA that Exploits Interest-Aligned Manual Image Categorization},\n booktitle = {Proceedings of 14th ACM Conference on Computer and Communications Security (CCS)},\n year = {2007},\n month = {October},\n publisher = {Association for Computing Machinery, Inc.},\n url = {https://www.microsoft.com/en-us/research/publication/asirra-a-captcha-that-exploits-interest-aligned-manual-image-categorization/},\n edition = {Proceedings of 14th ACM Conference on Computer and Communications Security (CCS)},\n}\n", "homepage": "https://www.microsoft.com/en-us/download/details.aspx?id=54765", "license": "", "features": {"image": {"decode": true, "id": null, "_type": "Image"}, "labels": {"num_classes": 2, "names": ["cat", "dog"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": {"input": "image", "output": "labels"}, "task_templates": [{"task": "image-classification", "image_column": "image", "label_column": "labels"}], "builder_name": "cats_vs_dogs", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3893603, "num_examples": 23422, "dataset_name": "cats_vs_dogs"}}, "download_checksums": {"https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_5340.zip": {"num_bytes": 824887076, "checksum": "b7974bd00a84a99921f36ee4403f089853777b5ae8d151c76a86e64900334af9"}}, "download_size": 824887076, "post_processing_size": null, "dataset_size": 3893603, "size_in_bytes": 828780679}}
dummy/{0.0.1 → 1.0.0}/dummy_data.zip RENAMED
File without changes