sreshwarprasad commited on
Commit
ac832a3
·
verified ·
1 Parent(s): 5f51d73

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +115 -16
README.md CHANGED
@@ -1,19 +1,118 @@
1
- # Galaxy Zoo 2 Data
2
 
3
- This directory contains the Galaxy Zoo 2 dataset used for training the hierarchical ViT model.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  ## Directory Structure
6
- - `raw/`: Raw files from Zenodo (images + mapping CSV).
7
- - `processed/`: Final curated dataset (dr7objid-named images + clean `labels.parquet`).
8
-
9
- ## How to get the data
10
- 1. Download the images from the [Zenodo GZ2 repository](https://zenodo.org/record/3565489).
11
- 2. Place the images in `data/raw/images_zenodo/`.
12
- 3. Put `gz2_hart16.csv` and `gz2_filename_mapping.csv` in `data/raw/`.
13
- 4. Run the preparation pipeline:
14
- ```bash
15
- python3 scripts/data/convert_zenodo_images.py
16
- python3 scripts/data/prepare_labels.py
17
- ```
18
-
19
- Note: The datasets are large (~3GB for labels, ~20GB for images) and are excluded from version control via `.gitignore`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Galaxy Zoo 2 Dataset
2
 
3
+ This directory contains the dataset used for training and evaluating the **Hierarchical Probabilistic Vote Regression model** on Galaxy Zoo 2.
4
+
5
+ ---
6
+
7
+ ## Dataset Source
8
+
9
+ The dataset is derived from **Galaxy Zoo 2 (GZ2)**, a large-scale citizen science project providing galaxy morphology annotations.
10
+
11
+ * Total images: ~243,000
12
+ * Labels: volunteer vote distributions across a hierarchical decision tree
13
+
14
+ The data corresponds to:
15
+
16
+ * Willett et al. (2013)
17
+ * Hart et al. (2016)
18
+
19
+ ---
20
 
21
  ## Directory Structure
22
+
23
+ ```text
24
+ data/
25
+ ├── raw/ # Original data (Zenodo images + metadata CSVs)
26
+ ├── processed/ # Final curated dataset
27
+ └── README.md
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Raw Data
33
+
34
+ The raw dataset includes:
35
+
36
+ * Galaxy images from Zenodo (`images_gz2.zip`)
37
+ * `gz2_hart16.csv` — morphological vote distributions
38
+ * `gz2_filename_mapping.csv` — mapping between image filenames and object IDs
39
+
40
+ Each galaxy is identified by a **DR7 object ID (`dr7objid`)**, which links images to labels.
41
+
42
+ ---
43
+
44
+ ## Processing Pipeline (This Work)
45
+
46
+ The raw Galaxy Zoo 2 dataset is not directly suitable for training.
47
+
48
+ In this project, the following preprocessing steps are performed:
49
+
50
+ * Map images from `asset_id` → `dr7objid`
51
+ * Rename images for consistent indexing
52
+ * Align images with corresponding labels
53
+ * Remove missing or unmatched samples
54
+ * Filter invalid or incomplete entries
55
+ * Construct hierarchical vote distributions
56
+ * Ensure all probability vectors are valid (sum = 1)
57
+
58
+ Pipeline implementation:
59
+
60
+ ```bash
61
+ python3 scripts/data/convert_zenodo_images.py
62
+ python3 scripts/data/prepare_labels.py
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Processed Data
68
+
69
+ The final dataset consists of:
70
+
71
+ * Cleaned and aligned galaxy images
72
+ * `labels.parquet` containing structured vote distributions
73
+
74
+ This dataset is directly used for training probabilistic models.
75
+
76
+ ---
77
+
78
+ ## Notes
79
+
80
+ * Final dataset size: **~3.3 GB (images + labels)**
81
+ * A small fraction of samples may be missing due to incomplete mappings
82
+ * Missing samples are assumed to be randomly distributed
83
+
84
+ The processed dataset ensures:
85
+
86
+ * consistent mapping between images and labels
87
+ * valid probability distributions
88
+ * suitability for hierarchical probabilistic modeling
89
+
90
+ ---
91
+
92
+ ## Usage
93
+
94
+ This dataset is designed for:
95
+
96
+ * probabilistic regression over Galaxy Zoo decision trees
97
+ * predicting full vote distributions instead of single labels
98
+ * training models that preserve uncertainty and distribution structure
99
+
100
+ ---
101
+
102
+ ## Citation
103
+
104
+ If you use this dataset, please cite:
105
+
106
+ * Willett, K. W., et al. (2013)
107
+ *Galaxy Zoo 2: detailed morphological classifications for galaxies*
108
+ https://arxiv.org/abs/1308.3496
109
+
110
+ * Hart, R. E., et al. (2016)
111
+ *Galaxy Zoo: improved debiased morphological classifications*
112
+ https://arxiv.org/abs/1607.01019
113
+
114
+ ---
115
+
116
+ ## Summary
117
+
118
+ This dataset represents a cleaned and structured version of Galaxy Zoo 2, enabling reliable training of models that predict **hierarchical probability distributions** rather than discrete labels.