Screen cabinet label construction quality detection method and device based on real-time target monitoring

By combining YOLOv8 target detection and OCR recognition technologies, the display cabinet labels are monitored in real time, solving the problem of decreased detection accuracy in existing technologies and achieving efficient and accurate inspection of the construction quality of display cabinet labels.

CN119600586BActive Publication Date: 2025-11-28GUANGDONG POWER GRID CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411773192.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-11-28
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Existing technologies that rely on single-target detection models show a significant decrease in detection accuracy when faced with complex construction environments or images containing detailed information such as text and symbols, making it difficult to meet high-precision requirements.

Method used

A target detection model based on YOLOv8 architecture combined with an OCR recognition model is used to acquire images of the cabinet through real-time target monitoring, identify the text area of ​​the label, and perform character extraction and matching to determine whether the cabinet label meets the construction standards.

Benefits of technology

It improves the model's generalization ability and detection speed, solves the problem of insufficient ability to identify detailed information in existing technologies, and realizes efficient and accurate inspection of the construction quality of cabinet labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600586B_ABST
    Figure CN119600586B_ABST
Patent Text Reader

Abstract

The application provides a cabinet label construction quality detection method based on real-time target monitoring, a cabinet label construction quality detection device based on real-time target monitoring, a computer readable storage medium and a cabinet label automatic detection system. The method acquires a first target image by collecting a cabinet image in real time, inputs the first target image into a target detection model trained based on a YOLOv8 structure, locates a label character area to generate a second target image, then inputs the second target image into an OCR recognition model, extracts characters and obtains first target characters, and finally matches the first target characters with preset standard characters to determine whether the label meets the construction standard. The application combines the YOLOv8 target detection algorithm with the OCR character recognition technology, enhances the generalization ability, detection speed and accuracy, and solves the problem that the model relying on a single target for detection in the prior art has insufficient detail information recognition capability, resulting in reduced detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power system safety assurance, in particular to a screen cabinet label construction quality detection method based on real-time target monitoring, a screen cabinet label construction quality detection device based on real-time target monitoring, a computer readable storage medium and a screen cabinet label automatic detection system. BACKGROUND

[0002] The safe and reliable operation of the power secondary system is the key foundation for the stable operation of the entire power system, and any potential quality hidden danger may cause serious consequences. Among them, the screen cabinet wiring quality problem is one of the common and high-risk hidden dangers, such as substandard standard connector plug-in quality, terminal row wiring error or missing connection, etc., which is often the main cause of system failure or even safety accidents. Therefore, in the construction installation process, it is particularly important to detect, accept and record the wiring quality in a timely and efficient manner. This not only can quickly find and correct quality problems, but also can significantly improve construction efficiency and ensure the safe and stable operation of the power secondary system.

[0003] In recent years, with the rapid development of artificial intelligence and automation technology, the application of image recognition, mobile robots and mechanical arm redundant freedom motion control technology to screen cabinet installation quality detection has become a research hotspot. These technologies can realize real-time detection, autonomous acceptance and operation trace in the construction process, effectively find and solve quality problems, and comprehensively improve construction efficiency and wiring quality, thereby providing strong guarantee for the safe operation of the power secondary system.

[0004] However, the existing technology still has certain limitations in specific implementation. For example: CN115409816A proposes a screen cabinet image processing method based on a pre-trained pressure plate region detection model, which can locate and analyze the state of the pressure plate region. However, this method relies on image preprocessing technology and has high requirements for image quality. At the same time, the generalization ability of its detection model is limited, and its adaptability to complex construction scenes is weak. CN113221687A identifies the state of the pressure plate based on the MobilenetV3-YOLOv5s network, and realizes lightweight through optimization methods such as sparse training, channel pruning and model distillation. However, this method sacrifices certain accuracy while improving detection efficiency, especially in detail processing and complex scene adaptation. CN115909032A uses a bidirectional network and multi-layer feature fusion technology to detect screen cabinet targets with high precision, and has strong anti-interference ability. However, this method still has deficiencies in detail feature extraction, and the recognition accuracy of fine features such as text information contained in the screen cabinet is not high.

[0005] The model relying on a single target for detection in the prior art often has insufficient detail information recognition capability, especially when facing complex construction environments or images containing detail information such as text and symbols, the detection accuracy significantly decreases. This problem makes the existing method difficult to meet the high precision requirement in some practical application scenarios, affecting its effectiveness and reliability in power secondary system wiring quality detection. Overall, the existing technology still has a large improvement space in model precision, generalization performance, and adaptability to complex construction scenes. SUMMARY

[0006] The main purpose of the present application is to provide a screen cabinet label construction quality detection method based on real-time target monitoring, a screen cabinet label construction quality detection device based on real-time target monitoring, a computer readable storage medium and a screen cabinet label automatic detection system, to at least solve the problem that the model relying on a single target for detection in the prior art has insufficient detail information recognition capability, resulting in decreased detection accuracy.

[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a screen cabinet label construction quality detection method based on real-time target monitoring is provided, comprising: acquiring a first target image, the first target image being a real-time collected screen cabinet image; inputting the first target image into a target detection model to determine the region containing label text in the first target image, obtaining a second target image, the target detection model being obtained based on YOLOv8 structure training; inputting the second target image into an OCR recognition model to extract characters in the second target image, obtaining first target characters; matching the first target characters with a preset character string, and determining whether the screen cabinet label meets the construction standard according to the matching result.

[0008] Optionally, the target detection model includes a backbone network, a neck network and a head network, inputting the first target image into the target detection model to determine the region containing label text in the first target image, obtaining the second target image, comprising: controlling the backbone network to perform feature extraction on the first target image through at least different numbers of convolution layers and outputting, obtaining a first feature group; controlling the neck network to obtain a second feature group by combining the first feature group; controlling the head network to analyze the second feature group to perform bounding box detection and class information labeling, obtaining the second target image.

[0009] Optionally, the backbone network comprises an input module, a C2F module, a convolutional layer and an SPPF module, and the backbone network is controlled to perform feature extraction on the first target image through different numbers of convolutional layers and output a first feature group, comprising: performing first preprocessing on the first target image through the input module to obtain a second target image, wherein the first preprocessing comprises cropping, flipping, scaling, brightness adjustment and contrast adjustment; processing the second target image through two convolutional layers and a C2F module in sequence to obtain a candidate feature; processing the candidate feature through one convolutional layer and one C2F module in sequence to obtain a first target feature; processing the first target feature through one convolutional layer and one C2F module in sequence to obtain a second target feature; processing the second target feature through one convolutional layer, one C2F module and one SPPF module in sequence to obtain a third target feature; and determining the first target feature, the second target feature and the third target feature as the first feature group.

[0010] Optionally, the neck network comprises an Upsample module, a Concat module, a C2F module and a convolutional layer, and the neck network is controlled to combine the first feature group to obtain a second feature group, comprising: upsampling the third target feature through the Upsample module, and connecting the upsampled third target feature and the second target feature through the Concat module to obtain a fourth target feature; processing the fourth target feature through the C2F module, upsampling the processed fourth target feature through the Upsample module, and connecting the upsampled fourth target feature and the first target feature through the Concat module to obtain a fifth target feature; processing the fifth target feature through the C2F module to obtain a sixth target feature; processing the sixth target feature through the convolutional layer, connecting the processed sixth target feature through the Concat module, and processing the connected sixth target feature through the C2F module to obtain a seventh target feature; processing the seventh target feature through the convolutional layer, connecting the processed seventh target feature and the third target feature through the Concat module to obtain an eighth target feature; processing the eighth target feature through the C2F module to obtain a ninth target feature; and determining the sixth target feature, the seventh target feature and the ninth target feature as the second feature group.

[0011] Optionally, the head network comprises a convolutional layer, a two-dimensional convolutional layer, a Boxs Loss module and a Cls Loss module, and the head network is controlled to analyze the second feature group to perform bounding box detection and class information labeling to obtain the second target image, comprising: processing the sixth target feature through the convolutional layer, further processing the processed sixth target feature through the two-dimensional convolutional layer, and respectively performing loss function calculation on the further processed Boxs Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module to obtain a first loss function value and a second loss function value; processing the seventh target feature through the convolutional layer, further processing the processed seventh target feature through the two-dimensional convolutional layer, and respectively performing loss function calculation on the further processed Boxs Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module to obtain a third loss function value and a fourth loss function value; processing the eighth target feature through the convolutional layer, further processing the processed eighth target feature through the two-dimensional convolutional layer, and respectively performing loss function calculation on the further processed Boxs Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module to obtain a fifth loss function value and a sixth loss function value; performing bounding box detection based on the first loss function, the third loss function and the fifth loss function, and performing class information labeling based on the second loss function, the fourth loss function and the sixth loss function to obtain the second target image.

[0012] Optionally, the OCR recognition model comprises a plurality of CNN networks and a CNN+softmax network, and the second target image is input into the OCR recognition model to extract characters in the second target image to obtain first target characters, comprising: cropping the first target image based on the second target image to obtain a third target image; performing second preprocessing on the third target image to obtain a fourth target image, the second preprocessing comprising denoising, binarization, grayscale transformation and image enhancement; based on a first CNN network, analyzing the fourth target image through a sliding window and / or a connection component to divide the text area in the fourth target image into single or multiple characters to obtain a fifth target image; based on a second CNN network, performing key point search on the fifth target image and calculating the direction of the key points to perform SIFT feature extraction to obtain a third feature group; and classifying and recognizing the third feature group through the CNN+softmax network to obtain the first target characters.

[0013] Optionally, based on the first target character matching the preset string, and determining whether the cabinet label meets the construction standard according to the matching result, comprising: based on the first target character and the preset string accurate matching, obtaining a first matching result, the accurate matching includes one or more of string direct comparison, hash comparison and regular expression matching; determining the first target character corresponding to the first matching result as a second target character as the first target character does not match, based on the second target character and the preset string fuzzy matching, obtaining a second matching result, the fuzzy matching includes one or more of Levenshtein distance, Jaccard similarity and long string matching algorithm; in the case that any one of the first matching result and the second matching result is matching, based on the first target character and the preset string position matching, in the case of position matching, it is determined that the cabinet label meets the construction standard.

[0014] According to another aspect of the present application, a cabinet label construction quality detection device based on real-time target monitoring is provided, the device comprising: a first acquisition unit for acquiring a first target image, the first target image being a real-time collected cabinet image; a first input unit for inputting the first target image into a target detection model to determine a region containing label text in the first target image, obtaining a second target image, the target detection model being obtained based on YOLOv8 structure training; a second input unit for inputting the second target image into an OCR recognition model to extract characters in the second target image, obtaining first target characters; a first determination unit for matching the first target characters with a preset string, and determining whether the cabinet label meets the construction standard according to the matching result.

[0015] According to still another aspect of the present application, a computer readable storage medium is provided, the computer readable storage medium comprising a stored program, wherein the program controls the device where the computer readable storage medium is located to execute any one of the methods when the program is running.

[0016] According to still another aspect of the present application, a cabinet label automatic detection system is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any one of the methods.

[0017] The technical solution of the application first acquires a first target image, the first target image being a real-time collected screen cabinet image; then inputs the first target image into a target detection model to determine a region containing label text in the first target image, to obtain a second target image, the target detection model being obtained based on YOLOv8 structure training; then inputs the second target image into an OCR recognition model to extract characters in the second target image, to obtain first target characters; finally, matches the first target characters with a preset character string, and determines whether the screen cabinet label meets the construction standard according to the matching result. The application fuses the YOLOv8 target detection algorithm and the OCR character recognition technology, and combines with the upper logic judgment comparison algorithm in the prior art, improves the generalization ability, detection speed and accuracy through the YOLOv8 target detection algorithm, and solves the problem of insufficient detail information recognition ability of the model for detecting a single target in the prior art, which leads to the problem of reduced detection accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 A hardware structure block diagram of a mobile terminal for screen cabinet label construction quality detection based on real-time target monitoring according to an embodiment of the application is shown;

[0019] Figure 2 A flowchart of a screen cabinet label construction quality detection method based on real-time target monitoring according to an embodiment of the application is shown;

[0020] Figure 3 A structure block diagram of a screen cabinet label construction quality detection device based on real-time target monitoring according to an embodiment of the application is shown.

[0021] Among them, the above-mentioned drawings include the following reference signs:

[0022] 102, processor; 104, memory; 106, transmission device; 108, input and output device. DETAILED DESCRIPTION

[0023] It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other without conflict. The application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0024] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall into the protection scope of the present application.

[0025] It should be noted that the terms "first", "second", and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0026] As introduced in the background, the model relying on a single target for detection in the prior art often has insufficient ability to recognize detailed information, especially when facing complex construction environments or images containing detailed information such as text and symbols, the detection accuracy is significantly reduced. To solve the problem that the model relying on a single target for detection in the prior art has insufficient ability to recognize detailed information, resulting in reduced detection accuracy, the embodiments of the present application provide a cabinet label construction quality detection method based on real-time target monitoring, a cabinet label construction quality detection device based on real-time target monitoring, a computer readable storage medium and a cabinet label automatic detection system.

[0027] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application.

[0028] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking the case of running on a mobile terminal, Figure 1 is a hardware structure block diagram of a mobile terminal of a cabinet label construction quality detection method based on real-time target monitoring. As Figure 1 shown, the mobile terminal can include one or more Figure 1The mobile terminal can further include a transmission device 106 for communication function and an input / output device 108. Those skilled in the art can understand that, Figure 1 The structure shown is only schematic and does not limit the structure of the mobile terminal. For example, the mobile terminal can include more or less components than those shown, or have a different configuration or arrangement of the components. Figure 1 The mobile terminal can include more or less components than those shown, or have a different configuration or arrangement of the components. Figure 1 The mobile terminal can include more or less components than those shown, or have a different configuration or arrangement of the components.

[0029] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as the computer program corresponding to the device information display method in the embodiments of the present application. The processor 102 can execute various function applications and data processing by running the computer programs stored in the memory 104, i.e. implement the method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the mobile terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific examples of the network can include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.

[0030] In the embodiments, a real-time target monitoring based cabinet label construction quality detection method running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0031] Figure 2 is a flowchart of the real-time target monitoring based cabinet label construction quality detection method according to the embodiments of the present application. As Figure 2As shown, the method comprises the following steps:

[0032] Step S201, acquiring a first target image, the first target image being a real-time acquired cabinet image;

[0033] Specifically, a real-time acquisition device (such as a high-definition camera or an industrial camera) is used to acquire the first target image of the cabinet. The image includes the overall view of the cabinet and the specific label area, which can ensure the real-time and accuracy of the image, avoiding the limitations of relying on manual shooting or static images. Real-time image acquisition can quickly reflect the state of the cabinet during construction, providing stable input data for subsequent automated detection, thereby improving the timeliness and accuracy of quality inspection.

[0034] Step S202, inputting the first target image into a target detection model to determine the region containing label text in the first target image, and obtaining a second target image, the target detection model being trained based on a YOLOv8 structure;

[0035] Specifically, the acquired first target image is input into a model trained based on the YOLOv8 target detection algorithm. YOLOv8 can quickly identify the region containing label text in the image through its efficient feature extraction and target positioning capability, and crop it to form a second target image, providing accurate region information for subsequent OCR recognition. The model is trained using a large number of labeled cabinet image data through a deep learning method, thereby having strong generalization ability and being able to adapt to different sizes, shapes and positions of labels.

[0036] Further, compared with traditional detection methods, the YOLOv8 model has higher speed and accuracy. By quickly positioning the label region, it can effectively eliminate the interference of other irrelevant parts in the image, so that the subsequent processing can focus on the key information. Compared with other algorithms (such as YOLOv5s, etc.), YOLOv8 can maintain high accuracy when processing large-scale images, significantly improving the detection efficiency and accuracy of cabinet labels.

[0037] Step S203, inputting the second target image into an OCR recognition model to extract characters in the second target image, and obtaining a first target character;

[0038] Specifically, the label region (i.e. the second target image) positioned by the YOLOv8 model is input into an OCR text recognition model for character extraction and recognition. The OCR recognition model uses image preprocessing (such as denoising, binarization, etc.) and convolutional neural networks (CNN) to segment and classify characters, and finally outputs the recognized character information. The OCR recognition model will recognize each character in the label region and classify it with high precision according to the characteristics of the characters.

[0039] Further, the OCR recognition technology can efficiently extract text information from images, especially in complex construction environments, it can accurately identify text information with different fonts, sizes, shapes, and arrangements. The high-precision recognition of this technology enables fast and accurate extraction of label information, providing reliable data support for label acceptance. In addition, the OCR model is optimized to handle labels in complex backgrounds, greatly improving practicality.

[0040] In step S204, the first target character is matched with the preset string, and it is determined whether the cabinet label meets the construction standard according to the matching result.

[0041] Specifically, the character information recognized by OCR is matched with the preset label specification. The preset string contains the label rules defined in the construction standard (such as label format, text content, etc.). Through the string matching algorithm, the system can determine whether the recognized label meets the predetermined standard. If the recognition result matches the standard label content, the label is considered to meet the standard, otherwise it is marked as unqualified and an acceptance report is generated.

[0042] Further, through the string matching technology, it can accurately determine whether the label content meets the specification, avoiding the omissions or misjudgments that may occur in the manual inspection process. This process is automated and standardized, avoiding human interference and improving the efficiency and accuracy of label acceptance. In addition, the generated acceptance report can provide a basis for subsequent rectification and quality traceability, greatly improving the management level of construction quality.

[0043] Through this embodiment, a cabinet label construction quality detection method based on real-time target monitoring is provided, which can automatically complete the whole process from image acquisition, label detection to acceptance report generation. First, the cabinet image is acquired through real-time acquisition equipment to ensure the real-time and accuracy of the image data, providing reliable input for subsequent detection. Then, the YOLOv8 target detection model is used to quickly identify the label area in the image, accurately positioning the text position of the label, effectively improving the detection efficiency and accuracy. Then, the OCR technology is used to accurately recognize the label text, solving the problem of text recognition in complex environments and ensuring the high precision of character extraction. Finally, with the help of string matching algorithm and preset label specification, it is automatically verified whether the label meets the construction standard, and an acceptance report is generated to provide effective support for construction quality control. This method improves the automation level in the construction process, reduces manual intervention, significantly improves the efficiency and accuracy of quality detection, and solves the problem of insufficient detail information recognition ability of the model relying on a single target in the prior art, which leads to a decrease in detection accuracy.

[0044] The model in the application is composed of three parts: Backbone (main network), Neck (neck network) and Head (head network), which work together to achieve efficient target detection. First, Backbone is responsible for extracting features from the input image, which is the basis for subsequent target detection. In order to improve the efficiency of feature extraction, Backbone adopts a structure similar to CSPDarknet, which effectively reduces the amount of calculation and realizes high efficiency in the feature extraction process. Backbone is composed of multiple convolutional layers and C2F modules, where C2F modules replace traditional C3 modules, enhancing the flow of gradients and helping to solve the problem of gradient vanishing in deep networks. Next, the Neck part is located between the main network and the head network, responsible for fusing and enhancing features to provide more accurate feature representation for the subsequent decision-making stage. Finally, the Head part analyzes the fused features to produce the final detection results and outputs the bounding box and class information of the target. The design of this model enables YOLOv8 to maintain high precision and high efficiency of target detection under the condition of high real-time requirement.

[0045] As a possible implementation manner, the target detection model includes a main network, a neck network and a head network, and a first target image is input into the target detection model to determine a region containing a label text in the first target image, and a second target image is obtained, including:

[0046] Step S301, controlling the main network to perform feature extraction on the first target image through at least different numbers of convolutional layers and outputting to obtain a first feature group;

[0047] Specifically, the first target image is first input into the main network of the target detection model. The main network uses multiple convolutional layers for feature extraction, extracting spatial information in the image from low to high level layer by layer. The number and structure of these convolutional layers are optimized through training to better capture important features in the image, such as the outline of the label, the text region and other background information in the image. The output first feature group contains rich image features, providing basic data support for the subsequent network.

[0048] Step S302, controlling the neck network to obtain a second feature group by combining the first feature group;

[0049] Specifically, the first feature group is input to the neck network of the target detection model. The neck network is located between the backbone network and the head network, and its main task is to fuse multiple features from the backbone network. Through multi-level feature fusion modules such as FPN, PANet, etc., different scale features are integrated to enhance the expression of information at different levels. Through these fusion operations, the neck network can extract more comprehensive and global context information features, and output the second feature group. This process is crucial for handling complex backgrounds and diverse label regions.

[0050] In step S303, the head network is controlled to analyze the second feature group to perform bounding box detection and class information labeling, and obtain a second target image.

[0051] Specifically, the second feature group is input to the head network of the target detection model. The main task of the head network is to perform target positioning and classification labeling. By analyzing the second feature group, the head network predicts the bounding box of the cabinet label (i.e., the position of the label region) and labels the class information of the region (such as the type or purpose of the label). Finally, the second target image output by the head network contains the processed image, which marks the bounding box of the label and the corresponding class information.

[0052] Through the three-stage processing flow (backbone network, neck network, and head network) of the target detection model in this embodiment, efficient and accurate positioning of the cabinet label is achieved. First, the backbone network extracts important feature information from the image, laying a solid foundation for subsequent processing. Then, the neck network enhances the adaptability of the model to different scales and complex backgrounds by fusing features, ensuring accurate positioning of the label region. Finally, the head network outputs the position information and class information of the label by bounding box detection and class labeling, forming a second target image, ensuring the accuracy and comprehensiveness of the detection.

[0053] As a possible implementation manner, the backbone network includes an input module, a C2F module, a convolution layer, and an SPPF module, and the backbone network is controlled to perform feature extraction on the first target image through at least different numbers of convolution layers and output a first feature group, including:

[0054] In step S401, the first target image is preprocessed by the input module to obtain a second target image, and the first preprocessing includes cropping, flipping, scaling, brightness adjustment, and contrast adjustment.

[0055] Specifically, the first target image is first pre-processed by the input module to provide suitable input data for subsequent feature extraction. The first pre-processing includes various image processing techniques such as cropping, flipping, scaling, brightness adjustment, and contrast adjustment. The purpose of these operations is to enhance the diversity and robustness of the image, especially when the label region in the image may vary due to factors such as environmental lighting, changes in viewing angle, or image quality. Through these pre-processing operations, the generalization ability of the target detection model can be improved, making it better adapt to input images in different scenarios.

[0056] Step S402, the second target image is processed by two convolutional layers and a C2F module in turn to obtain candidate features;

[0057] Specifically, the second target image after the first pre-processing is processed by two convolutional layers and a C2F module in turn to obtain candidate features. The C2F module represents a Cascaded Convolutional Fusion module. The main role of the convolutional layer is to extract low-level feature information from the image, such as edges, textures, etc., while the C2F module is used to enhance the gradient flow of the features and improve the expression ability of the network. The purpose of this stage is to extract features with diversity from the input image to prepare for further processing.

[0058] Step S403, the candidate features are processed by a convolutional layer and a C2F module in turn to obtain first target features;

[0059] Specifically, the candidate features are further processed by a convolutional layer and a C2F module to obtain first target features. The convolutional layer continues to extract detailed information from the candidate features, while the C2F module further enhances the expression ability of these features and prepares for the next step of feature fusion.

[0060] Step S404, the first target features are processed by a convolutional layer and a C2F module in turn to obtain second target features;

[0061] Specifically, the first target features are further processed by a convolutional layer and a C2F module to obtain second target features. The purpose of this step is to further refine and optimize the feature map to ensure that the obtained features are more compact and have strong recognition ability.

[0062] Step S405, the second target features are processed by a convolutional layer, a C2F module, and a SPPF module in turn to obtain third target features;

[0063] Specifically, the second target feature is processed by a convolutional layer, a C2F module, and a SPPF module (Spatial Pyramid Pooling Fast module) to obtain a third target feature. The convolutional layer continues to extract important features, the C2F module further enhances the feature expression capability, and the SPPF module enhances the spatial context information of the feature map through multi-scale pooling, optimizing the multi-scale processing capability of the feature. The goal of this stage is to obtain a high-quality, multi-scale target feature through the combined action of different modules.

[0064] In step S406, the first target feature, the second target feature, and the third target feature are determined as the first feature group.

[0065] Specifically, the first target feature, the second target feature, and the third target feature are merged and determined as the final first feature group. This process fuses the features extracted in multiple stages to obtain a feature group with stronger comprehensiveness and larger information quantity. By fusing the features extracted in multiple stages, the first feature group obtains more comprehensive and accurate feature information. This feature group contains various image information from low-level to high-level and from local to global, providing a very rich data basis for subsequent label positioning and classification.

[0066] Through the backbone network design of the embodiment, first, the input module performs multiple preprocessing on the original image, thereby providing diversified and optimized input data for the subsequent processing stage. The combined action of the convolutional layer and the C2F module ensures the extraction of multi-level features, and at the same time, fully utilizes the connection between features at each layer to further improve the detection capability of complex targets. Through the introduction of the SPPF module, the network can process targets of different scales, enhancing the recognition capability of large-size targets. Finally, after multiple stages of deep processing and feature fusion, a first feature group containing rich details and global information is obtained. This series of steps significantly improves the target detection accuracy and efficiency of the model, especially in a variable and complex construction environment, which can accurately and efficiently complete the detection of the screen cabinet label, providing a stable and reliable feature input for subsequent OCR recognition.

[0067] As a possible implementation manner, the neck network includes an Upsample module, a Concat module, a C2F module, and a convolutional layer, and controls the neck network to obtain a second feature group by combining the first feature group, including:

[0068] In step S501, the third target feature is upsampled by the Upsample module, and the upsampled third target feature and the second target feature are connected by the Concat module to obtain a fourth target feature.

[0069] Specifically, first, the third target feature is upsampled by the Upsample module, i.e., the spatial size of the feature map is enlarged, so as to restore the high resolution of the image. Then, the third target feature after upsampling is connected with the second target feature by using the Concat module. The purpose of this operation is to fuse the feature information from different stages to enrich the feature representation and improve the expression ability of the model in the subsequent stage.

[0070] In step S502, the fourth target feature is processed by the C2F module, the processed fourth target feature is upsampled by the Upsample module, and the fourth target feature after upsampling is connected with the first target feature by the Concat module to obtain the fifth target feature.

[0071] Specifically, first, the fourth target feature is processed by the C2F module to further extract more representative high-level features. The processed fourth target feature is then upsampled by the Upsample module to restore the high resolution of the image. Subsequently, the fourth target feature after upsampling is connected with the first target feature by the Concat module to obtain the fifth target feature. The main purpose of this operation is to further fuse the feature information from different stages to enhance the multi-scale perception ability of the model.

[0072] In step S503, the fifth target feature is processed by the C2F module to obtain the sixth target feature.

[0073] Specifically, the C2F module further extracts high-level information in the fifth target feature, optimizing the details and context information in the feature map. This process helps to enhance the network's ability to recognize complex structures in the image and improves the accurate positioning and precise recognition ability of the label position.

[0074] In step S504, the sixth target feature is processed by the convolutional layer, the processed sixth target feature is connected by the Concat module, and the connected sixth target feature is processed by the C2F module to obtain the seventh target feature.

[0075] Specifically, through the joint action of the convolutional layer, the Concat module and the C2F module, the network can extract and optimize image features from multiple angles. The convolutional layer can capture features in detail, while the Concat module ensures effective fusion of multi-layer features, and the C2F module further enhances the context relationship of the features. This process improves the model's ability to process detailed information and ensures the stability and efficiency of the network in complex scenarios.

[0076] In step S505, the seventh target feature is processed by a convolutional layer, and the processed seventh target feature and the third target feature are connected by a Concat module to obtain an eighth target feature.

[0077] Specifically, through the combination of convolutional layers and Concat modules, the network can effectively extract detailed features and fuse feature information of different layers. This operation strengthens the connection between features and improves the accuracy of detection. By connecting with the third target feature, the network can integrate more comprehensive context information and enhance the model's perception ability of the target.

[0078] In step S506, the eighth target feature is processed by a C2F module to obtain a ninth target feature.

[0079] Specifically, through the processing of the C2F module, the ninth target feature is further refined and optimized. These features can effectively improve the model's recognition ability of complex targets in a multi-level processing process, especially in accurate positioning under different scales and complex backgrounds. The introduction of the C2F module enhances the expression ability of the network, so that the model can better adapt to the challenges of different scenes.

[0080] In step S507, the sixth target feature, the seventh target feature, and the ninth target feature are determined as a second feature group.

[0081] Specifically, the second feature group contains feature information extracted from multiple processing stages, and integrates feature maps of different levels, with strong multi-scale adaptability and spatial context perception ability. This feature group not only enhances the target detection performance of the network, but also improves the accurate recognition and classification ability of the label region. This feature group is the basis for target detection and subsequent OCR recognition, laying a solid foundation for the accuracy and efficiency of subsequent steps.

[0082] Through the neck network design of the present embodiment, first, through the joint operation of the Upsample module and the Concat module, the network can realize the fusion and enhancement of multi-scale features, improving the resolution and detail capture ability of the image. Subsequently, the introduction of multiple C2F modules ensures the depth optimization of feature information and the improvement of expression ability, so that the network can better handle complex target recognition tasks. The combination and optimization of convolutional layers, Concat modules, and C2F modules not only enhance the diversity of features, but also effectively improve the model's perception ability of targets of different levels and scales. Through these steps, the final second feature group integrates rich multi-dimensional features, which can provide accurate support for subsequent target detection and OCR recognition, ensuring the efficiency and accuracy of the entire cabinet label detection method.

[0083] As a possible implementation manner, the head network comprises a convolutional layer, a two-dimensional convolutional layer, a Boxs Loss module and a Cls Loss module, and the head network is controlled to analyze the second feature group to perform boundary box detection and class information labeling, to obtain a second target image, comprising:

[0084] In step S601, the sixth target feature is processed by the convolutional layer, and the processed sixth target feature is further processed by the two-dimensional convolutional layer, and the further processed Boxs Loss module and Cls Loss module are loss function calculated by the Boxs Loss module and the Cls Loss module respectively, to obtain a first loss function value and a second loss function value;

[0085] Specifically, the sixth target feature is first processed by the convolutional layer to extract deeper feature information. Then, the processed sixth target feature is further processed by the two-dimensional convolutional layer to obtain more refined spatial features. The processed features are respectively loss function calculated by the Boxs Loss module and the Cls Loss module, to obtain a first loss function value and a second loss function value respectively. The Boxs Loss module is used to calculate the prediction error of the boundary box, and the Cls Loss module is used to calculate the error of the class prediction.

[0086] In step S602, the seventh target feature is processed by the convolutional layer, and the processed seventh target feature is further processed by the two-dimensional convolutional layer, and the further processed Boxs Loss module and Cls Loss module are loss function calculated by the Boxs Loss module and the Cls Loss module respectively, to obtain a third loss function value and a fourth loss function value;

[0087] Specifically, by using the convolutional layer and the two-dimensional convolutional layer jointly, the network can extract more rich spatial and contextual features. The calculation of the loss function not only improves the accuracy of the boundary box detection, but also enhances the ability of target classification, ensuring that the seventh target feature performs more outstandingly in the detection and classification tasks, and providing more accurate feature information for the subsequent steps.

[0088] In step S603, the eighth target feature is processed by the convolutional layer, and the processed eighth target feature is further processed by the two-dimensional convolutional layer, and the further processed Boxs Loss module and Cls Loss module are loss function calculated by the Boxs Loss module and the Cls Loss module respectively, to obtain a fifth loss function value and a sixth loss function value;

[0089] Specifically, through the processing of the convolution layer and the two-dimensional convolution layer, the eighth target feature is further optimized, which can more accurately reflect the position and category of the target in the image. The joint use of the Boxs Loss and Cls Loss modules ensures the accurate prediction of the bounding box and the target category, thereby improving the accuracy of the detection result. This process enhances the target detection capability of the model in complex scenes and ensures higher recognition and classification performance.

[0090] In step S604, the bounding box detection is performed based on the first loss function, the third loss function and the fifth loss function, and the category information labeling is performed based on the second loss function, the fourth loss function and the sixth loss function, to obtain a second target image.

[0091] Specifically, by comprehensively calculating multiple loss functions, the network can achieve accurate optimization in bounding box detection and target classification. The optimization of the bounding box improves the accuracy of the target position, and the optimization of the category information labeling enhances the accuracy of the classification. This process ensures accurate recognition and positioning of the model to the label through weight adjustment of the joint loss function, significantly improving the comprehensive performance of target detection.

[0092] In this embodiment, by introducing various technical means such as convolution layer, two-dimensional convolution layer, Boxs Loss module and Cls Loss module, the second feature group is analyzed and optimized to ensure high efficiency in the target detection task. The joint use of the convolution layer and the two-dimensional convolution layer can not only extract more detailed and deep image features, but also improve the spatial representation ability of the features. In the loss function calculation process, the Boxs Loss module focuses on the positioning accuracy of the target, and the Cls Loss module ensures the accuracy of the classification result. Through the combination of multiple loss functions, the model can simultaneously optimize the accuracy of the bounding box and the recognition ability of the category at different levels, thereby improving the overall detection and classification effect.

[0093] As a possible implementation manner, the OCR recognition model includes multiple CNN networks and a CNN+softmax network, and the second target image is input into the OCR recognition model to extract characters in the second target image, to obtain first target characters, including:

[0094] In step S701, the first target image is cropped based on the second target image to obtain a third target image.

[0095] Specifically, the cropping operation can effectively reduce the size of the input image, remove redundant information, thereby speeding up the subsequent processing speed and improving the accuracy of the text recognition. By concentrating on processing the region containing the label text, the OCR model can focus more on character extraction, reduce external interference, and improve the overall recognition effect.

[0096] Step S702, performing second preprocessing on the third target image to obtain a fourth target image, the second preprocessing including denoising, binarization, grayscale transformation, and image enhancement;

[0097] Specifically, the third target image is subjected to second preprocessing, including denoising, binarization, grayscale transformation, and image enhancement operations. Denoising processing helps to remove random noise in the image and improve the clarity of the image; binarization converts the image into a form with stronger black and white contrast, which helps to separate the text area; grayscale transformation makes the brightness of the image more uniform; and image enhancement techniques such as brightness and contrast adjustment can make the characters more prominent, facilitating subsequent processing.

[0098] Step S703, performing sliding window and / or connected component analysis on the fourth target image based on the first CNN network to segment the text area in the fourth target image into single or multiple characters, and obtaining a fifth target image;

[0099] Specifically, the first CNN network is used to perform sliding window analysis or connected component analysis on the fourth target image subjected to second preprocessing. The sliding window technique can detect local areas in the image by continuously sliding the window, thereby identifying and segmenting the text area therein. Connected component analysis can help identify the coherence between characters, segment the text area, and obtain single or multiple characters, ultimately generating the fifth target image.

[0100] Step S704, performing key point search on the fifth target image based on the second CNN network and calculating the direction of the key points to perform SIFT feature extraction, and obtaining a third feature group;

[0101] Specifically, the second CNN network performs key point search on the fifth target image and calculates the direction of the key points to perform SIFT (Scale-Invariant Feature Transform) feature extraction. The SIFT algorithm can extract stable key points in the image and describe them, helping to improve the matching and recognition accuracy of characters. Through the direction information of the key points, SIFT can effectively deal with rotation, scale changes, and noise effects in the image.

[0102] Step S705, classifying and recognizing the third feature group through a CNN+softmax network to obtain a first target character.

[0103] Specifically, the third feature group obtained through SIFT feature extraction is input into the CNN+Softmax network for classification and recognition. The CNN network performs in-depth analysis on the feature group to identify the character information in the image. The Softmax layer classifies each character according to the output probability value of the network, thereby determining the most likely character category.

[0104] This embodiment realizes the process of accurately extracting characters from target images through the combination of multiple CNN networks and CNN+Softmax networks. Through cropping and preprocessing techniques, the image quality is significantly improved, providing high-quality input data for subsequent character recognition. The sliding window and connection component analysis techniques effectively segment the text area, ensuring that each character can be accurately extracted. The SIFT feature extraction technique further enhances the stability and robustness of the image, enabling the OCR model to adapt to complex and changing environments. Finally, the joint use of CNN+Softmax networks realizes efficient and accurate character classification, significantly improving the accuracy and speed of OCR recognition.

[0105] As a possible implementation, based on the matching of the first target character and the preset string, and determining whether the cabinet label meets the construction standard according to the matching result, comprising:

[0106] Step S801, based on the accurate matching of the first target character and the preset string, the first matching result is obtained, and the accurate matching includes one or more of string direct comparison, hash comparison and regular expression matching;

[0107] Specifically, the first target character obtained based on the OCR recognition model is accurately matched with the preset string. The accurate matching method includes one or more of string direct comparison, hash comparison and regular expression matching. The string direct comparison is to compare the characters one by one, the hash comparison is to quickly match the hash value of the characters, and the regular expression matching is to match the string through the preset rule.

[0108] Step S802, the first target string corresponding to the first matching result is determined as the second target string, and the second matching result is obtained based on the fuzzy matching of the second target string and the preset string, and the fuzzy matching includes one or more of Levenshtein distance, Jaccard similarity and long string matching algorithm;

[0109] Specifically, if the first matching result does not pass the accurate matching, i.e. the string direct comparison is not successfully matched, the first target string is determined as the second target string, and the fuzzy matching is performed based on the second target string and the preset string. The fuzzy matching method includes one or more of Levenshtein distance (edit distance), Jaccard similarity and long string matching algorithm. The Levenshtein distance measures the minimum edit distance between two strings, the Jaccard similarity measures the similarity of the strings by calculating the intersection and union of the character sets, and the long string matching algorithm optimizes the matching of long text.

[0110] In step S803, in a case where any one of the first matching result and the second matching result is a matching pass, position matching is performed between the first target string and the preset string, and in a case where the position matching is a pass, it is determined that the cabinet label meets the construction standard.

[0111] Specifically, in a case where any one of the first matching result and the second matching result is a pass, matching is performed based on the position information of the first target string and the preset string. Specifically, the position of the label is compared to ensure that the label is within the specified area. If the position matching is a pass, that is, the position and content of the label meet the construction standard, it is determined that the cabinet label meets the construction standard.

[0112] The embodiment can cope with various situations in the label recognition process by combining precise matching and fuzzy matching, and ensure efficient and flexible verification of whether the cabinet label meets the construction standard. Through precise matching of direct string comparison, hash comparison and regular expression matching, complete matching verification can be quickly performed. If there is an incomplete match, further fault-tolerant judgment is performed through fuzzy matching algorithms such as Levenshtein distance and Jaccard similarity, which improves the fault-tolerant capability of the system. Finally, through position matching, it is ensured that the label is in the correct position and meets the construction specification. The scheme enhances the adaptability and stability of the system in complex construction scenes, improves the precision and reliability of the cabinet label construction quality detection, and can efficiently complete the construction acceptance and quality monitoring, ensuring the safe and stable operation of the power secondary system.

[0113] The embodiment of the application also provides a cabinet label construction quality detection device based on real-time target monitoring. It should be noted that the cabinet label construction quality detection device based on real-time target monitoring provided in the embodiment of the application can be used to execute the cabinet label construction quality detection method based on real-time target monitoring provided in the embodiment of the application. The device is used to realize the above-mentioned embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiments is preferably realized in software, hardware or a combination of software and hardware is also possible and is conceived.

[0114] The cabinet label construction quality detection device based on real-time target monitoring provided in the embodiment of the application is described below.

[0115] Figure 3 is a structural block diagram of the cabinet label construction quality detection device based on real-time target monitoring according to the embodiment of the application. As Figure 3 shown, the device includes a first acquisition unit 10, a first input unit 20, a second input unit 30, and a first determination unit 40.

[0116] The first acquisition unit 10 is configured to acquire a first target image, wherein the first target image is a real-time collected cabinet image.

[0117] Specifically, the first target image of the cabinet is acquired by using a real-time acquisition device (such as a high-definition camera or an industrial camera). The image includes an overall view of the cabinet and a specific label area, which can ensure the real-time and accuracy of the image and avoid the limitations of relying on manual shooting or static images.

[0118] The first input unit 20 is configured to input the first target image into a target detection model to determine a region containing label text in the first target image, and obtain a second target image, wherein the target detection model is trained based on a YOLOv8 structure.

[0119] Specifically, the acquired first target image is input into a model trained based on a YOLOv8 target detection algorithm. YOLOv8 can quickly identify the region containing label text in the image through its efficient feature extraction and target positioning capability, and crop the region to form a second target image, which provides accurate region information for subsequent OCR recognition. The model is trained by a large number of labeled cabinet image data through a deep learning method, thereby having strong generalization ability and being able to adapt to different sizes, shapes and positions of labels.

[0120] The second input unit 30 is configured to input the second target image into an OCR recognition model to extract characters in the second target image, and obtain first target characters.

[0121] Specifically, the label region (i.e., the second target image) positioned by the YOLOv8 model is input into an OCR text recognition model for character extraction and recognition. The OCR recognition model performs image preprocessing (such as denoising and binarization), uses a convolutional neural network (CNN) to segment and classify characters, and finally outputs the recognized character information. The OCR recognition model identifies each character in the label region and classifies the characters with high precision according to their features.

[0122] The first determination unit 40 is configured to match the first target characters with preset strings, and determine whether the cabinet label meets the construction standard according to a matching result.

[0123] Specifically, the character information recognized by the OCR is matched with preset label specifications. The preset strings include label rules (such as label format and text content) defined in the construction standard. Through a string matching algorithm, the system can determine whether the recognized label meets the predetermined standard. If the recognition result matches the standard label content, the label is considered to meet the standard, otherwise it is marked as unqualified and an acceptance report is generated.

[0124] The embodiment provides a device for detecting construction quality of cabinet labels based on real-time target monitoring, which comprises a first acquisition unit, a first input unit, a second input unit and a first determination unit. The first acquisition unit is configured to acquire a first target image, which is a real-time collected cabinet image; the first input unit is configured to input the first target image into a target detection model to determine a region containing label text in the first target image and obtain a second target image, wherein the target detection model is obtained based on YOLOv8 structure training; the second input unit is configured to input the second target image into an OCR recognition model to extract characters in the second target image and obtain first target characters; and the first determination unit is configured to match the first target characters with preset strings and determine whether the cabinet label meets the construction standard according to the matching result. The application combines the YOLOv8 target detection algorithm with the OCR character recognition technology, and combines the upper logic judgment comparison algorithm in the prior art, which significantly improves the detection accuracy. Through the YOLOv8 model, the generalization ability, detection speed and accuracy of target detection are improved, thereby solving the deficiency of a single target detection model in detail information recognition in the traditional technology and avoiding the problem of reduced detection accuracy caused by information omission or error. This technology fusion not only enhances the accurate recognition ability of the cabinet label, but also effectively improves the reliability of the construction quality detection.

[0125] As a possible implementation manner, the target detection model comprises a backbone network, a neck network and a head network, and the first input unit comprises a first control module, a second control module and a third control module.

[0126] The first control module is configured to control the backbone network to perform feature extraction on the first target image through at least different numbers of convolution layers and output to obtain a first feature group;

[0127] The second control module is configured to control the neck network to obtain a second feature group by combining the first feature group;

[0128] The third control module is configured to control the head network to perform bounding box detection and class information labeling by analyzing the second feature group to obtain the second target image.

[0129] Through the three-stage processing flow (the backbone network, the neck network and the head network) of the target detection model in the embodiment, efficient and accurate positioning of the cabinet label is realized. First, the backbone network extracts important feature information in the image, laying a solid foundation for subsequent processing. Then, the neck network enhances the adaptability of the model to different scales and complex backgrounds by fusing features, ensuring accurate positioning of the label region. Finally, the head network outputs the position information and class information of the label by bounding box detection and class labeling to form the second target image, ensuring the accuracy and comprehensiveness of the detection.

[0130] As a possible implementation manner, the backbone network comprises an input module, a C2F module, a convolutional layer and an SPPF module, and the first control module comprises a first processing submodule, a second processing submodule, a third processing submodule, a fourth processing submodule, a fifth processing submodule and a confirmation submodule.

[0131] The first processing submodule is configured to perform first preprocessing on the first target image through the input module to obtain a second target image, and the first preprocessing comprises cropping, flipping, scaling, brightness adjustment and contrast adjustment.

[0132] The second processing submodule is configured to sequentially process the second target image through two convolutional layers and a C2F module to obtain a candidate feature.

[0133] The third processing submodule is configured to sequentially process the candidate feature through a convolutional layer and a C2F module to obtain a first target feature.

[0134] The fourth processing submodule is configured to sequentially process the first target feature through a convolutional layer and a C2F module to obtain a second target feature.

[0135] The fifth processing submodule is configured to sequentially process the second target feature through a convolutional layer, a C2F module and an SPPF module to obtain a third target feature.

[0136] The confirmation submodule is configured to determine the first target feature, the second target feature and the third target feature as a first feature group.

[0137] Through the backbone network design of the embodiment, first, the input module performs multiple preprocessing on the original image, thereby providing diversified and optimized input data for the subsequent processing stage. The linkage of the convolutional layer and the C2F module ensures the extraction of multi-level features, and at the same time, fully utilizes the connection between the features of each layer in the processing process, further improving the detection ability of complex targets. Through the introduction of the SPPF module, the network can process targets of different scales, enhancing the recognition ability of large-size targets. Finally, through multiple stages of deep processing and feature fusion, a first feature group containing rich details and global information is obtained. This series of steps significantly improves the target detection accuracy and efficiency of the model, especially in the variable and complex construction environment, which can accurately and efficiently complete the detection of screen cabinet labels, providing stable and reliable feature input for subsequent OCR recognition.

[0138] As a possible implementation manner, the neck network comprises an Upsample module, a Concat module, a C2F module and a convolutional layer, and the second control module comprises: a first feature processing submodule, a second feature processing submodule, a third feature processing submodule, a fourth feature processing submodule, a fifth feature processing submodule, a sixth feature processing submodule and a feature group confirmation submodule.

[0139] The first feature processing submodule is configured to: perform up-sampling on the third target feature through the Upsample module, and perform connection operation on the up-sampled third target feature and the second target feature through the Concat module to obtain a fourth target feature.

[0140] The second feature processing submodule is configured to: perform processing on the fourth target feature through the C2F module, perform up-sampling on the processed fourth target feature through the Upsample module, and perform connection operation on the up-sampled fourth target feature and the first target feature through the Concat module to obtain a fifth target feature.

[0141] The third feature processing submodule is configured to: perform processing on the fifth target feature through the C2F module to obtain a sixth target feature.

[0142] The fourth feature processing submodule is configured to: perform processing on the sixth target feature through the convolutional layer, perform connection operation on the processed sixth target feature through the Concat module, and perform processing on the connected sixth target feature through the C2F module to obtain a seventh target feature.

[0143] The fifth feature processing submodule is configured to: perform processing on the seventh target feature through the convolutional layer, perform connection operation on the processed seventh target feature and the third target feature through the Concat module to obtain an eighth target feature.

[0144] The sixth feature processing submodule is configured to: perform processing on the eighth target feature through the C2F module to obtain a ninth target feature.

[0145] The feature group confirmation submodule is configured to: determine the sixth target feature, the seventh target feature and the ninth target feature as a second feature group.

[0146] Through the neck network design of the embodiment, firstly, through the joint operation of the Upsample module and the Concat module, the network can realize the fusion and enhancement of multi-scale features, and improve the resolution and detail capture ability of the image. Subsequently, the introduction of multiple C2F modules ensures the depth optimization of feature information and the improvement of expression ability, so that the network can better handle complex target recognition tasks. The multiple combinations and optimizations of the convolutional layer, the Concat module and the C2F module not only enhance the diversity of features, but also effectively improve the perception ability of the model to targets at different levels and scales. Through these steps, the final second feature group integrates rich multi-dimensional features, which can provide accurate support for subsequent target detection and OCR recognition, ensuring the efficiency and accuracy of the entire cabinet label detection method.

[0147] As a possible implementation manner, the head network includes a convolutional layer, a two-dimensional convolutional layer, a Boxs Loss module and a Cls Loss module, and the third control module includes a first calculation submodule, a second calculation submodule, a third calculation submodule and a labeling submodule.

[0148] The first calculation submodule is configured to process the sixth target feature through the convolutional layer, further process the processed sixth target feature through the two-dimensional convolutional layer, and respectively calculate loss functions of the further processed Boxs Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module to obtain a first loss function value and a second loss function value.

[0149] The second calculation submodule is configured to process the seventh target feature through the convolutional layer, further process the processed seventh target feature through the two-dimensional convolutional layer, and respectively calculate loss functions of the further processed Boxs Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module to obtain a third loss function value and a fourth loss function value.

[0150] The third calculation submodule is configured to process the eighth target feature through the convolutional layer, further process the processed eighth target feature through the two-dimensional convolutional layer, and respectively calculate loss functions of the further processed Boxs Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module to obtain a fifth loss function value and a sixth loss function value.

[0151] The labeling submodule is configured to perform bounding box detection based on the first loss function, the third loss function and the fifth loss function, and perform class information labeling based on the second loss function, the fourth loss function and the sixth loss function to obtain a second target image.

[0152] The second feature group is analyzed and optimized by introducing various technical means such as convolutional layers, two-dimensional convolutional layers, Boxs Loss modules and Cls Loss modules, thereby ensuring high efficiency in the target detection task. The joint use of convolutional layers and two-dimensional convolutional layers can not only extract more detailed and deep image features, but also improve the spatial representation ability of the features. In the loss function calculation process, the Boxs Loss module focuses on the positioning accuracy of the target, and the Cls Loss module ensures the accuracy of the classification result. Through the combination of multiple loss functions, the model can simultaneously optimize the accuracy of the bounding box and the recognition ability of the class at different levels, thereby improving the overall detection and classification effect.

[0153] As a possible implementation manner, the OCR recognition model includes a plurality of CNN networks and a CNN+softmax network, and the second input unit includes a cropping module, a preprocessing module, a segmentation module, a feature extraction module and a classification recognition module.

[0154] The cropping module is configured to crop the first target image based on the second target image to obtain a third target image.

[0155] The preprocessing module is configured to perform second preprocessing on the third target image to obtain a fourth target image, and the second preprocessing includes denoising, binarization, grayscale transformation and image enhancement.

[0156] The segmentation module is configured to analyze the fourth target image through a sliding window and / or a connected component based on the first CNN network, divide the text region in the fourth target image into a single or multiple characters, and obtain a fifth target image.

[0157] The feature extraction module is configured to search for key points based on the second CNN network, calculate the direction of the key points, and perform SIFT feature extraction on the fifth target image to obtain a third feature group.

[0158] The classification recognition module is configured to perform classification recognition on the third feature group through the CNN+softmax network to obtain a first target character.

[0159] This embodiment realizes the process of accurately extracting characters from target images through the combination of multiple CNN networks and CNN+Softmax networks. Through cropping and preprocessing techniques, the image quality is significantly improved, providing high-quality input data for subsequent character recognition. The sliding window and connection component analysis techniques effectively segment the text area, ensuring that each character can be accurately extracted. The SIFT feature extraction technique further enhances the stability and robustness of the image, enabling the OCR model to adapt to complex and changing environments. Finally, the joint use of CNN+Softmax networks realizes efficient and accurate character classification, significantly improving the accuracy and speed of OCR recognition.

[0160] As a possible implementation manner, the first determining unit comprises a first matching module, a second matching module, and a third matching module.

[0161] The first matching module is configured to perform accurate matching between the first target character and the preset string to obtain a first matching result, wherein the accurate matching comprises one or more of direct string comparison, hash comparison, and regular expression matching.

[0162] The second matching module is configured to determine the first target character as a second target character when the first matching result is a mismatch with the first target character, perform fuzzy matching between the second target character and the preset string to obtain a second matching result, and wherein the fuzzy matching comprises one or more of Levenshtein distance, Jaccard similarity, and long string matching algorithm.

[0163] The third matching module is configured to perform position matching between the first target character and the preset string when either the first matching result or the second matching result is a match, and determine that the cabinet label meets the construction standard when the position matching is a match.

[0164] This embodiment can handle various situations during label recognition by combining accurate matching and fuzzy matching, ensuring efficient and flexible verification of whether the cabinet label meets the construction standard. Through direct string comparison, hash comparison, and regular expression matching, complete matching verification can be quickly performed. If there is an incomplete match, further fault tolerance judgment is performed through fuzzy matching algorithms such as Levenshtein distance and Jaccard similarity, improving the fault tolerance of the system. Finally, through position matching, it is ensured that the label is in the correct position and meets the construction specification. This scheme enhances the adaptability and stability of the system in complex construction scenarios, improves the accuracy and reliability of the cabinet label construction quality detection, and efficiently completes the construction acceptance and quality monitoring, ensuring the safe and stable operation of the power secondary system.

[0165] The cabinet label construction quality detection device based on real-time target monitoring includes a processor and a memory, the first acquisition unit, the first input unit, the second input unit and the first determination unit are all stored in the memory as program units, and the corresponding functions are realized by the processor executing the program units stored in the memory.

[0166] The processor includes a core, and the core calls the corresponding program units in the memory.

[0167] The memory can include a non-permanent memory in a computer readable medium, a random access memory (RAM) and / or a non-volatile memory such as a read-only memory (ROM) or a flash memory (flash RAM), and the memory includes at least one memory chip.

[0168] The embodiment of the application provides a computer readable storage medium, and the computer readable storage medium includes a stored program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to execute the cabinet label construction quality detection method based on real-time target monitoring when the program runs.

[0169] The embodiment of the application provides a cabinet label automatic detection system, and the cabinet label automatic detection system includes one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a program for executing the cabinet label construction quality detection method based on real-time target monitoring.

[0170] The embodiment of the application provides a processor, and the processor is used for running a program, wherein the program executes the cabinet label construction quality detection method based on real-time target monitoring when the program runs.

[0171] The embodiment of the application provides a communication system, and the communication system includes a first communication domain, a second communication domain processor, a memory and a program stored in the memory and capable of running on the processor, and the processor executes the program to realize at least the cabinet label construction quality detection method based on real-time target monitoring.

[0172] The application also provides a computer program product suitable for executing the program initialized with at least the cabinet label construction quality detection method based on real-time target monitoring when the computer program product is executed on a data processing device.

[0173] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with a general purpose computer, and can be centralized in a single computer or distributed among a network of computers, and can be implemented with program code executable by a computer, and thus can be stored in a storage device and executed by a computer, and in some cases, the steps shown or described can be executed in a different order than shown or described, or can be implemented as separate integrated circuit modules or as a single integrated circuit module, and thus the application is not limited to any particular combination of hardware and software.

[0174] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the application can be in the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage media, etc.) embodying computer readable program code.

[0175] The present application is described herein with reference to the flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams Figure 1 Means for performing the function specified by the flowchart

[0176] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams Figure 1 Means for performing the function specified by the flowchart

[0177] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart illustrations and / or block diagrams.Figure 1 one or more processes and / or functions specified in one or more blocks Figure 1 one or more processes and / or functions specified in one or more blocks

[0178] In one typical arrangement, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0179] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.

[0180] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0181] It should also be noted that the terms "comprising", "containing", or any other variant thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0182] From the above description, it can be seen that the above-mentioned embodiments of the present application achieve the following technical effects:

[0183] 1) The construction quality detection method of cabinet label based on real-time target monitoring of the present application can automatically complete the whole process from image acquisition, label detection to acceptance report generation. First, the cabinet image is acquired in real time to ensure the real-time and accuracy of the image data, providing reliable input for subsequent detection. Then, the YOLOv8 target detection model is used to quickly identify the label area in the image and accurately locate the text position of the label, effectively improving the detection efficiency and accuracy. Then, the OCR technology is used to accurately recognize the label text, solving the problem of text recognition in complex environment and ensuring high accuracy of character extraction. Finally, with the help of string matching algorithm and preset label specification, it is automatically verified whether the label meets the construction standard, and the acceptance report is generated to provide effective support for construction quality control. This method improves the automation level in the construction process, reduces manual intervention, significantly improves the efficiency and accuracy of quality detection, and solves the problem of insufficient detail information recognition ability of the model relying on a single target for detection in the prior art, which leads to decreased detection accuracy.

[0184] 2) The cabinet label construction quality detection device based on real-time target monitoring of the present application, the device comprises: a first acquisition unit, a first input unit, a second input unit and a first determination unit. The first acquisition unit is used to acquire a first target image, the first target image is a real-time acquired cabinet image; the first input unit is used to input the first target image into a target detection model to determine the area containing label text in the first target image, and obtain a second target image, the target detection model is obtained based on YOLOv8 structure training; the second input unit is used to input the second target image into an OCR recognition model to extract characters in the second target image and obtain first target characters; the first determination unit is used to match the first target characters with a preset string, and determine whether the cabinet label meets the construction standard according to the matching result. The present application combines YOLOv8 target detection algorithm with OCR text recognition technology, and combines the upper logic judgment comparison algorithm in the prior art, which significantly improves the detection accuracy. Through the YOLOv8 model, the generalization ability, detection speed and accuracy of target detection are improved, thereby solving the deficiency of single target detection model in traditional technology in detail information recognition, avoiding the problem of reduced detection accuracy caused by information omission or error. This technology fusion not only enhances the accurate recognition ability of the cabinet label, but also effectively improves the reliability of construction quality detection.

[0185] The above is only a preferred embodiment of the present application and is not intended to limit the present application. Those skilled in the art can make various changes and modifications to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for inspecting the construction quality of cabinet labels based on real-time target monitoring, characterized in that, include: Acquire a first target image, which is a real-time captured image of the cabinet; The first target image is input into the target detection model to determine the region in the first target image that contains the label text, thereby obtaining the second target image. The target detection model is trained based on the YOLOv8 structure. The second target image is input into the OCR recognition model to extract the characters in the second target image, thus obtaining the first target character; The first target character is matched with a preset string, and the matching result is used to determine whether the cabinet label meets the construction standards. The target detection model includes a backbone network, a neck network, and a head network. The first target image is input into the target detection model to determine the regions in the first target image containing labeled text, resulting in a second target image, including: The backbone network is controlled to extract and output features from the first target image through at least a different number of convolutional layers to obtain a first feature group. The neck network is controlled to combine the first feature group to obtain the second feature group; The head network is controlled to analyze the second feature group to perform bounding box detection and category information annotation to obtain the second target image; The OCR recognition model includes multiple CNN networks and a CNN+softmax network. The second target image is input into the OCR recognition model to extract characters from the second target image, resulting in the first target character, including: The first target image is cropped based on the second target image to obtain the third target image; A second preprocessing is performed on the third target image to obtain a fourth target image. The second preprocessing includes denoising, binarization, grayscale transformation and image enhancement. Based on the first CNN network, the fourth target image is analyzed by sliding window and / or connection component, and the text region in the fourth target image is segmented into single or multiple characters to obtain the fifth target image; The key point search is performed on the fifth target image based on the second CNN network, and the orientation of the key points is calculated to perform SIFT feature extraction and obtain the third feature group. The first target character is obtained by classifying and recognizing the third feature group using the CNN+softmax network.

2. The method according to claim 1, characterized in that, The backbone network includes an input module, a C2F module, convolutional layers, and an SPPF module. It controls the backbone network to extract features from the first target image and output them through at least a different number of convolutional layers, resulting in a first feature group, including: The first target image is preprocessed by the input module to obtain the second target image. The first preprocessing includes cropping, flipping, scaling, brightness adjustment and contrast adjustment. The second target image is processed sequentially through two convolutional layers and one C2F module to obtain candidate features; The candidate features are processed sequentially through one convolutional layer and one C2F module to obtain the first target feature; The first target feature is processed sequentially through one convolutional layer and one C2F module to obtain the second target feature; The second target feature is processed sequentially through a convolutional layer, a C2F module, and an SPPF module to obtain the third target feature; The first target feature, the second target feature, and the third target feature are determined as the first feature group.

3. The method according to claim 2, characterized in that, The neck network includes an Upsample module, a Concat module, a C2F module, and convolutional layers. The neck network is controlled to combine the first feature group to obtain a second feature group, including: The third target feature is upsampled using the Upsample module, and the upsampled third target feature is concatenated with the second target feature using the Concat module to obtain the fourth target feature. The fourth target feature is processed by the C2F module, the processed fourth target feature is upsampled by the Upsample module, and the upsampled fourth target feature and the first target feature are concatenated by the Concat module to obtain the fifth target feature. The C2F module processes the fifth target feature to obtain the sixth target feature; The sixth target feature is processed by the convolutional layer, the processed sixth target feature is concatenated by the Concat module, and the concatenated sixth target feature is processed by the C2F module to obtain the seventh target feature; The seventh target feature is processed by the convolutional layer, and the processed seventh target feature is concatenated with the third target feature by the Concat module to obtain the eighth target feature; The ninth target feature is obtained by processing the eighth target feature using the C2F module; The sixth target feature, the seventh target feature, and the ninth target feature are determined as the second feature group.

4. The method according to claim 3, characterized in that, The head network includes convolutional layers, two-dimensional convolutional layers, a Boxes Loss module, and a Cls Loss module. It controls the head network to analyze the second feature group to perform bounding box detection and category information annotation, thereby obtaining the second target image, including: The sixth target feature is processed by the convolutional layer, and the processed sixth target feature is further processed by the two-dimensional convolutional layer. The Boxes Loss module and Cls Loss module are respectively used to calculate the loss function of the further processed Boxes Loss module and Cls Loss module to obtain the first loss function value and the second loss function value. The seventh target feature is processed by the convolutional layer, and the processed seventh target feature is further processed by the two-dimensional convolutional layer. The Boxes Loss module and Cls Loss module are used to calculate the loss function of the further processed Boxes Loss module and Cls Loss module respectively to obtain the third loss function value and the fourth loss function value. The eighth target feature is processed by the convolutional layer, and the processed eighth target feature is further processed by the two-dimensional convolutional layer. The loss function is calculated by the Box Loss module and the Cls Loss module respectively to obtain the fifth loss function value and the sixth loss function value. Boundary box detection is performed based on the first loss function, the third loss function, and the fifth loss function, and category information is labeled based on the second loss function, the fourth loss function, and the sixth loss function to obtain the second target image.

5. The method according to claim 1, characterized in that, The process involves matching the first target character with a preset string, and determining whether the cabinet label conforms to construction standards based on the matching result, including: Based on the precise matching of the first target character and the preset string, a first matching result is obtained. The precise matching includes one or more of string direct comparison, hash comparison and regular expression matching. The first target string that does not match the first matching result is determined as the second target string. Fuzzy matching is performed between the second target string and the preset string to obtain the second matching result. The fuzzy matching includes one or more of Levenshtein distance, Jaccard similarity and long string matching algorithms. If either the first matching result or the second matching result is a successful match, a positional match is performed between the first target string and the preset string. If the positional match is successful, it is determined that the cabinet label conforms to the construction standards.

6. A device for inspecting the construction quality of cabinet labels based on real-time target monitoring, characterized in that, The device includes: The first acquisition unit is used to acquire a first target image, wherein the first target image is a real-time acquired image of the cabinet; The first input unit is used to input the first target image into the target detection model to determine the region containing the label text in the first target image and obtain the second target image. The target detection model is trained based on the YOLOv8 structure. The second input unit is used to input the second target image into the OCR recognition model to extract characters from the second target image and obtain the first target character; The first determining unit is used to match the first target character with a preset string and determine whether the cabinet label meets the construction standards based on the matching result. The target detection model includes a backbone network, a neck network, and a head network. The first input unit includes: The first control module is used to control the backbone network to extract features from the first target image and output them through at least a different number of convolutional layers to obtain a first feature group. The second control module is used to control the neck network to obtain a second feature group by combining the first feature group; The third control module is used to control the head network to analyze the second feature group to perform bounding box detection and category information annotation to obtain the second target image; The OCR recognition model includes multiple CNN networks and a CNN+softmax network. The second input unit includes: The cropping module is used to crop the first target image based on the second target image to obtain a third target image; The preprocessing module is used to perform a second preprocessing based on the third target image to obtain a fourth target image. The second preprocessing includes denoising, binarization, grayscale transformation, and image enhancement. The segmentation module is used to analyze the fourth target image based on the first CNN network through a sliding window and / or connection components, and to segment the text region in the fourth target image into single or multiple characters to obtain the fifth target image; The feature extraction module is used to search for key points in the fifth target image based on the second CNN network and calculate the orientation of the key points to perform SIFT feature extraction and obtain a third feature group. The classification and recognition module is used to classify and recognize the third feature group through the CNN+softmax network to obtain the first target character.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1 to 5.

8. An automatic label detection system for display cabinets, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising methods for performing any one of claims 1 to 5.

Citation Information

Patent Citations

  • Pressing plate state recognition model training method and pressing plate state recognition method

    CN113221687A

  • Substation screen cabinet pressing plate state identification method, device and equipment and storage medium

    CN115409816A

  • Operation robot screen cabinet target detection method and system

    CN115909032A

  • Railway wagon character information identification method based on YOLOv5

    CN116665094A

  • Multi-type document element detection and content extraction method and system, medium and equipment

    CN117237973A