The invention discloses a cross-domain
small sample semantic segmentation method and device, equipment and a medium. According to the cross-domain
small sample semantic segmentation method, a hierarchical
data set is constructed through a controllable style offset synthesis image, and a style
feature extraction and weight generation network is trained; a dynamic weight is generated based on the difference between the target domain image style representation and the source domain reference, feature layer level modulation is performed on the visual basis model
encoder features, and the feature alignment problem is accurately solved; image
semantic information is fused and supported through a memory attention mechanism, so that the problem of
small sample semantic sparsity is effectively relieved; meanwhile, the
synthetic data accurately controls style offset through a stable
diffusion model, and uncontrollability of traditional generative
data expansion is avoided. According to the method, the cross-domain small sample semantic segmentation performance is remarkably improved, and the problems of prompt mismatching, feature
dislocation and out-of-
control data expansion caused by domain offset are solved.