Skip to content

Commit e518444

Browse files
committed
remove unused
1 parent 557dcfe commit e518444

File tree

4 files changed

+13
-57
lines changed

4 files changed

+13
-57
lines changed

models/modules.py

-21
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, pad=1, no
1313
def forward(self, x):
1414
return self.bn(self.conv(x))
1515

16-
17-
class ConvBn(nn.Module):
18-
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, pad=1, norm_act=InPlaceABN):
19-
super(ConvBn, self).__init__()
20-
self.conv = nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride, padding=pad, bias=False)
21-
self.bn = norm_act(out_channels, activation='identity')
22-
23-
def forward(self, x):
24-
return self.bn(self.conv(x))
25-
26-
2716
class ConvBnReLU3D(nn.Module):
2817
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, pad=1, norm_act=InPlaceABN):
2918
super(ConvBnReLU3D, self).__init__()
@@ -33,16 +22,6 @@ def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, pad=1, no
3322
def forward(self, x):
3423
return self.bn(self.conv(x))
3524

36-
37-
class ConvBn3D(nn.Module):
38-
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, pad=1, norm_act=InPlaceABN):
39-
super(ConvBn3D, self).__init__()
40-
self.conv = nn.Conv3d(in_channels, out_channels, kernel_size, stride=stride, padding=pad, bias=False)
41-
self.bn = norm_act(out_channels, activation='identity')
42-
43-
def forward(self, x):
44-
return self.bn(self.conv(x))
45-
4625
def homo_warp(src_feat, src_proj, ref_proj_inv, depth_values):
4726
# src_feat: (B, C, H, W)
4827
# src_proj: (B, 4, 4)

models/mvsnet.py

-14
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,6 @@ def forward(self, x):
6767
x = self.prob(x)
6868
return x
6969

70-
class RefineNet(nn.Module):
71-
def __init__(self):
72-
super(RefineNet, self).__init__()
73-
self.conv1 = ConvBnReLU(4, 32)
74-
self.conv2 = ConvBnReLU(32, 32)
75-
self.conv3 = ConvBnReLU(32, 32)
76-
self.res = ConvBnReLU(32, 1)
77-
78-
def forward(self, img, depth_init):
79-
concat = torch.cat((img, depth_init), dim=1)
80-
depth_residual = self.res(self.conv3(self.conv2(self.conv1(concat))))
81-
depth_refined = depth_init + depth_residual
82-
return depth_refined
83-
8470
class MVSNet(nn.Module):
8571
def __init__(self, norm_act=InPlaceABN):
8672
super(MVSNet, self).__init__()

test.ipynb

+11-20
Large diffs are not rendered by default.

train.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ def val_dataloader(self):
180180
hparams = get_opts()
181181
system = MVSSystem(hparams)
182182
checkpoint_callback = ModelCheckpoint(filepath=os.path.join('ckpts',
183-
f'{hparams.exp_name}'),
183+
hparams.exp_name),
184184
monitor='val/loss',
185185
mode='min',
186186
save_top_k=1,)
187187

188188
logger = TestTubeLogger(
189189
save_dir="logs",
190-
name=f'{hparams.exp_name}',
190+
name=hparams.exp_name,
191191
debug=False,
192192
create_git_tag=False
193193
)

0 commit comments

Comments
 (0)