MCPcopy Create free account
hub / github.com/cewang-sysu/DuDoTrans / __init__

Method __init__

modules/reconstructor.py:10–19  ·  view source on GitHub ↗
(self, dset, img_h=512, img_w=512)

Source from the content-addressed store, hash-verified

8class reconstructor(nn.Module):
9 # the version of reconstructor is set as FBP-DuDo-SwinIR to test the effectiveness of dual domain SwinIR in Recon
10 def __init__(self, dset, img_h=512, img_w=512):
11 super(reconstructor, self).__init__()
12 self.Image_recon_module=SwinIR(upscale=1, img_size=(img_h, img_w), in_chans=2,
13 window_size=8, img_range=1., depths=[2, 2, 2, 2],
14 embed_dim=60, num_heads=[2, 2, 2, 2], mlp_ratio=2, upsampler='')
15 self.Sinogram_recon_module=SwinIR(upscale=1, img_size=(96, 800),
16 window_size=8, img_range=1., depths=[1, 1, 1],
17 embed_dim=60, num_heads=[2, 2, 2], mlp_ratio=2, upsampler='')
18 self.dset=dset
19 self.fp_senet_gt, _, self.ril_odl, __ = self.dset.ril()
20 def forward(self, img, img_gt, sinos):
21 sinos_gt=self.radon_senet_gt(img_gt)
22 sinos_enhanced=self.Sinogram_recon_module(sinos)

Callers 1

__init__Method · 0.45

Calls 2

SwinIRClass · 0.90
rilMethod · 0.45

Tested by

no test coverage detected