Patent ID: 11908222
Assignee: HANGZHOU DIANZI UNIVERSITY
Field: Computer technology (Electrical engineering)
Classification: CPC G  Y | IPC G

Claim 8:
9. The method according to claim 8, wherein the specific implementation process of step (5) comprises steps of step 5-1 to step 5-4:
step 5-1: using labeled data in the pedestrian re-identification dataset as supervision information, and using ID loss and difficult triplet loss to train the network for each training batch as shown in equation (18), wherein the ID loss uses cross entropy loss:, L
      
       i
       ⁢
       d
      
     
     =
     
      
       
        ∑
         
       
       
        i
        =
        1
       
       N
      
      -
      
       
        q
        i
       
       ⁢
       
        log
        ⁡
        (
        
         p
         i
        
        )
       
      
     
    
   
   
    
     (
     18
     )
    
   
  
 

wherein N is the number of pedestrian categories, qi is the supervised label and pi is the predictive label;
the difficult triplet loss randomly samples P identities, each identity extracts K instances to form a mini batch with a size of P*K; each picture xa in the batch is selected as the anchor point in turn, and the farthest positive sample picture xp and the nearest negative sample picture xn in the batch are selected to form a triple to train the network in order to enhance the generalization ability of the network, as shown in equation(19):, L
      triplet
     
     =
     
      
       
        ∑
         
       
       
        i
        =
        1
       
       P
      
      ⁢
      
       
        
         
          ∑
           
         
         
          a
          =
          1
         
         K
        
        [
        
         m
         +
         
          
           
            
             max
             
              1
              ≤
              p
              ≤
              K
             
            
            ||
            
             
              f
              ⁢
              
               (
               
                x
                
                 i
                 ,
                 a
                
               
               )
              
             
             -
             
              f
              ⁢
              
               (
               
                x
                
                 i
                 ,
                 p
                
               
               )
              
             
            
            
             ||
             2
            
           
           ︷
          
          
           hardest
           ⁢
              
           positive
          
         
         -
         
          
           
            
             min
             
              
               
                
                 
                  
                   n
                   =
                   
                    1
                    ⁢
                       
                    …
                    ⁢
                       
                    K
                   
                  
                 
                
                
                 
                  
                   j
                   =
                   
                    1
                    ⁢
                       
                    …
                    ⁢
                       
                    P
                   
                  
                 
                
               
               ⁢
               j
              
              ≠
              i
             
            
            ||
            
             
              f
              ⁡
              (
              
               x
               
                i
                ,
                a
               
              
              )
             
             -
             
              f
              ⁡
              (
              
               x
               
                j
                ,
                n
               
              
              )
             
            
            
             ||
             2
            
           
           ︸
          
          
           hardest
           ⁢
              
           negative
          
         
        
        ]
       
       +
      
     
    
   
   
    
     (
     19
     )
    
   
  
 

step 5-2: training the occluded pedestrian re-identification model according to ƒ1, ƒ2, ƒ3, ƒ4 generated by the global features ƒcls, the final group of features of pedestrian key-points ƒƒ_keypoints and the pedestrian features ƒatt_local division to obtain a final model, and the specific equation can be expressed as follows:, Loss
     =
     
      
       
        L
        id
       
       (
       
        f
        cls
       
       )
      
      +
      
       
        L
        triplet
       
       (
       
        f
        cls
       
       )
      
      +
      
       
        1
        S
       
       ⁢
       
        
         
          ∑
          
           i
           =
           1
          
         
         S
        
         
        
         
          k
          c
          i
         
         [
         
          
           
            L
            id
           
           (
           
            f
            f_keypoints
            i
           
           )
          
          +
          
           
            L
            triplet
           
           (
           
            f
            f_keypoints
            i
           
           )
          
         
         ]
        
       
      
      +
      
       
        1
        k
       
       ⁢
       
        
         ∑
          
        
        
         i
         =
         1
        
        k
       
       ⁢
       
        (
        
         
          
           L
           id
          
          (
          
           f
           i
          
          )
         
         +
         
          
           L
           triplet
          
          (
          
           f
           i
          
          )
         
        
        )
       
      
     
    
   
   
    
     (
     20
     )
    
   
  
 

wherein S is the number of pedestrian key-points, and kc is the key-point confidence obtained in step 2-1;
step 5-3: in the test stage, inputting images to be queried q and test set images t into the final model for feature extraction, to obtain key-point features of the images to be queried q represented by ƒq and key-point features the test set images t represented by ƒt, and using graph matching optimization comparison, as shown in equation (21):, GM
     =
     
      
       1
       S
      
      ⁢
      
       
        ∑
         
       
       
        i
        =
        1
       
       S
      
      ⁢
      
       k
       c_q
       i
      
      ⁢
      
       k
       c_t
       i
      
      ⁢
      
       cosine
       (
       
        
         f
         q
         i
        
        ,
        
         f
         t
         i
        
       
       )
      
     
    
   
   
    
     (
     21
     )
    
   
  
 

wherein kc_qi and kc_ti are the i-th key-point confidences of the image q and t respectively; cosine is the cosine distance;
step 5-4: comparing the query image features with the test set image features, judging whether the images belong to the same class, and output the same class of pedestrian images.