xinghaochen / DECO

Official PyTorch implementation of "DECO: Query-Based End-to-End Object Detection with ConvNets"
41 stars 2 forks source link

About DecoDecoderLayer #3

Closed wsy-yjys closed 2 months ago

wsy-yjys commented 6 months ago

What do query pos and tgt stand for?

class DecoDecoderLayer(nn.Module):
    ……
    def forward(self, tgt, memory, query_pos: Optional[Tensor] = None):
        # SIM
        b, d, h, w = memory.shape
        tgt2 = tgt + query_pos
wsy-yjys commented 6 months ago

Does query pos indicate positional encodings?

xinghaochen commented 5 months ago

Does query pos indicate positional encodings?

Yes. And tgt is the object queries.