MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / create_window

Function create_window

utils/loss_utils.py:49–53  ·  view source on GitHub ↗
(window_size, channel)

Source from the content-addressed store, hash-verified

47 return gauss / gauss.sum()
48
49def create_window(window_size, channel):
50 _1D_window = gaussian(window_size, 1.5).unsqueeze(1)
51 _2D_window = _1D_window.mm(_1D_window.t()).float().unsqueeze(0).unsqueeze(0)
52 window = Variable(_2D_window.expand(channel, 1, window_size, window_size).contiguous())
53 return window
54
55def ssim(img1, img2, window_size=11, size_average=True):
56 channel = img1.size(-3)

Callers 2

ssim_loss_maskFunction · 0.85
ssimFunction · 0.85

Calls 1

gaussianFunction · 0.85

Tested by

no test coverage detected