VisionAI: MURA Dataset Classification & Explainable X-Ray Analysis is a deep learning project designed to automatically classify musculoskeletal X-ray images as Normal or Abnormal using a transfer-learning approach based on MobileNetV2.
In addition to classification, the project includes an Explainable AI (XAI) module that generates visual heatmaps highlighting regions that contributed most to the model's prediction, making the results more interpretable for medical analysis and educational purposes.
The project utilizes the MURA (Musculoskeletal Radiographs) Dataset, one of the largest publicly available radiographic image datasets released by the Stanford ML Group.
MURA contains musculoskeletal X-ray studies collected from clinical practice and is widely used for research in medical image classification and computer-aided diagnosis.
Dataset Characteristics
-
Task: Binary Classification (Normal vs. Abnormal)
-
Body Parts Covered:
- Elbow
- Finger
- Forearm
- Hand
- Humerus
- Shoulder
- Wrist
-
Image Type: Musculoskeletal Radiographs (X-rays)
-
Labels: Normal / Abnormal
https://www.kaggle.com/datasets/cjinny/mura-v11
- Detect abnormalities in musculoskeletal X-rays.
- Leverage transfer learning for efficient model training.
- Improve model interpretability using heatmap visualization.
- Demonstrate the application of AI in medical imaging.
The classification model is built using TensorFlow/Keras and utilizes:
MobileNetV2 was selected because it provides:
- Lightweight architecture
- Fast inference
- Strong feature extraction capability
- Reduced computational requirements
- MobileNetV2 Base Model
- Global Average Pooling Layer
- Dense Layers
- Dropout Regularization
- Sigmoid Output Layer for Binary Classification
One of the key highlights of this project is the Explainable AI Dashboard implemented using Streamlit.
- Upload an X-ray image.
- Predict whether the image is Normal or Abnormal.
- Generate Grad-CAM style heatmaps.
- Visualize regions influencing model decisions.
- Display confidence scores.
- Interactive web interface.
The explainer.py file:
- Loads the trained MobileNetV2 model.
- Accepts user-uploaded X-ray images.
- Preprocesses images to match training dimensions.
- Generates predictions using the trained model.
- Computes gradients from the final convolutional layer.
- Creates a heatmap highlighting important regions.
- Overlays the heatmap onto the original X-ray.
- Displays classification results and confidence scores through Streamlit.
- Improves transparency of AI predictions.
- Helps users understand model focus areas.
- Enhances trust in automated diagnosis systems.
- Demonstrates practical Explainable AI techniques in healthcare.
- β Binary X-Ray Classification (Normal vs Abnormal)
- β MobileNetV2 Transfer Learning
- β Medical Image Analysis
- β Grad-CAM Inspired Heatmap Visualization
- β Explainable AI Dashboard
- β Streamlit-Based User Interface
- β Confidence Score Display
- β Image Overlay Visualization
- β Interactive X-Ray Upload System
- TensorFlow
- Keras
- MobileNetV2
- NumPy
- Pandas
- Matplotlib
- OpenCV (cv2)
- Pillow (PIL)
- Streamlit
- Glob
- OS
MURA-Dataset-Classification-VisionAI/
β
βββ classification.ipynb # Model training notebook
βββ explainer.py # Streamlit explainability dashboard
βββ models/
β βββ xray_mobilenetv2.h5 # Trained model
β
βββ README.md
βββ requirements.txt
git clone https://github.com/Shashank14105/MURA-Dataset-Classification-VisionAI.git
cd MURA-Dataset-Classification-VisionAIpip install numpy pandas matplotlib opencv-python scikit-learn
pip install tensorflow keras
pip install streamlit pillowAlternatively:
pip install -r requirements.txtTo start training the classification model on the MURA dataset:
python XRayClassification.pyor run:
jupyter notebook classification.ipynbstreamlit run explainer.pyAfter launching, open the local Streamlit URL displayed in your terminal.
The system provides:
-
Classification Prediction
- Normal
- Abnormal
-
Confidence Score
-
Heatmap Visualization
-
Overlay Analysis View
Example:
Prediction: ABNORMAL (94.32%)
The AI detected potential abnormalities
in the highlighted regions.
- Multi-class abnormality detection
- Severity estimation
- Support for additional radiology datasets
- Advanced explainability techniques
- Model deployment on cloud platforms
- Integration with hospital workflows
This project demonstrates:
- Medical Image Classification
- Transfer Learning
- Computer Vision
- Explainable AI (XAI)
- Streamlit Deployment
- Deep Learning in Healthcare
making it an excellent portfolio project for students and researchers interested in AI for healthcare.
Shashank K
AI & Machine Learning Enthusiast VisionAI Project Series
If you found this project useful, consider giving the repository a β.


