  Modern large radio continuum surveys have high sensitivity and resolution,
and can resolve previously undetected extended and diffuse emissions, which
brings great challenges for the detection and morphological classification of
extended sources. We present HeTu-v2, a deep learning-based source detector
that uses the combined networks of Mask Region-based Convolutional Neural
Networks (Mask R-CNN) and a Transformer block to achieve high-quality radio
sources segmentation and classification. The sources are classified into 5
categories: Compact or point-like sources (CS), Fanaroff-Riley Type I (FRI),
Fanaroff-Riley Type II (FRII), Head-Tail (HT), and Core-Jet (CJ) sources.
HeTu-v2 has been trained and validated with the data from the Faint Images of
the Radio Sky at Twenty-one centimeters (FIRST). We found that HeTu-v2 has a
high accuracy with a mean average precision ($AP_{\rm @50:5:95}$) of 77.8%,
which is 15.6 points and 11.3 points higher than that of HeTu-v1 and the
original Mask R-CNN respectively. We produced a FIRST morphological catalog
(FIRST-HeTu) using HeTu-v2, which contains 835,435 sources and achieves 98.6%
of completeness and up to 98.5% of accuracy compared to the latest 2014 data
release of the FIRST survey. HeTu-v2 could also be employed for other
astronomical tasks like building sky models, associating radio components, and
classifying radio galaxies.
