Patent ID: 11887354
Assignee: INSTITUTE OF AUTOMATION, CHINESE ACADEMY OF SCIENCES
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 16:
17. A weakly supervised image semantic segmentation method based on the intra-class discriminator comprising:
extracting a feature image of a to-be-processed image through a feature extraction network, and obtaining an image semantic segmentation result of the to-be-processed image through an image semantic segmentation module, wherein the image semantic segmentation module is obtained through training based on a training image set and corresponding accurate pixel-level class labels;
wherein, the corresponding accurate pixel-level class labels are obtained through a first intra-class discriminator and a second intra-class discriminator based on the training image set and corresponding image-level class labels; the first intra-class discriminator and the second intra-class discriminator are separately constructed based on a deep network, and a method for training the first intra-class discriminator and the second intra-class discriminator comprises:
step S10: extracting a feature image of each image in the training image set through the feature extraction network to obtain a training feature image set, and constructing a first loss function of the first intra-class discriminator and a second loss function of the second intra-class discriminator, respectively;
step S20: training the first intra-class discriminator based on the training feature image set, the corresponding image-level class labels and the first loss function to obtain preliminary pixel-level foreground and background labels corresponding to all classes of each image in the training image set
step S30: training the second intra-class discriminator based on the training feature image set, the corresponding preliminary pixel-level foreground and background labels and the second loss function to obtain accurate pixel-level foreground and background labels corresponding to all the classes of each image in the training image set, wherein before step S30, the weakly supervised semantic segmentation method further comprises: finely adjusting the preliminary pixel-level foreground and background labels, wherein a method for finely adjusting the preliminary pixel-level foreground and background labels comprises:
finely adjusting the preliminary pixel-level foreground and background labels by one or more methods comprising averaging in a superpixel and using a conditional random field; and
step S40: generating the accurate pixel-level class labels based on the accurate pixel-level foreground and background labels corresponding to all the classes of each image in the training image set and the corresponding image-level class labels, wherein the second loss function is:, L
    ⁡
    
      (
      
        X
        ⁢
        2
      
      )
    
  
  =
  
    
      -
      
        1
        NHW
      
    
    ⁢
    
      
        ∑
        
          i
          =
          1
        
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          HW
        
        ⁢
        
          
            ∑
            
              c
              =
              1
            
            C
          
          ⁢
          
            
              y
              
                i
                ,
                c
              
            
            ⁡
            
              [
              
                
                  
                    B
                    
                      i
                      ,
                      k
                      ,
                      c
                    
                  
                  ⁢
                  
                    logσ
                    ⁡
                    
                      (
                      
                        S
                        
                          i
                          ,
                          k
                          ,
                          c
                        
                      
                      )
                    
                  
                
                +
                
                  
                    (
                    
                      1
                      -
                      
                        B
                        
                          i
                          ,
                          k
                          ,
                          c
                        
                      
                    
                    )
                  
                  ⁢
                  
                    log
                    ⁡
                    
                      (
                      
                        1
                        -
                        
                          σ
                          ⁡
                          
                            (
                            
                              S
                              
                                i
                                ,
                                k
                                ,
                                c
                              
                            
                            )
                          
                        
                      
                      )
                    
                  
                
              
              ]
            
          
        
      
    
  

wherein N represents a quantity of images in the training image set; HW represents a quantity of pixels in a feature image of a training image; C represents a quantity of image-level class labels in the training image set; yi,c represents an image-level label corresponding to a cth class of an ith image; Bi,k,c represents pixel-level foreground and background prediction results of the first intra-class discriminator after fine adjustment; Si,k,c represents prediction results of the second intra-class discriminator; and σ is a Sigmoid function.