Table of Contents
Fetching ...

Topological Signatures vs. Gradient Histograms: A Comparative Study for Medical Image Classification

Faisal Ahmed

TL;DR

The paper directly compares two handcrafted feature paradigms—Histogram of Oriented Gradients (HOG) and Topological Data Analysis (TDA) via cubical persistent homology—for medical image classification on retinal fundus images from the APTOS dataset. It quantifies 26{,}244} HOG features and 800 TDA features per image, evaluating seven classical classifiers with 10-fold cross-validation for binary Normal vs DR and five-class DR severity tasks. XGBoost achieves the best overall performance for both feature types, with binary accuracies around 94% (HOG 94.29%, TDA 94.18%) and five-class accuracies around 74% (HOG 74.41%, TDA 74.69%). The results show that HOG and TDA provide complementary representations—local gradient texture vs global topological structure—supporting the potential for hybrid approaches that integrate both to improve interpretability and robustness in medical image classification.

Abstract

This work presents a comparative evaluation of two fundamentally different feature extraction paradigms--Histogram of Oriented Gradients (HOG) and Topological Data Analysis (TDA)--for medical image classification, with a focus on retinal fundus imagery. HOG captures local structural information by modeling gradient orientation distributions within spatial regions, effectively encoding texture and edge patterns. In contrast, TDA, implemented through cubical persistent homology, extracts global topological descriptors that characterize shape, connectivity, and intensity-based structure across images. We evaluate both approaches on the publicly available APTOS retinal fundus dataset for two classification tasks: binary classification (normal vs. diabetic retinopathy (DR)) and five-class DR severity grading. From each image, 26,244 HOG features and 800 TDA features are extracted and independently used to train seven classical machine learning models, including logistic regression, random forest, XGBoost, support vector machines, decision trees, k-nearest neighbors, and Extra Trees, using 10-fold cross-validation. Experimental results show that XGBoost achieves the best performance across both feature types. For binary classification, accuracies of 94.29% (HOG) and 94.18% (TDA) are obtained, while multi-class classification yields accuracies of 74.41% and 74.69%, respectively. These results demonstrate that gradient-based and topological features provide complementary representations of retinal image structure and highlight the potential of integrating both approaches for interpretable and robust medical image classification.

Topological Signatures vs. Gradient Histograms: A Comparative Study for Medical Image Classification

TL;DR

The paper directly compares two handcrafted feature paradigms—Histogram of Oriented Gradients (HOG) and Topological Data Analysis (TDA) via cubical persistent homology—for medical image classification on retinal fundus images from the APTOS dataset. It quantifies 26{,}244} HOG features and 800 TDA features per image, evaluating seven classical classifiers with 10-fold cross-validation for binary Normal vs DR and five-class DR severity tasks. XGBoost achieves the best overall performance for both feature types, with binary accuracies around 94% (HOG 94.29%, TDA 94.18%) and five-class accuracies around 74% (HOG 74.41%, TDA 74.69%). The results show that HOG and TDA provide complementary representations—local gradient texture vs global topological structure—supporting the potential for hybrid approaches that integrate both to improve interpretability and robustness in medical image classification.

Abstract

This work presents a comparative evaluation of two fundamentally different feature extraction paradigms--Histogram of Oriented Gradients (HOG) and Topological Data Analysis (TDA)--for medical image classification, with a focus on retinal fundus imagery. HOG captures local structural information by modeling gradient orientation distributions within spatial regions, effectively encoding texture and edge patterns. In contrast, TDA, implemented through cubical persistent homology, extracts global topological descriptors that characterize shape, connectivity, and intensity-based structure across images. We evaluate both approaches on the publicly available APTOS retinal fundus dataset for two classification tasks: binary classification (normal vs. diabetic retinopathy (DR)) and five-class DR severity grading. From each image, 26,244 HOG features and 800 TDA features are extracted and independently used to train seven classical machine learning models, including logistic regression, random forest, XGBoost, support vector machines, decision trees, k-nearest neighbors, and Extra Trees, using 10-fold cross-validation. Experimental results show that XGBoost achieves the best performance across both feature types. For binary classification, accuracies of 94.29% (HOG) and 94.18% (TDA) are obtained, while multi-class classification yields accuracies of 74.41% and 74.69%, respectively. These results demonstrate that gradient-based and topological features provide complementary representations of retinal image structure and highlight the potential of integrating both approaches for interpretable and robust medical image classification.

Paper Structure

This paper contains 32 sections, 11 equations, 12 figures, 4 tables.

Figures (12)

  • Figure 2: Sublevel filtration. Binary images ${\mathcal{X}_{70}},{\mathcal{X}_{90}},{\mathcal{X}_{110}}$ obtained from a fundus image for threshold values $70,90,110$. (Note: This Fig is reused from our previous published paper ahmed2023tofi)
  • Figure 3: Flowchart of TDA-ML model pipeline: Starting from color fundus images, we extract grayscale and RGB channels. Persistence diagrams are computed from these color spaces, from which 100-dimensional Betti-0 and Betti-1 vectors are derived for each channel. These topological feature vectors are concatenated and used as input to machine learning classifiers such as Random Forest (RF), XGBoost, and k-Nearest Neighbors (kNN) to achieve accurate retinal image classification. (Note: This Fig is reused from our previous published paper ahmed2023tofi)
  • Figure 4: Illustration of the preprocessing pipeline applied to a fundus image. From left to right: (a) Original color image, (b) grayscale conversion used for HOG computation, and (c) corresponding Histogram of Oriented Gradients (HOG) visualization highlighting edge and texture features.
  • Figure 5: HOG-ML Model Pipeline: The flowchart illustrates the complete processing pipeline for retinal image classification using HOG features. Starting with color fundus images, grayscale conversion is performed, followed by Histogram of Oriented Gradients (HOG) computation and visualization. From each grayscale image, a total of 26,244 HOG features are extracted. These feature vectors are then used as input to machine learning classifiers such as Random Forest (RF), XGBoost, and k-Nearest Neighbors (kNN) to achieve accurate classification of retinal images.
  • Figure 6: Comparison of AUC performance for various classifiers using TDA-derived features on the APTOS dataset (binary classification setting).
  • ...and 7 more figures