A Stacked Ensemble Technique for DFU detection

Priyansh Soni
5 min readMay 18, 2022

--

A detailed overview for developing a stacked ensemble model for the early detection of Diabetic Foot Ulcer(DFU)

This is in reference to a research study I co-authored for the early stage detection of DFU to prevent major amputations and lack of clinical diligence.

Co-author — Priyansh Kedia

OUTLINE —

  1. Introduction
  2. Problem Statement and Approach
  3. Data Collection and Preprocessing
  4. Some Pre-trained architectures
  5. Model Performance
  6. The Stacked Ensemble Technique
  7. Conclusion

1. Introduction

Diabetes is growing faster than ever with the increasing rate of population and stress levels. Diabetes is one of the deadliest diseases of the current generation, with more than 537 million people suffering worldwide.

Plus the amputation rate is very high when it comes to lack of sincerity in the early detection of the disease. Thus, clinical measures cannot be solely relied upon as they lack in time severity, high diagnosis cost, and what not.

And here is when the power of Machine Learning and AI comes to play.

2. Problem Statement and Approach

  • Problem Statement — Given healthy foot images and DFU infected foot images, how can we come up with a method to classify DFU and healthy foot images.
  • Approach — We can feed the images to a Convolutional Neural Network (CNN) with some pooling layers and architectural inupts , and can generate features from these images, which can then be used for classification.

This approach seems viable, since such a classifier can help us classify image samples into DFU and healthy ones, or some other disease type perhaps. This can help us come up with an efficient solution much better than manual clinical surveillance for every patient to identify DFU and other disease type.

3. Data Collection and Preprocessing

Data Collection

The data available on the internet for the working on DFU image samples are private and can be accessed through universities and private medical institutions only. On of the very few open source DFU image datasets can be found on Kaggle over here.

One of the most popular datasets on DFU is the DFUC dataset.
The Diabetic Foot Ulcers Grand Challenge (DFUC) is a medical imaging classification competition hosted by the Medical Image Computing and Computer Assisted Intervention (MICCAI). The dataset contains around 4000 DFU and healthy foot images which are segregated into training and test sets.

The DFUC dataset is publicly available for non-commercial research purposes only, and can be obtained by emailing a formal request at m.yap@mmu.ac.uk

Data Preprocessing

If we are constrained with lesser data, we can perform data augmentation to prevent the model from overfitting and hence generate more data for the model to train upon.

4. Some Pre-trained architectures

After Data collection and preprocessing, we can finally move on to train the processed data on some classifiers to make predictions.

Transfer learning allows Deep Learning architectures to be trained on billions of data images passed as input previously, and then use the pre-trained models for our own problem statement. This helps the model to learn the low level features more efficiently using a lot of data. We can make use of the pre-trained features from the model for our own dataset by moulding some deeper layers of the model as per our convenience and dataset.

Due to this brilliance in Deep Learning, we can use some of the most popularly used pre-trained Deep CNN models available here. These are :

1. Xception
2. VGG
3. ResNet
4. Inception
5. MobileNet
6. DenseNet
7. NASNet
8. EfficientNet

Training our data on these models can generate some great results.

5. Model Performance

The results achieved from these pre-trained architectures can be based upon the below mentioned evaluation metrics :

  1. Accuracy
  2. Precision
  3. Recall
  4. F1-Score

These metrics help us evaluate how well our model is performing based on the problem type. For medical problems, Recall is given high importance over other evaluation metrics. This is because we want to reduce the rate of False Negatives as much as possible for any disease detection and hence we prioritise increasing recall with a balanced trade-off for precision.

But can we do better than one pre-trained model?

6. The Stacked Ensemble Technique

  • Stacked modelling — it is a technique to stack the output from one model onto the output of another to make a compiled output matrix. This matrix can then be fed into some classifier for prediction. This is helpful as it uses features generated from both the models and then feeds these combined features into another model(classifier).
    For more details on stacked modelling, you can visit this.
  • Ensemble modelling — is a technique to combine a number of weak learners(models) to generate a single output. This output is generally better than the output given by individual weak learners.
    For more detail on ensemble learning, you can visit this.

Model Approach —

  1. Select 2 models from the pre-trained architectures where the accuracy is high and the model size is less.
  2. Train these two DCNNs with our DFU dataset.
  3. Instead of applying a Softmax layer as the last layer, we stack the output from these two models into a single feature matrix (say M)
  4. This feature matrix M, has the features trained form the 2 best performing size efficient pre-trained models on our DFU dataset
  5. Feed this feature matrix M as input into a ML classifier. The best results can be achieved by using XGBoost Classifier for classification.

This model outperforms the pre-trained architectures due to the use of output feature stacking which makes the feature matrix highly dense and hence give out better results.

A 2-level architecture of the proposed model can be visualised below :

Level-1 architechture
Level-2 architecture

7. Conclusion

By stacking the features from two pre-trained models and feeding them as input to the individual classifier, we can generate better results for the detection of DFU image classification.

Our proposed model is able to classify DFU images from Healthy Skin images with high accuracy and recall.

The study has been accepted in the 4th IEEE ICAC3N-22 conference being held in Decemeber 14–15, 2022.

--

--

Priyansh Soni

Bet my articles are the best easy explanation you could get anywhere. I am a product enthusiast nurturing technology to transform change.