[6주차/백서경/논문리뷰] ViTPose : Simple Vision Transformer Baselines for Human Post Estimation (2022)
해당 글은 노션에서 작성되었습니다. 글과 사진이 깨지는 부분이 있어 자세한 내용은 https://western-hortensia-8e0.notion.site/ViTPose-Simple-Vision-Transformer-Baselines-for-Human-Post-Estimation-2022-05ddcec739774f54b2a453d091102147?pvs=4 를 참고해주세요!
input : original image
[downsample]
person instance가 있는 image가 주어지면, downsampling ratio인 dd 짜리 patch로 나눠준다.
Rd23 인 patch N(=HdWd)개가 생기므로 전체 patch는
xp∈RNd2∗3 이 된다.
[flatten]
2D인 각 patch를 flatten하여 dd3 짜리 1D로 만들어준다
xp∈RN∗(d2∗3)
[linear projection]
transformer의 input으로 constant한 size의 vector를 받기 때문에, dd3인 각 patch를 C dimension으로 linear projection 한다.
모든 patch에 linear projection 적용해 나온 output xp∈RNC=RHdWd∗C 이 F0가 되어 transformer의 input으로 들어간다.
input : embedded patches
F0∈RHd∗Wd∗C
F′i+1=Fi+MHSA(LN(Fi))
[Layer Norm]
embedded patch에 layer normalization을 적용
[Linear Layer]
[ Attention Score ]
query와 key 행렬을 내적하여 attention score를 얻는데, 이때 내적하는 것은 query와 key 간의 유사도를 구하는 것으로 해석할 수 있다.
[ Scaling & Softmax ]
attention score 값 간의 차이를 눌러주기 위해 특정 값으로 나눠 scaling해주고, softmax를 적용해서 유사도 값을 0-1 사이로 맞춰준다.
[ Value 행렬과 연산 ]
Query와 key의 유사도인 attention score 행렬과 Value 행렬을 내적하여 최종 Self-Attention Value를 얻는다.
[ Multi-head ]
[ Skip connection ]
layer norm과 multihead self attention을 거친 output을 input에 더해준다.
F′i+1=Fi+MHSA(LN(Fi))
Fi+1=F′i+1+FFN(LN(Fi))
input : encoder output Fi
Fi∈RHd(=16)∗Wd(=16)∗C
우리가 원하는 것은 key joint의 값이므로, encoder output을 joint로 변환해주는 과정이 필요하다. ViTPose는 transformer encoder에 가벼운 decoder를 붙여서 최종 output을 얻는다.
K=Conv1∗1(Deconv(Deconv(Fout)))
[Deconvolution]
input으로 H16∗W16C의 Fi가 들어오면, decoder에서 deconvolution을 통해 upsampling을 해준다. 한번의 deconvolution에서 2배 upsample이 되어서 두번의 deconv를 거치고 나면 RH4W4∗C 가 된다.
[Predictor-convolution layer]
찾고자 하는 목표 joint의 개수가 Nk개라고 할 때, 11 convolution을 거쳐H4W4C 에서 H16W16∗Nk 의 feature map을 얻는다.
reference
---
[6주차 / 박민규 / 논문리뷰 ] ViTAE (0) | 2023.08.17 |
---|---|
[6주차 / 김지윤 / 논문리뷰] ViTAE : Vision Transformer Advanced by Exploring Intrinsic Inductive Bias (0) | 2023.08.11 |
[6주차 / 임종우 / 논문리뷰] ViTPose : Simple Vision Transformer Baselines for Human Pose Estimation (0) | 2023.08.10 |
[4주차/백서경/논문리뷰] Auto-Encoding Variational Bayes (0) | 2023.08.06 |
[4주차 / 김지윤 / 논문 리뷰] Generative Adversarial Nets(GAN) (0) | 2023.08.06 |
댓글 영역