ygtxr1997 / CelebBasis

Official Implementation of 'Inserting Anybody in Diffusion Models via Celeb Basis'
https://celeb-basis.github.io/
MIT License
253 stars 7 forks source link

confusing about the shape of B? #17

Closed CuddleSabe closed 11 months ago

CuddleSabe commented 1 year ago

B = PCA(Ck, p) = R^{mxp}, but the shape of C_bar is R^d, how to compute it?

截屏2023-11-06 19 28 38
CuddleSabe commented 1 year ago

截屏2023-11-06 19 39 10 maybe the paper is wrong.... paper say u use the pca on the second dim, but the code is the first dim!

ygtxr1997 commented 1 year ago

PCA aims to reduce the dimension of a matrix in shape $m\times n$ into $m\times k$ in the 2nd dimension. However, in 3DMM and our method, we DO NOT directly use this reduced $m\times k$ matrix, but the itermediate result P in the shape of $k \times m$. Here P can be considered as a mapping matrix, that is, the relationship between the unreduced dimensions (768) and the reduced dimensions (maybe 512). You may refer to the 3DMM paper to find out more details. Our paper's B is mainly based on the P mapping matrix but not the reduced input embeddings.

CuddleSabe commented 1 year ago

PCA aims to reduce the dimension of a matrix in shape m × n into m × k in the 2nd dimension. However, in 3DMM and our method, we DO NOT directly use this reduced m × k matrix, but the itermediate result P in the shape of k × m . Here P can be considered as a mapping matrix, that is, the relationship between the unreduced dimensions (768) and the reduced dimensions (maybe 512). You may refer to the 3DMM paper to find out more details. Our paper's B is mainly based on the P mapping matrix but not the reduced input embeddings.

thanks! my fault ;)

ygtxr1997 commented 11 months ago

🤗