Skip to main content
QUICK REVIEW

[Paper Review] Cosmic-CoNN: A Cosmic Ray Detection Deep-Learning Framework, Dataset, and Toolkit

Chengyuan Xu, C. McCully|arXiv (Cornell University)|Jun 28, 2021
Radiation Detection and Scintillator TechnologiesPhysics and Astronomy9 references5 citations
TL;DR

Cosmic-CoNN is a deep learning framework that enables robust, generic cosmic ray (CR) detection in single-exposure astronomical images across diverse ground-based telescopes. By introducing a median-weighted loss function and group normalization, it achieves 93.40% F1-score on LCO data and 94.37% on unseen Gemini data, outperforming prior models without retraining.

ABSTRACT

Rejecting cosmic rays (CRs) is essential for the scientific interpretation of CCD-captured data, but detecting CRs in single-exposure images has remained challenging. Conventional CR detectors require experimental parameter tuning for different instruments, and recent deep learning methods only produce instrument-specific models that suffer from performance loss on telescopes not included in the training data. We present Cosmic-CoNN, a generic CR detector deployed for 24 telescopes at the Las Cumbres Observatory, which is made possible by the three contributions in this work: 1) We build a large and diverse ground-based CR dataset leveraging thousands of images from a global telescope network. 2) We propose a novel loss function and a neural network optimized for telescope imaging data to train generic CR detection models. At 95% recall, our model achieves a precision of 93.70% on Las Cumbres imaging data and maintains a consistent performance on new ground-based instruments never used for training. Specifically, the Cosmic-CoNN model trained on the Las Cumbres CR dataset maintains high precisions of 92.03% and 96.69% on Gemini GMOS-N/S 1x1 and 2x2 binning images, respectively. 3) We build a suite of tools including an interactive CR mask visualization and editing interface, console commands, and Python APIs to make automatic, robust CR detection widely accessible by the community of astronomers. Our dataset, open-source codebase, and trained models are available at https://github.com/cy-xu/cosmic-conn.

Motivation & Objective

  • Address the challenge of detecting cosmic rays in single-exposure CCD images, especially when multiple exposures are unavailable.
  • Overcome limitations of existing deep learning models that are instrument-specific and lose performance on unseen telescopes.
  • Develop a generic, transferable CR detection model that generalizes across ground-based instruments with varying pixel scales, binning, and imaging conditions.
  • Create a publicly accessible toolkit with visualization, APIs, and command-line tools to support widespread adoption in astronomy.
  • Build a large, diverse CR dataset from Las Cumbres Observatory data to train and validate the model across real-world observational variability.

Proposed method

  • Propose a median-weighted loss function that addresses class imbalance in CR detection by assigning higher loss weights to pixels with lower median intensity, improving model convergence.
  • Integrate group normalization (GN) into the U-Net-based neural network architecture to enhance training stability and efficiency, especially with small or variable batch sizes.
  • Use 1024×1024 pixel cropping patches from aligned images to preserve spatial context and detect CRs of arbitrary shapes and sizes.
  • Train the model end-to-end using PyTorch with Adam optimizer, employing data augmentation (random rotation and mirroring) for improved generalization.
  • Adapt the same architecture for spectroscopic data (NRES) by adjusting input patch size and batch size, demonstrating cross-modality applicability.
  • Implement a two-phase training strategy for fair comparison with baseline models like deepCR, ensuring consistent training dynamics across different batch sizes.

Experimental results

Research questions

  • RQ1Can a deep learning model trained on one set of ground-based telescopes generalize effectively to unseen instruments with different pixel scales, binning, and imaging conditions?
  • RQ2How does a median-weighted loss function improve model performance and training efficiency compared to standard cross-entropy loss in highly imbalanced CR detection tasks?
  • RQ3To what extent does group normalization enhance training stability and convergence speed in low-data or variable-batch scenarios common in astronomical imaging?
  • RQ4Can a single, unified deep learning framework achieve state-of-the-art performance across multiple data types (imaging and spectroscopy) without retraining per instrument?
  • RQ5How does the proposed framework compare in accuracy and efficiency to existing methods like LA Cosmic and deepCR on both training and unseen telescope data?

Key findings

  • The Cosmic-CoNN model achieves a 93.40% F1-score on LCO imaging data, a significant improvement over the baseline model’s 89.19% and deepCR’s 89.35%.
  • On unseen Gemini telescope data, Cosmic-CoNN achieves 86.80% F1-score at 1×1 binning and 94.37% at 2×2 binning, outperforming all baseline and variant models.
  • The median-weighted loss function reduces training epochs from 2980 to 2080 while improving F1-score from 89.19% to 92.98%, demonstrating faster convergence and better performance.
  • The combination of 1024×1024 patch size, group normalization, and median-weighted loss yields the best generalization, with a 94.37% F1-score on 2×2 binned Gemini data.
  • The model generalizes to spectroscopic data (NRES) with a 92.10% F1-score, showing its applicability beyond standard imaging applications.
  • The framework reduces training time and improves robustness across instruments, with the final model training in only 380 epochs, a 87% reduction compared to the baseline.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.