(depth_low, up_weights)
| 200 | return volume |
| 201 | |
| 202 | def context_upsample(depth_low, up_weights): |
| 203 | |
| 204 | b, c, h, w = depth_low.shape |
| 205 | depth_unfold = F.unfold(depth_low.reshape(b,c,h,w),3,1,1).reshape(b,-1,h,w) |
| 206 | depth_unfold = F.interpolate(depth_unfold,(h*16,w*16),mode='nearest').reshape(b,9,h*16,w*16) |
| 207 | depth = (depth_unfold*up_weights).sum(1) |
| 208 | |
| 209 | return depth |
| 210 | |
| 211 | def disparity_regression(x, maxdisp): |
| 212 | assert len(x.shape) == 4 |
nothing calls this directly
no outgoing calls
no test coverage detected