Source-linked AI summary

Impact of canny edge detection preprocessing on performance of machine learning models for Parkinson's disease classification

Sameer Bhat, Piotr Szczuko

arXiv:2609.07408v1cs.LGcs.CV

TL;DR

The study examines how dataset size and image preprocessing affect machine-learning classification of healthy and Parkinson’s disease handwriting spirals. It evaluates multiple models across original, augmented, Canny-processed, and Hessian-filtered datasets, including accuracy, memory, latency, and calibration. Larger datasets generally increase resource demands, while Canny preprocessing with Hessian filtering lowers most models’ performance; model behavior varies substantially across datasets and resource constraints.

Abstract

from arXiv · show

This study investigates the classification of individuals as healthy or at risk of Parkinson's disease using machine learning (ML) models, focusing on the impact of dataset size and preprocessing techniques on model performance. Four datasets are created from an original dataset: DS_0, (normal dataset), DS_1 (DS_O subjected to Canny edge detection and Hessian filtering), DS_2 (augmented DS_0), and DS_3 (augmented DS_1). We evaluate a range of ML models-Logistic Regression (LR), Decision Tree (DT), Random Forest (RF), Gradient Boosting (GB), XGBoost (XBG), Naive Bayes (NB), Support Vector Machine (SVM), and AdaBoost (AdB)-on these datasets, analyzing prediction accuracy, model size, and prediction latency. The results show that while larger datasets lead to increased model memory footprints and prediction latencies, the Canny edge detection preprocessing supplemented by Hessian filtering (used in DS_1 and DS_3) degrades the performance of most models. In our experiment, we observe that Random Forest (RF) maintains a stable memory footprint of 61 KB across all datasets, while models like KNN and SVM show significant increases in memory usage, from 5.7-7 KB on DS_0 to 102-220 KB on DS_2, and similar increases in prediction time. Logistic Regression, Decision Tree, and Naive Bayes show stable memory footprints and fast prediction times across all datasets. XGBoost's prediction time increases from 180-200 ms on DS_0 to 700-3000 ms on DS_2 (truncated)

Research contribution

The study compares machine-learning models for Parkinson’s disease classification, examines discriminative feature spaces, and emphasizes explainable feature extraction.

  • The study compares machine-learning models for classifying patients as healthy or affected by Parkinson’s disease.Source: Research contribution · p. 2
  • The research explores feature spaces to identify characteristics that support model training and evaluation.Source: Research contribution · p. 2
  • Explainable machine learning is prioritized through analysis of the feature-extraction process and model predictions.Source: Research contribution · p. 2

Literature review

Prior work establishes handwriting and spiral analysis as promising inputs for Parkinson’s disease detection, while this study addresses unclear feature selection, model complexity, latency, and data scarcity.

Method

The method evaluates classifiers on original, augmented, Canny-processed, and Hessian-filtered spiral-image datasets using HoG features and cross-validation.

Method

  • The study uses balanced spiral images from the Parkinson’s Image dataset, containing healthy and Parkinson’s disease classes.The dataset includes 72 training and 30 testing samples and excludes wave images.Source: Method · p. 4

Data augmentation and pre-processing

  • Four experimental folds compare original DS0, augmented DS2, and corresponding Canny- and Hessian-processed datasets.Source: Method · p. 4

Method

  • Ten-fold stratified cross-validation and reserved testing sets evaluate nine machine-learning classifiers across DS0, DS1, DS2, and DS3.Source: Method · p. 4

Histogram-of-oriented gradients

Canny edge detector

  • Canny preprocessing smooths images with a Gaussian operation, calculates gradients, suppresses non-maxima, and applies edge-detection stages.The study applies Canny detection to spiral images and then filters ridges with ridge operators.Source: Canny edge detector · pp. 5–6

Edge intensity detection using Ridge operators

Hessian-based ridge detection analyzes curvature-derived edge intensity in grayscale spiral images to identify ridge-like structures after Canny processing.

Experiment setup

The experiment preprocesses spiral images, extracts and selects handcrafted statistical features, and evaluates nine classifiers across four dataset variants using stratified cross-validation and performance metrics.

  • The experiment runs preprocessing, feature extraction, feature selection, training, evaluation, testing, memory-footprint estimation, and prediction-time measurement.Source: Experiment setup · p. 7

Data augmentation and preprocessing

  • The Canny preprocessing uses tuned sigma, threshold, and aperture-size settings, with sigma = 2.8 identified as optimal for DS1 and DS3.The reported settings include threshold1 = threshold2 = 51 and apertureSize = 5.Source: Figure 5 · p. 8
  • Four datasets are generated from raw spiral images through augmentation, HoG or Canny processing, and Hessian filtering for the Canny-derived datasets.DS1 is produced by Canny edge detection followed by Hessian filtering; augmentation produces DS2 and DS3 variants.Source: Data augmentation and pre-processing · p. 8

Feature extraction

  • Eleven statistical features—including mean, standard deviation, skewness, kurtosis, energy, variance, and RMS—are handcrafted from each prepared dataset.The feature vectors also include power, median, minimum, and maximum.Source: Feature extraction · pp. 9–10

Feature selection

  • Recursive feature elimination ranks features, while the study selects feature sets intended to provide similar prediction accuracy across models.Different classifiers may require different feature sets, motivating a common high-performing subset.Source: Feature selection · pp. 10–11

Training and evaluation

Accuracy (ACC)

The study defines accuracy and complementary discrimination metrics for evaluating binary classifiers, including AUC, true-positive rate, true-negative rate, and false-positive rate.

  • Accuracy is the proportion of correct predictions, calculated from true positives, true negatives, false positives, and false negatives.Source: Accuracy (ACC) · p. 12
  • AUC estimates how often a model ranks a randomly selected positive example above a randomly selected negative example, with values ranging from 0 to 1.Source: Area under curve (AUC) · p. 12, Receiver Operating Characteristic… · p. 13
  • True-positive rate measures correctly identified positive examples relative to all positive examples, while true-negative rate measures correctly identified negatives relative to all negatives.Source: Area under curve (AUC) · p. 12
  • The study also reports F1-score, whose harmonic-mean formulation gives a value of 1 for a perfect model.Source: F1 score · p. 12
  • ROC curves plot true-positive rate against false-positive rate across classification thresholds, where false-positive rate measures negative examples incorrectly classified as positive.Source: Receiver Operating Characteristic… · p. 13

Results and discussion

Training on four dataset variants produces model-specific outputs that support individual performance comparisons across the classifiers.

  • Four-dataset training generates separate outputs for each model, followed by experiment results and detailed discussion.Source: Results and discussion · p. 13

ML model training on DS0 and DS2

The study compares feature spaces and calibration behavior for models trained on DS0 and DS2, linking feature reduction to efficiency and dataset size to calibration-curve alignment.

DS0 feature space

DS2 feature space

  • The DS2 feature space uses feature_set_DS2 = [1, 2, 3, 4, 6], because removing additional features lowers model prediction accuracy.The selected feature space is associated with reduced memory footprints and prediction times.Source: ML model training on DS0 and DS2 · p. 14

Model calibration

  • Models trained on DS0 show calibration curves that do not align with the perfect-calibration line, whereas DS2 curves nearly align with it.The models remain imperfectly calibrated, and the paper notes that calibration before training may further improve prediction accuracy.Source: Model calibration · p. 14, Figure 9 · p. 14, Figure 10 · p. 14

Cross-validation evaluation

ROC evaluation

Performance evaluation on DS0 and DS2

On DS0 and DS2, model performance varies substantially across classifiers, while larger datasets alter accuracy, error patterns, memory requirements, and prediction-time behavior.

ROC performance

  • AUC reaches 0.92 for DT and ADB on DS0, while RF and GB achieve 0.90 and 0.91, respectively.Source: Model ROC · p. 16
  • On DS2, RF, XGB, and SVM attain the highest AUC of 0.97 among the evaluated models.Source: Model ROC · p. 16

Learning curves

  • 91.7% is the approximate highest training accuracy on DS0, achieved by GB and DT; DS2 training accuracies range approximately from 78% to 92%.Source: Model learning · p. 16

Confusion matrices

  • KNN shows the lowest false-positive and false-negative counts and the highest true-positive and true-negative counts on DS2.Source: Model confusion matrix · p. 17

Bias-variance analysis

  • Bias-variance trade-offs occur at particular feature combinations, while DS2 feature sets show elevated mean squared errors and require further investigation.Source: Bias-variance trade-off · pp. 18–19

Memory footprint

  • Memory requirements are feature-space independent for some models but increase with feature counts for others, especially KNN and SVM.Source: Model memory footprint · p. 20

Deployment considerations

  • Feature selection is recommended to maintain low, consistent model sizes for resource-constrained and edge-computing devices.Source: Model memory footprint · p. 21

ML model training on DS1 and DS3

For DS1 and DS3, feature selection, calibration, and cross-validation are used to assess models trained on preprocessed and augmented handwriting data. Augmentation improves calibration alignment, but Canny preprocessing lowers prediction accuracy.

Feature-space construction

Model calibration

Preprocessing effects

  • Large-size datasets automatically calibrate models to some extent, but Canny preprocessing lowers prediction accuracies for the handwriting classification models.Source: ML model training on DS1 and DS3 · p. 23

Limitations

Model evaluation

Performance evaluation on DS1 and DS3

Across DS1 and DS3, Canny-based preprocessing produces generally consistent but lower classification performance than the original and augmented datasets. It also creates substantial variation in model memory footprints and prediction times, especially as feature space and dataset size increase.

ROC performance

  • AUCs on DS1 range from 0.81 to 0.85, with RF and KNN highest at 0.85; DS3 raises RF, GB, XGB, and SVM to up to 0.89.DT remains lower on DS1 at 0.78, while NB, LR, and KNN reach 0.85, 0.87, and 0.87 on DS3, respectively.Source: Performance evaluation on DS1 and DS3 · p. 24

Learning curves

  • 71% to 82% approximate cross-validation accuracy is observed on DS1, while DS1 and DS3 remain below the accuracies enabled by DS0 and DS2.KNN reaches 82% on DS1, whereas DS2 cross-validation accuracy ranges from approximately 73% to 83%.Source: Performance evaluation on DS1 and DS3 · pp. 24–25

Memory footprint

  • 1.5KB to 61KB approximately is the DS1 model-size increase relative to DS0, with RF and ADB requiring the most memory.RF and ADB show no change in size across the examined DS1 feature space, while LR and XGB remain nearly constant.Source: Performance evaluation on DS1 and DS3 · pp. 25–27
  • DS3 model sizes increase for ADB, RF, KNN, and SVM as feature counts and combinations increase.The steepness varies by model and feature combination, indicating that memory footprint depends on both factors.Source: Performance evaluation on DS1 and DS3 · p. 27

Prediction latency

  • Prediction times generally rise with feature count, with a steep increase when the feature space changes from four to five features.On DS1, KNN, NB, LR, and SVM are one order of magnitude, while GB, ADB, XGB, and RF exceed two orders of magnitude.Source: Performance evaluation on DS1 and DS3 · p. 28
  • SVM prediction time rises by four orders of magnitude from DS0 to DS3, while ADB, XGB, GB, and RF rise by two orders of magnitude.NB, KNN, and LR increase gradually below two orders of magnitude, whereas the study evaluates at most five feature vectors.Source: Performance evaluation on DS1 and DS3 · p. 29

Conclusion

The study evaluates machine-learning models for classifying hand-drawn spirals from healthy individuals and Parkinson’s disease patients, considering performance, bias-variance trade-offs, prediction time, and memory footprints.

  • Decision Tree and Adaptive Boosting performed strongly on the original dataset.Source: Conclusion · p. 35
  • The study compares model performance and practical suitability across prediction accuracy, bias-variance trade-offs, prediction times, and memory footprints.Source: Conclusion · p. 35

Data availability

The study used an openly downloadable Parkinson’s drawings dataset and reports its receipt and acceptance dates.

Additional information

Additional information covers correspondence, reprints, publisher neutrality, and the article’s Creative Commons licensing terms.

Loading 2609.07408v1…