Hostname: page-component-74656f9884-npj9w Total loading time: 0 Render date: 2026-11-06T23:58:16.537Z Has data issue: false hasContentIssue false

Deblending overlapping galaxies in DECaLS using transformer-based algorithm: A method combining multiple bands and data types

Published online by Cambridge University Press:  19 March 2024

Ran Zhang
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Meng Liu*
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Zhenping Yi
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Hao Yuan
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Zechao Yang
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Yude Bu
Affiliation:
School of Mathematics and Statistics, Shandong University, Weihai, Shandong, China
Xiaoming Kong
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Chenglin Jia
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Yuchen Bi
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Yusheng Zhang
Affiliation:
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai, Shandong, China
Nan Li
Affiliation:
National Astronomical Observatories, Chinese Academy of Sciences, Beijing, China
*
Corresponding author: Meng Liu; Email: liumeng@sdu.edu.cn
Rights & Permissions [Opens in a new window]

Abstract

In large-scale galaxy surveys, particularly deep ground-based photometric studies, galaxy blending was inevitable. Such blending posed a potential primary systematic uncertainty for upcoming surveys. Current deblenders predominantly depended on analytical modelling of galaxy profiles, facing limitations due to inflexible and imprecise models. We presented a novel approach, using a U-net structured transformer-based network for deblending astronomical images, which we term the CAT-deblender. It was trained using both RGB and the grz-band images, spanning two distinct data formats present in the Dark Energy Camera Legacy Survey (DECaLS) database, including galaxies with diverse morphologies in the training dataset. Our method necessitated only the approximate central coordinates of each target galaxy, sourced from galaxy detection, bypassing assumptions on neighbouring source counts. Post-deblending, our RGB images retained a high signal-to-noise peak, consistently showing superior structural similarity against ground truth. For multi-band images, the ellipticity of central galaxies and median reconstruction error for r-band consistently lie within $\pm$0.025 to $\pm$0.25, revealing minimal pixel residuals. In our comparison of deblending capabilities focused on flux recovery, our model showed a mere 1% error in magnitude recovery for quadruply blended galaxies, significantly outperforming SExtractor’s higher error rate of 4.8%. Furthermore, by cross-matching with the publicly accessible overlapping galaxy catalogs from the DECaLS database, we successfully deblended 433 overlapping galaxies. Moreover, we have demonstrated effective deblending of 63 733 blended galaxy images, randomly chosen from the DECaLS database.

Information

Type
Research Article
Copyright
© The Author(s), 2024. Published by Cambridge University Press on behalf of Astronomical Society of Australia
Figure 0

Table 1. The selection of well-sampled galaxies in GZD-5 is measured. The determination of thresholds is mainly based on Table 2 in Li et al. (2022). Columns T01$\sim$T7 in the third column represent the classification tasks in the GZD-5 decision tree. The fourth column shows the thresholds for selecting clean samples for pre-classification. For instance, to choose galaxies that can identify relatively clean lens-shaped samples, the conditions are $f_{feature/disc}$ >0.40, and $f_{edge-on,yes}$ >0.45.

Figure 1

Figure 1. The distribution of the number of galaxies in each class within the dataset, and the count of each galaxy morphology class in two data types: training set, validation set, and test set. The horizontal axis represents the types of galaxies, and the vertical axis represents the quantity of galaxy samples.

Figure 2

Figure 2. Description of data preprocessing and manual mixing of samples: The (a) process illustrates the creation of masks, where three masks represent the grz-bands, respectively. The (b) process showcases the masking of irrelevant objects. The mask represents the union of masks for irrelevant objects in the three band. The third image displays the post-processed image that only contains the target central galaxy. The (c) process demonstrates an example of manual galaxy blending, where the image includes a central target galaxy that needs to be reconstructed by the model and an eccentric galaxy.

Figure 3

Figure 3. The multi-head attention mechanism as defined in Vaswani et al. (2017) is described as follows. (a): The input sequence X is multiplied with the weight matrices $W^V$, $W^K$, and $W^Q$, resulting in V, K, and Q, respectively. (b): For multi-head attention, the value V, key K, and query Q each undergo h different learned linear projections. Subsequently, multi-head attention components generate h-dimensional output values in parallel. Finally, they are concatenated and projected, yielding the final value.

Figure 4

Figure 4. (a): Illustration of the rectangular window self-attention mechanism and axial shift operation. sh and sw are the window height and width of H-Rwin and V-Rwin, respectively. For a pixel (red dot), the attention area is the pink region in the middle feature map. (b): Description of the Local Complementary Module. (c): Explanation of the CATB module. (d): Overview of the structure of CAT-deblender.

Figure 5

Figure 5. The two subfigures above show the distribution of PSNR and SSIM scores on the RGB data test set. The average PSNR score on the test set is 32.94 dB, with a standard deviation of about $\sigma = 4.06$ The maximum SSIM score on the test set is 0.982, with a standard deviation of about $\sigma = 0.003$. The lower two subfigures illustrate how brightness differences between the central and neighbouring galaxies in the r-band test images affect ellipticity and galaxy magnitude error recovery, the top panel shows the distribution of the number of test samples on the x-axis, the middle panel shows the distribution of errors when splitting the test samples in a specific number of bins, and the bottom panel shows the median error.

Figure 6

Figure 6. The examples of successful deblending and prediction on the test set for two data types are shown via CAT-deblender. The top three rows display examples of successfully deblended RGB images, while the bottom three rows show examples of successfully deblended r-band images in the multi-band data. In each panel, the left side represents the input blended galaxy image, the middle represents the deblended image predicted by the deblending model, and the right side represents the image of the pre-blended central target galaxy. Additionally, overlayed on the deblended predictions are the correlation PSNR score, magnitude measurement error, and SSIM score between the deblended image and the corresponding pre-blended image. Under various galaxy morphologies and any number of off-centered galaxy instances, our CAT-deblender successfully deblended the central target galaxy and provided its most likely flux based on the off-centered galaxy occlusions.

Figure 7

Table 2. The comparison of the three deblenders, SExtractor (Bertin & Arnouts 1996), GAN(Generative Adversarial Network) (Reiman & Göhre 2019), and CAT-deblender, in terms of restoring the central galaxy’s magnitude, ellipticity, as well as their performance in SSIM and PSNR, is shown in the following table. In this table, Mag_mape stands for the MAPR between the magnitude of the deblended galaxy and the original central galaxy’s magnitude. $\Delta mag$ represents the average magnitude error, and $\Delta ellipticity$ indicates the average error in ellipticity. Both are calculated as the difference between the predicted value and the actual value.

Figure 8

Figure 7. The first row of subfigures displays the magnitude error of central galaxies in blended galaxies measured using the direct deblending functionality of SExtractor, compared to their original magnitudes. The second row shows the magnitude error of central galaxies after deblending with CAT-deblender, in comparison to their original magnitudes. Each panel in the first two rows presents the average luminosity error ($\Delta mag$), dispersion ($\sigma mag$), outlier ratio (defined as $|\Delta mag| > 0.75$), and the mean absolute percentage error (MAPE) of magnitude. The bottom row of four subfigures illustrates how the magnitude size of the central galaxy affects the recovery of galaxy magnitude in the model. In each subfigure, the top panel shows the distribution of the number of test samples along the x-axis, the middle panel shows the distribution of errors when dividing the test samples into a specific number of bins, and the bottom panel shows the median error. The first three subfigures in each row sequentially represent scenarios with 2-4 blended galaxy samples, and the fourth subfigure represents the entire test set sample.

Figure 9

Figure 8. The average residual pixel distribution of the r-band image unmixing on the test set is shown. The top two subfigures display the unmixing average residuals for the bi-blended, tri-blended galaxies, while the bottom two subfigures display those for the quad-blended galaxies and all samples in the test set. For each subplot, the x and y axes represent the height and width of the image, the bar on the right represents the residual pixel values. The red semi-transparent plane above represents the pixel zero level, and the blue semi-transparent surface below represents the background pixel distribution in the residual images.

Figure 10

Table 3. The model successfully deblending a catalog of blended galaxies is shown.

Figure 11

Figure 9. We present examples of RGB images of various overlapping galaxy types from the DECaLS database, along with the deblending results obtained using the CAT-deblender model. Each subplot consists of a pair of images. On the left side, we show the real observed blended galaxy image, and on the right side, we display the successful deblending prediction by the CAT-deblender model. Truncated coordinates are provided for identification purposes. The characters on the left side of each panel represent different blended galaxy types, and further details can be found in Keel et al. (2013).

Figure 12

Figure 10. We present examples of different mixed galaxy types in the r-band images from the DECaLS database, along with the deblending results obtained using the CAT-deblender model. Examples of successful unmixing in the r-band image from the multi-band images in the four panels at the top, and the four panels at the bottom represent successful unmixing examples in the corresponding RGB images for each of the four panels at the top. Each panel consists of three images. On the left side, we show the real observed mixed galaxy image. In the middle, we display the successful deblending prediction by the CAT-deblender model. On the right side, we show the residual image obtained by subtracting the predicted galaxy pixels from the original mixed galaxy image. Truncated coordinates are provided for identification purposes. The characters on the left side of each panel represent different mixed galaxy types, and further details can be found in Keel et al. (2013).

Figure 13

Figure 11. We present a subset of successfully deblended data types selected from the DECaLS database. For each subplot, the top three panels represent the mixed galaxy image, the three-dimensional pixel value distribution of the mixed galaxy image, and the deblending mask obtained using SExtractor. The bottom three panes represent the deblended target galaxy image, the three-dimensional pixel value distribution of the deblended image, and the deblending mask obtained using SExtractor.

Figure 14

Figure 12. (a) A $128\times128$ three-band blended galaxy image sample from the DECaLS dataset, visualized through Lupton transformation (Lupton et al. 2004). (b): Activation on the first layer of the Encoder when a $3\times128\times128$ image is input into the network. (c) Activation on the second layer of the Encoder. (d) Activation on the third layer of the Encoder. (e) Activation on the fourth layer, the bottleneck layer. (f): Activation on the first layer of the Decoder. (g) Activation on the second layer of the Decoder. (h) Activation on the third layer of the Decoder. (i) A $128\times128$ three-band deblended galaxy image sample, visualized through Lupton transformation (Lupton et al. 2004). Images in (b) to (h) represent a feature map each; the Encoder and bottleneck layers correspond to the output of learned features, while the Decoder layers correspond to the output of reconstructed features.

Figure 15

Figure 13. For those images that were successfully deblended but still have issues, we observed two distinct patterns: (i). There is a missing overlap area between the central galaxy and the eccentric galaxy in the deblended image, where the pixels are not appropriately filled, as shown in the three subfigures of the first row. (ii). The peak position of the central galaxy deviates significantly from the center of the image, resulting in a false deblend, as illustrated in the three subfigures of the second row. For those images that were not successfully deblended, we also found two common patterns: (i): The target image still retains noticeable remnants of the eccentric galaxy, as shown in the three subfigures of the third row. (ii): While there are multiple eccentric galaxies surrounding the central galaxy, the deblended image still retains parts of the eccentric galaxies, as depicted in the three subfigures of the fourth row.