[논문리뷰] MultiGrain : a unified image embedding for classes and instances - penny4860/study-note GitHub Wiki

1. 정리

요약

질문

  • R-mac 내용정리
  • margin loss에서의 batch sampling에서 negative pair를 선택하는 방식 (4)수식
    • 45 논문확인
    • 코드확인
    • negative j를 선택할 때 pdf 수식이 어떤역할을 하는거지?
  • l2-norm ==> pca ==> l2-norm 과정에 대해서 연구해보자.
    • CNN features off-the-shelf: An astounding baseline for recognition
    • Aggregating deep convolutional features for image retrieval
    • Particular object retrieval with integral max-pooling of CNN activations
  • 논문리뷰 : Fine-tuning CNN Image Retrieval with No Human Annotation
    • alpha-QE
  • 논문리뷰 : Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking
  • Image Embeddings

2. 내용

1. Intro

  • Contribution
    1. MultiGrain 구조의 image embedding 을 제안
      • 서로 다른 level의 degree of similarity task를 통합
    2. retrieval loss의 batching stragegy를 제안
      • classification task의 dataset만으로 추가적인 label 정보없이 retrieval task를 학습하는 방식
      • augment한 이미지를 similar instance 로 사용
    3. retrieval task에서 사용하는 pooling layer를 classfication task에 적용
  • Recognition task의 degree (coarse -> fine)
    • degree
      • class recognition
        • classification : object의 type을 인식
        • coarse level
        • more invariant to variation
      • instance recognition
        • retriaval : object를 인식
        • fine level
        • sensitive to small details
  • classification과 retrieval task를 동시에 수행하는 것에 대한 논리적인 근거
    • embedding space상에서 degree of similarity에 비례한 거리를 나타내는 모델을 학습
    • 원하는 결과
      • classfication only : d(다른 class) > d(같은 class)
      • retrieval only : d(다른 instance) > d(같은 instance)
      • classification + retrieval : d(다른 class) > d(같은 class + 다른 instance) > d(같은 class + 같은 instance)

3. Architecture Design

3.1. Spatial Pooling Operators

  • classification task 에서의 pooling
    • Global Average Pooling 을 사용 : Global Translation Invariance
  • Retrieval Task 에서의 pooling
    • cls task에 비해 more localized information이 필요하다.
    • 종류
      • cam을 사용
      • rmac
      • GeM : Generalized Mean Pooling
        • channel 별로 p-norm을 구한다.
        • p : exponent parameter
          • p = 1 : average pooling
          • p = inf : max pooling
          • p > 1 : Tensor pixel의 contrast를 높인다.
  • 논문에서 사용한 Pooling
    • cls/ret에 공통으로 GeM을 사용
    • input resolution에 따라 p값을 다르게 적용

3.2. Training Objective

classification loss

  • 일반적인 cross entropy를 사용

retrieval loss

  • 기존 방식
    • triplet loss
      • d(r, +) < d(r, -)
      • batch sampling이 어렵다.
    • contrasive loss
      • d(r, +) < thd
      • d(r, -) > thd
  • 논문에서 사용한 방식 : margin loss
    • loss(e_i, e_j, beta, y) = max(0, alpha + y*(dist(e_i, e_j) - beta))
      • alpha : fixed parameter
      • beta : trainable parameter
      • dist() : normalized euclidean distance
    • sampling 방식
      • (4) 수식

Join loss and architecture

(5) 수식

3.3. Batching with repeated augmentation (RA)

  • image classification dataset만을 사용해서 retrival task까지 학습하는 batch 구성방법을 제안
  • Repeated Augmentaion
    1. |B| / m개의 image를 sampling
    2. m번의 augmentation을 수행
      • |B|개의 image
      • original image와 augment된 sample을 positive pair로 사용

4. Experiments and Results

4.1. Experimental settings

Base architecture and training settings

  • resnet50
  • learning-rate
    • [0.2, 0.02, 0.002, 0.0002]
  • batch
    • batch size : 512, m : 3
    • 3번 augmentation 해서 512개의 batch 를 채운다.
      • 170-instance를 sampling

Data augmentation

  • full setting
    • flips
    • random
    • resized crop
    • lighting noise
    • color jitter
      • brightness
      • contrast
      • saturation

Pooling exponent

  • p=1 / p=3의 setting을 실험
  • p=3을 사용했을때 retrieval 성능이 좋았음.
    • convolution feature map의 contrast 커짐.
    • local 정보에 집중하는 효과

Input size and cropping

  • Training time
    • [224, 224]로 center crop
  • Testing time
    • 224-resolution : classification task protocal 사용
      • 가로, 세로중 small side를 256으로 resize
      • [224,224]로 center crop
    • 500-resolution, 800-resolution : retrieval task protocol 사용
      • 가로, 세로중 large side를 500,800으로 resize
      • center crop 없이 rect(직사각형) image로 입력

Margin loss and batch sampling

  • margin loss hyperparameter
    • "Sampling matters in deep embedding learning." 의 설정을 사용

4.3. Analysis of the tradeoff parameter

  • lambda : cls task의 loss importance
  • lambda = 0.5가 equal importance 를 의미하지 않는다.