Welcome to our Bone Fracture Detection Project, where we ventured into the world of computer vision ๐ท and deep learning ๐ง to assist in medical diagnostics! This was our debut into image classification.
The goal of this project is to develop a machine learning model that can accurately classify X-ray images as either showing signs of bone fractures or not. This is crucial for assisting medical professionals in diagnosing patients efficiently and accurately.
The dataset used in this project includes multi-region X-ray images focused on diagnosing bone fractures. You can download the dataset from here.
CNNs are specifically designed for processing grid-like data with inherent spatial relationships, such as images. Key characteristics include:
- Architecture: Built with convolutional layers that apply filters across input data to extract features like edges and textures.
- Pooling: Utilizes pooling layers to downsample features, reducing computational complexity and capturing hierarchical representations.
- Parameter Efficiency: Efficiently handles large inputs like images by sharing weights (filters), reducing the number of parameters and improving generalization.
-
PyTorch: This project utilizes PyTorch for training the CNN model. PyTorch offers GPU acceleration (
torch.cuda
) for faster computation. -
Keras: If you have a potato computer ๐ฅ and don't support GPU, don't worry! We have converted the code into Keras. You can find the Keras implementation in the
converting_keras.ipynb
file.
To enhance the robustness of the model and prevent overfitting, we performed data augmentation.
The performance metrics indicate that our model is highly effective in detecting bone fractures from X-ray images. Here are some key points:
- High Test Accuracy: The model correctly classifies 98.67% of the test samples.
- Excellent Precision and Recall: Precision of 98.00% and recall of 99.80% show the model's reliability in identifying true positives while minimizing false positives and false negatives.
- Strong F1 Score: The F1 Score of 98.89% balances precision and recall, demonstrating the model's overall effectiveness.
Additionally, our model was tested on a set of X-ray images that were misclassified by doctors. It correctly identified these images as showing signs of bone fractures, further validating its accuracy and potential as a diagnostic tool.
Overall, these results showcase the robustness and accuracy of our CNN model in bone fracture detection, making it a valuable tool for medical diagnostics.
We have deployed our model using Streamlit for easy access and testing. You can try it out here.
This project was developed by: