def run(model_path):
    """Run MonoDepthNN to compute depth maps.

    Args:
        model_path (str): path to saved model
    """
    print("initialize")

    # select device

    # load network
    #model = MidasNet(model_path, non_negative=True)
    model = MidasNet_preprocessing(model_path, non_negative=True)

    model.eval()
    
    print("start processing")

    # input
    img_input = np.zeros((3, 384, 384), np.float32)  

    # compute
    with torch.no_grad():
        sample = torch.from_numpy(img_input).unsqueeze(0)
        prediction = model.forward(sample)
        prediction = (
            torch.nn.functional.interpolate(
                prediction.unsqueeze(1),
                size=img_input.shape[:2],
                mode="bicubic",
                align_corners=False,
            )
            .squeeze()
            .cpu()
            .numpy()
        )

    torch.onnx.export(model, sample, ntpath.basename(model_path).rsplit('.', 1)[0]+'.onnx', opset_version=9)    
    
    print("finished")
Run MonoDepthNN to compute depth maps.

    Args:
        model_path (str): path to saved model
    
ControlNet-v1-1-nightly/annotator/zoe/zoedepth/models/base_models/midas_repo/tf/make_onnx_model.py