Galaxy10 DECals Dataset
The original Galaxy10 dataset was created with Galaxy Zoo (GZ) Data Release 2 where volunteers classify ~270k of SDSS galaxy images where ~22k of those images
were selected in 10 broad classes using volunteer votes. GZ later utilized images from DESI Legacy Imaging Surveys (DECals) with much better resolution and image quality.
Galaxy10 DECals has combined all three (GZ DR2 with DECals images instead of SDSS images and DECals campaign ab, c) results in ~441k of unique galaxies covered by DECals
where ~18k of those images were selected in 10 broad classes using volunteer votes with more rigorous filtering. Galaxy10 DECals had its 10 broad classes tweaked a bit so that
each class is more distinct from each other and
Edge-on Disk with Boxy Bulge class with only 17 images in original Galaxy10 was abandoned. The source code for this dataset is released
under this repositary so you are welcome to play around if you like, otherwise you can use the compiled Galaxy10 DECals with dowload link below.
Download Galaxy10 DECals
Size: 2.54 GB
Galaxy10 DECals is a dataset contains 17736 256x256 pixels colored galaxy images (g, r and z band) separated in 10 classes.
Galaxy10_DECals.h5 have columns
images with shape
(17736, 256, 256, 3),
pxscale in unit of arcsecond per pixel
Galaxy10 dataset (17736 images) ├── Class 0 (1081 images): Disturbed Galaxies ├── Class 1 (1853 images): Merging Galaxies ├── Class 2 (2645 images): Round Smooth Galaxies ├── Class 3 (2027 images): In-between Round Smooth Galaxies ├── Class 4 ( 334 images): Cigar Shaped Smooth Galaxies ├── Class 5 (2043 images): Barred Spiral Galaxies ├── Class 6 (1829 images): Unbarred Tight Spiral Galaxies ├── Class 7 (2628 images): Unbarred Loose Spiral Galaxies ├── Class 8 (1423 images): Edge-on Galaxies without Bulge └── Class 9 (1873 images): Edge-on Galaxies with Bulge
For more information on the original Galaxy Zoo 2 classification tree: Galaxy Zoo Decision Tree
Load with astroNN
1from astroNN.datasets import load_galaxy10 2from tensorflow.keras import utils 3import numpy as np 4 5# To load images and labels (will download automatically at the first time) 6# First time downloading location will be ~/.astroNN/datasets/ 7images, labels = load_galaxy10() 8 9# To convert the labels to categorical 10 classes 10labels = utils.to_categorical(labels, 10) 11 12# To convert to desirable type 13labels = labels.astype(np.float32) 14images = images.astype(np.float32)
OR Load with Python & h5py
You should download
Galaxy10_DECals.h5 first and open python at the same location and run the following to open it:
1import h5py 2import numpy as np 3from tensorflow.keras import utils 4 5# To get the images and labels from file 6with h5py.File('Galaxy10_DECals.h5', 'r') as F: 7 images = np.array(F['images']) 8 labels = np.array(F['ans']) 9 10# To convert the labels to categorical 10 classes 11labels = utils.to_categorical(labels, 10) 12 13# To convert to desirable type 14labels = labels.astype(np.float32) 15images = images.astype(np.float32)
Split into train and test set
1import numpy as np 2from sklearn.model_selection import train_test_split 3 4train_idx, test_idx = train_test_split(np.arange(labels.shape), test_size=0.1) 5train_images, train_labels, test_images, test_labels = images[train_idx], labels[train_idx], images[test_idx], labels[test_idx]
Lookup Galaxy10 Class
You can lookup Galaxy10 class to the corresponding name by
1from astroNN.datasets.galaxy10 import galaxy10cls_lookup 2galaxy10cls_lookup(# a class number here to get back the name)
Galaxy10 dataset classification labels come from Galaxy Zoo
Galaxy10 dataset images come from DESI Legacy Imaging Surveys
Galaxy Zoo is described in Lintott et al. 2008, the GalaxyZoo Data Release 2 is described in Lintott et al. 2011, Galaxy Zoo DECals Campaign is described in Walmsley M. et al. 2021, DESI Legacy Imaging Surveys is described in Dey A. et al., 2019
The Legacy Surveys consist of three individual and complementary projects: the Dark Energy Camera Legacy Survey (DECaLS; Proposal ID #2014B-0404; PIs: David Schlegel and Arjun Dey), the Beijing-Arizona Sky Survey (BASS; NOAO Prop. ID #2015A-0801; PIs: Zhou Xu and Xiaohui Fan), and the Mayall z-band Legacy Survey (MzLS; Prop. ID #2016A-0453; PI: Arjun Dey). DECaLS, BASS and MzLS together include data obtained, respectively, at the Blanco telescope, Cerro Tololo Inter-American Observatory, NSF’s NOIRLab; the Bok telescope, Steward Observatory, University of Arizona; and the Mayall telescope, Kitt Peak National Observatory, NOIRLab. The Legacy Surveys project is honored to be permitted to conduct astronomical research on Iolkam Du’ag (Kitt Peak), a mountain with particular significance to the Tohono O’odham Nation.