Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
1K<n<10K
Language Creators:
found
Annotations Creators:
crowdsourced
Source Datasets:
original
ArXiv:
License:
PHilita commited on
Commit
a378d9f
1 Parent(s): 6718361

Initial commit

Browse files
Files changed (5) hide show
  1. .gitattributes +1 -0
  2. README.md +258 -0
  3. cppe5.py +134 -0
  4. cppe5.tar.gz +3 -0
  5. dataset_infos.json +1 -0
.gitattributes CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ cppe5.tar.gz filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - found
6
+ language:
7
+ - en
8
+ license:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - object-detection
18
+ task_ids: []
19
+ paperswithcode_id: cppe-5
20
+ pretty_name: CPPE - 5
21
+ tags:
22
+ - medical-personal-protective-equipment-detection
23
+ dataset_info:
24
+ features:
25
+ - name: image_id
26
+ dtype: int64
27
+ - name: image
28
+ dtype: image
29
+ - name: width
30
+ dtype: int32
31
+ - name: height
32
+ dtype: int32
33
+ - name: objects
34
+ sequence:
35
+ - name: id
36
+ dtype: int64
37
+ - name: area
38
+ dtype: int64
39
+ - name: bbox
40
+ sequence: float32
41
+ length: 4
42
+ - name: category
43
+ dtype:
44
+ class_label:
45
+ names:
46
+ '0': Coverall
47
+ '1': Face_Shield
48
+ '2': Gloves
49
+ '3': Goggles
50
+ '4': Mask
51
+ splits:
52
+ - name: train
53
+ num_bytes: 240481257
54
+ num_examples: 1000
55
+ - name: test
56
+ num_bytes: 4172715
57
+ num_examples: 29
58
+ download_size: 238482705
59
+ dataset_size: 244653972
60
+ ---
61
+
62
+ # Dataset Card for CPPE - 5
63
+
64
+ ## Table of Contents
65
+ - [Table of Contents](#table-of-contents)
66
+ - [Dataset Description](#dataset-description)
67
+ - [Dataset Summary](#dataset-summary)
68
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
69
+ - [Languages](#languages)
70
+ - [Dataset Structure](#dataset-structure)
71
+ - [Data Instances](#data-instances)
72
+ - [Data Fields](#data-fields)
73
+ - [Data Splits](#data-splits)
74
+ - [Dataset Creation](#dataset-creation)
75
+ - [Curation Rationale](#curation-rationale)
76
+ - [Source Data](#source-data)
77
+ - [Annotations](#annotations)
78
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
79
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
80
+ - [Social Impact of Dataset](#social-impact-of-dataset)
81
+ - [Discussion of Biases](#discussion-of-biases)
82
+ - [Other Known Limitations](#other-known-limitations)
83
+ - [Additional Information](#additional-information)
84
+ - [Dataset Curators](#dataset-curators)
85
+ - [Licensing Information](#licensing-information)
86
+ - [Citation Information](#citation-information)
87
+ - [Contributions](#contributions)
88
+
89
+ ## Dataset Description
90
+
91
+ - **Homepage:**
92
+ - **Repository:** https://github.com/Rishit-dagli/CPPE-Dataset
93
+ - **Paper:** [CPPE-5: Medical Personal Protective Equipment Dataset](https://arxiv.org/abs/2112.09569)
94
+ - **Leaderboard:** https://paperswithcode.com/sota/object-detection-on-cppe-5
95
+ - **Point of Contact:** rishit.dagli@gmail.com
96
+
97
+ ### Dataset Summary
98
+
99
+ CPPE - 5 (Medical Personal Protective Equipment) is a new challenging dataset with the goal to allow the study of subordinate categorization of medical personal protective equipments, which is not possible with other popular data sets that focus on broad level categories.
100
+
101
+ Some features of this dataset are:
102
+
103
+ * high quality images and annotations (~4.6 bounding boxes per image)
104
+ * real-life images unlike any current such dataset
105
+ * majority of non-iconic images (allowing easy deployment to real-world environments)
106
+
107
+ ### Supported Tasks and Leaderboards
108
+
109
+ - `object-detection`: The dataset can be used to train a model for Object Detection. This task has an active leaderboard which can be found at https://paperswithcode.com/sota/object-detection-on-cppe-5. The metrics for this task are adopted from the COCO detection evaluation criteria, and include the mean Average Precision (AP) across IoU thresholds ranging from 0.50 to 0.95 at different scales.
110
+
111
+ ### Languages
112
+
113
+ English
114
+
115
+ ## Dataset Structure
116
+
117
+ ### Data Instances
118
+
119
+ A data point comprises an image and its object annotations.
120
+
121
+ ```
122
+ {
123
+ 'image_id': 15,
124
+ 'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=943x663 at 0x2373B065C18>,
125
+ 'width': 943,
126
+ 'height': 663,
127
+ 'objects': {
128
+ 'id': [114, 115, 116, 117],
129
+ 'area': [3796, 1596, 152768, 81002],
130
+ 'bbox': [
131
+ [302.0, 109.0, 73.0, 52.0],
132
+ [810.0, 100.0, 57.0, 28.0],
133
+ [160.0, 31.0, 248.0, 616.0],
134
+ [741.0, 68.0, 202.0, 401.0]
135
+ ],
136
+ 'category': [4, 4, 0, 0]
137
+ }
138
+ }
139
+ ```
140
+
141
+ ### Data Fields
142
+
143
+ - `image`: the image id
144
+ - `image`: `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]`
145
+ - `width`: the image width
146
+ - `height`: the image height
147
+ - `objects`: a dictionary containing bounding box metadata for the objects present on the image
148
+ - `id`: the annotation id
149
+ - `area`: the area of the bounding box
150
+ - `bbox`: the object's bounding box (in the [coco](https://albumentations.ai/docs/getting_started/bounding_boxes_augmentation/#coco) format)
151
+ - `category`: the object's category, with possible values including `Coverall` (0),`Face_Shield` (1),`Gloves` (2),`Goggles` (3) and `Mask` (4)
152
+
153
+ ### Data Splits
154
+
155
+ The data is split into training and testing set. The training set contains 1000 images and test set 29 images.
156
+
157
+ ## Dataset Creation
158
+
159
+ ### Curation Rationale
160
+
161
+ From the paper:
162
+ > With CPPE-5 dataset, we hope to facilitate research and use in applications at multiple public places to autonomously identify if a PPE (Personal Protective Equipment) kit has been worn and also which part of the PPE kit has been worn. One of the main aims with this dataset was to also capture a higher ratio of non-iconic images or non-canonical perspectives [5] of the objects in this dataset. We further hope to see high use of this dataset to aid in medical scenarios which would have a huge effect
163
+ worldwide.
164
+
165
+ ### Source Data
166
+
167
+ #### Initial Data Collection and Normalization
168
+
169
+ The images in the CPPE-5 dataset were collected using the following process:
170
+ * Obtain Images from Flickr: Following the object categories we identified earlier, we first download images from Flickr and save them at the "Original" size. On Flickr, images are served at multiple different sizes (Square 75, Small 240, Large 1024, X-Large 4K etc.), the "Original" size is an exact copy of the image uploaded by author.
171
+ * Extract relevant metadata: Flickr contains images each with searchable metadata, we extract the following relevant
172
+ metadata:
173
+ * A direct link to the original image on Flickr
174
+ * Width and height of the image
175
+ * Title given to the image by the author
176
+ * Date and time the image was uploaded on
177
+ * Flickr username of the author of the image
178
+ * Flickr Name of the author of the image
179
+ * Flickr profile of the author of the image
180
+ * The License image is licensed under
181
+ * MD5 hash of the original image
182
+ * Obtain Images from Google Images: Due to the reasons we mention earlier, we only collect a very small proportion
183
+ of images from Google Images. For these set of images we extract the following metadata:
184
+ * A direct link to the original image
185
+ * Width and height of the image
186
+ * MD5 hash of the original image
187
+ * Filter inappropriate images: Though very rare in the collected images, we also remove images containing inappropriate content using the safety filters on Flickr and Google Safe Search.
188
+ * Filter near-similar images: We then remove near-duplicate images in the dataset using GIST descriptors
189
+
190
+ #### Who are the source language producers?
191
+
192
+ The images for this dataset were collected from Flickr and Google Images.
193
+
194
+ ### Annotations
195
+
196
+ #### Annotation process
197
+
198
+ The dataset was labelled in two phases: the first phase included labelling 416 images and the second phase included labelling 613 images. For all the images in the dataset volunteers were provided the following table:
199
+
200
+ |Item |Description |
201
+ |------------|--------------------------------------------------------------------- |
202
+ |coveralls | Coveralls are hospital gowns worn by medical professionals as in order to provide a barrier between patient and professional, these usually cover most of the exposed skin surfaces of the professional medics.|
203
+ |mask | Mask prevents airborne transmission of infections between patients and/or treating personnel by blocking the movement of pathogens (primarily bacteria and viruses) shed in respiratory droplets and aerosols into and from the wearer’s mouth and nose.|
204
+ face shield | Face shield aims to protect the wearer’s entire face (or part of it) from hazards such as flying objects and road debris, chemical splashes (in laboratories or in industry), or potentially infectious materials (in medical and laboratory environments).|
205
+ gloves | Gloves are used during medical examinations and procedures to help prevent cross-contamination between caregivers and patients.|
206
+ |goggles | Goggles, or safety glasses, are forms of protective eye wear that usually enclose or protect the area surrounding the eye in order to prevent particulates, water or chemicals from striking the eyes.|
207
+
208
+ as well as examples of: correctly labelled images, incorrectly labelled images, and not applicable images. Before the labelling task, each volunteer was provided with an exercise to verify if the volunteer was able to correctly identify categories as well as identify if an annotated image is correctly labelled, incorrectly labelled, or not applicable. The labelling process first involved two volunteers independently labelling an image from the dataset. In any of the cases that: the number of bounding boxes are different, the labels for on or more of the bounding boxes are different or two volunteer annotations are sufficiently different; a third volunteer compiles the result from the two annotations to come up with a correctly labelled image. After this step, a volunteer verifies the bounding box annotations. Following this method of labelling the dataset we ensured that all images were labelled accurately and contained exhaustive
209
+ annotations. As a result of this, our dataset consists of 1029 high-quality, majorly non-iconic, and accurately annotated images.
210
+
211
+ #### Who are the annotators?
212
+
213
+ In both the phases crowd-sourcing techniques were used with multiple volunteers labelling the dataset using the open-source tool LabelImg.
214
+
215
+ ### Personal and Sensitive Information
216
+
217
+ [More Information Needed]
218
+
219
+ ## Considerations for Using the Data
220
+
221
+ ### Social Impact of Dataset
222
+
223
+ [More Information Needed]
224
+
225
+ ### Discussion of Biases
226
+
227
+ [More Information Needed]
228
+
229
+ ### Other Known Limitations
230
+
231
+ [More Information Needed]
232
+
233
+ ## Additional Information
234
+
235
+ ### Dataset Curators
236
+
237
+ Dagli, Rishit, and Ali Mustufa Shaikh.
238
+
239
+ ### Licensing Information
240
+
241
+ [More Information Needed]
242
+
243
+ ### Citation Information
244
+
245
+ ```
246
+ @misc{dagli2021cppe5,
247
+ title={CPPE-5: Medical Personal Protective Equipment Dataset},
248
+ author={Rishit Dagli and Ali Mustufa Shaikh},
249
+ year={2021},
250
+ eprint={2112.09569},
251
+ archivePrefix={arXiv},
252
+ primaryClass={cs.CV}
253
+ }
254
+ ```
255
+
256
+ ### Contributions
257
+
258
+ Thanks to [@mariosasko](https://github.com/mariosasko) for adding this dataset.
cppe5.py ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """CPPE-5 dataset."""
16
+
17
+
18
+ import collections
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @misc{dagli2021cppe5,
27
+ title={CPPE-5: Medical Personal Protective Equipment Dataset},
28
+ author={Rishit Dagli and Ali Mustufa Shaikh},
29
+ year={2021},
30
+ eprint={2112.09569},
31
+ archivePrefix={arXiv},
32
+ primaryClass={cs.CV}
33
+ }
34
+ """
35
+
36
+ _DESCRIPTION = """\
37
+ CPPE - 5 (Medical Personal Protective Equipment) is a new challenging dataset with the goal
38
+ to allow the study of subordinate categorization of medical personal protective equipments,
39
+ which is not possible with other popular data sets that focus on broad level categories.
40
+ """
41
+
42
+ _HOMEPAGE = "https://sites.google.com/view/cppe5"
43
+
44
+ _LICENSE = "Unknown"
45
+
46
+ _URL = "https://drive.google.com/uc?id=1MGnaAfbckUmigGUvihz7uiHGC6rBIbvr"
47
+
48
+ _CATEGORIES = ["Coverall", "Face_Shield", "Gloves", "Goggles", "Mask"]
49
+
50
+
51
+ class CPPE5(datasets.GeneratorBasedBuilder):
52
+ """CPPE - 5 dataset."""
53
+
54
+ VERSION = datasets.Version("1.0.0")
55
+
56
+ def _info(self):
57
+ features = datasets.Features(
58
+ {
59
+ "image_id": datasets.Value("int64"),
60
+ "image": datasets.Image(),
61
+ "width": datasets.Value("int32"),
62
+ "height": datasets.Value("int32"),
63
+ "objects": datasets.Sequence(
64
+ {
65
+ "id": datasets.Value("int64"),
66
+ "area": datasets.Value("int64"),
67
+ "bbox": datasets.Sequence(datasets.Value("float32"), length=4),
68
+ "category": datasets.ClassLabel(names=_CATEGORIES),
69
+ }
70
+ ),
71
+ }
72
+ )
73
+ return datasets.DatasetInfo(
74
+ description=_DESCRIPTION,
75
+ features=features,
76
+ homepage=_HOMEPAGE,
77
+ license=_LICENSE,
78
+ citation=_CITATION,
79
+ )
80
+
81
+ def _split_generators(self, dl_manager):
82
+ archive = dl_manager.download(_URL)
83
+ return [
84
+ datasets.SplitGenerator(
85
+ name=datasets.Split.TRAIN,
86
+ gen_kwargs={
87
+ "annotation_file_path": "annotations/train.json",
88
+ "files": dl_manager.iter_archive(archive),
89
+ },
90
+ ),
91
+ datasets.SplitGenerator(
92
+ name=datasets.Split.TEST,
93
+ gen_kwargs={
94
+ "annotation_file_path": "annotations/test.json",
95
+ "files": dl_manager.iter_archive(archive),
96
+ },
97
+ ),
98
+ ]
99
+
100
+ def _generate_examples(self, annotation_file_path, files):
101
+ def process_annot(annot, category_id_to_category):
102
+ return {
103
+ "id": annot["id"],
104
+ "area": annot["area"],
105
+ "bbox": annot["bbox"],
106
+ "category": category_id_to_category[annot["category_id"]],
107
+ }
108
+
109
+ image_id_to_image = {}
110
+ idx = 0
111
+ # This loop relies on the ordering of the files in the archive:
112
+ # Annotation files come first, then the images.
113
+ for path, f in files:
114
+ file_name = os.path.basename(path)
115
+ if path == annotation_file_path:
116
+ annotations = json.load(f)
117
+ category_id_to_category = {category["id"]: category["name"] for category in annotations["categories"]}
118
+ image_id_to_annotations = collections.defaultdict(list)
119
+ for annot in annotations["annotations"]:
120
+ image_id_to_annotations[annot["image_id"]].append(annot)
121
+ image_id_to_image = {annot["file_name"]: annot for annot in annotations["images"]}
122
+ elif file_name in image_id_to_image:
123
+ image = image_id_to_image[file_name]
124
+ objects = [
125
+ process_annot(annot, category_id_to_category) for annot in image_id_to_annotations[image["id"]]
126
+ ]
127
+ yield idx, {
128
+ "image_id": image["id"],
129
+ "image": {"path": path, "bytes": f.read()},
130
+ "width": image["width"],
131
+ "height": image["height"],
132
+ "objects": objects,
133
+ }
134
+ idx += 1
cppe5.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1151086e59fcb87825ecf4d362847a3f023ba69e7ace0f513d5aadc0e3dd3094
3
+ size 238482705
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "CPPE - 5 (Medical Personal Protective Equipment) is a new challenging dataset with the goal\nto allow the study of subordinate categorization of medical personal protective equipments,\nwhich is not possible with other popular data sets that focus on broad level categories.\n", "citation": "@misc{dagli2021cppe5,\n title={CPPE-5: Medical Personal Protective Equipment Dataset},\n author={Rishit Dagli and Ali Mustufa Shaikh},\n year={2021},\n eprint={2112.09569},\n archivePrefix={arXiv},\n primaryClass={cs.CV}\n}\n", "homepage": "https://sites.google.com/view/cppe5", "license": "Unknown", "features": {"image_id": {"dtype": "int64", "id": null, "_type": "Value"}, "image": {"id": null, "_type": "Image"}, "width": {"dtype": "int32", "id": null, "_type": "Value"}, "height": {"dtype": "int32", "id": null, "_type": "Value"}, "objects": {"feature": {"id": {"dtype": "int64", "id": null, "_type": "Value"}, "area": {"dtype": "int64", "id": null, "_type": "Value"}, "bbox": {"feature": {"dtype": "float32", "id": null, "_type": "Value"}, "length": 4, "id": null, "_type": "Sequence"}, "category": {"num_classes": 5, "names": ["Coverall", "Face_Shield", "Gloves", "Goggles", "Mask"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "cppe5", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 240481281, "num_examples": 1000, "dataset_name": "cppe5"}, "test": {"name": "test", "num_bytes": 4172739, "num_examples": 29, "dataset_name": "cppe5"}}, "download_checksums": {"https://drive.google.com/uc?id=1MGnaAfbckUmigGUvihz7uiHGC6rBIbvr": {"num_bytes": 238482705, "checksum": "1151086e59fcb87825ecf4d362847a3f023ba69e7ace0f513d5aadc0e3dd3094"}}, "download_size": 238482705, "post_processing_size": null, "dataset_size": 244654020, "size_in_bytes": 483136725}}