src/pretrain.py
def evaluate(test_datagen, model, model_path):
    """An evaluation loop that runs each batch in the test gen and displays the original - prediction - GT"""
    # Load the model
    print(f"Loading model from {model_path}")
    model.load_state(model_path)
    for x, y in test_datagen:
        print(x.shape)
        print(y.shape)
        pred = model.predict_on_batch(x)
        for xi, predi, yi in zip(x, pred, y):

            plot_output(xi, predi, yi)
An evaluation loop that runs each batch in the test gen and displays the original - prediction - GT
An evaluation loop that runs each batch in the test gen and displays the original - prediction - GT
An evaluation loop that runs each batch in the test gen and displays the original - prediction - GT
def evaluate(test_datagen, model, model_path):
    print(f"Loading model from {model_path}")
    model.load_state(model_path)
    for x, y in test_datagen:
        print(x.shape)
        print(y.shape)
        pred = model.predict_on_batch(x)
        for xi, predi, yi in zip(x, pred, y):
            plot_output(xi, predi, yi)
def evaluate ( test_datagen , model , model_path ) : print ( f"Loading model from {model_path}" ) model . load_state ( model_path ) for x , y in test_datagen : print ( x . shape ) print ( y . shape ) pred = model . predict_on_batch ( x ) for xi , predi , yi in zip ( x , pred , y ) : plot_output ( xi , predi , yi )
An evaluation loop that runs each batch in the test gen and displays the original - prediction - GT
An evaluation loop that runs each batch in the test gen and displays the original - prediction - GT
"""An evaluation loop that runs each batch in the test gen and displays the original - prediction - GT""" # Load the model
test_datagen
model
model_path