# Trajectory Classification and Recognition of Planar Mechanisms Based on ResNet18 Network
## 1 Introduction  
Planar linkage mechanisms are widely used in daily life, such as the weft insertion mechanism in knitting machines, wing-folding mechanisms in airplanes, and rehabilitation robots. Among these, trajectory synthesis is a key issue in mechanism design. The trajectory of a planar mechanism refers to the path traced by a specific point during the mechanism's motion, determined by the mechanism's structural characteristics and motion conditions. In machines and devices, the trajectory synthesized by the mechanism needs to closely approximate the desired path as much as possible [1]. Moreover, satisfactory results in trajectory synthesis can only be achieved when the type of mechanism to which the trajectory belongs is identified. Therefore, determining the type of mechanism to which a trajectory belongs is of significant importance for enhancing the accuracy of trajectory synthesis. There are generally three methods for synthesizing planar mechanism trajectories: graphical, analytical [2], and optimization [3; 4; 5]. Graphical methods are simple and quick but provide lower accuracy solutions, whereas analytical methods offer higher-precision solutions. Optimization methods, on the other hand, do not impose restrictions on the number of coupling points, making them more efficient. [PERSON] [6] used a simulated annealing method to optimize trajectory points and synthesize corresponding four-bar mechanisms. [PERSON] [7] constructed an objective function and used evolutionary algorithms to optimize trajectories. [PERSON] et al. [8] and [PERSON] et al. [9] proposed new algorithms based on harmony search to optimize four-bar mechanisms. [PERSON] proposed a trajectory synthesis for planar four-bar mechanisms based on a gravity search algorithm that minimizes a modified error function [10]. [PERSON] et al. [11] and [PERSON] et al. [12] synthesized four-bar mechanisms using the Fourier descriptor method. [PERSON] et al. (2013) used a particle swarm optimization algorithm to optimize planar four-bar mechanisms with clearances. [PERSON] et al. (2014) proposed a numerical synthesis program that combines motion generation and function generation for four-bar mechanisms. [PERSON] et al. (2015) proposed a solution domain approach for trajectory synthesis of planar four-bar mechanisms with eight precision points, achieving good results. [PERSON] et al. (2016) established a spherical four-bar mechanism database and obtained the most suitable basic dimension types for the mechanism under specified link curves. For trajectory synthesis of five-bar mechanisms, [PERSON] et al. (2017) proposed an optimization method for non-circular gear five-bar mechanisms, using genetic algorithms to find globally optimal solutions. [PERSON] et al. (2018) used fixed-length constraint equations to synthesize the drive mechanism and the required link parameters. [PERSON] et al. (2019) proposed a method based on wavelet analysis theory and established an adaptive database. [PERSON] et al. (2019) proposed a method based on deep generative neural networks to obtain a set of optimal dimensions and parameters for Stephenson-III type six-bar mechanisms. [PERSON] et al. (2011) algebraically synthesized Stephenson-III type planar six-bar mechanisms, while [PERSON] et al. (2012) used wavelet series to synthesize planar six-bar mechanisms. The above-mentioned scholars used different methods to synthesize planar mechanism trajectories, designing corresponding mechanisms to generate curves close to the desired path. However, they did not judge the type of mechanism to which the trajectory belongs, which could lead to synthesized mechanisms not effectively generating the expected curves. Therefore, this paper starts with trajectory images and proposes a method based on the ResNet18 network to determine the type of mechanism to which the trajectory image belongs, aiming to improve the accuracy of subsequent trajectory synthesis.