In your code RT_Strero.py,when dealing with the cost volume, have codes:
for scale in range(len(feats_l)):if scale > 0:wflow = F.upsample(pred[scale - 1], (feats_l[scale].size(2), feats_l[scale].size(3)),mode='bilinear') * feats_l[scale].size(2) / img_size[2]cost = self._build_volume_2d3(feats_l[scale], feats_r[scale], 3, wflow, stride=1)else:cost = self._build_volume_2d(feats_l[scale], feats_r[scale], 12, stride=1)
in
wflow = F.upsample(pred[scale - 1], (feats_l[scale].size(2), feats_l[scale].size(3)),mode='bilinear') * feats_l[scale].size(2) / img_size[2]
this line, it seems the previous pred (pred[scale - 1] )is already reshape to 256*512 with
disp_up = F.upsample(pred_low_res, (img_size[2], img_size[3]), mode='bilinear')
it's bigger than every cost in feats_l or feats_r, and it seems meant to be downsample.
So why use the function upsample but not do conv?
Thanks.
@heguohao0728
You could use deconv/conv to perform upsampling/downsample.
We choose bilinear upsampling for reducing training parameter without performance drop.
Hi, sorry to disturb you again...
In your code RT_Strero.py,when dealing with the cost volume, have codes:
for scale in range(len(feats_l)):
if scale > 0:
wflow = F.upsample(pred[scale - 1], (feats_l[scale].size(2), feats_l[scale].size(3)),
mode='bilinear') * feats_l[scale].size(2) / img_size[2]
cost = self._build_volume_2d3(feats_l[scale], feats_r[scale], 3, wflow, stride=1)
else:
cost = self._build_volume_2d(feats_l[scale], feats_r[scale], 12, stride=1)
in
wflow = F.upsample(pred[scale - 1], (feats_l[scale].size(2), feats_l[scale].size(3)),mode='bilinear') * feats_l[scale].size(2) / img_size[2]
this line, it seems the previous pred (pred[scale - 1] )is already reshape to 256*512 withdisp_up = F.upsample(pred_low_res, (img_size[2], img_size[3]), mode='bilinear')
it's bigger than every cost in feats_l or feats_r, and it seems meant to be downsample. So why use the function upsample but not do conv? Thanks.