(img, msize, model, net_type)
| 1051 | |
| 1052 | # Generate a single-input depth estimation |
| 1053 | def 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. |
no test coverage detected