Disease classification with educational medical images

AdvancedImage Classification

An educational and research project only: its results are not a medical diagnosis and are not used to make any treatment decision.

Problem description

Building an educational image classifier on openly licensed medical images (such as the small MedMNIST datasets, most of them under CC BY 4.0 except DermaMNIST, which is under the non-commercial CC BY-NC 4.0) using transfer learning in Teachable Machine or Image Embedding in Orange. An educational and research project only: its results are not a medical diagnosis and must not be used for a treatment decision.

Objectives

  • Understanding the privacy and ethics of medical images
  • Applying transfer learning to medical images
  • Evaluating the model with Recall and the Confusion Matrix

Problem type

Image Classification

Tools used

Algorithms

Implementation steps

  1. Open medical-image-classification.ows in Orange after installing the Image Analytics extension (Options → Add-ons), then choose your image folder in Import Images (it uses the local SqueezeNet embedder, so the images are not uploaded).
  2. Choose an openly licensed educational medical image dataset from its official source and read its terms (do not use real patient images without consent).
  3. Teachable Machine: Image Project → a class for each condition → upload the images → Train → test with images that were not in the training.
  4. Orange (Image Analytics extension): Import Images → Image Embedding → Test and Score with Logistic Regression.
  5. Document the source and licence of the images in your report.

Workflow diagram

Orange

Image AnalyticsEvaluateModel

Import Images Import ImagesImage Embedding Image EmbeddingTest and Score Test and ScoreLogistic Regression LogisticRegressionConfusion Matrix Confusion MatrixImage Viewer Image ViewerData → ImagesEmbeddings → DataLearnerEvaluation ResultsData
Drawn from the OWS workflow file attached to the project: the widgets, their icons, their category colours and the channel names on the links, as they appear when opened in Orange.

↔ Drag the diagram sideways to see all of it.

Connections as text (5)
  • Import Images → Image Embedding (Data → Images)
  • Image Embedding → Test and Score (Embeddings → Data)
  • Logistic Regression → Test and Score (Learner)
  • Test and Score → Confusion Matrix (Evaluation Results)
  • Import Images → Image Viewer (Data)

Project files

Results

No published results

We do not publish numeric results for this project: the images are not included in the plugin, and the result depends on the dataset you choose and how you split it.

Evaluation metrics

  • Recall for each class
  • Confusion Matrix
  • ROC AUC for binary cases

Interpreting the results

Transfer learning usually gives good results with few images, but performance on images from a different hospital or device may drop a lot (Domain Shift). An educational and research project only: its results are not a medical diagnosis and must not be used for a treatment decision.

Discussion questions

  • Why might the model fail on images from another X-ray machine?
  • What approvals are required to use real patient images?
  • How would you explain the model's decision to a doctor (XAI)?

Try it in the Visual Neural Network Lab

Similar projects