Robot injection and dyeing positioning deviation detection method based on deep learning technology

By using an improved CLOTHES-YOLO network to accurately identify and segment garment outlines, the problem of garment placement deviation in robotic dyeing systems is solved, improving dyeing accuracy and production stability. This technology is suitable for quality control in automated dyeing production lines.

CN120894618APending Publication Date: 2025-11-04JIANGSU HUAYI GARMENT CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510997725.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-19
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

In existing technologies, robotic dyeing systems lack effective visual recognition and precise positioning capabilities when faced with deviations between the actual placement of garments and the sample template, leading to dyeing deviations and finished product quality issues, especially making it difficult to guarantee consistency and stability in mass production.

Method used

An improved CLOTHES-YOLO instance segmentation network is adopted, combined with a lightweight and precision-enhanced YOLOv11 network structure. Through a high-resolution perception module and attention mechanism, it can accurately identify and segment clothing outlines, and compare the deviation with a preset sample template to provide adjustment schemes to improve positioning accuracy.

Benefits of technology

It improves the accuracy and stability of the robotic dyeing system, reduces dyeing deviations caused by garment placement errors, and ensures consistency in mass production and real-time automation control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894618A_ABST
    Figure CN120894618A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of textile quality detection, in particular to a robot injection and dyeing positioning deviation detection method based on a deep learning technology, and the method comprises the steps: manually setting a detection system deviation threshold value; constructing a CLOTHES-YOLO neural network based on YOLOv11, preparing a corresponding data set, and training and optimizing the model in combination with the training data set; collecting pictures of the arranged clothes, and inputting the collected pictures into a neural network to extract a contour mask of each piece of clothes; performing image post-processing operation by using an Opencv visual processing algorithm; comparing the processing result of the area and the central point of each piece of clothes with a proofing template; and judging whether the detection is qualified according to a comparison result. If the detection result is unqualified, an unqualified signal is fed back to the PLC, and the system gives an adjustment scheme according to a comparison result. According to the method, the positioning precision of clothes placement in the injection and dyeing process of the robot can be effectively improved, the injection and dyeing deviation caused by placement errors is reduced, and the consistency and stability of batch production are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of textile quality detection, and particularly relates to a robot injection dyeing positioning deviation detection method based on deep learning technology. BACKGROUND

[0002] With the continuous advancement of non-material cultural heritage protection work, traditional crafts such as tie-dyeing and injection dyeing are gradually introduced into modern automated manufacturing processes to improve production efficiency and achieve standardized output. In the process of modern injection dyeing technology transforming into intelligent manufacturing, robot automatic injection dyeing systems are widely used to improve efficiency and consistency, especially when batch production of dyed clothes with complex patterns is required, their advantages are particularly significant. Under this background, image recognition and detection technology based on computer vision has become a key link connecting traditional crafts and modern intelligent manufacturing.

[0003] Once there is a significant difference between the actual placement of the clothes and the sample template, even if the robot performs injection dyeing according to the established path, the injection dyeing area will not match the target contour, resulting in dye injection deviation, which seriously affects the quality of the finished product, and even causes the whole piece of clothes to be scrapped. Especially when batch injection dyeing production is carried out, such deviations will be systematically magnified, causing process confusion, yield reduction, increased labor repair costs and a series of problems. Therefore, how to quickly and accurately detect the deviation between the actual placement of the clothes and the template before injection dyeing is performed, and whether the injection dyeing condition is met or adjusted, becomes a key link for the stable and high-quality operation of the robot injection dyeing system.

[0004] In recent years, with the wide application of deep learning technology in the field of computer vision, neural network-based image recognition methods have made significant breakthroughs in target detection and instance segmentation tasks. Compared with traditional image processing algorithms, deep learning models show stronger robustness and generalization ability in processing non-rigid targets, complex backgrounds and multi-scale textures, and are particularly suitable for the recognition and segmentation of flexible materials such as cloth. Therefore, introducing deep learning methods into the robot injection dyeing system for accurate recognition of the outline of the clothes and its placement position has become a feasible technical path to improve the accuracy of injection dyeing positioning.

[0005] In the prior art, CN117726622B proposes to collect the image of the dyed cloth through the camera, and adjust the temperature and concentration of the dyeing liquid based on the chrominance difference between the image and the preset pattern, so as to realize dynamic control of the dyeing quality. Although this scheme can improve the dyeing uniformity to a certain extent, the image analysis still mainly relies on edge detection and chrominance difference evaluation, and the recognition ability of cloth deformation and placement deviation is limited. CN115710787B proposes to realize automatic dyeing and nozzle clogging self-cleaning mechanism of clothes through the cooperation of the robot system and the nozzle anti-clogging structure, and improves the consistency and reliability of dyeing. However, this scheme focuses more on the mechanical structure and dyeing process control, and lacks the visual recognition and accurate positioning ability of the clothes position deviation and complex profile, which limits the automatic application level of the system in complex actual scenes. The present application realizes the detection of robot dyeing positioning by combining deep learning technology, which can effectively solve the problems of irregular clothes placement and inaccurate dyeing positioning, so as to realize higher precision automatic tie-dyeing control. SUMMARY

[0006] The purpose of the present application is to solve the problems existing in the prior art, and a robot dyeing positioning deviation detection method based on deep learning technology is proposed. Through the lightweight and precision enhancement improvement of the YOLOv11 network structure, a CLOTHES-YOLO instance segmentation network suitable for the clothes detection scene in industrial field is constructed, and the key geometric information is extracted combined with the visual processing algorithm, so as to realize the automatic comparison, recognition and feedback of the deviation between the actual placement state of the clothes and the proofing template, so as to improve the precision, efficiency and stability of the robot dyeing system.

[0007] In order to achieve the above purpose, the present application adopts the following technical scheme:

[0008] A robot dyeing positioning deviation detection method based on deep learning technology, comprising the following steps:

[0009] Step 1, setting the detection threshold: manually setting the deviation threshold of the detection system;

[0010] Step 2, constructing the improved neural network model: lightweight and precision enhancement improvement of YOLOv11 network, then constructing the complete model structure CLOTHES-YOLO, and preparing the corresponding training set to train the network;

[0011] Step 3, image acquisition and recognition: through industrial camera or high-resolution image acquisition device, image acquisition is carried out on the clothes placed by artificial, the acquisition image should cover the whole working area, and the outline of the clothes in the image should be complete and the illumination should be uniform, so as to facilitate the subsequent recognition processing. Then, input the acquired image into the CLOTHES-YOLO instance segmentation network model, and extract the mask outline of each clothes;

[0012] Step 4, Opencv algorithm post-processing: after the completion of the CLOTHES-YOLO model for the segmentation of the clothes instance, the extracted mask image is further analyzed using Opencv and other visual processing algorithms to extract the position and area of each garment in the image, providing basic data support for subsequent accurate comparison with the proofing template and positioning deviation calculation;

[0013] Step 5, result comparison: compare the area and center point coordinates of each garment in the current image with the standard data in the proofing template;

[0014] Step 6, detection of unqualified products: provide adjustment scheme; if one garment is detected as unqualified, an unqualified signal will be fed back to the PLC, providing a corresponding alarm signal, and the system will provide a corresponding adjustment scheme according to the comparison result;

[0015] Manually adjust and re-detect visually;

[0016] Specifically, when the system detects that the area or position deviation of a garment exceeds the preset threshold, it is determined as unqualified. The system will feed back the unqualified signal to the PLC control unit in real time through the communication interface, triggering the corresponding alarm mechanism such as audible and visual warning or information prompt to attract the attention of the operator. At the same time, the system automatically generates a quantitative adjustment scheme based on the actual area and center of gravity coordinates of the garment in the current image, including the direction and distance of the required displacement, area correction suggestions, etc., to facilitate quick and accurate manual correction;

[0017] Step 7, detection of qualified products, control release; if the position and area of all garments are within the threshold deviation range of the proofing program, a qualified signal will be fed back to the PLC to control the speed chain to run and release.

[0018] Preferably, in step 1, the deviation threshold includes an area deviation threshold and a position deviation threshold:

[0019] The area deviation threshold is used to determine the allowable deviation range between the actual detected garment area and the standard area set in the proofing template, which can be set according to the garment size type, image resolution and production accuracy requirements, usually expressed in percentage form (such as ±5%);

[0020] The position deviation threshold is used to determine the maximum allowable offset between the actual detected garment center point coordinates and the standard center point coordinates in the proofing template, which is set according to the positioning accuracy requirement, with the unit of physical distance (such as ±15mm), which can be used to automatically determine whether the garment is placed within the reasonable range of the dyeing station.

[0021] This invention, based on the YOLOv11 network structure, constructs an improved model suitable for garment contour recognition and sampling deviation comparison tasks in robotic dyeing. YOLOv11, the most widely used version in the YOLO series, maintains the high efficiency of single-stage target detection while introducing a task-adaptive multi-branch structure for the first time, supporting unified modeling of target detection and instance segmentation. The instance segmentation branch enables pixel-level mask prediction of targets in images, providing technical support for accurate garment contour extraction, region localization, and deviation analysis. However, this original structure is mainly geared towards general scenarios. For garment targets with irregular shapes, diverse placement methods, and occlusion or texture interference, the segmentation accuracy and detail preservation capabilities are still insufficient, especially under lightweight deployment requirements, where inference speed and segmentation accuracy are difficult to balance. To meet the high-quality recognition requirements of garment boundaries after placement in the automated dyeing process, this invention needs to rely on a higher-resolution, more expressive instance segmentation model to obtain clear and complete garment contour information and accurately compare it with a preset sampling template to determine whether the dyeing area meets the process specifications and to achieve subsequent deviation detection and adjustment decisions.

[0022] To address the aforementioned issues, this invention jointly improves the YOLOv11 network structure by combining lightweighting and accuracy enhancement, proposing the CLOTHES-YOLO network model. This model, by introducing a lightweight head structure and a high-resolution perception module, significantly improves the extraction accuracy of circular and deformed clothing contours while maintaining model efficiency. Furthermore, CLOTHES-YOLO integrates an attention mechanism and a multi-scale feature enhancement module in its instance segmentation branch, effectively improving the model's ability to segment clothing edges. Combined with the tie-dye clothing dataset constructed in this invention, CLOTHES-YOLO can accurately identify and segment clothing targets in complex arrangement patterns, supporting subsequent automated prototyping, comparison, and dyeing execution.

[0023] Preferably, in step 2, the improved CLOTHES-YOLO model's neural network Neck structure uses an improved SBA (Selective Boundary Aggregation) module instead of the traditional FPN+PANet structure to improve the extraction accuracy of clothing boundary contours; specifically including:

[0024] The multi-scale feature maps P3, P4 and P5 extracted from Backbone are first input into the Neck module in stages, the deepest feature map P5 is introduced into the C2PSA module to improve the perception ability of the target context information after the C3K2 module and the SPPF structure enhance the global receptive field, then the P5 is fused with the P4 feature map through the SBA module, and the fine expression of the scale feature is realized after the C3K2 module; the process continues to extend to the shallow layer, and after the P3 feature map is fused, the same structure combination processing is also carried out to strengthen the detail information of the target contour, and the fused feature Figure One As the input of the small-scale target segmentation head, the feature map is also fused with the feature Figure One The input is input into the third SBA module, and after further fusion of spatial and semantic information, the C3K2 module extracts the middle-level semantic feature as the input of the medium-scale target segmentation head, then the medium-scale feature map output by the C3K2 module is fused with the deepest feature map P5, and after the fourth SBA module is input, the C3K2 module further extracts the deep semantic representation, and finally forms the feature map for the large-scale target segmentation head, realizing high-precision segmentation and recognition of multi-scale targets.

[0025] Among them, Head: in order to improve the real-time performance and deployment efficiency of the model in the actual automatic dyeing system, the original network structure of YOLOv11 is improved to be light, and the CLOTHES-YOLO model with higher inference speed is constructed. The improvement mainly reflects in the optimization of the detection head (Head) structure, as follows:

[0026] Since instance segmentation is a further segmentation task based on detection, the improvement direction of the present application is not directly aimed at the segmentation head, but focuses on optimizing the detection head to improve the overall segmentation performance. The original detection head of YOLOv11 uses DWConv for detection, although DWConv can effectively reduce FLOPs, but it cannot be simply used to replace the conventional Conv, because it will cause serious precision decline. Therefore, the present application proposes a light Superior-Head structure, which uses partial convolution (Partial Convolution, PConv) instead of traditional depthwise separable convolution (Depthwise Separable Convolution, DWConv), so as to greatly reduce the operation redundancy and memory access pressure while maintaining the segmentation accuracy of the model, realizing the efficient deployment of the network on edge computing devices.

[0027] Preferably, the SBA module is used for interactive fusion of two input feature maps from different scales to enhance their semantic complementarity and spatial expression ability, and its internal structure includes two 1x1 convolution processing units, two attention weight generation channels, a feature interaction module and a 3x3 convolution fusion unit; wherein a pair of input feature maps from high and low levels are first compressed in channels by 1x1 convolution to obtain preliminary intermediate representations; then, the two feature maps generate adaptive weight maps through Sigmoid function to form two groups of guided gating features; on this basis, the low-level features are multiplied and added with the guided gating results generated by the high-level features after convolution, and the information from the up-sampled high-level features is fused; at the same time, the high-level features are fused with the guided enhancement information from the low-level features in the same way after convolution; finally, the two feature maps are spliced after size alignment, and a 3x3 convolution is performed to realize deep fusion output, thereby effectively enhancing the information interaction ability between features of different scales and improving the perception and expression ability of the model for complex targets.

[0028] The SBA module adopts a bidirectional fusion mechanism, realizes adaptive fusion of high-level semantic features and low-level boundary features by introducing a recalibration attention unit (RAU), thereby enhancing the expression ability of the model for clothing detail contours, avoiding boundary blur and segmentation deviation, and realizing selective enhancement of feature information by combining an adaptive attention mechanism, thereby improving the clothing contour segmentation accuracy of the model under complex background and color interference.

[0029] Preferably, in step 2, the Head structure of the improved CLOTHES-YOLO model adopts a lightweight Effective-Head structure to improve the inference speed and real-time performance of the model; the improvement of the Effective-Head structure is that the YOLOv11 segmentation head before improvement is composed of three branches, which are responsible for classification, bounding box regression and mask prediction, respectively, wherein the classification branch uses two layers of DWConv, and the bounding box and mask branches use standard convolution stacking; in the improved Effective-Head structure, the first layer convolution of the classification and bounding box branches is replaced by PConv (partial convolution) to reduce redundant calculation and FLOPs, and enhance the perception ability of the model for local details and edge features, and the mask branch structure remains unchanged. Overall, the new structure realizes lightweight deployment of the model while maintaining segmentation accuracy.

[0030] Preferably, the PConv (partial convolution) performs convolution operation on only part of the channels of the feature map, while the remaining channels are not involved in the calculation, thereby significantly reducing the amount of redundant calculation and memory access overhead on the basis of maintaining the feature representation ability, and improving the running efficiency and inference speed of the overall network.

[0031] Compared with the traditional deep separable convolution (DWConv), PConv has the following advantages:

[0032] The FLOPs is only 1 / 16 of the conventional convolution, and the memory access amount is only 1 / 4 of the conventional convolution, which significantly reduces the computing power consumption.

[0033] Compared with DWConv, PConv can reduce FLOPs while effectively preserving spatial structure information and having better feature extraction capability.

[0034] PConv reduces the memory access frequency in the high-frequency operation process, and effectively improves the performance of the model in the edge device deployment under the premise of ensuring real-time performance.

[0035] The PConv has been used to replace the DWConv in the Effective-Head structure of the application, achieving an optimal balance between lightweight and high precision, and is particularly suitable for robot dyeing task scenarios with high real-time requirements.

[0036] Preferably, in step 5, the result comparison includes the following process:

[0037] Step 5.1, extracting the geometric information corresponding to the segmentation contour of each piece of clothing in the current frame image, including the area value and the center point coordinate;

[0038] Step 5.2, one-to-one corresponding matching the actual area and center point coordinate of each piece of clothing with the standard area value and target position coordinate in the preset proofing template;

[0039] Step 5.3, calculating the area deviation value and the position deviation value of each piece of clothing, the area deviation value being the difference between the current detection area and the standard template area, and the position deviation value being the Euclidean distance between the current center point and the standard center point;

[0040] Step 5.4, judging whether each deviation value is within the preset area deviation threshold and position deviation threshold range; if any deviation exceeds the set threshold, the piece of clothing is determined to be unqualified, otherwise it is qualified.

[0041] By adopting the above technical scheme: the CLOTHES-YOLO model realizes the organic unification of lightweight structure, high-precision segmentation and real-time inference performance on the basis of maintaining the original detection and segmentation ability of YOLOv11. And efficiently matches with the preset proofing template, thereby realizing automatic detection and evaluation of the dyeing position deviation.

[0042] Compared with the prior art, the application has the following beneficial effects:

[0043] 1、The present application improves the lightweight and precision enhancement of YOLOv11 network structure, constructs a CLOTHES-YOLO instance segmentation network suitable for industrial site clothes detection scene, and extracts key geometric information combined with visual processing algorithm, realizes the automatic comparison, identification and feedback between the actual placement state of clothes and the deviation of the sample template, so as to improve the precision, efficiency and stability of the robot dyeing system.

[0044] 2、The present application can effectively improve the positioning accuracy of clothes placement in the robot dyeing process, reduce the dyeing deviation caused by placement error, and ensure the consistency and stability of batch production. At the same time, the present application has good real-time performance and scalability, and is suitable for quality control link in various automatic dyeing production lines. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 The flowchart of the present application;

[0046] Figure 2 The network structure diagram of CLOTHES-YOLO in the present application;

[0047] Figure 3 The SBA module structure diagram in the present application;

[0048] Figure 4 The Effective-Head structure diagram in the present application;

[0049] Figure 5 The detection result diagram in the present application;

[0050] Figure 6 The system adjustment scheme diagram in the present application. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings, so that the people skilled in the art can better understand the advantages and features of the present application, and the protection scope of the present application is more clearly defined. The described embodiments of the present application are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the people skilled in the art without creative labor belong to the protection scope of the present application.

[0052] As shown in Figure 1 , a robot dyeing positioning deviation detection method based on deep learning technology comprises the following steps:

[0053] (1) Detection threshold setting;

[0054] The detection system deviation threshold is set artificially, and the deviation threshold includes area deviation threshold and position deviation threshold.

[0055] The area deviation threshold is used to judge the allowable deviation range between the actual detected clothing area and the standard area set in the proofing template, and the area deviation threshold can be set according to the clothing size type, image resolution and production precision requirement, and is usually expressed in percentage form (such as ±5%);

[0056] The position deviation threshold is used to judge the maximum allowable offset between the actual detected clothing center point coordinate and the standard center point coordinate in the proofing template, and the position deviation threshold is set according to the positioning accuracy requirement, and the unit is physical distance (such as ±15mm), and the threshold can be used to automatically judge whether the clothing is placed in the reasonable range of the dyeing station;

[0057] (2) Construct an improved neural network model;

[0058] The improved model suitable for clothing contour recognition and proofing comparison task is constructed on the basis of the YOLOv11 network structure. YOLOv11, as the most widely used version of YOLO series, can realize pixel-level mask prediction of the target in the image through the instance segmentation branch, and provide a basis for subsequent accurate positioning and region analysis of the clothing. However, the original structure of YOLOv11 mainly faces general scenes, and there are still some deficiencies in the segmentation accuracy and detail retention for irregular-shaped and varied-placed clothing targets.

[0059] In order to meet the accurate recognition requirement of the clothing contour after being placed in the present application, high-quality contour boundary needs to be obtained relying on the instance segmentation technology, and the segmentation result is compared with the preset proofing template to evaluate whether the dyeing area and angle meet the process requirement. In this process, the network needs to have good recognition ability for fine-grained boundary, curved contour and occluded area, and maintain high reasoning speed to meet the real-time requirement of the automatic system. However, the existing YOLOv11 still has limited instance segmentation accuracy under complex background and texture interference, especially in the lightweight deployment scene, there are problems of decreased segmentation accuracy and insufficient model reasoning speed.

[0060] In view of the above problems, the YOLOv11 network structure is improved in lightweight and precision enhancement, and a CLOTHES-YOLO network model is proposed, and the network structure is as follows: Figure 2The model significantly improves the extraction accuracy of class circles and deformed clothing contours while maintaining the running efficiency of the model by introducing a lightweight backbone structure and a high-resolution perception module. In addition, CLOTHES-YOLO integrates attention mechanisms and multi-scale feature enhancement modules in the instance segmentation branch, effectively improving the model's segmentation ability on clothing edges. Combined with the tie-dye clothing special dataset constructed by the present application, CLOTHES-YOLO can realize accurate recognition and segmentation of clothing targets in complex placement modes, supporting subsequent automatic proofing comparison and discharge execution.

[0061] The improved CLOTHES-YOLO model adopts an improved SBA (Selective Boundary Aggregation) module to replace the traditional FPN+PANet structure in the Neck structure of the neural network, in order to improve the extraction accuracy of the clothing boundary contour; specifically including:

[0062] The multi-scale feature maps P3, P4 and P5 extracted from the Backbone are first input into the Neck module in stages. After the deepest feature map P5 is enhanced by the C3K2 module and the SPPF structure to enhance the global receptive field, the C2PSA module is introduced to improve the perception ability of the target context information. Then, it is fused with the P4 feature map through the SBA module, and after passing through the C3K2 module, the fine expression of the scale feature is realized. This process continues to extend to the shallow layer, and after the P3 feature map is fused, it is also processed by the same structure combination, which strengthens the detailed information of the target contour. The fused feature Figure One The feature map is input into the first SBA module as a small-scale target segmentation head, and on the other hand, the feature map is also input into the second SBA module as a medium-scale target segmentation head. Figure One The feature map is input into the third SBA module, and after further fusion of spatial and semantic information, the C3K2 module extracts the middle-level semantic features, which are input into the fourth SBA module as a large-scale target segmentation head. After further extraction of deep semantic representation by the C3K2 module, the feature map for the large-scale target segmentation head is finally formed, realizing high-precision segmentation and recognition of multi-scale targets.

[0063] The SBA module is used for interactive fusion of two input feature maps from different scales, enhances semantic complementarity and spatial expression ability, and the internal structure comprises two 1x1 convolution processing units, two attention weight generation channels, a feature interaction module and a 3x3 convolution fusion unit; wherein a pair of input feature maps from high and low levels are first respectively subjected to 1x1 convolution for channel compression to obtain preliminary intermediate representation; then, the two feature maps respectively generate adaptive weight maps through the Sigmoid function to form two groups of guided gate features; on this basis, the low-level feature is multiplied and added with the guided gate result generated by the high-level feature after convolution, and the information from the up-sampling of the high-level feature is fused; at the same time, the high-level feature is fused with the guided enhancement information from the low-level feature in the same way after convolution; finally, the two feature maps are spliced after size alignment, and a 3x3 convolution is performed to realize deep fusion output, thereby effectively enhancing the information interaction ability between features of different scales and improving the perception and expression ability of the model to complex targets.

[0064] The SBA module adopts a bidirectional fusion mechanism, realizes adaptive fusion of high-level semantic features and low-level boundary features by introducing a recalibration attention unit (RAU), thereby enhancing the expression ability of the model to the details and contours of clothes, avoiding boundary blur and segmentation deviation, and realizing selective strengthening of feature information by combining an adaptive attention mechanism, thereby improving the contour segmentation accuracy of the model to clothes under complex background and color interference.

[0065] The improved Neck structure of the CLOTHES-YOLO adopts an improved SBA (Selective Boundary Aggregation) module to replace the traditional FPN+PANet structure to improve the extraction accuracy of the contours of clothes, and the improved structure is as shown in Figure 3 The core idea of the SBA module is to optimize feature expression by selectively aggregating boundary information and semantic information, so that high-level features can inherit rich semantic information while fully utilizing the boundary detail information of shallow features, thereby solving the limitations of the traditional FPN structure in boundary expression. The SBA introduces a recalibration attention unit (RAU) to adaptively extract complementary information of deep and shallow features before fusion, making the boundary information clearer, while avoiding redundancy and inconsistency that may be caused by direct fusion of low-level features and high-level features. The process of the function PAU(·, ·) in the RAU can be represented as:

[0066]

[0067]

[0068] wherein , is the input feature, and is a linear mapping and sigmoid function, is point-wise multiplication, is a linear mapping and sigmoid function, The inverse operation of refining the inaccurate and rough estimates into accurate and complete prediction maps takes a convolution operation with a kernel size of 1x1 as the linear mapping process. Therefore, the SBA process can be expressed as:

[0069]

[0070] wherein is a 3x3 convolution with batch normalization and ReLU activation layer. After fusing the third and fourth layers from the encoder, the deep semantic information is contained, is the first layer with boundary details from the backbone. is a concatenation operation along the channel dimension, is the output of the SBA module.

[0071] In addition, compared with the traditional FPN structure, SBA adopts a bidirectional fusion mechanism between high-resolution and low-resolution features, ensuring that high-level features can still accurately capture the contour details of clothes while obtaining rich semantic information, effectively making up for the lack of target boundary information in FPN. At the same time, SBA combines an adaptive attention mechanism to dynamically adjust feature weights according to different resolutions and contents of feature maps, thereby enhancing the model's adaptability to clothes of different shapes, colors, and boundary complexity. This improvement enhances the ability to retain details in the target edge region, further improving segmentation accuracy, and thus more accurately extracts the geometric features of clothes, providing a reliable guarantee for the positioning deviation detection and intelligent adjustment of the robot in the dyeing process.

[0072] To improve the real-time performance and deployment efficiency of the model in the actual automatic dyeing system, the present invention makes lightweight improvements to the original network structure of YOLOv11, constructing a CLOTHES-YOLO model with higher inference speed. The improvement mainly reflects in the optimization of the head structure, as shown in Figure 4 , and described as follows:

[0073] Since instance segmentation is a further segmentation task based on detection, the improvement direction of the present application does not directly aim at the segmentation head, but focuses on optimizing the detection head to improve the overall segmentation performance. The original detection head of YOLOv11 adopts DWConv for detection, although DWConv can effectively reduce FLOPs, but it cannot be simply used to replace the conventional Conv, because it will cause serious precision decline. Therefore, the present application proposes a lightweight Effective-Head structure, which uses Partial Convolution (PConv) to replace the traditional Depthwise Separable Convolution (DWConv), the improved YOLOv11 segmentation head is composed of three branches, which are responsible for classification, bounding box regression and mask prediction respectively, among which the classification branch uses two layers of DWConv, and the bounding box and mask branches use standard convolution stacking; while in the improved Effective-Head structure, the first layer convolution of the classification and bounding box branches is replaced by PConv (partial convolution) to reduce redundant calculation and FLOPs, and enhance the model's perception ability to local details and edge features, and the mask branch structure remains unchanged. It is worth mentioning that partial convolution can more effectively extract spatial features by reducing redundant calculation and memory access at the same time, so PConv has a good balance in computational efficiency and performance compared with DWConv, thereby maintaining the segmentation accuracy of the model while greatly reducing the operation redundancy and memory access pressure, realizing the efficient deployment of the network on edge computing devices.

[0074] Through the above improvement, the CLOTHES-YOLO model realizes the organic unification of lightweight structure, high-precision segmentation and real-time inference performance on the basis of maintaining the original detection and segmentation ability of YOLOv11. And it can efficiently match the preset proofing template, so as to realize the automatic detection and evaluation of the position deviation of the dyeing position.

[0075] (3) Image acquisition and recognition;

[0076] Through an industrial camera or a high-resolution image acquisition device, the clothes placed in the dyeing area by artificial are image collected. The collected image should cover the entire working area and ensure that the outline of the clothes in the image is complete and the light is uniform, so as to facilitate subsequent recognition processing. Then, the obtained image is input into the CLOTHES-YOLO instance segmentation network model constructed by the present application, and the mask outline of each piece of clothing is extracted. The extracted mask outline will be used as a structured input to participate in subsequent geometric feature analysis and deviation calculation.

[0077] (4) Opencv algorithm post-processing;

[0078] After the segmentation of the clothes instance by the CLOTHES-YOLO model, the mask image extracted is further analyzed by using a visual processing algorithm such as OpenCV, specifically including the acquisition of key geometric information such as contour extraction and area calculation, boundary fitting, and center point positioning calculation. Thus, the spatial pose and shape features of the clothes in the image are further extracted, providing basic data support for subsequent accurate comparison with the proofing template and positioning deviation calculation.

[0079] (5) result comparison;

[0080] The area and center point coordinates of each piece of clothes in the current image are matched and compared with the standard data in the proofing template, specifically including:

[0081] The geometric information corresponding to the segmentation contour of each piece of clothes in the current frame image is extracted, including the area value and center point coordinates;

[0082] The actual area and center point coordinates of each piece of clothes extracted are matched one by one with the standard area value and target position coordinates in the preset proofing template;

[0083] The area deviation value and position deviation value of each piece of clothes are calculated, the area deviation value being the difference between the current detection area and the standard template area, and the position deviation value being the Euclidean distance between the current center point and the standard center point;

[0084] It is judged whether each deviation value is within the preset area deviation threshold and position deviation threshold range; if any deviation exceeds the set threshold, the piece of clothes is determined to be unqualified.

[0085] The visual detection results compared with the proofing template are displayed in the industrial computer, as shown in Figure 5 .

[0086] (6) detection of unqualified: provide adjustment scheme;

[0087] When the system detects that the area or position deviation of a piece of clothes exceeds the preset threshold, it is determined to be unqualified. The system will feed back the unqualified signal to the PLC control unit in real time through the communication interface, triggering the corresponding alarm mechanism such as audible and visual warning or information prompt, to attract the attention of the operator. At the same time, the system automatically generates a quantitative adjustment scheme based on the actual area and center of gravity coordinates of the clothes in the current image, including the direction and distance of the required displacement, area correction suggestions, etc., to facilitate manual quick and accurate correction, as shown in Figure 6 . Figure 6 .

[0088] (7) detection of qualified; control release

[0089] When the system completes the contour extraction of all clothes in the current frame image, the geometric feature analysis of the area and position, and matches and compares it with the standard data in the preset proofing template one by one, if the actual area deviation value and the position deviation value of all clothes are within the set threshold range, the system will determine that the current clothes state is qualified. At this time, the visual detection module will automatically feed back the "detection qualified" signal to the upper computer or PLC control system, trigger the automatic control logic, drive the speed chain conveying system to continue running, and realize the release operation of the qualified clothes station. This mechanism ensures that only the clothes meeting the process standard can enter the next dyeing or discharging process, effectively improves the stability and product consistency of the automatic production line, and meets the production management requirements of high efficiency and closed loop control.

[0090] In summary, the present application improves the lightweight and precision enhancement of the YOLOv11 network structure, constructs a CLOTHES-YOLO instance segmentation network suitable for the clothes detection scene in the industrial field, and extracts key geometric information combined with the visual processing algorithm to realize the automatic comparison, identification and feedback of the deviation between the actual clothes placement state and the proofing template, so as to improve the precision, efficiency and stability of the robot dyeing system.

[0091] The description and practice disclosed in the present application are easy to think and understand for ordinary skilled persons in the technical field, and some improvements and refinements can be made without departing from the principles of the present application. Therefore, the modifications or improvements made without departing from the spirit of the present application should also be considered as the protection scope of the present application.

Claims

1. A method for detecting robot injection and dyeing positioning deviation based on deep learning technology, characterized in that, Includes the following steps: Step 1, Detection threshold setting: Manually set the deviation threshold for the detection system; Step 2: Construct the improved neural network model: The YOLOv11 network is improved by lightweighting and accuracy enhancement. Then, the complete model structure CLOTHES-YOLO is constructed, and the corresponding training set is prepared to train the network. Step 3, Image Acquisition and Recognition: Acquire images of the manually placed clothes, input the acquired images into the CLOTHES-YOLO instance segmentation network, and extract the mask contour of each piece of clothing; Step 4, OpenCV algorithm post-processing: Use OpenCV vision processing algorithms to extract key geometric information from the segmentation mask; Step 5: Result Comparison: Compare the area and center point coordinates of each garment in the current image with the standard data in the sampling template; Step 6, Inspection Failure: Provide Adjustment Plan; If one garment fails the inspection, a failure signal is sent to the PLC, providing a corresponding alarm signal. The system then provides an appropriate adjustment plan based on the comparison results. The necessary adjustments are made manually, and then a visual inspection is performed again. Step 7: If the inspection is qualified, control the release; if the position and area of ​​all the clothes are within the threshold range of deviation from the sampling program, then the qualified signal is fed back to the PLC to control the double speed chain to run and release.

2. The robot injection and dyeing positioning deviation detection method based on deep learning technology according to claim 1, characterized in that, In step 1, the deviation thresholds include the area deviation threshold and the position deviation threshold: The area deviation threshold is used to determine the allowable deviation range between the actual detected area of ​​the clothing and the standard area set in the sampling template. The area deviation threshold can be set according to the clothing size type, image resolution and production accuracy requirements, and is expressed as a percentage. The position deviation threshold is used to determine the maximum allowable offset between the actual detected center point coordinates of the garment and the standard center point coordinates in the sample template. The position deviation threshold is set according to the positioning accuracy requirements and the unit is physical distance. This threshold can be used to automatically determine whether the garment is placed within a reasonable range of the dyeing station.

3. The robot injection and dyeing positioning deviation detection method based on deep learning technology according to claim 1, characterized in that, In step 2, the improved CLOTHES-YOLO model's neural network neck structure uses an improved SBA module instead of the traditional FPN+PANet structure to improve the accuracy of extracting clothing boundary contours; specifically including: Multi-scale feature maps P3, P4, and P5 extracted from the Backbone are first fed into the Neck module step by step. The deepest feature map P5, after being processed by the C3K2 module and SPPF structure to enhance the global receptive field, is introduced into the C2PSA module to improve the perception of target context information. It is then fused with the P4 feature map through the SBA module, and after passing through the C3K2 module again, a refined representation of scale features is achieved. This process continues to the shallower layers, where it is fused with the P3 feature map and undergoes the same structural combination processing to enhance the detailed information of the target contour. The fused feature map serves two purposes: This feature map serves as the input for the small-scale target segmentation head. On the other hand, it is also input to the third SBA module along with the feature map output from the second SBA module. After further fusing spatial and semantic information, the C3K2 module extracts mid-level semantic features, which are then used as the input for the mid-scale target segmentation head. Subsequently, the mid-scale feature map output from the C3K2 module is fused with the deepest feature map P5 and input to the fourth SBA module for deep interaction. After that, the C3K2 module further extracts deep semantic representations, ultimately forming a feature map for the large-scale target segmentation head, achieving high-precision segmentation and recognition of multi-scale targets.

4. The robot injection positioning deviation detection method based on deep learning technology according to claim 3, characterized in that, The SBA module is used to interactively fuse two input feature maps from different scales, enhancing their semantic complementarity and spatial expressiveness. Its internal structure includes two 1×1 convolutional processing units, two attention weight generation channels, a feature interaction module, and a 3×3 convolutional fusion unit. First, a pair of input feature maps from high and low levels undergo 1×1 convolution for channel compression, obtaining preliminary intermediate representations. Then, these two features are processed by the Sigmoid function to generate adaptive weight maps, forming two sets of guided gating features. Based on this, the low-level features, after convolution, are multiplied and added with the guided gating results generated from the high-level features, and information from the upsampled high-level features is fused. Simultaneously, the high-level features, after convolution, are fused with guided enhancement information from the low-level features in the same way. Finally, the two features are size-aligned and concatenated, and a 3×3 convolution is used to achieve deep fusion output, effectively enhancing the information interaction between features at different scales and improving the model's perception and expression capabilities for complex targets. The SBA module adopts a bidirectional fusion mechanism. By introducing a recalibrated attention unit (RAU), it achieves adaptive fusion of high-level semantic features and low-level boundary features, thereby enhancing the model's ability to express the detailed contours of clothing, avoiding boundary blurring and segmentation deviation. Combined with the adaptive attention mechanism, it achieves selective enhancement of feature information, thereby improving the model's accuracy in segmenting clothing contours under complex backgrounds and color interference.

5. The robot injection and dyeing positioning deviation detection method based on deep learning technology according to claim 3, characterized in that, In step 2, the improved CLOTHES-YOLO model adopts a lightweight Effective-Head structure to enhance the model's inference speed and real-time performance. The improvement of the Effective-Head structure lies in the fact that the original YOLOv11 segmentation head consists of three branches, responsible for classification, bounding box regression, and mask prediction, respectively. The classification branch uses two layers of DWConv, while the bounding box and mask branches use standard convolution stacking. In the improved Effective-Head structure, the first layer convolution of the classification and bounding box branches is replaced with PConv partial convolutions to reduce redundant computation and FLOPs, and enhance the model's ability to perceive local details and edge features. The mask branch structure remains unchanged.

6. The robot injection and dyeing positioning deviation detection method based on deep learning technology according to claim 5, characterized in that, The PConv partial convolution operates by convolving only a portion of the channels of the feature map, while reserving the remaining channels from computation.

7. The robot injection positioning deviation detection method based on deep learning technology according to claim 1, characterized in that, Step 5, the result comparison includes the following procedures: Step 5.1: Extract the geometric information corresponding to the segmentation contour of each piece of clothing in the current frame image, including the area value and the coordinates of the center point; Step 5.2: Match the actual area and center point coordinates of each garment with the standard area value and target position coordinates in the preset sampling template; Step 5.3: Calculate the area deviation value and position deviation value for each garment. The area deviation value is the difference between the current detected area and the standard template area, and the position deviation value is the Euclidean distance between the current center point and the standard center point. Step 5.4: Determine whether each deviation value is within the preset area deviation threshold and position deviation threshold range; if any deviation exceeds the set threshold, the garment is determined to be unqualified.

Citation Information

Patent Citations

  • A human-machine collaborative intelligent spraying robot

    CN115710787B