arunos728 / MotionSqueeze

Official PyTorch Implementation of MotionSqueeze, ECCV 2020
BSD 2-Clause "Simplified" License
139 stars 16 forks source link

MS module insert into 3D model #20

Open paden118 opened 2 years ago

paden118 commented 2 years ago

Can this module be inserted into the 3D model? How to insert? thanks?

for example, in the Flow_refinement class, What is the shape of input x, res, match_v, and the output x?

def forward(self, x, res, match_v):
    if match_v is not None:
        x = tr.cat([x, match_v], dim=1)
    _, c, h, w = x.size()
    x = x.view(-1,self.num_segments-1,c,h,w)

    x = tr.cat([x,x[:,-1:,:,:,:]], dim=1) ## (b,t,3,h,w)
    x = x.view(-1,c,h,w)

    x = self.conv1(x)
    x = self.conv2(x)
    x = self.conv3(x)
    x = self.conv4(x)
    x = x + res

    return x