github-actions[bot] commited on
Commit
ff9b9fe
·
0 Parent(s):

Dataset release v1.0.0

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +172 -0
  2. stats.json +115 -0
  3. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000001.png +0 -0
  4. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000002.png +0 -0
  5. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000003.png +0 -0
  6. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000004.png +0 -0
  7. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000005.png +0 -0
  8. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000006.png +0 -0
  9. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000007.png +0 -0
  10. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000008.png +0 -0
  11. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000009.png +0 -0
  12. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000010.png +0 -0
  13. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000011.png +0 -0
  14. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000012.png +0 -0
  15. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000013.png +0 -0
  16. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000014.png +0 -0
  17. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000015.png +0 -0
  18. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000016.png +0 -0
  19. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000017.png +0 -0
  20. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000018.png +0 -0
  21. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000019.png +0 -0
  22. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000020.png +0 -0
  23. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000021.png +0 -0
  24. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000022.png +0 -0
  25. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000023.png +0 -0
  26. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000024.png +0 -0
  27. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000025.png +0 -0
  28. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000026.png +0 -0
  29. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000027.png +0 -0
  30. test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000028.png +0 -0
  31. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000001.png +0 -0
  32. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000002.png +0 -0
  33. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000003.png +0 -0
  34. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000004.png +0 -0
  35. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000005.png +0 -0
  36. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000006.png +0 -0
  37. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000007.png +0 -0
  38. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000008.png +0 -0
  39. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000009.png +0 -0
  40. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000010.png +0 -0
  41. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000011.png +0 -0
  42. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000012.png +0 -0
  43. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000013.png +0 -0
  44. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000014.png +0 -0
  45. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000015.png +0 -0
  46. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000016.png +0 -0
  47. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000017.png +0 -0
  48. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000018.png +0 -0
  49. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000019.png +0 -0
  50. test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000020.png +0 -0
README.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Plastic Caps Dataset
3
+ language: en
4
+ license: cc-by-4.0
5
+ task_categories:
6
+ - image-classification
7
+ tags:
8
+ - plastic
9
+ - caps
10
+ - classification
11
+ - computer-vision
12
+ - multi-view
13
+ - controlled-environment
14
+ - grouped-splits
15
+ - recycling
16
+ - sustainability
17
+ size_categories:
18
+ - 1K<n<10K
19
+ ---
20
+
21
+ # Plastic Caps Dataset
22
+
23
+ ## Dataset Summary
24
+
25
+ This dataset contains images of plastic caps categorized by the color. The dataset is divided into training, validation, and test splits using a leakage-safe strategy that groups all images of the same physical cap together in the same split while maintaining balanced color distributions across subsets.
26
+
27
+ ### Supported Tasks
28
+
29
+ - The initial and primary purpose of this dataset is **Color classification** (target label: `color_category`)
30
+
31
+ ## Dataset Structure
32
+
33
+ ### Data Fields
34
+
35
+ - **image**: Image object containing the image data and associated metadata (loaded by the Hugging Face `datasets` library).
36
+ - **cap_id**: A string (UUID) as the unique identifier for each physical cap.
37
+ - **cap_type**: Categorical label indicating the physical design of the plastic cap: `disc/press top cap`, `dual flip-top cap`, `flip-top cap`, `hinged cap`, `push-pull/sports cap`, `standard cap`, `tethered yorker cap`, `twist cap` and `yorker spout cap`.
38
+ - **cap_rotation**: An integer indicating the rotation of the cap, `12`, `3`, `6` meaning the cap is rotated to the 12 o'clock, 3 o'clock and 6 o'clock positions, respectively.
39
+ - **cap_state**: A string, for normal caps: "0", "1" indicating if the cap is closed or open. In the case of dual-flip caps "00", "01", "10", "11" indicating the state of each lid (both closed, lid a open, lid b open, both open).
40
+ - **cap_facing_position**: An integer, either `0` or `1`, indicating if the cap is facing downwards or upwards, respectively.
41
+ - **camera_angle**: An integer, indicating the angle of the camera when the image was taken (`90`, `45` or `0` degrees).
42
+ - **color_category**: Categorical label representing grouped color classes used in recycling workflows, following [Tapitas Oportunidades – Colores](https://www.tapitasoportunidades.com/colores/) (one of `red/orange/pink/fuchsia/brown`, `yellow/gold`, `blue`, `green`, `white/transparent`, `silver/gray` and `black`).
43
+
44
+ ### Data Instances
45
+
46
+ #### Images
47
+
48
+ - **Total images:** 2662
49
+
50
+ **Color distribution (images):**
51
+ - **black**: `263`
52
+ - **blue**: `278`
53
+ - **green**: `412`
54
+ - **red / orange / pink / fuchsia / brown**: `583`
55
+ - **silver / gray**: `94`
56
+ - **white / transparent**: `836`
57
+ - **yellow / gold**: `196`
58
+
59
+ #### Caps (Unique Physical Objects)
60
+
61
+ - **Total unique caps:** 239
62
+
63
+ **Color distribution (caps):**
64
+ - **black**: `25`
65
+ - **blue**: `28`
66
+ - **green**: `33`
67
+ - **red / orange / pink / fuchsia / brown**: `46`
68
+ - **silver / gray**: `12`
69
+ - **white / transparent**: `77`
70
+ - **yellow / gold**: `18`
71
+
72
+ ### Data Splits
73
+
74
+ The dataset is split into **training**, **validation**, and **test** subsets using a deterministic and stratified splitting strategy designed to prevent data leakage and preserve distributional balance.
75
+
76
+ - **Grouping key:** All samples are grouped by `cap_id`, ensuring that images of the same physical object do not appear across different splits.
77
+ - **Stratification:** The split is stratified by `color_category` to maintain consistent distributions across subsets.
78
+ - **Split ratios:**
79
+ * **Train:** `80%`
80
+ * **Validation:** `10%`
81
+ * **Test:** `10%`
82
+
83
+ #### Images / Color distribution (%)
84
+
85
+ | Dataset Split | Number of Images | Black | Blue | Green | Red / orange / pink / fuchsia / brown | Silver / gray | White / transparent | Yellow / gold |
86
+ |--------------|-----------------:|------:|------:|------:|------:|------:|------:|------:|
87
+ | Train | 2,110 | 11.0% | 10.4% | 14.4% | 24.0% | 2.8% | 30.1% | 7.1% |
88
+ | Validation | 254 | 4.7% | 7.1% | 18.1% | 18.1% | 2.4% | 44.9% | 4.7% |
89
+ | Test | 298 | 6.0% | 13.4% | 20.8% | 10.1% | 9.4% | 28.9% | 11.4% |
90
+
91
+ #### Caps / Color distribution (%)
92
+
93
+ | Dataset Split | Number of Caps | Black | Blue | Green | Red / orange / pink / fuchsia / brown | Silver / gray | White / transparent | Yellow / gold |
94
+ |--------------|---------------:|------:|------:|------:|------:|------:|------:|------:|
95
+ | Train | 191 | 10.5% | 11.5% | 13.6% | 19.4% | 5.2% | 32.5% | 7.3% |
96
+ | Validation | 24 | 8.3% | 12.5% | 16.7% | 16.7% | 4.2% | 33.3% | 8.3% |
97
+ | Test | 24 | 12.5% | 12.5% | 12.5% | 20.8% | 4.2% | 29.2% | 8.3% |
98
+
99
+ ## Dataset Creation
100
+
101
+ This dataset contains images of plastic caps collected in-house by the author. Each cap is labeled with a color category, following [Tapitas Oportunidades – Colores](https://www.tapitasoportunidades.com/colores/), and a cap type, defined as metadata. All images are provided at their original resolution of **224×224** pixels in RGB format.
102
+
103
+ The cap type determines the image capture strategy, including the number of images per cap, camera angles, rotational variations, facing position, and cap state (open or closed). This ensures that each cap is represented through multiple views appropriate to its physical design, providing diverse visual data for downstream tasks.
104
+
105
+ These plastic caps are used in non-profit initiatives to produce accessible products, such as retractable walkways and amphibious chairs, as described on the [Donatapa website](https://costaricaturismoaccesible.com/donatapa/productos/). The labels reflect both practical usage categories and the intended applications of the caps.
106
+
107
+ ### Curation Rationale
108
+
109
+ The plastic caps dataset was designed to support research in computer vision, specifically for classification and analysis of colors and cap types in applications related to social impact and sustainability.
110
+
111
+ ### Source Data
112
+
113
+ The data was obtained by capturing multi-view images of plastic caps using a fixed camera setup in a controlled environment. No third-party datasets were used.
114
+
115
+ ### Annotations
116
+
117
+ The dataset does not contain any additional annotations.
118
+
119
+ ## Personal and Sensitive Information
120
+
121
+ The dataset does not contain any personal or sensitive information.
122
+
123
+ ## Versioning
124
+
125
+ We use [Semantic Versioning (SemVer)](https://semver.org/) for versioning our dataset, meaning we follow the **MAJOR.MINOR.PATCH** version pattern and the following versioning policy:
126
+
127
+ **MAJOR version**
128
+
129
+ Incremented when changes **break backward compatibility** including:
130
+ - Schema changes (renaming or removing fields)
131
+ - Data type changes.
132
+ - Changes in the semantic meaning of existing fields
133
+ - Modifications to label definitions or class taxonomies
134
+ - Restructuring of dataset splits (train/validation/test)
135
+ - Any change that invalidates direct comparison with previous results
136
+
137
+ **MINOR version**
138
+
139
+ Incremented for **backward-compatible extensions** such as:
140
+ - Addition of new columns or metadata fields
141
+ - Addition of new classes without modifying existing ones
142
+ - Inclusion of additional samples or images
143
+ - Addition of new dataset splits
144
+ - Improvements to documentation or dataset metadata
145
+
146
+ **PATCH version**
147
+
148
+ Incremented for **non-semantic corrections** like:
149
+ - Fixes to metadata errors
150
+ - Small-scale correction of mislabeled samples
151
+ - Replacement of corrupted files
152
+ - Corrections to dataset card
153
+
154
+ For the versions available, see [the tags](https://huggingface.co/datasets/sebastiangv/plastic-caps/tree/main) in the dataset repository.
155
+
156
+ ## License
157
+
158
+ This dataset is released under [Creative Commons Attribution 4.0 International (**CC-BY-4.0**)](https://creativecommons.org/licenses/by/4.0/) license.
159
+
160
+ ## Citation
161
+
162
+ If you use this dataset in your research, please cite:
163
+
164
+ ```bibtex
165
+ @dataset{garcia2026plasticcaps,
166
+ title = {Plastic Caps Dataset},
167
+ author = {García, Sebastián},
168
+ year = {2026},
169
+ publisher = {Hugging Face},
170
+ url = {https://huggingface.co/datasets/sebastiangv/plastic-caps}
171
+ }
172
+ ```
stats.json ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "images": {
3
+ "total": 2662,
4
+ "by_color": {
5
+ "black": 263,
6
+ "blue": 278,
7
+ "green": 412,
8
+ "red/orange/pink/fuchsia/brown": 583,
9
+ "silver/gray": 94,
10
+ "white/transparent": 836,
11
+ "yellow/gold": 196
12
+ }
13
+ },
14
+ "caps": {
15
+ "total": 239,
16
+ "by_color": {
17
+ "black": 25,
18
+ "blue": 28,
19
+ "green": 33,
20
+ "red/orange/pink/fuchsia/brown": 46,
21
+ "silver/gray": 12,
22
+ "white/transparent": 77,
23
+ "yellow/gold": 18
24
+ }
25
+ },
26
+ "splits": {
27
+ "test": {
28
+ "images": {
29
+ "total": 298,
30
+ "by_color": {
31
+ "black": 18,
32
+ "blue": 40,
33
+ "green": 62,
34
+ "red/orange/pink/fuchsia/brown": 30,
35
+ "silver/gray": 28,
36
+ "white/transparent": 86,
37
+ "yellow/gold": 34
38
+ }
39
+ },
40
+ "caps": {
41
+ "total": 24,
42
+ "by_color": {
43
+ "black": 3,
44
+ "blue": 3,
45
+ "green": 3,
46
+ "red/orange/pink/fuchsia/brown": 5,
47
+ "silver/gray": 1,
48
+ "white/transparent": 7,
49
+ "yellow/gold": 2
50
+ }
51
+ }
52
+ },
53
+ "train": {
54
+ "images": {
55
+ "total": 2110,
56
+ "by_color": {
57
+ "black": 233,
58
+ "blue": 220,
59
+ "green": 304,
60
+ "red/orange/pink/fuchsia/brown": 507,
61
+ "silver/gray": 60,
62
+ "white/transparent": 636,
63
+ "yellow/gold": 150
64
+ }
65
+ },
66
+ "caps": {
67
+ "total": 191,
68
+ "by_color": {
69
+ "black": 20,
70
+ "blue": 22,
71
+ "green": 26,
72
+ "red/orange/pink/fuchsia/brown": 37,
73
+ "silver/gray": 10,
74
+ "white/transparent": 62,
75
+ "yellow/gold": 14
76
+ }
77
+ }
78
+ },
79
+ "validation": {
80
+ "images": {
81
+ "total": 254,
82
+ "by_color": {
83
+ "black": 12,
84
+ "blue": 18,
85
+ "green": 46,
86
+ "red/orange/pink/fuchsia/brown": 46,
87
+ "silver/gray": 6,
88
+ "white/transparent": 114,
89
+ "yellow/gold": 12
90
+ }
91
+ },
92
+ "caps": {
93
+ "total": 24,
94
+ "by_color": {
95
+ "black": 2,
96
+ "blue": 3,
97
+ "green": 4,
98
+ "red/orange/pink/fuchsia/brown": 4,
99
+ "silver/gray": 1,
100
+ "white/transparent": 8,
101
+ "yellow/gold": 2
102
+ }
103
+ }
104
+ }
105
+ },
106
+ "split_policy": {
107
+ "grouped_by": "cap_id",
108
+ "stratified_by": "color_category",
109
+ "ratios": {
110
+ "train": 0.8,
111
+ "validation": 0.1,
112
+ "test": 0.09999999999999995
113
+ }
114
+ }
115
+ }
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000001.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000002.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000003.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000004.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000005.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000006.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000007.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000008.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000009.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000010.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000011.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000012.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000013.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000014.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000015.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000016.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000017.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000018.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000019.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000020.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000021.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000022.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000023.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000024.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000025.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000026.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000027.png ADDED
test/2a868c0a-7567-4d8c-8766-d83556fe1a07_0000028.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000001.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000002.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000003.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000004.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000005.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000006.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000007.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000008.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000009.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000010.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000011.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000012.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000013.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000014.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000015.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000016.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000017.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000018.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000019.png ADDED
test/37a13562-74cc-431b-b2d9-035d3d559bf3_0000020.png ADDED