models.midas.midas_onnx
Source: models/midas/midas_onnx.py
models.midas.midas_onnx
DynamicUnflatten
Bases: Module
Dynamic Unflatten that computes output sizes from input tensor shape
ONNXCompatibleGlobalPool2d
Bases: Module
ONNX-compatible replacement for AdaptiveMaxPool2d(1) and AdaptiveAvgPool2d(1)
replace_adaptive_pooling_with_onnx_compatible(module)
Recursively replace AdaptiveMaxPool2d and AdaptiveAvgPool2d with ONNX-compatible versions
replace_unflatten_with_dynamic(module)
Recursively replace nn.Unflatten with dynamic versions that adapt to tensor sizes