MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / refine_focal

Function refine_focal

lib/test_utils.py:111–118  ·  view source on GitHub ↗
(depth, focal, model, u0, v0)

Source from the content-addressed store, hash-verified

109 return outputs
110
111def refine_focal(depth, focal, model, u0, v0):
112 last_scale = 1
113 focal_tmp = np.copy(focal)
114 for i in range(1):
115 scale = refine_focal_one_step(depth, focal_tmp, model, u0, v0)
116 focal_tmp = focal_tmp / scale.item()
117 last_scale = last_scale * scale
118 return torch.tensor([[last_scale]])
119
120def refine_shift(depth_wshift, model, focal, u0, v0):
121 depth_wshift_tmp = np.copy(depth_wshift)

Callers

nothing calls this directly

Calls 1

refine_focal_one_stepFunction · 0.85

Tested by

no test coverage detected