The invention discloses a Yellow
River ice semantic segmentation method based on a multi-attention mechanism double-flow fusion network. The method is used for solving the technical problem that an existing Yellow
River ice detection method is poor in accuracy. According to the technical scheme, firstly, data sets are collected and labeled, the
labeled data sets are divided into a training
data set and a
test data set, then a segmentation
network structure is constructed, the network comprises shallow branches and deep branches, and a channel attention module is added to the deep
branch, a position attention module is added to the shallow
branch, the fusion module is used for fusing the shallow branches and the deep branches, the data in the
training set is added into the network in batches, the constructed neural network is trained by adopting
cross entropy loss and an RMSprop optimizer, and finally, a to-be-tested image is input and a test is carried out by using the trained model. According to the method, multi-level and multi-scale
feature fusion can be selectively carried out, context information is captured based on an attention mechanism, a feature map with higher resolutionis obtained, and a better segmentation effect is obtained.