https://github.com/mianmharoon/deeplearning_coreml_swiftui_bonefracturedetection
An elegant macOS demo app built with SwiftUI that leverages CoreML for real-time bone fracture detection from X-ray images. This project demonstrates how deep learning models can be seamlessly integrated into Swift-based apps for medical image analysis and AI-powered diagnostics.
https://github.com/mianmharoon/deeplearning_coreml_swiftui_bonefracturedetection
ai computer-vision coreml coreml-framework coreml-models deep-learning deeplearning healthcare-application imageclassification ios machine-learning macos medical-image-processing medical-imaging medical-imaging-classification swift swift6 swiftui visionframework
Last synced: about 1 month ago
JSON representation
An elegant macOS demo app built with SwiftUI that leverages CoreML for real-time bone fracture detection from X-ray images. This project demonstrates how deep learning models can be seamlessly integrated into Swift-based apps for medical image analysis and AI-powered diagnostics.
- Host: GitHub
- URL: https://github.com/mianmharoon/deeplearning_coreml_swiftui_bonefracturedetection
- Owner: MianMHaroon
- License: mit
- Created: 2025-10-31T14:43:08.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-10-31T21:03:28.000Z (7 months ago)
- Last Synced: 2025-10-31T21:21:32.799Z (7 months ago)
- Topics: ai, computer-vision, coreml, coreml-framework, coreml-models, deep-learning, deeplearning, healthcare-application, imageclassification, ios, machine-learning, macos, medical-image-processing, medical-imaging, medical-imaging-classification, swift, swift6, swiftui, visionframework
- Language: Swift
- Homepage:
- Size: 20 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bone Fracture Detector — macOS SwiftUI Demo
---
> **Disclaimer:** This project is for **educational and research purposes only**. It must **not** be used for real medical diagnosis.
---
A simple macOS demo app built with **SwiftUI** using a **Core ML image classification model** to detect bone fractures from X‑ray images.
I used a publicly available dataset from Kaggle, formatted it for Core ML training, then converted it into `.mlmodel` format.
Dataset format used for Create ML / Core ML training:
```
train/
├─ shoulderfracture/
│ └─ images...
└─ forearmfracture/
└─ images...
```
You can train your own model using this same structure. I have also attached the formatted dataset to make training easier.
---
## How to Run the Project
1. Download or clone this repository.
2. Open the `.xcodeproj` file in **Xcode**.
3. Press **Run** to launch the macOS app.
The `.mlmodel` file is already included, so the app will work immediately.
---
## Core ML Model
* Dataset taken from Kaggle.
* Converted into Core ML format.
* Trained using Create ML with the folder structure shown above.
You may replace the model with your own by training in Create ML and dropping the new `.mlmodel` file into the Xcode project.
---
## License
MIT License
---
## Author
**Muhammad Haroon**
Email: [mianmharoon72@gmail.com](mailto:mianmharoon72@gmail.com)
LinkedIn: [https://www.linkedin.com/in/mian-haroon](https://www.linkedin.com/in/mian-haroon)
---
## References
* [Kaggle dataset (original notebook used)](https://www.kaggle.com/code/sinatavakoli/bone-fracture-detection/output)
* [CoreML Tools Documentation](https://coremltools.readme.io/)