diff --git a/cellfinder/core/classify/classify.py b/cellfinder/core/classify/classify.py index ec77190f..3488c666 100644 --- a/cellfinder/core/classify/classify.py +++ b/cellfinder/core/classify/classify.py @@ -68,6 +68,14 @@ def main( workers=workers, ) + if trained_model and trained_model.suffix == ".h5": + print( + "Weights provided in place of the model, " + "loading weights into default model." + ) + model_weights = trained_model + trained_model = None + model = get_model( existing_model=trained_model, model_weights=model_weights,