  Wide-field astronomical surveys are often affected by the presence of
undesirable reflections (often known as "ghosting artifacts" or "ghosts") and
scattered-light artifacts. The identification and mitigation of these artifacts
is important for rigorous astronomical analyses of faint and
low-surface-brightness systems. However, the identification of ghosts and
scattered-light artifacts is challenging due to a) the complex morphology of
these features and b) the large data volume of current and near-future surveys.
In this work, we use images from the Dark Energy Survey (DES) to train,
validate, and test a deep neural network (Mask R-CNN) to detect and localize
ghosts and scattered-light artifacts. We find that the ability of the Mask
R-CNN model to identify affected regions is superior to that of conventional
algorithms and traditional convolutional neural networks methods. We propose
that a multi-step pipeline combining Mask R-CNN segmentation with a classical
CNN classifier provides a powerful technique for the automated detection of
ghosting and scattered-light artifacts in current and near-future surveys.
