Bone fracture classification through X-ray has traditionally relied on human diagnostics, which can sometimes be flawed. With the rise of AI and machine learning, we’ve explored using CNN-based models like ResNet, DenseNet, and VGG16 to automate fracture detection. Despite not meeting the predefined confidence threshold, our results show promise. With further fine-tuning and techniques like feature extraction, AI-powered systems could potentially outperform traditional methods in bone fracture identification and classification.
This repository contains a bone fracture detection project implemented using CNN, ResNet, and YOLO models. The dataset is sourced from Kaggle.
- Overview
- Dataset
- Features
- Results
- File Structure
- How to Use
- Visualization
- Contributing
- License
- References
Bone fracture detection is crucial in medical imaging, and this project automates the detection process using three state-of-the-art models:
- Convolutional Neural Network (CNN): Custom-built for fracture classification.
- ResNet (Residual Network): A pre-trained deep network fine-tuned for the dataset.
- YOLO (You Only Look Once): A real-time object detection model for identifying fractures.
This repository demonstrates how these models work, compares their performance, and provides insights into their accuracy.
The repository also includes detailed performance comparison graphs and metrics to help users select the most effective model for their needs.
The dataset used in this project is from Kaggle:
Bone Fracture Detection Computer Vision Project.
- Download the dataset from the above link.
- Extract it and place the files in the
dataset/directory.
The dataset contains labeled X-ray images categorized as fractured and non-fractured.
This project is packed with exciting features:
- CNN: A straightforward and efficient architecture for image classification.
- ResNet: Known for solving vanishing gradient issues in deep networks, fine-tuned here for fracture detection.
- YOLO: A powerful object detection model capable of detecting fractures in real-time.
Each model is evaluated using:
- Accuracy
- Precision
- Recall
- F1 Score
- Compare model performance with graphs of Epochs vs. Accuracy.
- Visualize predictions and detections for better interpretability.
Key results of the models:
-
CNN:
- Accuracy: 88%
- F1 Score: 0.85
-
ResNet:
- Accuracy: 92%
- F1 Score: 0.91
-
YOLO:
- mAP (mean Average Precision): 91%
- Real-time detection capability with high accuracy.
Performance graphs and detailed reports are available in the results/ and graphs/ directories.
Bone-Fracture-Detection/
├── graphs/
│ ├── epochs_vs_accuracy.png
│ └── confusion_matrices/
├── models/
│ ├── cnn_model.py
│ ├── resnet_model.py
│ ├── yolo_model.py
├── main.py
├── requirements.txt
├── README.md
└── LICENSE
- Install Python 3.7 or higher.
- Install the required dependencies:
pip install -r requirements.txt- Clone this repository:
git clone https://github.com/ALOK-CST/Bone-Fracture-Detection.git- Navigate into the project directory:
cd Bone-Fracture-Detection- Place the dataset in the dataset/ directory.
- Run the script to train a model (e.g., ResNet):
python models/resnet_model.py- View the results and graphs in the results/ and graphs/ folders.
- Predicted vs. Actual Labels (Confusion Matrix).
- Detection Boxes on X-ray Images (for YOLO).
- Graphs of Epochs vs. Accuracy.
- Fork the repository.
- Create a new branch.
- Commit your changes and create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Kaggle Bone Fracture Detection Project
He, Kaiming, et al. "Deep Residual Learning for Image Recognition." Redmon, Joseph, et al. "You Only Look Once: Unified, Real-Time Object Detection."