Image classification in healthcare and medical diagnostics
The use of image classification in medical diagnostics has become increasingly popular in recent years. Many physicians and researchers are using deep learning models to classify medical images, such as X-rays and MRIs, into distinct categories with the goal of augmenting existing diagnostic techniques. The traditional approach to diagnosing many medical images relies on medical professionals identifying visual features that are present within these images. This technique introduces human bias, takes time, and costs organizations money.
Oracle has recently introduced the Oracle Cloud Infrastructure (OCI) Vision AI service and the Data Labeling service which can be used together to create labeled datasets for image classification, document classification, object detection, and custom models for other use cases.
In this blog, we walk you through how we’ve applied the capabilities of OCI Vision and the Data Labeling to create a biomedical image classification model to classify images into one of three categories.
Data overview
We obtained coherent diffraction images generated from cancerous blood samples from East Carolina University. Each of these JPG images is labeled with one of three classifications based on the features present in the image. For the purposes of this project, we assume that the classifications on the training dataset are accurate. The three classifications are cell, debris, and stripe. Using image classification techniques when classifying these images has several benefits: It greatly lowers the risk of misdiagnosis based on human error and can increase the efficiency, speed, and accuracy of reaching the diagnosis.
Architecture diagram and model development
We utilized several OCI services throughout this use case, including Object Storage, Data Labeling, and Vision AI. The following image depicts a system architecture diagram.

The coherent diffraction images were stored locally and then uploaded to an Object Storage bucket through a bulk upload command. During the upload, the images were prepended with a letter associated with their classification. For example, images that are classified as debris were uploaded and prepended with the letter D. When all the images were uploaded to Object Storage, a dataset was created within Data Labeling. We used the Data Labeling API to create custom code to allow us to bulk-label the images with the three classifications: Stripe, cell, and debris. After labeling the dataset using the Data Labeling API, we created a custom image classification model using the OCI Vision AI service.
Results
The following image shows what the dataset looks like from the Oracle Cloud Console. The dataset was created using 300 images that were uploaded to Object Storage.

We can select a specific image and verify that the image has been labeled with the appropriate label. As an example, the file name of the following image was prepended with the letter S and as a result, the image was labeled as stripe after running the custom bulk labeling code.

The following image shows what the custom image classification model looks like from the Console. We can examine various training metrics, such as precision, recall, and F1 score. The dataset we used to train the model was trained using 100 images per class: 100 cell, 100 debris, and 100 stripe. In the future, we plan on training a new image classification model using more images per class, and we also plan on increasing the training time to improve the training metrics and model performance.

After the model has been created, we can upload a test image to examine the results of the model. The following example is a debris image. The Results panel indicates that the model is 82.93% confident that the uploaded image is a debris image.

Conclusion
Our team has developed an Oracle Live Lab to allow anyone to recreate the steps outlined in this blog in an Oracle Free Tier or paid cloud account.
