Views
No views yet
1from huggingface_hub import hf_hub_download
2from src.model import load_trained_model
3import numpy as np
4
5model_path = hf_hub_download(repo_id="samarthkumar/ultrasound-nerve-segmentation", filename="model_nerve.keras")
6model = load_trained_model(model_path)
7
8# image shape: (128, 128, 1), values in [0, 1]
9mask = model.predict(np.expand_dims(image, 0))