Geometric trajectory classification using BiLSTM

Hanna Ulyanava1
Baha Celik2
Vikas Davangere Rajashekar3
Mantas Makulavicius4
1, 2, 3, 4Department of Mechatronics, Robotics and Digital Manufacturing, Vilnius Tech, Vilnius, Lithuania
Corresponding Author: Mantas Makulavicius
Download PDF

Abstract

The classification of geometric trajectory segments into fundamental parts such as lines and arcs is one of the challenges in such fields as computer vision, robotics, and automated manufacturing. Traditional rule-based approaches, such as angle-based segmentation, often struggle with noisy data, sampling irregularities, and complex transition regions. This work addresses this problem by proposing a deep learning approach that uses a Bidirectional Long Short-Term Memory (Bi-LSTM) network. The aim of the study is to develop a model that accurately classifies trajectory segments from raw 2D coordinate sequences (Fig. 1(a)). The proposed methodology (Fig. 1(b)) includes dataset preprocessing, Bi-LSTM model construction (Fig. 1(c)), and systematic training and evaluation. The core idea is to make use of the bidirectional nature of architecture to process sequential coordinate data in both forward and backward directions, which allows the model to capture geometric context that single-point analysis misses.

Implementation involved the generation and preprocessing of a dataset containing 10,000 different geometric shapes (circles, rectangles, capsules, etc.) (Fig. 1(a)). The raw 2D coordinates were normalized and transformed into sequences of 13 engineered features, including curvature, velocity, acceleration, and cumulative angle changes. A two-layer Bi-LSTM model with dropout regularization was developed and trained on these sequences. The model achieved an accuracy of 99.72 % on the separate test set, effectively distinguishing between linear and curved segments. This method is applicable to robot route planning, and quality control, where reliable analysis of complex trajectories is essential for automated decision-making. Future work will focus on extending the implementation on irregular trajectories generated from real industrial processes.

Fig. 1. Training pipeline: a) samples loading from the dataset; b) machine learning pipeline; c) constructed Bi-LSTM model architecture
Training pipeline: a) samples loading from the dataset;  b) machine learning pipeline; c) constructed Bi-LSTM model architecture

References

  • A. Graves and J. Schmidhuber, “Framewise phoneme classification with bidirectional LSTM and other neural network architectures,” Neural Networks, Vol. 18, No. 5-6, pp. 602–610, Jul. 2005, https://doi.org/10.1016/j.neunet.2005.06.042
  • S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, Vol. 9, No. 8, pp. 1735–1780, Nov. 1997, https://doi.org/10.1162/neco.1997.9.8.1735

About this article

Received
November 18, 2025
Accepted
December 3, 2025
Published
December 1, 2026
Keywords
geometric classification
Bi-LSTM model
deep learning
trajectory segmentation