Detect, classify, and deblend sources in astronomical images using Mask R-CNN.
Reference Paper: Burke et al. 2019, MNRAS, 490 3952.
Corresponding Author: Colin J. Burke, University of Illinois at Urbana-Champaign
Additional Repository Authors: Patrick D. Aleo, Yu-Ching Chen, Joshua Yao-Yu Lin.
Astro R-CNN is a deep learning method for efficiently performing all tasks of source detection, classification, and deblending on astronomical images.
Setup:
pip install -r requirements.txt
Usage:
./astro_rcnn detect example
This will run the model in inference mode with pre-trained DECam weights (use GPU for best performance). The result will be a multi-extension FITS file output_0.fits
with a segmentation mask cutout in each extension corresponding to an object detection (extension number=SOURCE_ID). In each header, you will find the CLASS_ID (star=1,galaxy=2), bounding box (BBOX: y1,x1,y2,x2), and detection confidence (SCORE).
Example of Astro R-CNN detection on a real DECam image. See demo.ipynb for an interactive demonstration, including how to train on your own images.
Examples of Astro R-CNN deblending on a real DECam image.
This is a simple repository intended for demonstration purposes. For use with full-scale images or surveys, please contact the authors.
To train your own model, first download PhoSim training data (or make your own) into the project root directory: training set (1,000 images) validation set (250 images).
Then, try:
./astro_rcnn train trainingset,validationset
Depending on your setup, you should adjust the configuration settings and decide which weights to initialize with in astro_rcnn.py
.
If you would like a simulated test dataset beyond example
(1 image) to assess the network's performance: test set (50 images).
./astro_rcnn assess testset
This will generate mean AP score plots for stars and galaxies in testset
.
Also available are real DECam datasets of clusters of galaxies: ACO 1689 (50 images) ACO 3266 (50 images).