Rfid multi-tag detection method for computer vision-based industrial pipeline
By using computer vision methods and an improved YOLO-SSN detection model, the problems of missed detection, false detection, and positioning deviation in RFID tag detection in industrial production lines have been solved, achieving high-precision and stable detection in complex scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WENZHOU UNIV
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies for RFID tag detection in industrial production lines suffer from missed detections, false detections, and positioning errors. Especially under complex conditions such as high-speed transmission, changing lighting, and dense tag arrangement, traditional models struggle to extract global contextual information and spatial relationships between adjacent tags, and the training data coverage is incomplete, affecting the model's generalization ability and bounding box regression stability.
Using computer vision methods, we collect pipeline scene data, perform hierarchical segmentation and cross-combination, use the Swin Transformer backbone network to extract hierarchical feature maps, and perform multi-scale feature fusion through a path aggregation network. We introduce the Shape-NWD metric strategy and hybrid loss function to construct an improved YOLO-SSN detection model, thereby enhancing the model's detection capability in complex scenes.
It improves the model's ability to represent complex dynamic working conditions, enhances the feature extraction capability in small target and multi-label dense scenes, reduces the error of detection results, and improves detection accuracy and stability.
Smart Images

Figure CN122454150A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual perception technology for industrial production lines, and more particularly to a computer vision-based RFID multi-tag detection method for industrial production lines. Background Technology
[0002] Currently, RFID tag visual inspection in industrial production lines typically uses industrial cameras to capture images and traditional YOLO-like target detection models to locate and identify the tags. While this method can perform bounding box regression and category prediction in normal scenarios, it is prone to losing tag edge information in high-speed transmission, lighting changes, dense tag arrangement, and motion blur conditions. Ordinary convolutional backbone networks are insufficient in extracting global context information and spatial relationships between adjacent tags, leading to missed detections, false detections, and positioning errors in multi-tag detection.
[0003] Meanwhile, existing detection models typically use randomly partitioned sample data and IoU-type bounding box regression loss for training. The random partitioning method makes it difficult to ensure that the training, validation, and test data cover different production line scenarios, affecting the model's generalization ability under complex working conditions. IoU-type loss relies on the geometric overlap between the predicted bounding box and the true bounding box, and is more sensitive to slight positional shifts in RFID small target or ambiguous boundary scenarios, resulting in unstable bounding box regression and making it difficult to meet the needs of accurate detection of multiple RFID tags in dynamic industrial production line scenarios. Summary of the Invention
[0004] One objective of this invention is to propose a computer vision-based method for detecting multiple RFID tags on industrial production lines. This invention employs computer vision detection technology to achieve accurate identification of multiple RFID tags on industrial production lines, and has the advantages of strong adaptability, stable positioning, and accurate detection.
[0005] The RFID multi-tag detection method for industrial production lines based on computer vision according to embodiments of the present invention includes: Collect RFID multi-tag image data in dynamic scenes of industrial production lines and obtain corresponding production line scene status data; Sample images are generated based on RFID multi-tag image data, and the RFID tags in the sample images are labeled to obtain labeled sample data; Based on the pipeline scenario status data, the labeled sample data is divided into layers and cross-combined. The labeled sample data after layer division and cross-combination is extracted to form training data, validation data and test data. The sample images in the training data are divided into blocks to generate an image block sequence, and the image block sequence is input into the Swing Transformer backbone network to extract hierarchical feature maps. The channel dimension of the hierarchical feature map is adjusted to form feature layers of different scales, and the feature layers of different scales are fused through a path aggregation network to generate multi-scale fused features. Based on the multi-scale fusion features, predictive bounding boxes are generated and the information of the predicted bounding boxes is read. The information of the real bounding boxes associated with the sample images is read. Two-dimensional Gaussian distributions are constructed based on the information of the predicted bounding boxes and the information of the real bounding boxes, respectively. The Shape-NWD metric strategy is introduced to calculate the Shape-NWD distribution metric value. Based on the Shape-NWD distribution metric, a Shape-NWD hybrid loss function is constructed. Based on the constructed Shape-NWD hybrid loss function, the final improved YOLO-SSN detection model is obtained using training and validation data. The test data is input into the final improved YOLO-SSN detection model, and the final RFID multi-tag detection results are output.
[0006] Optionally, the acquisition of the pipeline scene status data includes the following specific steps: Collect RFID multi-tag image data in dynamic scenarios of industrial production lines; Obtain the corresponding pipeline scene status data.
[0007] Optionally, the acquisition of the labeled sample data includes the following specific steps: Generate sample images based on RFID multi-tag image data; The RFID tags in the sample images are labeled to obtain labeled sample data.
[0008] Optionally, the formation of the training data, validation data, and test data includes the following specific steps: Based on the status data of the pipeline scenario, the labeled sample data is divided into layers and cross-combined to form multiple combined subsets; Labeled sample data are extracted from multiple subsets to form training data, validation data, and test data.
[0009] Optionally, the extraction of the hierarchical feature map includes the following specific steps: Read sample images from the training data, perform Patch Partition processing on the sample images, and generate multiple image patches; Linear mapping is performed on image patches to generate a sequence of image patches; The image patch sequence is input into the Swing Transformer backbone network to extract hierarchical feature maps.
[0010] Optionally, the generation of the multi-scale fusion features includes the following specific steps: Feature layers are selected from the hierarchical feature maps to obtain shallow feature maps, middle feature maps, and deep feature maps; The channel dimensions of the shallow, middle, and deep feature maps are adjusted to form a first-scale feature layer, a second-scale feature layer, and a third-scale feature layer. The third-scale feature layer is upsampled and then concatenated and fused with the second-scale feature layer to generate a first upsampled fused feature. The first upsampled fused feature is then upsampled and then concatenated and fused with the first-scale feature layer to generate a second upsampled fused feature. The second upsampled fused feature is then downsampled and then concatenated and fused with the first upsampled fused feature to generate a first downsampled fused feature. The first downsampled fused feature is then downsampled and then concatenated and fused with the third-scale feature layer to generate a second downsampled fused feature. Multi-scale fusion features are formed based on the second upsampling fusion feature, the first downsampling fusion feature, and the second downsampling fusion feature.
[0011] Optionally, the calculation of the Shape-NWD distribution metric includes the following specific steps: The detection head is input with multi-scale fusion features, and the bounding box regression of the RFID tag is performed by the detection head to generate a predicted bounding box. Read the ground bounding box information associated with the sample image to obtain the ground bounding box corresponding to the predicted bounding box; Extract the center point coordinates, width, and height of the predicted bounding box and the ground bounding box respectively; A predicted two-dimensional Gaussian distribution is constructed based on the predicted bounding boxes, and a real two-dimensional Gaussian distribution is constructed based on the real bounding boxes; Calculate the Wasserstein distance based on the predicted two-dimensional Gaussian distribution and the actual two-dimensional Gaussian distribution; The shape constraint is calculated based on the aspect ratios of the predicted bounding box and the actual bounding box. The Wasserstein distance and shape constraint are weighted and fused to generate the Shape-NWD distance, which is then normalized to obtain the Shape-NWD distribution metric.
[0012] Optionally, the final improved YOLO-SSN detection model is obtained by the following specific steps: Construct an initial detection network and set up a normalization layer and an activation layer; Set the initial training parameters for the detection network and perform data augmentation on the sample images in the training data; The enhanced training data is input into the initial detection network for forward propagation, and the predicted bounding boxes are output by the detection head through the path aggregation network. Calculate the geometric regression loss based on the predicted bounding box and the true bounding box; The Shape-NWD loss is calculated based on the Shape-NWD distribution metric, and the geometric regression loss and the Shape-NWD loss are fused to obtain the mixed regression loss. Backpropagation is performed on the initial detection network based on the total loss function to update the network parameters; The updated initial detection network was validated using validation data, and the loss balance coefficient and training parameters were adjusted based on the validation results to obtain the final improved YOLO-SSN detection model.
[0013] Optionally, the output of the final RFID multi-tag detection result includes the following specific steps: The test data is input into the final improved YOLO-SSN detection model to obtain candidate detection results; The candidate detection results are filtered by confidence and repeated bounding box suppression to obtain the filtered detection results; The final RFID multi-tag detection result is determined based on the screening and detection results, and the final RFID multi-tag detection result is output.
[0014] The beneficial effects of this invention are: The present invention provides a computer vision-based RFID multi-tag detection method for industrial production lines. By collecting RFID multi-tag image data and corresponding production line scene status data in dynamic industrial production line scenarios, and performing hierarchical division and cross-combination of labeled sample data based on the production line scene status data, the model samples can cover detection scenarios under different conveyor speeds, different lighting conditions, and different tag arrangement densities. This improves the ability of sample data to represent complex dynamic working conditions of industrial production lines. At the same time, by dividing the sample images in the training data into blocks to generate image block sequences, and inputting them into the Swing Transformer backbone network to extract hierarchical feature maps, the model can obtain local edge information and global context information of RFID tags, enhancing the model's feature extraction capabilities under motion blur, dense arrangement, and complex background conditions.
[0015] Meanwhile, this invention also improves the scale adaptability of RFID small targets and dense multi-tag scenarios by adjusting the channel dimension of the hierarchical feature map and using a path aggregation network to fuse features of different scales to generate multi-scale fusion features. By constructing two-dimensional Gaussian distributions based on predicted bounding box information and real bounding box information respectively, and introducing a Shape-NWD metric strategy to calculate the Shape-NWD distribution metric value, and then constructing a Shape-NWD hybrid loss function based on the Shape-NWD distribution metric value, the final improved YOLO-SSN detection model is obtained using training data and validation data. This enhances the model's ability to constrain differences in center point distance, width and height scale differences, and aspect ratio shape differences, and reduces the impact of slight offset of small targets and blurred boundaries on the detection results. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of the RFID multi-tag detection method for industrial production lines based on computer vision proposed in this invention. Figure 2 This is a schematic diagram of the training process of the improved YOLO-SSN detection model for the computer vision-based RFID multi-tag detection method for industrial production lines proposed in this invention. Figure 3 This diagram illustrates the calculation of the Shape-NWD distribution metric and the construction of the hybrid loss function in the computer vision-based RFID multi-tag detection method for industrial production lines proposed in this invention. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0018] refer to Figures 1-3 A computer vision-based RFID multi-tag detection method for industrial production lines includes: Collect RFID multi-tag image data in dynamic scenes of industrial production lines and obtain corresponding production line scene status data; Sample images are generated based on RFID multi-tag image data, and the RFID tags in the sample images are labeled to obtain labeled sample data; Based on the pipeline scenario status data, the labeled sample data is divided into layers and cross-combined. The labeled sample data after layer division and cross-combination is extracted to form training data, validation data and test data. The sample images in the training data are divided into blocks to generate an image block sequence, and the image block sequence is input into the Swing Transformer backbone network to extract hierarchical feature maps. The channel dimension of the hierarchical feature map is adjusted to form feature layers of different scales, and the feature layers of different scales are fused through a path aggregation network to generate multi-scale fused features. Based on the multi-scale fusion features, predictive bounding boxes are generated and the information of the predicted bounding boxes is read. The information of the real bounding boxes associated with the sample images is read. Two-dimensional Gaussian distributions are constructed based on the information of the predicted bounding boxes and the information of the real bounding boxes, respectively. The Shape-NWD metric strategy is introduced to calculate the Shape-NWD distribution metric value. Based on the Shape-NWD distribution metric, a Shape-NWD hybrid loss function is constructed. Based on the constructed Shape-NWD hybrid loss function, the final improved YOLO-SSN detection model is obtained using training and validation data. The test data is input into the final improved YOLO-SSN detection model, and the final RFID multi-tag detection results are output.
[0019] In this embodiment, the acquisition of pipeline scene status data includes the following specific steps: Collect RFID multi-tag image data in dynamic scenes of industrial production lines. The RFID multi-tag image data includes RFID multi-tag images with different transmission speeds, different lighting conditions, different arrangement densities, and those with motion blur. Obtain the corresponding pipeline scene status data, which includes conveyor speed data, lighting status data, and tag arrangement density data. The conveyor speed data includes the conveyor belt running speed and the speed change per unit time. The lighting status data includes the image brightness value, brightness change amplitude, and local reflection intensity. The tag arrangement density data includes the number of RFID tags in a unit image area, the center point spacing between adjacent RFID tags, and the overlap ratio of the bounding boxes between adjacent RFID tags.
[0020] In this embodiment, the acquisition of labeled sample data includes the following specific steps: Generate sample images based on RFID multi-tag image data; The RFID tags in the sample images are labeled to obtain labeled sample data. The labeling types include category labeling and bounding box labeling. The labeled sample data includes the sample image and the corresponding tag category information and true bounding box information.
[0021] In this embodiment, the formation of training data, validation data, and test data includes the following specific steps: Based on the status data of the pipeline scenario, the labeled sample data is divided into layers and cross-combined to form multiple combined subsets; Labeled sample data is extracted from multiple subsets to form training data, validation data, and test data, avoiding the occurrence of a complex scenario in only a single dataset. The extraction ratio is 7:2:1, with training data accounting for 70%, validation data accounting for 20%, and test data accounting for 10%.
[0022] In this embodiment, the extraction of hierarchical feature maps includes the following specific steps: Read sample images from the training data, perform Patch Partition processing on the sample images, and generate multiple image patches; Linear mapping is performed on image patches to generate a sequence of image patches; The image patch sequence is input into the Swin Transformer backbone network to extract hierarchical feature maps. During the feature map extraction stage, window-based multi-head self-attention processing and moving window-based multi-head self-attention processing are performed alternately. Window-based multi-head self-attention processing is used to calculate the attention relationship between image patches within a fixed window. The calculation formula is as follows: ; ; ; ; ; in, To query the linear transformation weights corresponding to the matrix, The linear transformation weights corresponding to the key matrix. The linear transformation weights corresponding to the value matrix. For input features, For querying the matrix, The key matrix, For value matrices, Scaling factor For relative position encoding, This represents the computation of a single attention head. For normalization function, This is the transpose of the key matrix. This is the result of window-based multi-head self-attention processing. The outputs of multiple attention heads are concatenated. For the output of multiple attention heads, Indicates the output mapping weights; Multi-head self-attention processing based on moving windows achieves cross-window information interaction through a cyclic shift mechanism. The calculation formula is as follows: ; ; in, The input features are after cyclic shifting. For the first Layer input features, This is a cyclic shift operation. This is the result of window-based multi-head self-attention processing. The result is a multi-head self-attention processing based on a moving window. This is a reverse shift operation; Extracting hierarchical feature maps first involves performing window-based multi-head self-attention processing within a fixed window. The core formula is: ; in, For the first Layer input features, For layer normalization processing, These are the window attention features after fixed-window self-attention processing. The result is a window-based multi-head self-attention processing method. The core formula for multilayer perceptron feature transformation based on window attention features is: ; in, It is a multilayer perceptron. These are the local encoded features after window feature transformation. These are the window attention features after fixed-window self-attention processing. For layer normalization processing; The core formula for performing multi-head self-attention processing based on a moving window approach on local encoded features is: ; in, Presentation layer normalization processing, For local coding features, This represents the cross-window attention features after self-attention processing by the moving window. The result is a multi-head self-attention processing based on a moving window. Multilayer perceptron feature transformation is performed on the cross-window attention features to obtain cross-window encoded features. This process is repeated in different feature extraction stages of the backbone network to obtain encoded features at multiple stages. These features are then converted into feature maps to generate hierarchical feature maps.
[0023] In this embodiment, the generation of multi-scale fusion features includes the following specific steps: Feature layers are selected from the hierarchical feature maps to obtain shallow feature maps, middle feature maps, and deep feature maps. The shallow feature map contains the local edge information and spatial location details of the RFID tag, the middle feature map contains the local shape information and regional association information of the RFID tag, and the deep feature map contains the semantic information and global context information of the RFID tag. The channel dimensions of the shallow, middle, and deep feature maps are adjusted to form a first-scale feature layer, a second-scale feature layer, and a third-scale feature layer. The third-scale feature layer is upsampled and then concatenated and fused with the second-scale feature layer to generate a first upsampled fused feature. The first upsampled fused feature is then upsampled and then concatenated and fused with the first-scale feature layer to generate a second upsampled fused feature. The second upsampled fused feature is then downsampled and then concatenated and fused with the first upsampled fused feature to generate a first downsampled fused feature. The first downsampled fused feature is then downsampled and then concatenated and fused with the third-scale feature layer to generate a second downsampled fused feature. Multi-scale fusion features are formed based on the second upsampling fusion feature, the first downsampling fusion feature, and the second downsampling fusion feature.
[0024] In this embodiment, the calculation of the Shape-NWD distribution metric includes the following specific steps: The detection head is input based on multi-scale fusion features. The detection head performs bounding box regression on the RFID tag to generate a predicted bounding box. The detection head is used to output the predicted bounding box, the tag category prediction result, and the category confidence. Read the ground bounding box information associated with the sample image to obtain the ground bounding box corresponding to the predicted bounding box; Extract the center point coordinates, width, and height of the predicted bounding box and the ground bounding box respectively; A predicted two-dimensional Gaussian distribution is constructed based on the predicted bounding box, and a real two-dimensional Gaussian distribution is constructed based on the real bounding box. The center point coordinates of the predicted bounding box and the real bounding box are used to determine the mean vector of the two-dimensional Gaussian distribution, and the width and height of the predicted bounding box and the real bounding box are used to determine the covariance matrix of the two-dimensional Gaussian distribution. The Wasserstein distance is calculated based on the predicted and actual two-dimensional Gaussian distributions. The core formula is as follows: ; in, To predict a two-dimensional Gaussian distribution, It is a true two-dimensional Gaussian distribution. To predict the second-order Wasserstein distance between a two-dimensional Gaussian distribution and the true two-dimensional Gaussian distribution, To predict the mean vector of a two-dimensional Gaussian distribution, Let be the mean vector of a true two-dimensional Gaussian distribution. To predict the difference in center point distance between the bounding box and the true bounding box, To predict the square root of the covariance matrix of a two-dimensional Gaussian distribution, The square root of the covariance matrix of the true two-dimensional Gaussian distribution. To predict the difference in width and height between the bounding box and the true bounding box, It is a 2-norm. It is the Frobenius norm; The shape constraint is calculated based on the aspect ratios of the predicted and actual bounding boxes. The core formula is: ; in, To predict the width of the bounding box, To predict the height of the bounding box, The width of the actual bounding box. The height of the actual bounding box. This represents the aspect ratio shape difference between the predicted bounding box and the true bounding box. The Wasserstein distance and shape constraint are weighted and fused to generate the Shape-NWD distance, which is then normalized to obtain the Shape-NWD distribution metric. The core formula is as follows: ; ; in, Indicates the shape constraint weight. The Shape-NWD distance, To predict a two-dimensional Gaussian distribution, It is a true two-dimensional Gaussian distribution. To predict the Wasserstein distance between a two-dimensional Gaussian distribution and the true two-dimensional Gaussian distribution, This is the aspect ratio shape constraint. To predict the normalized distribution similarity between a two-dimensional Gaussian distribution and the true two-dimensional Gaussian distribution, It is an exponential function. This represents the normalization constant related to the target size of the RFID tag.
[0025] In this embodiment, the final improved YOLO-SSN detection model is obtained through the following specific steps: An initial detection network is constructed, and a normalization layer and an activation layer are set. The initial detection network includes a SwingTransformer backbone network, a path aggregation network, and a detection head. Set the initial training parameters for the detection network and perform data augmentation on the sample images in the training data. The training parameters include batch size, initial learning rate, maximum number of training epochs, weight decay coefficient, momentum parameter, loss balance coefficient, and learning rate adjustment strategy parameters. The enhanced training data is input into the initial detection network for forward propagation, and the predicted bounding boxes are output by the detection head through the path aggregation network. The geometric regression loss is calculated based on the predicted and actual bounding boxes. The formula for calculating the geometric regression loss is as follows: ; in, For geometric regression loss, To predict the bounding box, For the true bounding box, To predict the Euclidean distance between the center point of the bounding box and the center point of the true bounding box, To predict the diagonal length of the minimum bounding rectangle between the bounding box and the true bounding box, To predict the intersection-union ratio (IU / U) between the bounding box and the ground truth bounding box, The adjustment weight for the difference term, This is the aspect ratio difference term; The Shape-NWD loss is calculated based on the Shape-NWD distribution metric. The geometric regression loss and the Shape-NWD loss are then fused to obtain the mixed regression loss. The formula for calculating the Shape-NWD loss is as follows: ; The formula for calculating the mixed regression loss is: ; in, For Shape-NWD loss, To predict a two-dimensional Gaussian distribution, It is a true two-dimensional Gaussian distribution. for, For mixed regression loss, For geometric regression loss, The loss balance coefficient is determined based on validation data; The total loss function is calculated by combining the mixed regression loss, classification loss, and distribution focus loss. The formula for the total loss function is as follows: ; in, For the total loss function, For mixed regression loss, Predict the classification loss for each label category. The distribution focus loss is used for regression of the bounding box distribution; Backpropagation is performed on the initial detection network based on the total loss function to update the network parameters; The updated initial detection network was validated using validation data, and the loss balance coefficient and training parameters were adjusted based on the validation results to obtain the final improved YOLO-SSN detection model. The improved YOLO-SSN detection model features a multi-tag visual detection structure for dynamic scenarios in industrial production lines. Unlike existing technologies, this model introduces a SwinTransformer backbone network based on a moving window self-attention mechanism on top of the YOLO detection framework. It fuses feature layers of different scales through a path aggregation network, enhancing the multi-scale representation capability of densely packed, small-sized RFID tags. Furthermore, it introduces a Shape-NWD hybrid loss function, modeling the predicted and ground bounding boxes as two-dimensional Gaussian distributions. It constrains the training of the predicted bounding boxes by combining differences in center point distance, width and height scales, and aspect ratios. The improved YOLO-SSN detection model can improve the stability of small target bounding box localization, the ability to distinguish dense tags, and the accuracy of dynamic scene detection for RFID multi-tag images under conditions of high-speed transport, changing lighting, dense tag arrangement, and motion blur.
[0026] In this embodiment, the final output of the RFID multi-tag detection result includes the following specific steps: The test data is input into the final improved YOLO-SSN detection model to obtain candidate detection results; The candidate detection results are filtered by confidence and repeated bounding box suppression to obtain the filtered detection results; The final RFID multi-tag detection result is determined based on the screening and detection results, and the final RFID multi-tag detection result is output. The final RFID multi-tag detection result includes the RFID tag category information, location coordinates and category confidence level.
[0027] Example 1: To verify the feasibility of this invention in practice, it was applied to an RFID multi-tag detection system for an industrial production line. This production line is mainly used for the sorting, packaging, and transportation of multiple items in automated production. During operation, RFID tags are attached to the items to identify information such as item type, specifications, and quantity. Each item may have multiple RFID tags. Under conditions of high-speed movement, complex lighting, and dense tag arrangement, traditional target detection methods often cannot accurately locate and classify each RFID tag, leading to frequent missed detections and false detections, thus affecting the efficiency and accuracy of the production line.
[0028] In this production line application scenario, we employ the RFID multi-tag detection method of this invention. First, RFID tag image data of the dynamic scene on the production line is acquired using an industrial camera, and corresponding production line scene status data is simultaneously obtained, including the conveyor belt speed, lighting conditions, and tag density. This image data not only contains overall information about the items but also clearly captures the details of the RFID tags. Compared to traditional methods that rely solely on simple image acquisition, this invention incorporates production line scene status data, hierarchically dividing and cross-combining the acquired image data to form a more comprehensive training dataset. After this scene data-driven sample partitioning, the training data can cover various detection scenarios with different speeds, lighting conditions, and densities.
[0029] Next, based on the collected RFID multi-tag image data, sample images are generated, and each RFID tag is precisely labeled. The labeling includes the tag category and corresponding bounding box information. The final labeled sample data contains the image, tag category information, and actual bounding box information. In this process, the labeled sample data, using the method of this invention, can more accurately reflect the distribution characteristics of tags in dynamically changing pipeline scenarios compared to traditional labeling methods, especially addressing complex lighting changes and tag overlap issues. Subsequently, by hierarchically dividing and cross-combining the labeled sample data with the pipeline scene state data, the diversity of the training data was further enhanced. This operation ensured that the training, validation, and test data could cover various situations under different operating conditions of the pipeline, thereby improving the detection model's generalization ability to unknown scenarios. During model training, the Swin Transformer was used as the backbone network, which can extract fine-grained local features in the image through a self-attention mechanism while preserving global contextual information. This process is particularly important in RFID tag detection because the spatial relationship and relative position between tags are important factors affecting the detection results. Traditional convolutional neural networks often struggle to maintain good performance in small target detection and complex backgrounds, while the Swin Transformer, through window attention and cross-window information interaction, can effectively solve these problems and significantly improve the recognition accuracy of tag boundaries in dense multi-tag scenes.
[0030] Furthermore, this invention fuses feature layers of different scales through a path aggregation network, enabling the model to identify and locate RFID tags at multiple scales. Since the size and shape of RFID tags vary significantly across different scenarios, using features at a single scale can lead to performance degradation in detecting tags of certain sizes. By fusing shallow, medium, and deep feature information, the path aggregation network ensures that tags of different scales can be effectively detected.
[0031] After training, the model was tested using different test datasets, covering RFID tag scenarios with varying speeds, lighting conditions, and tag densities. During testing, it was observed that the improved YOLO-SSN detection model could consistently output accurate tag location and category information under conditions of high-speed transmission, complex lighting, and dense tag arrangement. By calculating the Shape-NWD distribution metric and optimizing the Shape-NWD hybrid loss function, the detection results were significantly improved. Traditional object detection methods often exhibit large errors in such scenarios, while the model of this invention, by introducing the Shape-NWD metric strategy, makes the bounding box regression smoother and more stable, effectively avoiding the instability problem in small object detection.
[0032] To record the beneficial effects of the present invention, the performance of the traditional method and the method of the present invention in RFID multi-tag detection on an industrial production line was compared in the same scenario. The recorded content includes average detection accuracy, false negative rate, false positive rate, and positioning stability index.
[0033] Table 1 Comparison of RFID multi-tag detection results using different methods
[0034] As shown in Table 1, the method of this invention exhibits significant advantages over traditional methods in RFID multi-tag detection on industrial production lines. First, the detection accuracy increases from 85% to 95% compared to traditional methods, indicating that the method of this invention can more accurately detect RFID tags under complex scenarios such as varying speeds, changes in lighting, and dense tag arrangement. Second, the false negative rate decreases from 12% to 4% compared to traditional methods, while the false positive rate also decreases from 8% to 2%, demonstrating that the method of this invention effectively reduces the occurrence of false negatives and improves detection reliability. Most importantly, the method of this invention also achieves a significant improvement in positioning stability, increasing from 70% to 90% compared to traditional methods. This means that even in high-speed transmission and dynamically changing environments, both detection accuracy and stability are greatly enhanced.
[0035] The performance improvement is primarily due to the fact that this invention incorporates pipeline scenario state data for hierarchical partitioning and cross-combination during the data preprocessing stage, ensuring that the training data covers different operating conditions. The Swin Transformer backbone network effectively extracts local details and global information through a window attention mechanism, while the path aggregation network integrates multi-scale features to improve the detection capability for labels of different sizes. Simultaneously, the improvements to bounding box regression through the Shape-NWD distribution metric strategy and the Shape-NWD hybrid loss function further enhance the stability and accuracy of small target detection.
[0036] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A computer vision-based RFID multi-tag detection method for industrial production lines, characterized in that, include: Collect RFID multi-tag image data in dynamic scenes of industrial production lines and obtain corresponding production line scene status data; Sample images are generated based on RFID multi-tag image data, and the RFID tags in the sample images are labeled to obtain labeled sample data; Based on the pipeline scenario status data, the labeled sample data is divided into layers and cross-combined. The labeled sample data after layer division and cross-combination is extracted to form training data, validation data and test data. The sample images in the training data are divided into blocks to generate an image block sequence, and the image block sequence is input into the SwinTransformer backbone network to extract hierarchical feature maps. The channel dimension of the hierarchical feature map is adjusted to form feature layers of different scales, and the feature layers of different scales are fused through a path aggregation network to generate multi-scale fused features. Based on the multi-scale fusion features, predictive bounding boxes are generated and the information of the predicted bounding boxes is read. The information of the real bounding boxes associated with the sample images is read. Two-dimensional Gaussian distributions are constructed based on the information of the predicted bounding boxes and the information of the real bounding boxes, respectively. The Shape-NWD metric strategy is introduced to calculate the Shape-NWD distribution metric value. Based on the Shape-NWD distribution metric, a Shape-NWD hybrid loss function is constructed. Based on the constructed Shape-NWD hybrid loss function, the final improved YOLO-SSN detection model is obtained using training and validation data. The test data is input into the final improved YOLO-SSN detection model, and the final RFID multi-tag detection results are output.
2. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The acquisition of the pipeline scene status data includes the following specific steps: Collect RFID multi-tag image data in dynamic scenarios of industrial production lines; Obtain the corresponding pipeline scene status data.
3. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The acquisition of the labeled sample data includes the following specific steps: Generate sample images based on RFID multi-tag image data; The RFID tags in the sample images are labeled to obtain labeled sample data.
4. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The formation of the training data, validation data, and test data includes the following specific steps: Based on the status data of the pipeline scenario, the labeled sample data is divided into layers and cross-combined to form multiple combined subsets; Labeled sample data are extracted from multiple subsets to form training data, validation data, and test data.
5. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The extraction of the hierarchical feature map includes the following specific steps: Read sample images from the training data, perform Patch Partition processing on the sample images, and generate multiple image patches; Linear mapping is performed on image patches to generate a sequence of image patches; The image patch sequence is input into the Swing Transformer backbone network to extract hierarchical feature maps.
6. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The generation of the multi-scale fusion features includes the following specific steps: Feature layers are selected from the hierarchical feature maps to obtain shallow feature maps, middle feature maps, and deep feature maps; The channel dimensions of the shallow, middle, and deep feature maps are adjusted to form a first-scale feature layer, a second-scale feature layer, and a third-scale feature layer. The third-scale feature layer is upsampled and then concatenated and fused with the second-scale feature layer to generate a first upsampled fused feature. The first upsampled fused feature is then upsampled and then concatenated and fused with the first-scale feature layer to generate a second upsampled fused feature. The second upsampled fused feature is then downsampled and then concatenated and fused with the first upsampled fused feature to generate a first downsampled fused feature. The first downsampled fused feature is then downsampled and then concatenated and fused with the third-scale feature layer to generate a second downsampled fused feature. Multi-scale fusion features are formed based on the second upsampling fusion feature, the first downsampling fusion feature, and the second downsampling fusion feature.
7. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The calculation of the Shape-NWD distribution metric includes the following specific steps: The detection head is input with multi-scale fusion features, and the bounding box regression of the RFID tag is performed by the detection head to generate a predicted bounding box. Read the ground bounding box information associated with the sample image to obtain the ground bounding box corresponding to the predicted bounding box; Extract the center point coordinates, width, and height of the predicted bounding box and the ground bounding box respectively; A predicted two-dimensional Gaussian distribution is constructed based on the predicted bounding boxes, and a real two-dimensional Gaussian distribution is constructed based on the real bounding boxes; Calculate the Wasserstein distance based on the predicted two-dimensional Gaussian distribution and the actual two-dimensional Gaussian distribution; The shape constraint is calculated based on the aspect ratios of the predicted bounding box and the actual bounding box. The Wasserstein distance and shape constraint are weighted and fused to generate the Shape-NWD distance, which is then normalized to obtain the Shape-NWD distribution metric.
8. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The final improved YOLO-SSN detection model is obtained through the following specific steps: Construct an initial detection network and set up a normalization layer and an activation layer; Set the initial training parameters for the detection network and perform data augmentation on the sample images in the training data; The enhanced training data is input into the initial detection network for forward propagation, and the predicted bounding boxes are output by the detection head through the path aggregation network. Calculate the geometric regression loss based on the predicted bounding box and the true bounding box; The Shape-NWD loss is calculated based on the Shape-NWD distribution metric, and the geometric regression loss and the Shape-NWD loss are fused to obtain the mixed regression loss. Backpropagation is performed on the initial detection network based on the total loss function to update the network parameters; The updated initial detection network was validated using validation data, and the loss balance coefficient and training parameters were adjusted based on the validation results to obtain the final improved YOLO-SSN detection model.
9. The RFID multi-tag detection method for industrial production lines based on computer vision according to claim 1, characterized in that, The output of the final RFID multi-tag detection result includes the following specific steps: The test data is input into the final improved YOLO-SSN detection model to obtain candidate detection results; The candidate detection results are filtered by confidence and repeated bounding box suppression to obtain the filtered detection results; The final RFID multi-tag detection result is determined based on the screening and detection results, and the final RFID multi-tag detection result is output.