Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 3.81 KB

README.md

File metadata and controls

68 lines (45 loc) · 3.81 KB

Astro R-CNN

Detect, classify, and deblend sources in astronomical images using Mask R-CNN: a deep learning approach to image segmentation.

Reference Paper: Burke et al. 2019, MNRAS, 490 3952.

Corresponding Author: Colin J. Burke, University of Illinois at Urbana-Champaign

Contributors (in alphabetical order): Patrick D. Aleo, Colin J. Burke, Yu-Ching Chen, Joshua Yao-Yu Lin, Xin Liu, Anshul Shah.

Updated Walkthrough:

See our updated notebook here using the detectron2 framework. The training time is now dramatically decreased (~minutes) and code highly extendable! This version supersedes the Matterport Mask R-CNN implementation and includes options to customize the network architecture.

Description:

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).

infrence Example of Astro R-CNN detection on a real DECam image. See demo_decam.ipynb for an interactive demonstration, including how to train on your own images.

deblending

Examples of Astro R-CNN deblending on a real DECam image.

This is a simple repository intended for demonstration purposes. In general, the pre-trained weights should work reasonably well for any optical telescope data provided it is normalized properly. For use with full-scale images or surveys, please contact the authors.

Training:

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).

Future Work:

  • Upgrade to detectron2 framework and work on the programming and user interface
  • Support for more than 3 bands
  • Support for arbitrary effective exposure times in bands
  • Generalizations to arbitarily-sized images
  • Add generative predictor for source profile inference
  • Comparison with SCARLET and other codes in crowded fields using deblending-sensitive metrics

Please contact the authors if you are interested in contributing!