YOLO is known for its ability to detect objects in an image in a single pass, making it a highly efficient and accurate object detection algorithm.🎯
The latest version of YOLO, YOLOv8, released in January 2023 by Ultralytics, has introduced several modifications that have further improved its performance.
In this project, I will focus on three major computer vision tasks that YOLOv8 can be used for: classification, detection, and segmentation. I will explore how YOLOv8 can be applied in the field of medical imaging to detect and classify various anomalies and diseases🧪💊.
Some of the notable modifications in YOLOv8 include:
-
New Backbone Network: YOLOv8 adopts the powerful Darknet-53 as its backbone network, enhancing feature extraction capabilities.
-
Anchor-Free Detection: YOLOv8 employs an anchor-free detection head, which directly predicts the center of an object instead of relying on offset values from predefined anchor boxes.
-
New Loss Function
In this project, I focus on three major computer vision tasks using YOLOv8, all accessible through the Streamlit web application:
-
Classification: Utilize the YOLOv8 model to classify medical images into three categories: COVID-19, Viral Pneumonia, and Normal, using the COVID-19 Image Dataset.
-
Object Detection: Employ YOLOv8 for detecting Red Blood Cells (RBC), White Blood Cells (WBC), and Platelets in blood cell images using the RBC and WBC Blood Cells Detection Dataset.
-
Segmentation: Use YOLOv8 for segmenting breast ultrasound images with the Breast Ultrasound Images Dataset.
I used Streamlit to create a user-friendly interface for easy interaction with the YOLOv8 model. Below are screenshots of each part:
-
Clone this repository to your local machine:
git clone https://github.com/sevdaimany/YOLOv8-Medical-Imaging.git
-
Navigate to the project directory:
cd YOLOv8-Medical-Imaging
-
Create a virtual environment (optional but recommended):
python -m venv venv
-
Activate the virtual environment:
On Windows:
venv\Scripts\activate
On macOS and Linux:
source venv/bin/activate
-
Install the required dependencies from the provided requirements.txt file:
pip install -r requirements.txt
Using the Provided Demo Images
I've made it easy for you to get started with our project without the need to download a dataset. I've included a set of demo images in the DEMO_IMAGES directory. You can use these images to quickly see how our project works.
Run the Streamlit App:
Start the Streamlit app to see our project in action:
streamlit run app.py