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.

  • Problem

    Feature selection in Parkinson’s handwriting analysis lacks clarity, while evidence comparing model accuracy, complexity, prediction time, and data-scarcity solutions remains limited.

  • Method

    The study evaluates nine machine-learning classifiers across four original, augmented, Canny-processed, and Hessian-filtered spiral-image datasets using cross-validation and reserved testing.

  • Results

    Canny preprocessing supplemented by Hessian filtering degrades most models’ performance, whereas larger datasets improve classification results but increase memory footprints and prediction latencies.

  • Takeaways & Limitations

    Decision Tree and AdaBoost perform strongly on the original dataset, while Random Forest, Extreme Gradient Boosting, and Support Vector Machines excel on augmented datasets.

  • Takeaways & Limitations

    Spiral drawing data may not capture cognitive or non-motor symptoms and is affected by inter-individual variability, supporting multimodal future research.

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.
  • The research explores feature spaces to identify characteristics that support model training and evaluation.
  • Explainable machine learning is prioritized through analysis of the feature-extraction process and model predictions.

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.

  • Handwriting problems such as micrographia may serve as clinical markers for early-stage disease, motivating automated analysis.
  • Machine-learning studies analyze spiral size, shape, and speed to distinguish Parkinson’s disease patients from healthy controls.
  • Deep-learning and hybrid models have reported high Parkinson’s disease classification accuracy using handwriting and related data.
  • The study addresses unclear feature selection by evaluating model accuracy, complexity, prediction time, and synthesized datasets.

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.
  • Data augmentation and pre-processing: Four experimental folds compare original DS0, augmented DS2, and corresponding Canny- and Hessian-processed datasets.
  • Method: Ten-fold stratified cross-validation and reserved testing sets evaluate nine machine-learning classifiers across DS0, DS1, DS2, and DS3.
  • Histogram-of-oriented gradients: HoG extracts gradient information by computing pixel gradients, orientations, local histograms, cells, and integrated blocks.
  • 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.

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.

  • Hessian-based ridge detection tracks ridges in spiral curves and emphasizes elongated structures for image analysis.
  • The Hessian matrix contains second partial derivatives of the image, including x-, y-, and mixed-direction derivatives.
  • The maximum and minimum Hessian eigenvalues represent maximum and minimum curvature intensities of the image surface.
  • Images are converted to grayscale before Hessian computation, with pixel intensities ranging from 0 to 255.

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.
  • 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.
  • Data augmentation and preprocessing: 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.
  • 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.
  • 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.
  • Training and evaluation: Nine classifiers are evaluated with stratified 10-fold cross-validation using accuracy, ROC curves, F-score, AUC, confusion matrices, memory, and prediction-time measures.The models use default calibration settings.

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.
  • 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.
  • 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.
  • The study also reports F1-score, whose harmonic-mean formulation gives a value of 1 for a perfect model.
  • ROC curves plot true-positive rate against false-positive rate across classification thresholds, where false-positive rate measures negative examples incorrectly classified as positive.

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.

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: The DS0 feature space is reduced to feature_set_DS0 = [1, 2, 3] after removing highly correlated features and features 4 and 6.
  • 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.
  • 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.
  • Cross-validation evaluation: Figure 11 reports cross-validation accuracy and F1-score for nine models evaluated with stratified 10-fold cross-validation.
  • ROC evaluation: ROC curves are presented for models trained on both DS0 and DS2, enabling comparison across the small and augmented datasets.

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.
  • ROC performance: On DS2, RF, XGB, and SVM attain the highest AUC of 0.97 among the evaluated models.
  • 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%.
  • Confusion matrices: KNN shows the lowest false-positive and false-negative counts and the highest true-positive and true-negative counts on DS2.
  • 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.
  • Memory footprint: Memory requirements are feature-space independent for some models but increase with feature counts for others, especially KNN and SVM.
  • Deployment considerations: Feature selection is recommended to maintain low, consistent model sizes for resource-constrained and edge-computing devices.

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: The DS3 feature space selected by RFS is feature_set_DS3 = [1, 2, 3, 4, 6] because DS1-derived features produced low prediction scores.
  • Model calibration: Models trained on DS1 are not aligned with the perfect calibration line, whereas DS3 models align with it to some extent without achieving ideal S-shaped curves.
  • Preprocessing effects: Large-size datasets automatically calibrate models to some extent, but Canny preprocessing lowers prediction accuracies for the handwriting classification models.
  • Limitations: The analysis is limited to uncalibrated models, leaving calibrated-model performance estimation for future work.
  • Model evaluation: The study evaluates nine models using stratified 10-fold cross-validation for accuracy and F1-score.

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.
  • 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%.
  • 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.
  • Memory footprint: 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.
  • 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.
  • Prediction latency: 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.

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.
  • The study compares model performance and practical suitability across prediction accuracy, bias-variance trade-offs, prediction times, and memory footprints.

Data availability

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

  • The study used an open Parkinson’s drawings dataset available for download from Kaggle.
  • The manuscript was received on 2 August 2024 and accepted on 10 April 2025.

Additional information

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

  • Correspondence and material requests should be addressed to S.B.
  • Reprints and permissions information is available through the Nature website.
  • Springer Nature states that it remains neutral regarding jurisdictional claims in maps and institutional affiliations.
  • The article is licensed under Creative Commons Attribution 4.0, subject to attribution, source-linking, and change-disclosure requirements.
Loading 2609.07408v1…