An irregular toy automatic spraying control system based on image recognition

The image recognition-based automated painting control system for irregular toys utilizes a ring-shaped arrangement of industrial cameras and a Siamese architecture toy tracking network to achieve precise pose recognition and painting path planning for irregular toys. This solves the problems of unstable quality and low efficiency in traditional painting processes, thereby improving painting quality and production efficiency.

CN120920247BActive Publication Date: 2026-06-19北流高达玩具有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北流高达玩具有限公司
Filing Date
2025-09-10
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Traditional toy painting processes cannot adapt to the random positions and postures of irregular toys, resulting in unstable painting quality, low production efficiency, and difficulty in ensuring the quality consistency of different batches of products.

Method used

An automated spraying control system for irregular toys based on image recognition is adopted. Four industrial cameras arranged in a ring are used to acquire 360° images. Combined with a toy tracking network based on the Siamese architecture, pose recognition and surface mesh coding are performed to achieve fine planning and dynamic updating of the spraying path.

Benefits of technology

It improves the stability of coating quality and the consistency of product surface treatment, increases production efficiency and reduces quality costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120920247B_ABST
    Figure CN120920247B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image recognition technology and discloses an automated spraying control system for irregular toys based on image recognition. The system includes: a data acquisition module for acquiring a first image of an irregular toy on a conveyor belt; a pose recognition module for inputting the first image into a toy tracking network for pose recognition to obtain real-time pose data; a surface mesh encoding module for performing surface mesh encoding on the irregular toy based on the real-time pose data to obtain map encoding data; and a spraying path planning module for transmitting the real-time pose data to a tracking controller and simultaneously transmitting the map encoding data to a spraying controller, and performing spraying path planning to obtain a spraying trajectory. This invention effectively solves the problem that traditional fixed parameters cannot adapt to different materials and surface features, improves the stability of spraying quality and the consistency of product surface treatment, thereby increasing production efficiency and product qualification rate, and reducing quality costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to an automated spraying control system for irregular toys based on image recognition. Background Technology

[0002] Traditional toy painting processes utilize automated equipment with fixed paths. However, when dealing with irregularly shaped toys, these processes suffer from inconsistent painting quality, low production efficiency, and difficulty in ensuring consistent quality across different batches. Because the position and posture of toys on the conveyor belt are random, fixed paths cannot adapt to the actual spatial state of the toys in real time, leading to frequent quality problems such as painting deviations, uneven coverage, and localized missed or over-spraying. Summary of the Invention

[0003] This invention provides an automated spraying control system for irregular toys based on image recognition. This invention effectively solves the problem that traditional fixed parameters cannot adapt to different materials and surface characteristics, improves the stability of spraying quality and the consistency of product surface treatment, thereby improving production efficiency and product qualification rate, and reducing quality costs.

[0004] In a first aspect, the present invention provides an automated spraying control system for irregular toys based on image recognition, the automated spraying control system for irregular toys based on image recognition comprising:

[0005] The acquisition module is used to acquire the first image of the irregularly shaped toy on the conveyor belt;

[0006] The pose recognition module is used to input the first image into the toy tracking network for pose recognition and obtain real-time pose data.

[0007] The surface mesh encoding module is used to perform surface mesh encoding on the irregular toy based on the real-time pose data to obtain map encoding data.

[0008] The spraying path planning module is used to transmit the real-time pose data to the tracking controller and the map encoding data to the spraying controller. The spraying path is planned through the tracking controller and the spraying controller to obtain the spraying trajectory.

[0009] In conjunction with the first aspect, in a first implementation of the first aspect of the present invention, the acquisition module is specifically used for:

[0010] Four industrial cameras arranged in a ring are used to synchronously trigger and capture images of irregular toys on a conveyor belt, resulting in multi-view original images.

[0011] Distortion correction is performed on the original multi-view images to obtain corrected images;

[0012] The corrected image is subjected to histogram equalization to obtain a standard image, and the standard image is subjected to Gaussian filtering to obtain a first image.

[0013] In conjunction with the first aspect, in a second implementation of the first aspect of the present invention, the pose recognition module further includes:

[0014] The feature extraction unit is used to input the first image into the feature extraction backbone network of the toy tracking network for feature extraction to obtain the backbone feature vector.

[0015] An edge feature enhancement processing unit is used to input the backbone feature vector into the toy contour enhancement module of the toy tracking network for edge feature enhancement processing to obtain a contour feature vector.

[0016] The pose decoding unit is used to input the contour feature vector into the temporal correlation module of the toy tracking network to calculate the motion trajectory, obtain the temporal feature vector, and perform pose decoding on the temporal feature vector to obtain real-time pose data.

[0017] In conjunction with the first aspect, in a third implementation of the first aspect of the present invention, the edge feature enhancement processing unit is specifically used for:

[0018] The backbone feature vector is input into the edge-aware convolution kernel of the toy contour enhancement module for convolution calculation to obtain edge response features;

[0019] The edge response features are subjected to activation function calculation to obtain edge enhancement features, and spatial attention weights are calculated based on the edge enhancement features to obtain a spatial attention weight matrix.

[0020] The spatial attention weight matrix and the edge enhancement features are multiplied element-wise to obtain the contour feature vector.

[0021] In conjunction with the first aspect, in a fourth implementation of the first aspect of the present invention, the surface mesh encoding module further includes:

[0022] The surface point cloud projection unit is used to calculate the coordinate transformation matrix based on the real-time pose data, and project the toy surface point cloud onto a local coordinate system with the centroid of the irregular toy as the origin based on the coordinate transformation matrix, so as to obtain the toy surface point cloud data.

[0023] The grid discretization processing unit is used to perform grid discretization processing on the point cloud data of the toy surface to obtain multiple grid cells, and calculate the spatial position coordinates of each grid cell to obtain a set of grid cells on the toy surface.

[0024] A multidimensional feature encoding unit is used to perform multidimensional feature encoding on each grid cell in the set of grid cells on the toy surface to obtain an initial map encoding matrix;

[0025] The dynamic update unit is used to dynamically update the initial map coding matrix based on the real-time pose data to obtain map coding data synchronized with the movement of the irregular toy.

[0026] In conjunction with the first aspect, in a fifth implementation of the first aspect of the present invention, the multidimensional feature encoding unit is specifically used for:

[0027] The normal vector is calculated based on the gradient change of adjacent grid points in the toy surface grid unit set to obtain three-dimensional normal vector data.

[0028] The optimal spraying angle value for each grid cell is calculated based on the spatial relationship between the three-dimensional normal vector data and the vertical direction.

[0029] The spectral reflectance and surface roughness of the toy surface grid unit set are measured to obtain the material code value and the coating value.

[0030] The initial map coding matrix is ​​obtained by sequentially combining the three-dimensional normal vector data, the optimal spraying angle value, the material coding value, the spraying layer value, and the preset occlusion mark value and quality weight value.

[0031] In conjunction with the first aspect, in a sixth implementation of the first aspect of the present invention, the spraying path planning module further includes:

[0032] The transmission unit is used to transmit the real-time pose data to the tracking controller and the map encoding data to the spraying controller, respectively.

[0033] The tracking control unit is used to receive the real-time pose data from the tracking controller and calculate the tracking confidence and pose change. When the tracking confidence is lower than a preset threshold, a re-initialization mechanism is triggered to obtain the tracking quality evaluation result.

[0034] The spraying area filtering unit is used to filter sprayable areas from the map coding data of the spraying controller based on the tracking quality assessment results, and to create a basic spraying path based on the sprayable areas.

[0035] The spraying parameter adjustment unit is used to adjust the spraying parameters based on the material code value, obtain the adjusted parameters, and combine the adjusted parameters with the path coordinates in the basic spraying path to obtain the spraying trajectory.

[0036] In conjunction with the first aspect, in the seventh implementation of the first aspect of the present invention, the spraying area screening unit is specifically used for:

[0037] Based on the tracking quality assessment results, the spraying task status is determined to obtain the spraying task execution status.

[0038] Based on the execution status of the spraying task, the occlusion marker values ​​in the map coding data are filtered to obtain the sprayable area, and the sprayable area is sorted according to its spatial location to obtain an optimized spraying point sequence.

[0039] The starting point, turning point and ending point in the optimized spraying point sequence are selected as path control nodes, and the velocity and acceleration boundary conditions at each path control node are calculated to obtain the path planning control node set.

[0040] The set of path planning control nodes is input into a fifth-order polynomial interpolation algorithm. The polynomial coefficients are calculated by solving a system of sixth-order linear equations, and a basic spraying path is generated between adjacent path control nodes.

[0041] In conjunction with the first aspect, in the eighth implementation of the first aspect of the present invention, the image recognition-based automated spraying control system for irregular toys further includes:

[0042] The surface coating module is used to calculate the joint angles of the six-axis robot based on the coating trajectory and drive the actuator to control the coating pressure and flow parameters to complete the surface coating, and to acquire a second image after the coating is completed;

[0043] The difference calculation module is used to perform difference calculation between the second image and the first image to obtain a difference image, and to perform morphological opening operation and connected component labeling on the difference image to obtain defect region data;

[0044] The update module is used to update the map coding data according to the types of missed spraying areas and overspraying areas identified in the defect area data, so as to obtain updated map coding data.

[0045] The generation module is used to generate a spray control command based on the defect area location information in the updated map coding data.

[0046] In conjunction with the first aspect, in the ninth implementation of the first aspect of the present invention, the surface spraying module is specifically used for:

[0047] The spraying trajectory is input into the inverse kinematics solver to calculate the joint angles of the six-axis robot, and the spraying parameter instructions are calculated based on the corresponding material code values.

[0048] The robot motion control is performed based on the joint angles of the six-axis robot to obtain the robot end-effector pose;

[0049] The spraying actuator is controlled to perform surface spraying according to the spraying parameter instructions. The spraying pressure regulating valve, flow control valve and spray gun distance adjusting mechanism are adjusted synchronously to form a uniform coating on the toy surface according to the spraying trajectory, so as to obtain the completed sprayed toy surface.

[0050] The surface of the toy after the coating has been applied is captured to obtain a second image.

[0051] The technical solution provided by this invention achieves 360° image acquisition without blind spots through four industrial cameras arranged in a ring, effectively solving the blind spot problem inherent in traditional single-view acquisition. A hardware-level synchronous triggering mechanism ensures the temporal consistency of multi-view images, improving the integrity and accuracy of information about irregular toy surfaces. The toy tracking network, designed with a Siamese architecture, integrates contour enhancement and temporal correlation modules, enabling precise identification of complex surface textures and irregular shape features of toys. The network learns the toy's motion patterns to achieve motion prediction, effectively improving tracking stability and pose calculation accuracy in dynamic environments. Dynamic map encoding technology based on real-time pose data enables refined management of spraying parameters, uniformly encoding and updating multi-dimensional information such as the toy's surface geometry, material properties, and spraying requirements in real time. The distributed collaborative architecture of the tracking controller and the spraying controller achieves specialized task division: the tracking controller focuses on high-speed image processing and pose calculation, while the spraying controller focuses on path planning and motion control. This architecture effectively solves the problem of insufficient computing power of traditional single controllers and the problem that traditional fixed parameters cannot adapt to different materials and surface characteristics. It improves the stability of spraying quality and the consistency of product surface treatment, thereby improving production efficiency and product qualification rate, and reducing quality costs. Attached Figure Description

[0052] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a schematic diagram of the structure of an automated spraying control system for irregular toys based on image recognition in an embodiment of the present invention. Detailed Implementation

[0054] This invention provides an automated spraying control system for irregular toys based on image recognition. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, systems, products, or devices.

[0055] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the automated spraying control system for irregular toys based on image recognition in this invention includes:

[0056] The acquisition module is used to acquire the first image of the irregularly shaped toy on the conveyor belt;

[0057] Specifically, four industrial cameras arranged in a ring around an irregularly shaped toy moving on a conveyor belt are used to acquire omnidirectional images. The cameras, model Basler acA1920-150uc, are symmetrically positioned at a 45° angle above the conveyor belt to achieve 360° coverage of the toy's surface. A TTL-level synchronous trigger signal controlled by an STM32F407 microcontroller enables simultaneous acquisition of four image streams with millisecond-level delay, obtaining multi-view raw images at the same time to avoid image mismatch caused by time differences. Each raw image is then input into a distortion correction algorithm, performing pixel-level remapping based on the camera intrinsic parameter matrix and distortion coefficient model to correct geometric distortion caused by radial and tangential lens distortion, resulting in a corrected image. The corrected image is subjected to histogram equalization. By calculating the cumulative distribution function of the original image and redistributing the gray levels, the brightness and contrast of the image are enhanced and the background details are clearer. The histogram equalized image is then used as the standard image input to the filtering module. Gaussian filtering is performed using a 5×5 Gaussian kernel with a standard deviation of 1.2 to smooth the high-frequency noise signals in the image and output the first image.

[0058] The pose recognition module is used to input the first image into the toy tracking network for pose recognition and obtain real-time pose data.

[0059] Specifically, the feature extraction unit receives the first image output by the acquisition module and inputs it into the feature extraction backbone network constructed in the toy tracking network for feature extraction processing. The backbone network is based on an improved ResNet-50 architecture, which modifies the downsampling parameters of the 4th and 5th residual blocks to retain higher resolution spatial detail information and uses grouped convolution technology to compress parameter redundancy, thereby improving inference speed while outputting a backbone feature vector containing edge, texture, and structural information. The edge feature enhancement processing unit inputs the backbone feature vector into the toy contour enhancement module in the toy tracking network. The toy contour enhancement module is based on a learnable edge-aware convolution kernel initialized with a Laplacian operator. It enhances the toy boundary response through a combination of convolution operations and activation functions, while superimposing a spatial attention mechanism to automatically suppress background redundant noise, generating a contour feature vector focused on the shape and surface structure of the toy's edges. The pose decoding unit receives the contour feature vector and inputs it into the temporal correlation module. The temporal correlation module is built based on a bidirectional long short-term memory network structure. The forward and reverse state recursion can jointly model the motion trajectory change pattern in the current frame and multiple adjacent frames, outputting a temporal feature vector that expresses continuous dynamic behavior. The temporal feature is then mapped into real-time six-degree-of-freedom pose data representing the irregular toy at the current moment through a fully connected pose decoding layer, including three-dimensional position coordinates and Euler angle attitude parameters.

[0060] The surface mesh encoding module is used to encode the surface mesh of irregular toys based on real-time pose data to obtain map encoding data;

[0061] Specifically, the surface point cloud projection unit calculates the coordinate transformation matrix based on real-time six-DOF pose data. This matrix consists of a rotation matrix composed of three Euler angles and a translation vector composed of three translation components. A homogeneous coordinate transformation method is used to transform the original toy surface point cloud acquired by structured light scanning from the global coordinate system to a local coordinate system with the toy's centroid as the origin, resulting in aligned toy surface point cloud data. The mesh discretization unit then performs regular meshing on the toy surface point cloud data. Based on a set spatial resolution of 0.5mm, the entire surface area is divided into 200×200 uniform mesh units. Simultaneously, the center position coordinates of each mesh unit in the local coordinate system are calculated, constructing a set of toy surface mesh units. The multidimensional feature encoding unit performs multidimensional attribute extraction and encoding operations for each grid cell. This includes calculating the surface normal vector using the point cloud gradient direction, determining the material type based on spectral reflectance, setting the number of coating layers based on surface roughness mapping, calculating the optimal coating angle parameter using the normal angle, and determining the occlusion marker and initial quality weight factor based on ray projection. This forms an initial map encoding matrix containing eight-dimensional parameter information, representing the physical and technological characteristics of each coating area. The dynamic update unit continuously receives real-time pose data input at a frequency of 60Hz. It uses the new rotation and translation information in each frame to update and transform the coordinates of each grid cell in the original map encoding, achieving rapid incremental correction of position-related feature terms in the map encoding matrix, and obtaining map encoding data that is synchronized in real time with the irregular toy's movement trajectory.

[0062] The spraying path planning module is used to transmit real-time pose data to the tracking controller and map encoding data to the spraying controller. The spraying path is then planned through the tracking controller and the spraying controller to obtain the spraying trajectory.

[0063] Specifically, the transmission unit performs the data distribution task, transmitting real-time six-DOF pose data to the tracking controller via the UDP high-speed communication protocol at a refresh rate of 60Hz. Simultaneously, it transmits map-coded data containing eight-dimensional information, generated by the surface mesh coding module, to the spraying controller, thus achieving data division of labor and collaboration under the dual-controller architecture. The tracking control unit calculates the tracking quality assessment value internally using the pose change between the previous and current frames and the network output confidence score. The confidence score is derived from the output probability of Toy-TrackNet, and the pose change is measured using Euclidean distance. The combined result forms the tracking quality function value, which is compared with a set threshold. When the confidence score falls below a preset lower limit or the pose drift is too large, a network re-initialization mechanism is automatically triggered. The spraying area selection unit determines whether the current frame data meets the path generation conditions based on the tracking quality assessment results. If the assessment is valid, it selects grid cells with occlusion markers set to non-occlusion from the map coding data maintained in the spraying controller as sprayable areas. It then performs area aggregation and boundary identification based on surface continuity, constructing a basic spraying path on the spatial grid set to form continuous, non-redundant executable path segments. The spraying parameter adjustment unit dynamically adjusts the three core parameters—spraying pressure, speed, and flow rate—based on the material coding value in each grid cell and the spraying process setting rules. For example, the spraying pressure is set to 0.5 MPa for plastic, 0.7 MPa for metal, and 0.9 MPa for rubber. It also performs multi-factor parameter fine-tuning based on the number of spray layers and the normal angle. The adjusted spraying parameters are then bound to the corresponding path coordinates in the basic spraying path to generate a spraying trajectory data sequence.

[0064] In one specific embodiment, the acquisition module is specifically used for:

[0065] Four industrial cameras arranged in a ring are used to synchronously trigger and capture images of irregular toys on a conveyor belt, resulting in multi-view original images.

[0066] Distortion correction is performed on the original images from multiple perspectives to obtain the corrected images;

[0067] The corrected image is subjected to histogram equalization to obtain a standard image, and the standard image is subjected to Gaussian filtering to obtain the first image.

[0068] Specifically, four high-performance industrial cameras arranged in a ring acquire multi-view images of the target area, and a hardware-level synchronous triggering mechanism ensures image temporal consistency. Four Baslerac A1920-150uc industrial cameras are installed above the conveyor belt, arranged in a ring at 45° intervals at 0°, 90°, 180°, and 270° azimuths to avoid single-view occlusion or blind spots. A 15% field-of-view overlap between adjacent views enhances stereoscopic perception. The distance between the cameras and the conveyor belt is uniformly set at 800mm, the lens focal length is 16mm, and a 30° overhead angle is used to acquire details of the target's edges and surface structure without introducing distortion. A hardware synchronization triggering module built with an STM32F407 microcontroller was introduced. This module simultaneously triggers the exposure process of four cameras using a 5V TTL level pulse signal (100μs pulse width), effectively eliminating image time delay deviations caused by software triggering. The triggering frequency is adaptively adjusted according to the conveyor belt speed. When the conveyor belt speed is 0.5m / s, the image acquisition frequency is set to 30Hz, and when the speed increases to 2.0m / s, the corresponding acquisition frequency increases to 60Hz to ensure sufficient inter-frame overlap and image density even in fast-moving scenes. After synchronous exposure, the four cameras transmit the raw image data in parallel to the image processing unit via a gigabit Ethernet interface, forming a multi-view raw image set. High-precision distortion correction is performed frame-by-frame on the raw images, based on the pre-calibrated intrinsic parameter matrix and distortion coefficient vector of each camera. The intrinsic parameter matrix includes the focal length f. x f y With principal point coordinates c x c y The distortion coefficient vector includes three radial distortion parameters k1, k2, and k3, and two tangential distortion parameters p1 and p2. The correction method reverses the mapping of image coordinates to ideal imaging coordinates and uses bilinear interpolation for pixel reconstruction to repair barrel distortion and slant distortion caused by wide-angle lenses, generating a corrected image with realistic geometric structure. Histogram equalization is performed on the distortion-corrected image. The gray-level histogram of the image is calculated and its cumulative distribution function is obtained. Then, the gray-level value of each pixel is remapped to the range of 0 to 255 according to the principle of uniform distribution through the mapping function, realizing nonlinear enhancement of image contrast, making the details in low-brightness areas clearer and the boundary contours more distinct, forming a standard image under a unified brightness standard. A 5×5 Gaussian kernel with a standard deviation of 1.2 is used to perform two-dimensional Gaussian filtering on the standard image. The image pixels are weighted and averaged through spatial domain convolution operations to smooth neighborhood gray-level differences and reduce the intensity of sharp edge noise, while preserving the main structural contours. The filtered image is the first image.

[0069] In one specific embodiment, the pose recognition module further includes:

[0070] The feature extraction unit is used to input the first image into the feature extraction backbone network of the toy tracking network for feature extraction to obtain the backbone feature vector.

[0071] The edge feature enhancement processing unit is used to input the backbone feature vector into the toy contour enhancement module of the toy tracking network for edge feature enhancement processing to obtain the contour feature vector.

[0072] The pose decoding unit is used to input the contour feature vector into the temporal correlation module of the toy tracking network to calculate the motion trajectory, obtain the temporal feature vector, and perform pose decoding on the temporal feature vector to obtain real-time pose data.

[0073] Specifically, the feature extraction unit inputs the first image into the feature extraction backbone network of the toy tracking network to extract multi-scale semantic features. The feature extraction backbone network is built on the structurally optimized ResNet-50 architecture. Compared with the high compression ratio path of the traditional ResNet, the feature extraction backbone network modifies the downsampling stride of the fourth and fifth residual convolution modules, adjusting it from 2 to 1, so that the output feature map has a higher spatial resolution, thereby enhancing the ability to capture small-scale geometric structures and contour change regions. At the same time, the backbone network introduces a grouped convolution mechanism, dividing each convolution operation into 32 independent sub-channels, reducing the number of parameters to 65% of the standard model, and outputting a high-dimensional backbone feature vector with a size of 240×135×2048, which contains comprehensive feature representations of toy surface texture, edge shape and key geometric structures. The edge feature enhancement unit inputs the backbone feature vector into the toy contour enhancement module constructed in the toy tracking network. The toy contour enhancement module, aiming at edge-sensitive feature representation, designs a learnable edge-aware convolutional kernel initialized with a Laplacian template. Supervised training of the convolutional weights is performed through backpropagation to adapt to contour extraction characteristics under different materials and complex backgrounds. After convolution, a ReLU nonlinear activation function is introduced to improve the sparsity of feature representation. The enhanced edge features are then fused with the original backbone features through a residual path, preserving global semantic information while highlighting contour response. To suppress background interference and increase the weight of the target region, the module introduces a spatial attention mechanism. A 1×1 convolution operation with channel compression is applied to the enhanced feature map, and a spatial weight matrix is ​​output via a Sigmoid function. The spatial weight matrix is ​​then fused pixel-by-pixel with the enhanced feature map to obtain a contour feature vector focused on the toy's main body region. The pose decoding unit inputs the contour feature vector into the temporal correlation module in the network structure for motion trajectory modeling. The temporal correlation module is implemented based on a bidirectional long short-term memory (Bi-LSTM) network, constructing forward and backward state recursion paths to jointly model the displacement continuity and trajectory change trend between historical and future frames. The input to the temporal correlation module at each time step is a 2048-dimensional contour feature vector, with an internal state dimension of 256. During the update process, the LSTM unit sequentially calculates the forget gate, input gate, candidate memory state, and output gate, and combines the previous state and current features to determine the update output of the current hidden state, generating a temporal feature vector expressing the temporal structure, direction change, and velocity trend. The decoding module maps the temporal feature vector into real-time six-DOF pose parameters through a fully connected neural network, including three-dimensional spatial position coordinates x, y, z and three pose Euler angles α, β, γ, and simultaneously outputs a tracking confidence score between 0 and 1.

[0074] In one specific embodiment, the feature extraction unit is specifically used for: inputting a first image into a first convolutional layer group for initial feature extraction processing, performing downsampling calculation on the image using a 7x7 convolutional kernel and a max pooling layer to obtain a first-layer feature map; inputting the first-layer feature map into a second convolutional layer group for residual feature extraction processing, performing feature learning calculation using three residual blocks and a batch normalization layer to obtain a second-layer feature map; inputting the second-layer feature map into a third convolutional layer group for mid-level feature extraction processing, performing feature fusion calculation using four residual blocks and skip connections to obtain a third-layer feature map; inputting the third-layer feature map into a fourth convolutional layer group for high-level feature extraction processing, setting the downsampling stride of the fourth convolutional layer group to 1, maintaining the feature map resolution using six residual blocks to obtain a fourth-layer feature map; and inputting the fourth-layer feature map into a fifth convolutional layer group for final feature extraction processing, setting the downsampling stride of the fifth convolutional layer group to 1, performing feature compression calculation using three residual blocks and a global average pooling layer to obtain a backbone feature vector.

[0075] In one specific embodiment, the edge feature enhancement processing unit is specifically used for:

[0076] The backbone feature vector is input into the edge-aware convolution kernel of the toy contour enhancement module for convolution calculation to obtain the edge response features;

[0077] The edge response features are activated by calculation to obtain edge enhancement features, and the spatial attention weights are calculated based on the edge enhancement features to obtain the spatial attention weight matrix.

[0078] The spatial attention weight matrix and the edge enhancement features are multiplied element-wise to obtain the contour feature vector.

[0079] Specifically, the high-dimensional backbone feature vector is input into the edge-aware convolutional kernel of the toy contour enhancement module. The initial parameters of the edge-aware convolutional kernel are preset based on the three-dimensional Laplacian operator template. Its convolutional kernel weight matrix is ​​designed as an edge detection filter sensitive to the high-frequency components in the image. Specifically, it is a 3×3 two-dimensional convolutional kernel. The weights are continuously updated during actual training through backpropagation to adapt to the edge characteristics of different types of toy surfaces. The edge-aware convolution operation is performed sliding on the backbone feature tensor. In each local receptive field, the feature gradient direction and boundary abrupt response are calculated to form a set of edge response features that highlight the edge and texture transition areas in the image. The edge response feature tensor retains the original resolution in the spatial dimension and captures the edge pattern changes at different scales in the channel dimension. A nonlinear activation operation is performed on the edge response features. The ReLU activation function is used to set all negative responses to zero and retain positive responses. This effectively filters background noise while enhancing boundary characteristics and improving gradient sparsity, outputting edge enhancement features. Edge enhancement features are weighted using a spatial attention mechanism. A 1×1 convolution is performed on the feature map using channel compression to fuse channel information in the spatial dimension. The compressed result is then input into a Sigmoid activation function for normalization mapping, limiting the attention weight values ​​to the [0,1] interval. The resulting two-dimensional matrix is ​​the spatial attention weight matrix, where each element represents the importance index of the current spatial location in the global features; a higher weight indicates that the current location is closer to the effective area of ​​the toy. Element-wise multiplication is performed between the spatial attention weight matrix and the edge enhancement features in a one-to-one correspondence at spatial locations. This multiplication of the edge enhancement feature value at each location by the corresponding attention weight value preserves edge contour information while suppressing background noise and interference areas, achieving explicit focusing of edge features and target contours. The fusion result constitutes the contour feature vector.

[0080] In one specific embodiment, the pose decoding unit is specifically used for: inputting the contour feature vector into the forget gate of the bidirectional LSTM network for historical information filtering; calculating the historical state information to be retained or discarded using the Sigmoid activation function and weight matrix to obtain the forget gate output; performing input gate calculation based on the forget gate output; calculating the input gate weights and candidate values ​​using the Sigmoid activation function and tanh activation function respectively, and performing element-wise multiplication to obtain the current input information; performing cell state update processing by combining the current input information with the cell state at the previous time step; performing weighted fusion calculation by combining the historical state controlled by the forget gate and the new information controlled by the input gate to obtain the updated cell state; performing output gate calculation processing on the updated cell state; calculating the output weight using the Sigmoid activation function and performing element-wise multiplication with the tanh-activated cell state to obtain a temporal feature vector containing motion prediction; inputting the temporal feature vector into the pose decoder for six-degree-of-freedom calculation; calculating the position coordinates and pose angles through two fully connected layers respectively, and performing numerical regression calculation to obtain real-time pose data containing x, y, z coordinates and α, β, γ angles.

[0081] In one specific embodiment, the surface mesh encoding module further includes:

[0082] The surface point cloud projection unit is used to calculate the coordinate transformation matrix based on real-time pose data, and project the toy surface point cloud onto a local coordinate system with the centroid of the irregular toy as the origin based on the coordinate transformation matrix, so as to obtain the toy surface point cloud data.

[0083] The grid discretization processing unit is used to perform grid discretization processing on the point cloud data of the toy surface to obtain multiple grid cells, and calculate the spatial position coordinates of each grid cell to obtain a set of grid cells on the toy surface.

[0084] A multidimensional feature encoding unit is used to encode the multidimensional features of each grid cell in the set of grid cells on the toy surface to obtain the initial map encoding matrix.

[0085] The dynamic update unit is used to dynamically update the initial map coding matrix based on real-time pose data to obtain map coding data synchronized with the irregular movement of the toy.

[0086] Specifically, the surface point cloud projection unit constructs a homogeneous coordinate transformation matrix based on the six-degree-of-freedom pose data provided by the real-time pose recognition module. The homogeneous coordinate transformation matrix consists of a rotation matrix calculated from three Euler angles and the corresponding three-dimensional translation vector. The rotation matrix is ​​orthogonally combined with the rotations around the X-axis, Y-axis, and Z-axis to form a direction transformation sub-matrix. The translation vector is composed of column vectors of real-time coordinates x, y, and z, thus forming a homogeneous coordinate transformation structure. The global point cloud obtained by structured light scanning is mapped to a local coordinate system with the toy's center of mass as the origin through the homogeneous coordinate transformation matrix, realizing spatial alignment between the point cloud and the moving subject. The generated toy surface point cloud data has rotation normalization and position alignment characteristics in the local coordinate system. The grid discretization processing unit receives local point cloud data and divides the entire point cloud range into regular two-dimensional grids according to the set spatial resolution parameters. The specific granularity of the division is 0.5 mm, forming several spatial grid units. Each grid unit represents a spatial projection segment of a defined region in the local coordinate system. During this process, the spatial coordinates, grid number, and index of the geometric center point of each grid unit are calculated, forming a set of grid units for the toy surface. The multidimensional feature encoding unit takes the set of grid units as input, performs multidimensional attribute extraction operations on each grid, and generates a structured initial map encoding matrix. Within each grid unit, the surface normal vector is extracted through local point cloud gradient calculation, and the normal direction is estimated by fitting the least-squares plane of points within the current region. The surface material type of the current region is determined by the reflectivity parameter carried by the point cloud: high reflectivity maps to metal, medium reflectivity to plastic, and low reflectivity to rubber, each assigned a different encoding value. The number of coating layers is calculated based on the point cloud density and surface roughness; for roughness less than 0... 0.5 micrometers is defined as a single layer, and 1.5 micrometers or more is defined as three layers, with two layers in the middle. The optimal spraying angle is calculated based on the angle between the local normal and the vertical direction. The reverse ray projection algorithm is used to determine whether there is an occlusion relationship in the current grid. If there is occlusion, the occlusion flag is set to valid; otherwise, it is set to no occlusion. At the same time, the spraying quality weight of the grid initialization is set as the baseline value as the control factor for dynamic evaluation and respraying mechanism. Each grid cell is encoded as a multi-dimensional feature vector containing normal, material, number of layers, angle, occlusion and quality weight, and arranged into a structured initial map encoding matrix. The spatial fields of the map coding matrix are periodically updated by the dynamic update unit based on continuously input real-time pose data. The new frame of pose data is received at a frequency of 60 Hz, and a new coordinate transformation relationship is constructed by recalculating the rotation matrix and translation vector. The coordinate transformation is used to update all fields involving position, angle and direction in the initial map coding matrix. At the same time, parameters related to motion, such as spraying angle, occlusion state and dynamic weight, are incrementally adjusted. The update range is quickly filtered by pose change bounding box to improve computational efficiency and generate map coding data that is completely synchronized with the current motion state of the irregular toy.

[0087] In one specific embodiment, the multidimensional feature encoding unit is specifically used for:

[0088] The normal vector data is obtained by calculating the normal vector based on the gradient change of adjacent grid points in the toy surface grid cell set;

[0089] The optimal spraying angle value for each grid cell is calculated based on the spatial relationship between the three-dimensional normal vector data and the vertical direction.

[0090] The spectral reflectance and surface roughness of the toy surface grid unit set are measured to obtain the material code value and coating value;

[0091] The initial map coding matrix is ​​obtained by sequentially combining the three-dimensional normal vector data, the optimal spraying angle value, the material coding value, the spraying layer value, and the preset occlusion mark value and quality weight value.

[0092] Specifically, based on a set of mesh cells on the toy surface, gradient information is extracted by analyzing the 3D geometric distribution and height differences of adjacent mesh points. Based on this, 3D normal vector data corresponding to each mesh cell is constructed. An affine approximation is performed on the local neighborhood containing the current mesh center point and several surrounding mesh points using minimum plane fitting, resulting in a unit vector that best represents the surface tilt direction of the current region. This unit vector is then represented as a 3D vector in the local coordinate system, containing components in the X, Y, and Z directions. Based on the spatial angle between the 3D normal vector and the vertical direction in the local coordinate system, the optimal spraying angle for each mesh cell is calculated. The magnitude of the optimal spraying angle directly affects the paint adhesion efficiency and coating uniformity during the spraying process. The closer the angle is to perpendicularity, the more stable the spraying effect. When the angle deviates significantly, the spraying distance and pressure compensation parameters are automatically adjusted. Non-contact material identification and surface roughness detection are performed on all grid cells. Material identification involves measuring the reflectivity curve after illumination by multi-band light sources and matching it with known material spectral characteristics to obtain the material code value corresponding to each grid cell. The material code value distinguishes different material types such as plastic, metal, and rubber. Each type of material has different coating adhesion and process requirements. Roughness detection uses microstructure texture analysis to quantify the uniformity, fluctuation amplitude, and texture density of the brightness distribution of the reflected image, and then converts it into a roughness level index. The required coating layer value is set according to the roughness level index. For example, when the surface is smooth and delicate, only one layer of coating is needed. When the surface has a medium texture, two layers are needed. When the surface is obviously rough and has micro protrusions or grooves, three or more layers are needed to ensure coating integrity and adhesion strength. The three-dimensional normal vector data, optimal spraying angle value, material code value, and spraying layer value are organized into a unified format and then sequentially combined with preset occlusion mark value and initial quality weight value according to a fixed field order. The occlusion mark value is used to identify whether the current grid cell is occluded or shaded by other toy areas or structural components, and the initial quality weight value is used as the basis for scoring updates and respray scheduling in the spraying history effect feedback control system. All these fields are filled into each grid cell one by one according to the standard eight-dimensional vector format and summarized into the initial map coding matrix.

[0093] Before performing multi-dimensional feature encoding on each grid cell in the toy surface grid cell set to obtain the initial map encoding matrix, the process includes: preprocessing the toy surface grid cell set using deep learning for material recognition; constructing a deep convolutional neural network containing four material types: plastic, metal, rubber, and composite materials; training the material classification model using multi-dimensional features such as spectral reflectance, surface texture, and color distribution to obtain a material intelligent recognition model; performing surface material probability prediction processing based on the material intelligent recognition model; inputting the local image features of each grid cell into the recognition model to calculate the probability distribution of each material type; using a weighted average method to handle mixed materials in boundary areas to obtain material probability distribution data; and performing intelligent recommendation processing of spraying parameters based on the material probability distribution data. A nonlinear mapping relationship is established between material type and parameters such as spraying pressure, speed, distance, and number of layers. A Bayesian optimization algorithm is used to search for the optimal parameter combination, considering the coupling effect between parameters, to obtain a set of intelligently recommended spraying parameters. This set of intelligently recommended spraying parameters is then validated and corrected using historical data. Successful cases of similar materials and geometric features are compared using a historical spraying quality database. A case-based reasoning algorithm is used to correct the parameter recommendation results and update the recommendation model weights, resulting in validated and corrected spraying parameters. These validated and corrected spraying parameters are then fused with material coding values ​​obtained through traditional measurements. A weighted voting mechanism, combined with expert knowledge and data-driven results, is used to establish a material identification confidence evaluation system and dynamically adjust the fusion weights, resulting in high-precision material feature coding data.

[0094] In one specific embodiment, the spraying path planning module further includes:

[0095] The transmission unit is used to transmit real-time pose data to the tracking controller and map-encoded data to the spraying controller, respectively.

[0096] The tracking control unit is used to receive real-time pose data from the tracking controller and calculate the tracking confidence and pose change. When the tracking confidence is lower than a preset threshold, a re-initialization mechanism is triggered to obtain the tracking quality evaluation result.

[0097] The spraying area filtering unit is used to filter sprayable areas from the map coding data of the spraying controller based on the tracking quality assessment results, and to create a basic spraying path based on the sprayable areas.

[0098] The spraying parameter adjustment unit is used to adjust the spraying parameters based on the material code value, obtain the adjusted parameters, and combine the adjusted parameters with the path coordinates in the basic spraying path to obtain the spraying trajectory.

[0099] Specifically, the transmission unit, acting as the fundamental hub for data interaction, distributes data within the dual-controller architecture. It sends real-time six-DOF pose data calculated by the pose recognition module to the tracking controller via the UDP high-speed communication protocol, enabling the tracking controller to obtain the latest pose input with millisecond-level latency. Simultaneously, it transmits multi-dimensional map encoded data generated and dynamically updated by the surface mesh encoding module to the painting controller, ensuring that the data used by the painting controller for path calculation and parameter calls remains synchronized with the toy's actual motion state, establishing a control data link. The tracking control unit performs quality analysis on the real-time pose data within the tracking controller, comparing pose changes between adjacent frames to determine the object's displacement and rotation amplitude in space. It also combines this with the confidence information output by the tracking network to assess the reliability of the current tracking result. When the tracking confidence is higher than a set threshold, it indicates reliable recognition and stable pose updates. Conversely, when the confidence is lower than the threshold, occlusion, blurring, or drift is present, triggering a re-initialization mechanism. This mechanism restores tracking accuracy by reloading feature templates and resetting trajectory prediction, resulting in a tracking quality assessment result. The spraying area selection unit is invoked by the spraying controller. It receives the tracking quality assessment results and determines whether the current pose data meets the trajectory planning conditions. If the determination result is valid, it uses the occlusion markers in the map coding data to screen all grid cells, extracting the areas marked as unoccluded as a set of sprayable areas. In the set of sprayable areas, the spraying points are sorted and aggregated according to spatial continuity and surface normal distribution to construct a basic spraying path that is fully covered and avoids repetition. The spraying parameter adjustment unit performs process-level parameter matching. It reads the material coding value for the grid cell corresponding to each path segment and dynamically adjusts the spraying pressure, spraying speed, and paint flow rate according to different material characteristics. For example, plastic surfaces have weak coating adhesion, requiring medium pressure and high speed to avoid accumulation; metal surfaces require increased spraying pressure to ensure penetration and adhesion; and rubber surfaces have low surface energy and are prone to rebound, requiring reduced speed and increased number of spraying layers. At the same time, it combines surface roughness information to correct the coating thickness to ensure the uniformity of the final film. All adjusted parameters are combined point by point with the spatial coordinates of the basic spraying path to form a spraying trajectory carrying process parameters, including the spatial movement path of the spray gun and the dynamically adjusted spraying process settings.

[0100] In one specific embodiment, the spraying area screening unit is specifically used for:

[0101] The spraying task status is determined based on the tracking quality assessment results to obtain the spraying task execution status.

[0102] Based on the execution status of the spraying task, the occlusion marker values ​​in the map coding data are filtered to obtain the sprayable areas. The sprayable areas are then sorted according to their spatial location to obtain the optimized spraying point sequence.

[0103] The starting point, turning point and ending point in the optimized spraying point sequence are selected as path control nodes, and the velocity and acceleration boundary conditions at each path control node are calculated to obtain the path planning control node set.

[0104] The set of path planning control nodes is input into a fifth-order polynomial interpolation algorithm. The polynomial coefficients are calculated by solving a system of sixth-order linear equations, and a basic spraying path is generated between adjacent path control nodes.

[0105] Specifically, the spraying task status is determined based on the tracking quality assessment results. When the tracking confidence remains above the threshold and the pose change is stable, the spraying task is considered executable. If the tracking confidence fluctuates or the pose drift exceeds the limit, it is considered paused or re-initialized, and the status is fed back to the path planning module to dynamically adjust the trajectory calculation logic. Under the condition that the task status is confirmed to be valid, the spraying area is filtered through map coding data. Based on the setting of the occlusion marker value in the coding matrix, sprayable and non-sprayable points are distinguished. Points marked as unoccluded are aggregated into sprayable areas, while points marked as occluded are removed in this path generation to ensure that the spraying is not interrupted or has quality defects due to occlusion during the spray gun operation. The obtained sprayable areas are then optimized and sorted. Through the analysis of spatial positional relationships, adjacent area points are reordered according to the principles of continuity and minimum displacement to form an optimized spraying point sequence. Path control nodes are extracted from the optimized point sequence, including the starting point, turning points, and final termination point. The starting point serves as the positional reference for path initialization, the turning points represent key locations where the trajectory direction changes, and the termination point marks the end position of path execution. For each path control node, corresponding velocity and acceleration boundary conditions are calculated. The boundary conditions are set according to the kinematics and dynamics constraints of the robotic arm. The velocity boundary is used to control the smoothness of the spray gun movement, and the acceleration boundary is used to prevent trajectory deviation or uneven coating thickness caused by excessive inertia. The set of path planning control nodes is input into a fifth-order polynomial interpolation algorithm. A sixth-order linear equation system is constructed using the displacement, velocity, and acceleration of adjacent control nodes as boundary conditions. The polynomial coefficients are obtained through numerical solution, thereby generating a continuous, smooth basic spraying path with second-order derivative continuity between adjacent nodes.

[0106] The process involves inputting the path planning control node set into a fifth-order polynomial interpolation algorithm, calculating polynomial coefficients by solving a system of sixth-order linear equations, and generating a basic painting path between adjacent path control nodes. The next steps include: performing nonlinear dynamic characteristic analysis on the basic painting path; establishing a nonlinear dynamic model including path tracking error, speed deviation, and acceleration disturbance based on the rigid-flexible coupling characteristics of the six-axis robot and underactuated variables such as conveyor belt speed changes and toy weight changes to obtain system dynamic characteristic parameters; designing an adaptive control law based on these parameters, incorporating conveyor belt speed fluctuations and toy inertia changes as underactuated variables into the controller design, constructing an adaptive control law using Lyapunov stability theory, and setting initial gain parameters to obtain a basic adaptive controller; and then proceeding based on the basic adaptive controller... A backpropagation neural network (GWO-BPNN) is constructed using the Grey Wolf Optimization (GWO) algorithm to globally optimize the weights and thresholds of the neural network. The control performance is evaluated using a fitness function, and the network parameters are iteratively updated to obtain a trained GWO-BPNN parameter optimizer. The system's dynamic characteristic parameters are input into the GWO-BPNN parameter optimizer for online gain parameter tuning. The optimal gain parameters are calculated in real-time based on the current conveyor belt speed, toy pose change rate, and external disturbance intensity. The optimized parameters are then fed back to the adaptive controller to obtain the adaptively optimized control gain. Based on the adaptively optimized control gain, the basic spraying path is corrected. By adjusting the velocity distribution and acceleration constraints of path points in real-time, the system's nonlinearity and the effects of external disturbances are compensated for, resulting in an optimized spraying trajectory with vibration suppression capabilities.

[0107] In one specific embodiment, the image recognition-based automated spraying control system for irregular toys further includes:

[0108] The surface coating module is used to calculate the joint angles of the six-axis robot based on the coating trajectory and drive the actuator to control the coating pressure and flow parameters to complete the surface coating, and to acquire a second image after the coating is completed;

[0109] The difference calculation module is used to perform difference calculation between the second image and the first image to obtain a difference image, and to perform morphological opening operation and connected component labeling on the difference image to obtain defect region data.

[0110] The update module is used to update the map coding data based on the types of missed spraying areas and overspraying areas identified in the defect area data, so as to obtain the updated map coding data.

[0111] The generation module is used to generate spray control instructions based on the location information of defect areas in the updated map coding data.

[0112] Specifically, the surface coating module, based on the planned and parameter-bound coating trajectory, calls the inverse kinematics solver to analyze the spatial position and attitude angle of each path control point on the coating trajectory, and outputs the corresponding joint angle combination of the six-axis robot. This enables the coating robot arm to complete motion tracking of each position segment according to the set path. Simultaneously, the pressure and flow values ​​bound in the coating trajectory are mapped to the actuator control channel. The coating controller controls the working pressure and discharge speed of the paint spray gun, completing the high-precision coating adhesion operation on various areas of the irregular toy surface under multi-axis synchronous control. After the coating action is completed, the surface coating module controls the imaging subsystem to acquire a second image after coating. The second image is consistent with the first image in terms of physical position, shooting parameters, and lighting conditions. The differential calculation module receives the second image and performs pixel-by-pixel difference calculation with the original first image to generate a differential image. The grayscale change areas in the differential image correspond to the changes in image content before and after coating. The difference image is cleaned and its edges are removed by morphological opening operations. Scattered noise points are removed by erosion operations and the boundary contours are restored by subsequent dilation operations, forming a clean binary region map. The binary region map is then processed by a connected component labeling algorithm for region identification and numbering. Closed regions composed of all continuous pixels are extracted, and their area, centroid, bounding box, and average gray value are calculated. Based on these attributes, each connected region is classified. When the region area is large and the gray value difference is higher than the upper threshold, it is identified as an oversprayed region. When the region area is medium and the gray value is lower than the lower limit, it is identified as an undersprayed region. The judgment results, along with its spatial location information, are output as defect region data. The update module receives defect area data and locates the corresponding grid cell in the map coding data. By traversing and comparing the position of the defect area in the difference map with the spatial coordinates in the map coding, the specific affected grid number is determined. If the defect area is determined to be missed, the quality weight parameter in the corresponding grid cell is lowered, for example, from the original weight of 1.0 to 0.9, to reduce the probability of the defect area being skipped in the subsequent spraying path. If the defect area is determined to be oversprayed, the quality weight is increased, for example, to 1.1, but at the same time the number of sprayed layers remains unchanged or is reduced. When necessary, the occlusion flag is rewritten to the non-spraying state to avoid repeated coverage and coating accumulation. All these changes in fields are written to the map coding matrix in real time to form the updated map coding data.The generation module initiates the respray instruction generation process based on the defect area location information in the updated map coding data. It extracts the outer boundary contour of each missed area and generates a spiral or serpentine coverage trajectory within the boundary contour to ensure that the paint evenly covers the entire missed area. At the same time, it calls the original spraying parameters as a reference and appropriately reduces the spraying speed or increases the flow rate to improve the coverage effect. For oversprayed areas, no respraying is performed. Instead, control instructions are generated to blow air or pause spraying to correct the over-deposited coating. All respraying or repair actions are prioritized and transmitted to the spraying controller for execution within the current cycle to ensure that defect identification and real-time correction are completed within a single spraying operation cycle.

[0113] The process includes: generating respray control instructions based on defect location information in the updated map coding data; intelligent inference processing of operator behavior and intervention intentions; analyzing operator gestures, eye-tracking data, and control panel interaction records; using empathy inference algorithms to identify operator's spraying quality expectations and process adjustment intentions; simultaneously using non-empathy inference algorithms to analyze operator's technical skill level and operating habits to obtain operator intention understanding data; performing proactive and reactive action planning based on operator intention understanding data; proactively generating multiple optional respraying schemes for the operator to choose from when the system detects complex defect areas; and passively adjusting the current execution strategy and learning the operator's decision preferences when receiving operator intervention instructions to obtain an adaptive action planning strategy; and switching between autonomous and collaborative decision-making modes based on the adaptive action planning strategy in standard spraying. In the initial scenario, the system adopts an autonomous decision-making mode to independently execute repainting commands. In abnormal or complex scenarios, it switches to a collaborative decision-making mode to await operator confirmation and guidance. The system updates the decision-making mode switching threshold based on the decision results, resulting in an intelligent decision-making execution mode. The output of the intelligent decision-making execution mode is processed with the operator's actual feedback to learn human-like behavior. Through reinforcement learning algorithms, the system learns the operator's decision-making logic and quality standards, establishing a decision neural network that simulates the operator's thought process. This allows the system's decision-making behavior to gradually approach the judgment patterns of a skilled operator, resulting in a human-like decision-making behavior model. Based on this human-like decision-making behavior model, the system performs complex collaborative task execution. In complex scenarios such as parallel painting of multiple toys, switching between different product types, and changes in quality standards, the system can perform global coordination and local optimization like an experienced operator, forming a seamless collaborative relationship with the operator to obtain optimized repainting execution commands through human-machine collaboration.

[0114] Through the collaborative efforts of the aforementioned components, four industrial cameras arranged in a ring achieve 360° image acquisition without blind spots, effectively solving the blind spot problem inherent in traditional single-view acquisition. A hardware-level synchronous triggering mechanism ensures temporal consistency of multi-view images, improving the integrity and accuracy of information about irregular toy surfaces. The toy tracking network, designed with a Siamese architecture, integrates contour enhancement and temporal correlation modules, enabling precise identification of complex surface textures and irregular shape features of toys. The network learns the toy's motion patterns to achieve motion prediction, effectively improving tracking stability and pose calculation accuracy in dynamic environments. Dynamic map encoding technology based on real-time pose data enables refined management of spraying parameters, uniformly encoding and updating multi-dimensional information such as the toy's surface geometry, material properties, and spraying requirements in real time. The distributed collaborative architecture of the tracking controller and the spraying controller achieves specialized task division: the tracking controller focuses on high-speed image processing and pose calculation, while the spraying controller focuses on path planning and motion control. This architecture effectively solves the problem of insufficient computing power of traditional single controllers and the problem that traditional fixed parameters cannot adapt to different materials and surface characteristics. It improves the stability of spraying quality and the consistency of product surface treatment, thereby improving production efficiency and product qualification rate, and reducing quality costs.

[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing system embodiments, and will not be repeated here.

[0116] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the system described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0117] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image recognition based irregular toy automated spray painting control system, characterized in that, include: The acquisition module is used to acquire the first image of the irregularly shaped toy on the conveyor belt; The pose recognition module is used to input the first image into the toy tracking network for pose recognition and obtain real-time pose data. The surface mesh encoding module is used to perform surface mesh encoding on the irregular toy based on the real-time pose data to obtain map encoding data. The surface mesh encoding module further includes: a surface point cloud projection unit, used to calculate a coordinate transformation matrix based on the real-time pose data, and project the toy surface point cloud onto a local coordinate system with the centroid of the irregular toy as the origin, to obtain toy surface point cloud data; a mesh discretization processing unit, used to perform mesh discretization processing on the toy surface point cloud data to obtain multiple mesh cells, and calculate the spatial position coordinates of each mesh cell to obtain a set of toy surface mesh cells; and a multidimensional feature encoding unit, used to perform multidimensional feature encoding on each mesh cell in the toy surface mesh cell set to obtain an initial map encoding matrix; the multidimensional feature encoding unit is specifically used to: based on the toy surface mesh... The gradient changes of adjacent grid points in the grid cell set are used to calculate the normal vectors, resulting in three-dimensional normal vector data. The optimal spraying angle value for each grid cell is calculated based on the spatial relationship between the three-dimensional normal vector data and the vertical direction. Spectral reflectance and surface roughness are measured on the grid cell set on the toy surface to obtain material coding values ​​and spraying layer values. The three-dimensional normal vector data, the optimal spraying angle value, the material coding value, the spraying layer value, and preset occlusion marker values ​​and mass weight values ​​are sequentially combined to obtain an initial map coding matrix. A dynamic update unit is used to dynamically update the initial map coding matrix based on the real-time pose data to obtain map coding data synchronized with the movement of the irregular toy. A spraying path planning module is used to transmit the real-time pose data to the tracking controller and the map encoding data to the spraying controller, and to perform spraying path planning through the tracking controller and the spraying controller to obtain the spraying trajectory. The spraying path planning module further includes: a transmission unit for transmitting the real-time pose data to the tracking controller and the map encoding data to the spraying controller; a tracking control unit for receiving the real-time pose data and calculating the tracking confidence and pose change, triggering a re-initialization mechanism when the tracking confidence is lower than a preset threshold, and obtaining a tracking quality assessment result; and a spraying area filtering unit for filtering sprayable areas from the map encoding data of the spraying controller based on the tracking quality assessment result, and creating a basic spraying path based on the sprayable areas. Specifically, the spraying area filtering unit is used to: based on the tracking quality assessment result... The process involves: determining the spraying task status; filtering the occlusion marker values ​​in the map coding data based on the spraying task execution status to obtain sprayable areas; optimizing and sorting the sprayable areas according to their spatial location to obtain an optimized spraying point sequence; selecting the starting point, turning point, and ending point in the optimized spraying point sequence as path control nodes; calculating the velocity and acceleration boundary conditions at each path control node to obtain a path planning control node set; inputting the path planning control node set into a fifth-order polynomial interpolation algorithm; calculating the polynomial coefficients by solving a system of sixth-order linear equations; and generating a basic spraying path between adjacent path control nodes; and a spraying parameter adjustment unit, used to adjust the spraying parameters based on the material coding value to obtain the adjusted parameters, and combining the adjusted parameters with the path coordinates in the basic spraying path to obtain the spraying trajectory.

2. The image recognition based irregular toy automated spray painting control system of claim 1, wherein, The acquisition module is specifically used for: Four industrial cameras arranged in a ring simultaneously trigger and capture images of irregular toys on a conveyor belt, obtaining original images from multiple perspectives. Distortion correction is performed on the original multi-view images to obtain corrected images; The corrected image is subjected to histogram equalization to obtain a standard image, and the standard image is subjected to Gaussian filtering to obtain a first image.

3. The image recognition based irregular toy automated spray painting control system of claim 1, wherein, The pose recognition module further includes: The feature extraction unit is used to input the first image into the feature extraction backbone network of the toy tracking network for feature extraction to obtain the backbone feature vector; An edge feature enhancement processing unit is used to input the backbone feature vector into the toy contour enhancement module of the toy tracking network for edge feature enhancement processing to obtain a contour feature vector. The pose decoding unit is used to input the contour feature vector into the temporal correlation module of the toy tracking network to calculate the motion trajectory, obtain the temporal feature vector, and perform pose decoding on the temporal feature vector to obtain real-time pose data.

4. The automated spraying control system for irregular toys based on image recognition according to claim 3, characterized in that, The edge feature enhancement processing unit is specifically used for: The backbone feature vector is input into the edge-aware convolution kernel of the toy contour enhancement module for convolution calculation to obtain edge response features; The edge response features are subjected to activation function calculation to obtain edge enhancement features, and spatial attention weights are calculated based on the edge enhancement features to obtain a spatial attention weight matrix. The spatial attention weight matrix and the edge enhancement features are multiplied element-wise to obtain the contour feature vector.

5. The automated spraying control system for irregular toys based on image recognition according to claim 1, characterized in that, The image recognition-based automated painting control system for irregular toys also includes: The surface coating module is used to calculate the joint angles of the six-axis robot based on the coating trajectory and drive the actuator to control the coating pressure and flow parameters to complete the surface coating, and to acquire a second image after the coating is completed; The difference calculation module is used to perform difference calculation between the second image and the first image to obtain a difference image, and to perform morphological opening operation and connected component labeling on the difference image to obtain defect region data; The update module is used to update the map coding data according to the types of missed spraying areas and overspraying areas identified in the defect area data, so as to obtain updated map coding data. The generation module is used to generate a spray control command based on the defect area location information in the updated map coding data.

6. The image recognition based irregular toy automated spray painting control system of claim 5, wherein, The surface coating module is specifically used for: The spraying trajectory is input into the inverse kinematics solver to calculate the joint angles of the six-axis robot, and the spraying parameter instructions are calculated based on the corresponding material code values. The robot motion control is performed based on the joint angles of the six-axis robot to obtain the robot end-effector pose; The spraying actuator is controlled to perform surface spraying according to the spraying parameter instructions. The spraying pressure regulating valve, flow control valve and spray gun distance adjusting mechanism are adjusted synchronously to form a uniform coating on the toy surface according to the spraying trajectory, so as to obtain the completed sprayed toy surface. The surface of the toy after the coating has been applied is captured to obtain a second image.