mwalmsley commited on
Commit
8e6e428
1 Parent(s): 28a6dc2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +200 -217
README.md CHANGED
@@ -1,219 +1,202 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: smooth-or-featured-dr12_smooth
7
- dtype: int32
8
- - name: smooth-or-featured-dr12_featured-or-disk
9
- dtype: int32
10
- - name: smooth-or-featured-dr12_artifact
11
- dtype: int32
12
- - name: disk-edge-on-dr12_yes
13
- dtype: int32
14
- - name: disk-edge-on-dr12_no
15
- dtype: int32
16
- - name: has-spiral-arms-dr12_yes
17
- dtype: int32
18
- - name: has-spiral-arms-dr12_no
19
- dtype: int32
20
- - name: bar-dr12_yes
21
- dtype: int32
22
- - name: bar-dr12_no
23
- dtype: int32
24
- - name: bulge-size-dr12_dominant
25
- dtype: int32
26
- - name: bulge-size-dr12_obvious
27
- dtype: int32
28
- - name: bulge-size-dr12_none
29
- dtype: int32
30
- - name: how-rounded-dr12_completely
31
- dtype: int32
32
- - name: how-rounded-dr12_in-between
33
- dtype: int32
34
- - name: how-rounded-dr12_cigar-shaped
35
- dtype: int32
36
- - name: edge-on-bulge-dr12_boxy
37
- dtype: int32
38
- - name: edge-on-bulge-dr12_none
39
- dtype: int32
40
- - name: edge-on-bulge-dr12_rounded
41
- dtype: int32
42
- - name: spiral-winding-dr12_tight
43
- dtype: int32
44
- - name: spiral-winding-dr12_medium
45
- dtype: int32
46
- - name: spiral-winding-dr12_loose
47
- dtype: int32
48
- - name: spiral-arm-count-dr12_1
49
- dtype: int32
50
- - name: spiral-arm-count-dr12_2
51
- dtype: int32
52
- - name: spiral-arm-count-dr12_3
53
- dtype: int32
54
- - name: spiral-arm-count-dr12_4
55
- dtype: int32
56
- - name: spiral-arm-count-dr12_more-than-4
57
- dtype: int32
58
- - name: merging-dr12_neither
59
- dtype: int32
60
- - name: merging-dr12_tidal-debris
61
- dtype: int32
62
- - name: merging-dr12_both
63
- dtype: int32
64
- - name: merging-dr12_merger
65
- dtype: int32
66
- - name: smooth-or-featured-dr5_smooth
67
- dtype: int32
68
- - name: smooth-or-featured-dr5_featured-or-disk
69
- dtype: int32
70
- - name: smooth-or-featured-dr5_artifact
71
- dtype: int32
72
- - name: disk-edge-on-dr5_yes
73
- dtype: int32
74
- - name: disk-edge-on-dr5_no
75
- dtype: int32
76
- - name: has-spiral-arms-dr5_yes
77
- dtype: int32
78
- - name: has-spiral-arms-dr5_no
79
- dtype: int32
80
- - name: bar-dr5_strong
81
- dtype: int32
82
- - name: bar-dr5_weak
83
- dtype: int32
84
- - name: bar-dr5_no
85
- dtype: int32
86
- - name: bulge-size-dr5_dominant
87
- dtype: int32
88
- - name: bulge-size-dr5_large
89
- dtype: int32
90
- - name: bulge-size-dr5_moderate
91
- dtype: int32
92
- - name: bulge-size-dr5_small
93
- dtype: int32
94
- - name: bulge-size-dr5_none
95
- dtype: int32
96
- - name: how-rounded-dr5_round
97
- dtype: int32
98
- - name: how-rounded-dr5_in-between
99
- dtype: int32
100
- - name: how-rounded-dr5_cigar-shaped
101
- dtype: int32
102
- - name: edge-on-bulge-dr5_boxy
103
- dtype: int32
104
- - name: edge-on-bulge-dr5_none
105
- dtype: int32
106
- - name: edge-on-bulge-dr5_rounded
107
- dtype: int32
108
- - name: spiral-winding-dr5_tight
109
- dtype: int32
110
- - name: spiral-winding-dr5_medium
111
- dtype: int32
112
- - name: spiral-winding-dr5_loose
113
- dtype: int32
114
- - name: spiral-arm-count-dr5_1
115
- dtype: int32
116
- - name: spiral-arm-count-dr5_2
117
- dtype: int32
118
- - name: spiral-arm-count-dr5_3
119
- dtype: int32
120
- - name: spiral-arm-count-dr5_4
121
- dtype: int32
122
- - name: spiral-arm-count-dr5_more-than-4
123
- dtype: int32
124
- - name: spiral-arm-count-dr5_cant-tell
125
- dtype: int32
126
- - name: merging-dr5_none
127
- dtype: int32
128
- - name: merging-dr5_minor-disturbance
129
- dtype: int32
130
- - name: merging-dr5_major-disturbance
131
- dtype: int32
132
- - name: merging-dr5_merger
133
- dtype: int32
134
- - name: smooth-or-featured-dr8_smooth
135
- dtype: int32
136
- - name: smooth-or-featured-dr8_featured-or-disk
137
- dtype: int32
138
- - name: smooth-or-featured-dr8_artifact
139
- dtype: int32
140
- - name: disk-edge-on-dr8_yes
141
- dtype: int32
142
- - name: disk-edge-on-dr8_no
143
- dtype: int32
144
- - name: has-spiral-arms-dr8_yes
145
- dtype: int32
146
- - name: has-spiral-arms-dr8_no
147
- dtype: int32
148
- - name: bar-dr8_strong
149
- dtype: int32
150
- - name: bar-dr8_weak
151
- dtype: int32
152
- - name: bar-dr8_no
153
- dtype: int32
154
- - name: bulge-size-dr8_dominant
155
- dtype: int32
156
- - name: bulge-size-dr8_large
157
- dtype: int32
158
- - name: bulge-size-dr8_moderate
159
- dtype: int32
160
- - name: bulge-size-dr8_small
161
- dtype: int32
162
- - name: bulge-size-dr8_none
163
- dtype: int32
164
- - name: how-rounded-dr8_round
165
- dtype: int32
166
- - name: how-rounded-dr8_in-between
167
- dtype: int32
168
- - name: how-rounded-dr8_cigar-shaped
169
- dtype: int32
170
- - name: edge-on-bulge-dr8_boxy
171
- dtype: int32
172
- - name: edge-on-bulge-dr8_none
173
- dtype: int32
174
- - name: edge-on-bulge-dr8_rounded
175
- dtype: int32
176
- - name: spiral-winding-dr8_tight
177
- dtype: int32
178
- - name: spiral-winding-dr8_medium
179
- dtype: int32
180
- - name: spiral-winding-dr8_loose
181
- dtype: int32
182
- - name: spiral-arm-count-dr8_1
183
- dtype: int32
184
- - name: spiral-arm-count-dr8_2
185
- dtype: int32
186
- - name: spiral-arm-count-dr8_3
187
- dtype: int32
188
- - name: spiral-arm-count-dr8_4
189
- dtype: int32
190
- - name: spiral-arm-count-dr8_more-than-4
191
- dtype: int32
192
- - name: spiral-arm-count-dr8_cant-tell
193
- dtype: int32
194
- - name: merging-dr8_none
195
- dtype: int32
196
- - name: merging-dr8_minor-disturbance
197
- dtype: int32
198
- - name: merging-dr8_major-disturbance
199
- dtype: int32
200
- - name: merging-dr8_merger
201
- dtype: int32
202
- splits:
203
- - name: train
204
- num_bytes: 13773194874.51
205
- num_examples: 319530
206
- - name: test
207
- num_bytes: 3468361585.803
208
- num_examples: 79883
209
- download_size: 17267064517
210
- dataset_size: 17241556460.313
211
- configs:
212
- - config_name: default
213
- data_files:
214
- - split: train
215
- path: data/train-*
216
- - split: test
217
- path: data/test-*
218
  license: cc-by-nc-sa-4.0
219
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ annotations_creators:
3
+ - crowdsourced
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  license: cc-by-nc-sa-4.0
5
+ size_categories:
6
+ - 10K<n<100K
7
+ task_categories:
8
+ - image-classification
9
+ - image-feature-extraction
10
+ pretty_name: Galaxy Zoo DESI
11
+ arxiv: 2404.02973
12
+ tags:
13
+ - galaxy zoo
14
+ - physics
15
+ - astronomy
16
+ - galaxies
17
+ - citizen science
18
+ ---
19
+
20
+ # GZ Campaign Datasets
21
+
22
+ ## Dataset Summary
23
+
24
+ [Galaxy Zoo](www.galaxyzoo.org) volunteers label telescope images of galaxies according to their visible features: spiral arms, galaxy-galaxy collisions, and so on.
25
+ These datasets share the galaxy images and volunteer labels in a machine-learning-friendly format. We use these datasets to train [our foundation models](https://arxiv.org/abs/2404.02973). We hope they'll help you too.
26
+
27
+ - **Curated by:** [Mike Walmsley](https://walmsley.dev/)
28
+ - **License:** [cc-by-nc-sa-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en). We specifically require **all models trained on these datasets to be released as source code by publication**.
29
+
30
+ ## Downloading
31
+
32
+ Install the Datasets library
33
+
34
+ pip install datasets
35
+
36
+ and then log in to your HuggingFace account
37
+
38
+ huggingface-cli login
39
+
40
+ All unpublished* datasets are temporarily "gated" i.e. you must have requested and been approved for access. Galaxy Zoo team members should go to https://huggingface.co/mwalmsley/datasets/gz_desi, click "request access", ping Mike, then wait for approval.
41
+ Gating will be removed on publication.
42
+
43
+ *Currently: the `gz_h2o` and `gz_ukidss` datasets
44
+
45
+ ## Usage
46
+
47
+ ```python
48
+ from datasets import load_dataset
49
+
50
+ # . split='train' picks which split to load
51
+ dataset = load_dataset(
52
+ 'mwalmsley/gz_desi', # each dataset has a random fixed train/test split
53
+ split='train'
54
+ # some datasets also allow name=subset (e.g. name="tiny" for gz_evo). see the viewer for subset options
55
+ )
56
+ dataset.set_format('torch') # your framework of choice e.g. numpy, tensorflow, jax, etc
57
+ print(dataset_name, dataset[0]['image'].shape)
58
+ ```
59
+
60
+ Then use the `dataset` object as with any other HuggingFace dataset, e.g.,
61
+
62
+ ```python
63
+ from torch.utils.data import DataLoader
64
+
65
+ dataloader = DataLoader(ds, batch_size=4, num_workers=1)
66
+ for batch in dataloader:
67
+ print(batch.keys())
68
+ # the image key, plus a key counting the volunteer votes for each answer
69
+ # (e.g. smooth-or-featured-gz2_smooth)
70
+ print(batch['image'].shape)
71
+ break
72
+ ```
73
+
74
+ You may find these HuggingFace docs useful:
75
+ - [PyTorch loading options](https://huggingface.co/docs/datasets/en/use_with_pytorch#data-loading).
76
+ - [Applying transforms/augmentations](https://huggingface.co/docs/datasets/en/image_process#apply-transforms).
77
+ - [Frameworks supported](https://huggingface.co/docs/datasets/v2.19.0/en/package_reference/main_classes#datasets.Dataset.set_format) by `set_format`.
78
+
79
+
80
+ ## Dataset Structure
81
+
82
+ Each dataset is structured like:
83
+
84
+ ```json
85
+ {
86
+ 'image': ..., # image of a galaxy
87
+ 'smooth-or-featured-[campaign]_smooth': 4,
88
+ 'smooth-or-featured-[campaign]_featured-or-disk': 12,
89
+ ... # and so on for many questions and answers
90
+ }
91
+ ```
92
+
93
+ Images are loaded according to your `set_format` choice above. For example, ```set_format("torch")``` gives a (3, 424, 424) CHW `Torch.Tensor`.
94
+
95
+ The other keys are formatted like `[question]_[answer]`, where `question` is what the volunteers were asked (e.g. "smooth or featured?" and `answer` is the choice selected (e.g. "smooth"). **The values are the count of volunteers who selected each answer.**
96
+
97
+ `question` is appended with a string noting in which Galaxy Zoo campaign this question was asked e.g. `smooth-or-featured-gz2`. For most datasets, all questions were asked during the same campaign. For GZ DESI, there are three campaigns (`dr12`, `dr5`, and `dr8`) with very similar questions.
98
+
99
+ GZ Evo combines all the published datasets (currently GZ2, GZ DESI, GZ CANDELS, GZ Hubble, and GZ UKIDSS) into a single dataset aimed at multi-task learning. This is helpful for [building models that adapt to new tasks and new telescopes]((https://arxiv.org/abs/2404.02973)).
100
+
101
+ (we will shortly add keys for the astronomical identifiers i.e. the sky coordinates and telescope source unique ids)
102
+
103
+
104
+ ## Key Limitations
105
+
106
+ Because the volunteers are answering a decision tree, the questions asked depend on the previous answers, and so each galaxy and each question can have very different total numbers of votes. This interferes with typical metrics that use aggregated labels (e.g. classification of the most voted, regression on the mean vote fraction, etc.) because we have different levels of confidence in the aggregated labels for each galaxy. We suggest a custom loss to handle this. Please see the Datasets and Benchmarks paper for more details (under review, sorry).
107
+
108
+
109
+ All labels are imperfect. The vote counts may not always reflect the true appearance of each galaxy. Additionally,
110
+ the true appearance of each galaxy may be uncertain - even to expert astronomers.
111
+ We therefore caution against over-interpreting small changes in performance to indicate a method is "superior". **These datasets should not be used as a precise performance benchmark.**
112
+
113
+
114
+ ## Citation Information
115
+
116
+ The machine-learning friendly versions of each dataset are described in a recently-submitted paper. Citation information will be added if accepted.
117
+
118
+ For each specific dataset you use, please also cite the original Galaxy Zoo data release paper (listed below) and the telescope description paper (cited therein).
119
+
120
+ ### Galaxy Zoo 2
121
+
122
+ @article{10.1093/mnras/stt1458,
123
+ author = {Willett, Kyle W. and Lintott, Chris J. and Bamford, Steven P. and Masters, Karen L. and Simmons, Brooke D. and Casteels, Kevin R. V. and Edmondson, Edward M. and Fortson, Lucy F. and Kaviraj, Sugata and Keel, William C. and Melvin, Thomas and Nichol, Robert C. and Raddick, M. Jordan and Schawinski, Kevin and Simpson, Robert J. and Skibba, Ramin A. and Smith, Arfon M. and Thomas, Daniel},
124
+ title = "{Galaxy Zoo 2: detailed morphological classifications for 304 122 galaxies from the Sloan Digital Sky Survey}",
125
+ journal = {Monthly Notices of the Royal Astronomical Society},
126
+ volume = {435},
127
+ number = {4},
128
+ pages = {2835-2860},
129
+ year = {2013},
130
+ month = {09},
131
+ issn = {0035-8711},
132
+ doi = {10.1093/mnras/stt1458},
133
+ }
134
+
135
+ ### Galaxy Zoo Hubble
136
+
137
+ @article{2017MNRAS.464.4176W,
138
+ author = {Willett, Kyle W. and Galloway, Melanie A. and Bamford, Steven P. and Lintott, Chris J. and Masters, Karen L. and Scarlata, Claudia and Simmons, B.~D. and Beck, Melanie and {Cardamone}, Carolin N. and Cheung, Edmond and Edmondson, Edward M. and Fortson, Lucy F. and Griffith, Roger L. and H{\"a}u{\ss}ler, Boris and Han, Anna and Hart, Ross and Melvin, Thomas and Parrish, Michael and Schawinski, Kevin and Smethurst, R.~J. and {Smith}, Arfon M.},
139
+ title = "{Galaxy Zoo: morphological classifications for 120 000 galaxies in HST legacy imaging}",
140
+ journal = {Monthly Notices of the Royal Astronomical Society},
141
+ year = 2017,
142
+ month = feb,
143
+ volume = {464},
144
+ number = {4},
145
+ pages = {4176-4203},
146
+ doi = {10.1093/mnras/stw2568}
147
+ }
148
+
149
+ ### Galaxy Zoo CANDELS
150
+
151
+ @article{10.1093/mnras/stw2587,
152
+ author = {Simmons, B. D. and Lintott, Chris and Willett, Kyle W. and Masters, Karen L. and Kartaltepe, Jeyhan S. and Häußler, Boris and Kaviraj, Sugata and Krawczyk, Coleman and Kruk, S. J. and McIntosh, Daniel H. and Smethurst, R. J. and Nichol, Robert C. and Scarlata, Claudia and Schawinski, Kevin and Conselice, Christopher J. and Almaini, Omar and Ferguson, Henry C. and Fortson, Lucy and Hartley, William and Kocevski, Dale and Koekemoer, Anton M. and Mortlock, Alice and Newman, Jeffrey A. and Bamford, Steven P. and Grogin, N. A. and Lucas, Ray A. and Hathi, Nimish P. and McGrath, Elizabeth and Peth, Michael and Pforr, Janine and Rizer, Zachary and Wuyts, Stijn and Barro, Guillermo and Bell, Eric F. and Castellano, Marco and Dahlen, Tomas and Dekel, Avishai and Ownsworth, Jamie and Faber, Sandra M. and Finkelstein, Steven L. and Fontana, Adriano and Galametz, Audrey and Grützbauch, Ruth and Koo, David and Lotz, Jennifer and Mobasher, Bahram and Mozena, Mark and Salvato, Mara and Wiklind, Tommy},
153
+ title = "{Galaxy Zoo: quantitative visual morphological classifications for 48 000 galaxies from CANDELS★}",
154
+ journal = {Monthly Notices of the Royal Astronomical Society},
155
+ volume = {464},
156
+ number = {4},
157
+ pages = {4420-4447},
158
+ year = {2016},
159
+ month = {10},
160
+ doi = {10.1093/mnras/stw2587}
161
+ }
162
+
163
+ ### Galaxy Zoo DESI
164
+
165
+ (two citations due to being released over two papers)
166
+
167
+ @article{10.1093/mnras/stab2093,
168
+ author = {Walmsley, Mike and Lintott, Chris and Géron, Tobias and Kruk, Sandor and Krawczyk, Coleman and Willett, Kyle W and Bamford, Steven and Kelvin, Lee S and Fortson, Lucy and Gal, Yarin and Keel, William and Masters, Karen L and Mehta, Vihang and Simmons, Brooke D and Smethurst, Rebecca and Smith, Lewis and Baeten, Elisabeth M and Macmillan, Christine},
169
+ title = "{Galaxy Zoo DECaLS: Detailed visual morphology measurements from volunteers and deep learning for 314 000 galaxies}",
170
+ journal = {Monthly Notices of the Royal Astronomical Society},
171
+ volume = {509},
172
+ number = {3},
173
+ pages = {3966-3988},
174
+ year = {2021},
175
+ month = {09},
176
+ issn = {0035-8711},
177
+ doi = {10.1093/mnras/stab2093}
178
+ }
179
+
180
+
181
+ @article{10.1093/mnras/stad2919,
182
+ author = {Walmsley, Mike and Géron, Tobias and Kruk, Sandor and Scaife, Anna M M and Lintott, Chris and Masters, Karen L and Dawson, James M and Dickinson, Hugh and Fortson, Lucy and Garland, Izzy L and Mantha, Kameswara and O’Ryan, David and Popp, Jürgen and Simmons, Brooke and Baeten, Elisabeth M and Macmillan, Christine},
183
+ title = "{Galaxy Zoo DESI: Detailed morphology measurements for 8.7M galaxies in the DESI Legacy Imaging Surveys}",
184
+ journal = {Monthly Notices of the Royal Astronomical Society},
185
+ volume = {526},
186
+ number = {3},
187
+ pages = {4768-4786},
188
+ year = {2023},
189
+ month = {09},
190
+ issn = {0035-8711},
191
+ doi = {10.1093/mnras/stad2919}
192
+ }
193
+
194
+
195
+ ### Galaxy Zoo UKIDSS
196
+
197
+ Not yet published.
198
+
199
+ ### Galaxy Zoo Cosmic Dawn (a.k.a. H2O)
200
+
201
+
202
+ Not yet published.