Instructions to use subhan1501/MURA-EfficientNetV2-Fracture-Detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use subhan1501/MURA-EfficientNetV2-Fracture-Detection with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://subhan1501/MURA-EfficientNetV2-Fracture-Detection") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- medical-imaging
|
| 5 |
+
- computer-vision
|
| 6 |
+
- efficientnetv2
|
| 7 |
+
- keras
|
| 8 |
+
- tensorflow
|
| 9 |
+
license: mit
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# MURA Bone Fracture Detection Model
|
| 13 |
+
|
| 14 |
+
## Model Description
|
| 15 |
+
This is a custom-trained **EfficientNetV2** model designed to detect bone fractures in musculoskeletal radiographs. It was trained using transfer learning on the **MURA (Musculoskeletal Radiographs)** dataset.
|
| 16 |
+
|
| 17 |
+
* **Architecture:** EfficientNetV2 (Base) + Custom GlobalAveragePooling & Dense Head
|
| 18 |
+
* **Task:** Binary Classification (`fractured` vs. `not_fractured`)
|
| 19 |
+
* **Framework:** TensorFlow / Keras
|
| 20 |
+
* **Input Resolution:** 224x224 RGB images
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
+
You can load this model directly using TensorFlow/Keras to run inference on new X-ray images:
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
import tensorflow as tf
|
| 27 |
+
from tensorflow.keras.preprocessing import image
|
| 28 |
+
import numpy as np
|
| 29 |
+
|
| 30 |
+
# Load the model
|
| 31 |
+
model = tf.keras.models.load_model('MURA_EfficientNetV2L.h5')
|
| 32 |
+
|
| 33 |
+
# Preprocess image
|
| 34 |
+
img = image.load_img('path_to_xray.jpg', target_size=(224, 224))
|
| 35 |
+
img_array = image.img_to_array(img)
|
| 36 |
+
img_array = np.expand_dims(img_array, axis=0)
|
| 37 |
+
img_array = tf.keras.applications.efficientnet_v2.preprocess_input(img_array)
|
| 38 |
+
|
| 39 |
+
# Predict
|
| 40 |
+
prediction = model.predict(img_array)
|
| 41 |
+
print(f"Fracture Probability: {prediction[0][0]:.2%}")
|