Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep Aggregation of Regional Convolutional Activations for Content Based Image Retrieval #205

Open
chullhwan-song opened this issue Sep 27, 2019 · 1 comment

Comments

@chullhwan-song
Copy link
Owner

https://arxiv.org/abs/1909.09420

@chullhwan-song
Copy link
Owner Author

chullhwan-song commented Sep 27, 2019

Abstract

  • aggregation method built on top of existing regional pooling approaches
    • regional > r-mac에서의 grid region과 비슷한것같다.
    • aggregation feature > average activations(SPoC)+maximum activation(MAC)
  • 여기서 실제 이 논문의 aggregation의 의미는 regional마다 aggregation feature를 다시 aggregation하는 방법을 의미
    • 여기서 궁금한것은 region마다 합칠때, 어떻게..하는것인가?
  • training ? NRA(Nonlinear Rank Approximation) loss function 적용 > metric learning
    • backbone neural network & to learn the aggregation weights
      • aggregation weights를 어떻게 학습? 어떤 의미? > learns the importance of each of the regions and assigns it an individual weight

PROPOSED METHOD

Nonlinear Rank Approximation Loss

  • refer 논문을 더 자세히 봐야할듯.
  • triplet loss기반인데, 다만, distance(ex-cosine)를 min-max scaling기법으로 representation하는 방법인듯.

Global and Regional Pooling

  • 이 연구의 접근은 DIR의 R-MAC과 거의 접근이 비슷하다. 다만, 밑에서 설명하는 그 차이점이 이 논문의 핵심인듯..
  • R-MAC : 각 Region(ROI) 별 MAC feature를 추출하여 이를 합함으로써 global feature로 만듦.
  • 그래서, R-MAC의 문제점은
    • 작은 region도 high로 나타날수있다.(mac feature의 특성상) > 영역이 작다고 주요하지 않다는 보장이 있나? 다만 확률적으로.낮을수 있지만..
    • regions들안에는 over-lapping 영역이 많다..그래서, max-pooling 을 사용하는 것이라면, over-lapping되는 영역의 feature와 동일해질수 있다.(over-lapping의 영역이 max...)
  • 이와 같은 문제점때문에, max-pooling보다는 average pooling이 더 좋은 결과가 나올수 있다.
  • 다만, average pooling은 input image size에 민감하다.
  • 이연구는 다양한 input size에 대한 비교를 통해 둘을 비교하는듯..
    • average pooling
    • max pooling
    • average pooling + max pooling
      image
      • Max Global은 모든 input size에 대해 성능이 안좋았다.
      • Avg Global은 이미지가 커질수록 어느순간부터 성능이 떨어졌다. > Avg Global는 큰 이미지로 학습할필요가 없다란 의미 또는 이미지가 클수록 좋은것만은 아니다란 의미로 해석!!
      • 반면에 R-MAC(Max Regional)은 다른 feature보다 좋았다.
      • 그러나, Avg+Max 로 Global과 Regional으로 동시에 R-MAC를 극복
        • 여기서 주의 또는 이상한점??은 Global이 더 좋았다는 것!!
      • Global 과 Regional 차이가 Global이 아마도 region=1즉, 전체 이미지 한장의 영역에서만.. > 이런의미면, Regional이 더높아야하는거 아닌가?
  • feature의 구성은 R-MAC과 거의 유사
    • region별 pooling feature > region별 l2-normalize > 각 region에 대한 aggregation :sum pooling 이제 여기서부터는 global feature > l2-normalize
    • 여기서, average pooling + max pooling 하는데, 나중에 따로따로 구한다음 concat하는지?? 아님 초기단계부터 ?? 궁금하다. > Fig.4
  • eval input size : {224, 448, 672, 896, 1120}
  • Fig.2에서 언급했듯이, Avg+Max의 경우 Regional 보다 Global이 더 좋은 성능을 보임
    • 이 이유, 모든 Region이 다 중요한것이 아니다.란 의미로 해석하고있음.
    • 각 region의 크기에 따라 weight를 더 줘야하고, 이는 max pooling보다 avg pooling이 크기가 큰 region에서 더 효과적이란 의미라고 주장.
    • 궁금한점은?
      • test 결과는 448사이즈로 할때 가장 좋은데, 실제 학습에서는 448 아닌 299 사이즈로 한다 > 메모리 문제일까?

Weighted Aggregation of CNN Activations

  • 여기서 하고 싶은얘기는 region마다 중요도가 다르니 그에 따른 weight를 주고 싶은것!!
  • region은 21개의 ROI
    image
  • backbone net에서의 layer중 어디를?? > by the last convolutional layer with a ReLU activation
  • 그래서, 21 region과 2개의 pooling feature를 사용하므로, 총 42개의 regional feature가 생성.
  • DARAC : (Deeply Aggregated Regional Activations of Convolutions 제안
    image
    • 42x1x2048 에서 16x1x2048 feature map으로 넘어가는 단계가 이해가 잘 안된다.
    • 위의 feature map 사이즈로 설명한것은 이해가 가나? 하위 convolution 설명들은 이해가 잘 안감?
      • 위의 feature map의 dimension(channel)은 이해가서 하위 convolution에 대한 설명은 input/output의 dimension의미는 아님.
    • 일단 정리하면, 이 42x1x2048 에서 16x1x2048 feature map 단계는 논문에서는, Region별 weight의 계산하는 방법이다라고 이 논문의 핵심으로 말하고 있다.
    • 하지만,
      • 42x1x2048 에서 16x1x2048 feature map 단계에서, 42 > 16으로 가는게 이해가 안간다. > tf.nn.conv2d 함수와 매치해 볼때, 더 이해가 안감
      • 이걸 이해했다치고, 이게 왜 region별 가중치를 계산한것인지에 대해 더 이해가 안간다.
    • 논문에서는
      • "the first step a convolution layer with l kernels of size 42 × 1 aggregates the pooled data to a matrix of dimension l × C."
        • 크기가 42x1가진 l개 kernel의 convolution layer가 pooled 데이터를 가지고, lxC 차원 matric로 합친다. (해석이 잘되었다면..)의 의미 인것같은데..
          • pooled 데이터는 이 convolution에서의 입력데이터 >즉, 이미 앞부분에 설명했던 Max/Avg pooling
        • paper : l=16
      • 이해가 가는데로 업데이트하겠음~!!
    • 아무리 생각해도 transpose 밖에 없을것같다. feature map의 channel을 42로 transpose하고 Conv 연산(1x1)으로 16으로 줄인후, 다시 feature map의 channel 2048로(원상복귀>transpose)하는 방법이...
      • 그러니까, 42와 16을 channel로 생각하면 된다.
    • 참고로, REMAP 연구도 idea는 매우 비슷하다.
      • 푸념같지만, 설명방식도 비슷하다.. 이전까지는 이해가 잘가다가, 애매하게 region별 weight하는방법에 대한 중요부분에서 이해가 안간다.(나의 능력부족 ㅠ)

학습셋

  • google landmark
    • This modification leads to a total of 1196934 images from 12602 classes.
  • 299x299 resize
    • First all images are resized to 320 pixels on the smaller side and then they are randomly cropped to form a square with 299 pixels.
  • DIR 의 학습셋도 사용?
    • Since the training on a cleaned landmarks data set appeared to be crucial for optimal retrieval results in (DIR we perform an additional training on a subset of the used collection with identical hyper-parameters after convergence.
  • The resulting feature vectors from the first training procedure are further denoted as
    DARAC-GL and the vectors produced after the second training as DARAC-CL.
    • DARAC-GL : GL > google landmark
    • DARAC-CL : CL > DIR clean neuralcode's data
  • validation set에 대한 구성언급이 없음

실험

  • 사실 능가했다고 하기엔 애매함.
  • 실제적으로 보면, 최종적으로 input에대한 multi-resolution을 이용해야만 SOTA??
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant