MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / build_pyramid

Function build_pyramid

scripts/inv-rendering/loss.py:33–41  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

31
32
33def build_pyramid(img):
34 level = int(min(math.log2(img.shape[0]), math.log2(img.shape[1]))) + 1
35 level = min(5, level)
36 imgs = []
37 for i in range(level):
38 imgs.append(img)
39 if i < level - 1:
40 img = downsample(img)
41 return imgs
42
43
44def compute_render_loss_pyramid_L1(img, target_pyramid, weight=1.0):

Callers 2

Calls 3

downsampleFunction · 0.85
minFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected