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

关于PAN多级特征融合在维持原图比例不变时,填充区域的Attention Mask如何使用的问题 #372

Open
urbaneman opened this issue Jul 16, 2024 · 0 comments
Assignees

Comments

@urbaneman
Copy link

urbaneman commented Jul 16, 2024

感谢您的工作和对开源社区的贡献。

我想在自己的数据使用RT-DETR,数据目标在原尺度为正方形目标,我想利用这个信息,在数据处理时保持原图比例,我也参考了这个issue13,但是里面没有 Attention Mask 相关讨论。

我想咨询的问题是:
在图像保持原图比例缩放时,会引入填充像素,填充部分的Attention Mask在DETR中会被置为1,并在encode的时候忽略

https://github.com/facebookresearch/detr/blob/29901c51d7fe8712168b8d0d64351170bc0f83e0/models/backbone.py#L72

但是在 RT-DETR 中采用直接resize的方法,没有填充,keep_ratio: False,Attention Mask作用在了CDN中

memory = self.encoder[i](src_flatten, pos_embed=pos_embed)

我需要在原图比例上使用RT-DETR,那么PAN结构的特征融合时填充像素特征是否会影响非填充目标特征的表达是否需要对遮挡像素的特征做mask?

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

No branches or pull requests

2 participants