1 of 1

Deep Neural Networks for Galaxy Morphology Classification

by Galactic Shape ID: Bitao Jin (bjin8), James Ro (jro3), Christopher Tripp (crtripp)

CSCI 2470 (Deep Learning), Department of Computer Science, Brown University

Results

Introduction

The morphology of a galaxy, such as its shape and features, is informative about its star-forming activity, its evolutionary history, and its interaction with its local environment. In contrast to manually examining galaxy images through astronomical surveys like in the past, modern researchers have utilized the “citizen- science” project Galaxy Zoo to allow users to record galaxy’s visual features and label galaxy images, creating a large dataset of labeled galaxy images. With this project, we aim to design a deep neural network which is able to classify images in the Galaxy10: DECaLS dataset to a high level of accuracy.

Data | Methodology

We used the Galaxy10 DECaLS data set, which contains 17,736 galaxy images (256x256 pixels, colored) from DECaLS, labeled (through Galaxy Zoo) according to 10 classes: 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.

The dataset was preprocessed by converting the images and labels into floats, adding center cropping to the images, resizing the images to 69x69 pixels, and one-hot encoding the labels. When training our model, we decided to add in Random Rotation and Random Flip layers as data augmentation to improve the performance of our model. Finally, we divided the 17,736 images from the data set into 70% in training, 15% in validation, and 15% in test sets.

We implemented a single layer Convolutional Neural Network (CNN), a multi-layer CNN and a DenseNet CNN as the primary architectures of our project. The single-layer CNN consisted of: 1) 2D Convolution, 2) Batch Normalization, 3) Max-Pooling, 4) Dropout, 5) Flatten, 6) Dropout, 7) Dense with LeakyRelu, 8) Dropout, 9) Dense with SoftMax. The multi-layer CNN architecture was very similar except that it used three 2D Convolution layers, with each layer followed by a Batch Normalization layer.DenseNet proposes two changes to the standard CNN model: a dense block that allows gradients to flow through, and a transition layer that improves model efficiency by reducing parameters As we intended to build completely new architectures to classify galaxy images, we tuned our hyperparameters (epochs and batch size) and selected filter sizes and dropout rates based on trial and error, as well as general shared knowledge.

Discussion

Dealing with an enormous dataset (2.54GB) with 17,736 images definitely had its challenges. It was very computationally intensive to preprocess the dataset and train our models, sometimes taking up to 30 minutes to train a model. These were huge limiting factors, as it made it difficult to train and test our models, tune our hyperparameters, and come up with the most effective model architecture. We also learned throughout the course of our project that overfitting can be a common problem in image classification. This project did teach us a valuable lesson in the importance of data augmentation in image classification in reducing overfitting.

However, we were able to achieve a test accuracy of 76.62% on our multi-layer CNN model, which far surpassed the 43% accuracy achieved by Ciprijanovic et al. using ResNet50. Although our model’s accuracy was slightly lower than the 84.73% accuracy achieved by Gharat and Dandawate on a similar dataset that we hoped to surpass, our 76.62% accuracy suggests that we were still able to build a highly functional and accurate model architecture to correctly classify galaxy images.

We hope that future work on classifying images in this dataset would seriously consider the challenges and problems we faced with the training time and the amount of computation required to build a fully functional model. It may be useful in the future to subset the dataset into smaller chunks and apply CNN models on these smaller subsets rather than training and evaluating models on the entire dataset. Another way to lessen training time and make this process less computationally intensive would be to only look at images from a select few classes. We foresee that there may be a tradeoff between accuracy and training time/computing power with these two approaches, but we believe that future work can truly benefit from a faster training time in order to build and test the most effective model architecture.

Figure 2. Multi-layer CNN model architecture.

Figure 1. Example images of 10 galaxies, as well as preprocessed images with center crop and augmented images with random rotation and random flip.

Our multi-layer CNN model unsurprisingly outperformed our single-layer CNN model with a test accuracy of 76.62% versus 61.02%. The DenseNet201 model achieved even higher test accuracy at 94.83%. We have detailed the test accuracy of each model architecture as well as its respective categorical cross-entropy in the below figure.

Model

Accuracy

Categorical Cross-entropy

Single-layer CNN

61.02%

1.1306

Multi-layer CNN

76.62%

0.7124

DenseNet201

94.83%

7.0064

Figure 4. Accuracy and categorical cross-entropy losses of model architectures.

Figure 5. Prediction summary and examples.

Figure 3.A DenseNet Architecture with 3 dense blocks