MCPcopy Index your code
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / singleestimate

Function singleestimate

src/depthmap_generation.py:1053–1066  ·  view source on GitHub ↗
(img, msize, model, net_type)

Source from the content-addressed store, hash-verified

1051
1052# Generate a single-input depth estimation
1053def singleestimate(img, msize, model, net_type):
1054 if net_type == 0:
1055 return estimateleres(img, model, msize, msize)
1056 elif net_type == 10:
1057 return estimatemarigold(img, model, msize, msize)
1058 elif net_type == 11:
1059 return estimatedepthanything(img, model, msize, msize)
1060 elif net_type in [12, 13, 14]:
1061 return estimatedepthanything_v2(img, model, msize, msize)
1062 elif net_type >= 7:
1063 # np to PIL
1064 return estimatezoedepth(Image.fromarray(np.uint8(img * 255)).convert('RGB'), model, msize, msize)
1065 else:
1066 return estimatemidasBoost(img, model, msize, msize)
1067
1068
1069# Generating local patches to perform the local refinement described in section 6 of the main paper.

Callers 1

doubleestimateFunction · 0.85

Calls 6

estimateleresFunction · 0.85
estimatemarigoldFunction · 0.85
estimatedepthanythingFunction · 0.85
estimatedepthanything_v2Function · 0.85
estimatezoedepthFunction · 0.85
estimatemidasBoostFunction · 0.85

Tested by

no test coverage detected