Instructions to use samarthkumar/ultrasound-nerve-segmentation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use samarthkumar/ultrasound-nerve-segmentation with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://samarthkumar/ultrasound-nerve-segmentation") - Notebooks
- Google Colab
- Kaggle
Ultrasound Nerve Segmentation โ U-Net
Binary segmentation of the Brachial Plexus nerve in ultrasound images.
Model: U-Net (TensorFlow/Keras) Dataset: Kaggle Ultrasound Nerve Segmentation Validation Accuracy: 98.47% Input: 128ร128 grayscale ultrasound image Output: 128ร128 binary segmentation mask
Usage
from huggingface_hub import hf_hub_download
from src.model import load_trained_model
import numpy as np
model_path = hf_hub_download(repo_id="samarthkumar/ultrasound-nerve-segmentation", filename="model_nerve.keras")
model = load_trained_model(model_path)
# image shape: (128, 128, 1), values in [0, 1]
mask = model.predict(np.expand_dims(image, 0))
- Downloads last month
- 45