The application discloses a weakly supervised image semantic segmentation training and reasoning method, and relates to the technical field of
image processing, comprising the following steps: S1, a causal
graph model containing image features, category labels, co-occurrence context and segmentation results is constructed, the causal relationship between variables is determined, and the false causal path generated by the co-occurrence context as a
confounding variable on segmentation prediction is identified; the complete causal
graph model containing image features, category labels, co-occurrence context and segmentation results is constructed, the false causal path generated by the co-occurrence context as a
confounding variable is identified, the
confounding variable is sampled and adjusted by a
backdoor, and the false causal path is
cut off from the root of
causal reasoning, meanwhile, a causal consistency
loss function is designed to constrain the consistency of segmentation results under different context environments, and the effect that the false correlation problem of the co-occurrence context can be effectively solved without additional
labeled data or complex multi-model cooperation is realized.