Closed jiangtann closed 7 months ago
论文中提到,需要一个vision-to-decoder projector将所有的image feature变换到decoder的embedding_dim。
在SAM和LISA中,这是由nn.Conv2d单独完成的,out_chans直接就是decoder的embedding_dim 256。
而本文的image feature来自于MLLM的ViT输出,输出dim为1024。然后在代码中,先将image feature经过out_mm_projector: https://github.com/MaverickRen/PixelLM/blob/main/model/llava/model/llava_arch.py#L161
维度从1024变为了4096后,又经过了image_feature_neck,维度从4096变成了decoder的embedding_dim 256。 https://github.com/MaverickRen/PixelLM/blob/main/model/PixelLM.py#L508
想请教一下image feature先过一个MLP,将维度从1024变为4096的意义是什么,相比于直接用一个neck将image feature从1024降维成256会有优势吗?
我们通过实验发现,送入LLM的ViT的特征和送入Decoder的ViT特征是可以共用同一个mm_projector的,也可以将out_mm_projector去掉直接使用neck,但是效果都会比额外使用一个out_mm_projector差。
感谢你的解答!
论文中提到,需要一个vision-to-decoder projector将所有的image feature变换到decoder的embedding_dim。
在SAM和LISA中,这是由nn.Conv2d单独完成的,out_chans直接就是decoder的embedding_dim 256。
而本文的image feature来自于MLLM的ViT输出,输出dim为1024。然后在代码中,先将image feature经过out_mm_projector: https://github.com/MaverickRen/PixelLM/blob/main/model/llava/model/llava_arch.py#L161
维度从1024变为了4096后,又经过了image_feature_neck,维度从4096变成了decoder的embedding_dim 256。 https://github.com/MaverickRen/PixelLM/blob/main/model/PixelLM.py#L508
想请教一下image feature先过一个MLP,将维度从1024变为4096的意义是什么,相比于直接用一个neck将image feature从1024降维成256会有优势吗?