Skip to content

alok-devforge/BoneFractureDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bone Fracture Detection

Introduction

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.


Table of Contents 📋


Overview

Bone fracture detection is crucial in medical imaging, and this project automates the detection process using three state-of-the-art models:

  1. Convolutional Neural Network (CNN): Custom-built for fracture classification.
  2. ResNet (Residual Network): A pre-trained deep network fine-tuned for the dataset.
  3. 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.


Dataset

The dataset used in this project is from Kaggle:
Bone Fracture Detection Computer Vision Project.

Dataset Instructions:

  1. Download the dataset from the above link.
  2. Extract it and place the files in the dataset/ directory.

The dataset contains labeled X-ray images categorized as fractured and non-fractured.


Features

This project is packed with exciting features:

🔍 Multi-Model Architecture

  • 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.

📊 Performance Metrics

Each model is evaluated using:

  • Accuracy
  • Precision
  • Recall
  • F1 Score

📈 Visualization Tools

  • Compare model performance with graphs of Epochs vs. Accuracy.
  • Visualize predictions and detections for better interpretability.

Results

Key results of the models:

  1. CNN:

    • Accuracy: 88%
    • F1 Score: 0.85
  2. ResNet:

    • Accuracy: 92%
    • F1 Score: 0.91
  3. 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.


File Structure

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

How to Use

Prerequisites

  • Install Python 3.7 or higher.
  • Install the required dependencies:
pip install -r requirements.txt

Steps to Run

  1. Clone this repository:
git clone https://github.com/ALOK-CST/Bone-Fracture-Detection.git
  1. Navigate into the project directory:
cd Bone-Fracture-Detection
  1. Place the dataset in the dataset/ directory.
  2. Run the script to train a model (e.g., ResNet):
python models/resnet_model.py
  1. View the results and graphs in the results/ and graphs/ folders.

Visualization

Sample visualization tools provided in this repository:

  1. Predicted vs. Actual Labels (Confusion Matrix).
  2. Detection Boxes on X-ray Images (for YOLO).
  3. Graphs of Epochs vs. Accuracy.

Contributing

Contributions are welcome!

  1. Fork the repository.
  2. Create a new branch.
  3. Commit your changes and create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


References

Dataset:

Kaggle Bone Fracture Detection Project

Papers:

He, Kaiming, et al. "Deep Residual Learning for Image Recognition." Redmon, Joseph, et al. "You Only Look Once: Unified, Real-Time Object Detection."


About

Its a bone fracture detection project implemented using CNN, ResNet, and YOLO models. The dataset is sourced from Kaggle.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published