我讀 yinboc/liif 筆記

codingDL發表於2020-12-24

https://github.com/yinboc/liif/blob/main/models/liif.py
滿大街hardcode引數,大堆看不懂的軸,大堆莫名其妙的變數縮寫。。。

看來玩這個影像座標相關(並xy與外迴圈),又要新庫去操作軸了

imnet_spec:
name: mlp
out_dim: 3
hidden_list: [256, 256, 256, 256]

self.encoder = models.make(encoder_spec)
self.imnet = models.make(imnet_spec, args={'in_dim': imnet_in_dim})
pred = model(inp, batch['coord'], batch['cell'])

def forward(self, inp, coord, cell):
    self.gen_feat(inp)
    return self.query_rgb(coord, cell)

feat_unfold=True

imnet_in_dim *= 9
feat = F.unfold(feat, 3, padding=1).view(feat.shape[0], feat.shape[1] * 9, feat.shape[2], feat.shape[3])

local_ensemble=True

vx_lst = [-1, 1]
vy_lst = [-1, 1]

cell_decode=True

imnet_in_dim += 2
inp = torch.cat([inp, rel_cell], dim=-1)

相關文章