APPLICATION OF LOGISTIC REGRESSION WITH HOG FEATURES FOR GEOMETRIC SHAPE CLASSIFICATION

Authors

  • Aleksandar Petrović University of Niš, Faculty of Mechanical Engineering, Department of Mechanical Design, Product Development and Engineering, Republic of Serbia https://orcid.org/0000-0003-4448-9250
  • Milan Banić University of Niš, Faculty of Mechanical Engineering, Department of Mechanical Design, Product Development and Engineering, Republic of Serbia https://orcid.org/0000-0001-8684-042X
  • Gavrilo Adamović University of Niš, Faculty of Science and Mathematics, Department of Computer Science, Republic of Serbia
  • Ljiljana Radović University of Niš, Faculty of Mechanical Engineering, Department of Natural and Mathematical Science, Republic of Serbia

Keywords:

Logistic Regression, HOG, Classification, Railway, Signal Detection

Abstract

This paper investigates the application of Histogram of Oriented Gradients (HOG) features, simple colour statistics, Principal Component Analysis (PCA), and Logistic Regression for the classification of simple geometric shapes, namely circles, squares, and triangles. The work is positioned as a controlled baseline study aimed at evaluating the suitability of lightweight feature-based classification methods for future railway signal recognition pipelines.
The main experiments were conducted on a balanced synthetic dataset containing 4500 images in total, with 1500 samples per class. A leakage-free evaluation protocol was applied by dividing the dataset into training, validation, and test subsets. Hyperparameters were selected exclusively on the validation subset, while final performance was evaluated once on a previously unseen test subset.
The best-performing configuration was obtained using a 128×128 input resolution, 12 HOG orientations, 8×8 pixels per cell, 2×2 cells per block, and 300 PCA components. This configuration achieved a validation accuracy of 0.8028 and a final test accuracy of 0.7978. The results show that increasing the image resolution from 64×64 to 128×128, together with combining HOG descriptors with colour-based features, improves classification performance, while further increasing the resolution to 200×200 does not provide additional benefits.
An additional verification experiment on 30,000 images confirmed the stability of the selected configuration, achieving a test accuracy of 0.8070. The study also discusses how such lightweight classifiers may be used as auxiliary verification modules in future railway signal detection systems.

Downloads

Published

2026-06-03

Issue

Section

Articles