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

By combining YOLOv8 object detection model and OCR recognition technology, real-time detection and quality evaluation of screen cabinet labels are achieved, the problem of insufficient detailed information recognition capabilities in the existing technology is solved, and the accuracy and efficiency of detection are improved.

CN119600586AActive Publication Date: 2025-03-11GUANGDONG POWER GRID CO LTD +1

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, models that rely on a single target for detection lack the ability to identify detailed information, resulting in a decrease in detection accuracy, especially when complex construction environments or images contain detailed information such as text and symbols.

Method used

The target detection model based on YOLOv8 is used in combination with OCR recognition technology, and the screen cabinet image is obtained through real-time target monitoring, the label text area is identified, and character information is extracted through the OCR model, and finally determine whether the label meets the construction standards based on the matching results.

Benefits of technology

It improves the accuracy and efficiency of inspection, enhances the ability to adapt to complex construction scenarios and detailed information, and ensures the accurate identification of screen cabinet labels and the reliability of construction quality inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600586A_ABST
    Figure CN119600586A_ABST
Patent Text Reader

Abstract

The invention provides 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. The method comprises the following steps: acquiring a screen cabinet image in real time to obtain a first target image, inputting the first target image into a target detection model trained based on a YOLOv8 structure, positioning a label character area to generate a second target image, then inputting the second target image into an OCR recognition model, extracting characters and obtaining first target characters, and finally obtaining the first target characters. And finally, performing matching based on the first target character and a preset standard character string, and judging whether the label meets a construction standard or not. According to the method, a YOLOv8 target detection algorithm and an OCR character recognition technology are combined, the generalization ability, the detection speed and the accuracy are enhanced, and the problem that in the prior art, a model which depends on a single target to conduct detection is insufficient in detail information recognition ability, and consequently the detection accuracy is lowered is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The safe and reliable operation of the power secondary system is the key foundation for the stable operation of the entire power system. Any potential quality risks may bring serious consequences. Among them, the quality problem of panel cabinet wiring is one of the common and high-risk hidden dangers, such as substandard plug-in quality of standardized connectors, incorrect or missed terminal block wiring, etc., which are often the main causes of system failures and even safety accidents. Therefore, during the construction and installation process, it is particularly important to test, accept and record the wiring quality in a timely and efficient manner. This can not only quickly discover and correct quality problems, but also 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 robotic arm redundant degree of freedom motion control technology to panel cabinet installation quality inspection has become a research hotspot. These technologies can achieve real-time inspection, autonomous acceptance, and operation traceability during the construction process, effectively discover and solve quality problems, and comprehensively improve construction efficiency and wiring quality, thereby providing a strong guarantee for the safe operation of the power secondary system.

[0004] However, the existing technology still has certain limitations in its specific implementation. For example: CN115409816A proposes a screen cabinet image processing method based on a pre-trained pressure plate area detection model, which can locate and analyze the state of the pressure plate area. 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 recognizes the state of the pressure plate based on the MobilenetV3-YOLOv5s network, and achieves lightweight through optimization methods such as sparse training, channel pruning and model distillation. However, this method sacrifices a certain degree of accuracy while improving the detection efficiency, especially in detail processing and complex scene adaptation. CN115909032A uses a bidirectional network and multi-layer feature fusion technology to perform high-precision detection of screen cabinet targets, and has strong anti-interference ability. However, this method still has deficiencies in the extraction of detailed features, and the recognition accuracy of fine features such as text information contained in the screen cabinet is not high.

[0005] The existing models that rely on a single target for detection often have deficiencies in the ability to recognize detailed information, especially when faced with complex construction environments or images containing detailed information such as text and symbols, the detection accuracy is significantly reduced. This problem makes it difficult for existing methods to meet high-precision requirements in some practical application scenarios, affecting their effectiveness and reliability in the detection of wiring quality in power secondary systems. Overall, the existing technology still has a lot of room for improvement in terms of model accuracy, generalization performance, and adaptability to complex construction scenarios. Summary of the invention

[0006] The main purpose of this 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, so as to at least solve the problem that the model in the prior art that relies on a single target for detection has insufficient ability to recognize detailed information, resulting in a decrease in 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, including: obtaining a first target image, the first target image is a screen cabinet image collected in real time; inputting the first target image into a target detection model to determine the area containing label text in the first target image, and obtaining a second target image, and the target detection model is trained based on the YOLOv8 structure; inputting the second target image into an OCR recognition model to extract characters in the second target image and obtain first target characters; matching the first target characters with a preset character string, and determining whether the screen cabinet label meets the construction standards based on the matching result.

[0008] Optionally, 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 area in the first target image containing label text to obtain a second target image, including: controlling the backbone network to extract and output features of the first target image through at least different numbers of convolutional layers to obtain a first feature group; controlling the neck network to combine the first feature group to obtain a second feature group; and controlling the head network to analyze the second feature group to perform bounding box detection and category information labeling to obtain the second target image.

[0009] Optionally, the backbone network includes an input module, a C2F module, a convolutional layer and an SPPF module, and controls the backbone network to extract and output features of the first target image at least through different numbers of convolutional layers to obtain a first feature group, including: performing a first preprocessing on the first target image through the input module to obtain a second target image, the first preprocessing including cropping, flipping, scaling, brightness adjustment and contrast adjustment; processing the second target image through two of the convolutional layers and one of the C2F modules in sequence to obtain candidate features; processing the candidate features through one of the convolutional layers and one of the C2F modules in sequence to obtain a first target feature; processing the first target feature through one of the convolutional layers and one of the C2F modules in sequence to obtain a second target feature; processing the second target feature through one of the convolutional layers, one of the C2F modules and one of the SPPF modules 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 includes an Upsample module, a Concat module, a C2F module and a convolutional layer, and the neck network is controlled to obtain a second feature group by combining the first feature group, including: 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. feature; processing the fifth target feature through the C2F module to obtain a sixth target feature; processing the sixth target feature through the convolution layer, performing a connection operation on the processed sixth target feature through the Concat module, and processing the sixth target feature after the connection operation through the C2F module to obtain a seventh target feature; processing the seventh target feature through the convolution layer, performing a connection operation on 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; determining the sixth target feature, the seventh target feature and the ninth target feature as the second feature group.

[0011] Optionally, the head network includes a convolution layer, a two-dimensional convolution layer, a Boxs Loss module and a Cls Loss module, and controls the head network to analyze the second feature group to perform bounding box detection and category information labeling to obtain the second target image, including: processing the sixth target feature through the convolution layer, further processing the processed sixth target feature through the two-dimensional convolution layer, and 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, respectively, to obtain a first loss function value and a second loss function value; processing the seventh target feature through the convolution layer, further processing the processed seventh target feature through the two-dimensional convolution layer, and calculating the further processed Boxs Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module, respectively. The Loss module performs loss function calculation to obtain a third loss function value and a fourth loss function value; the eighth target feature is processed by the convolution layer, and the processed eighth target feature is further processed by the two-dimensional convolution layer, and the loss function is calculated for the further processed Boxs Loss module and Cls Loss module respectively by the BoxsLoss module and the Cls Loss module to obtain a fifth loss function value and a sixth loss function value; bounding 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.

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

[0013] Optionally, matching is performed based on the first target character with a preset string, and determining whether the screen cabinet label meets the construction standards based on the matching result, including: performing precise matching based on the first target character with the preset string to obtain a first matching result, and the precise matching includes one or more of direct string comparison, hash matching, and regular expression matching; determining the first target string corresponding to the first matching result as a match failure as a second target string, and performing fuzzy matching based on the second target string and the preset string to obtain a second matching result, and the fuzzy matching includes one or more of Levenshtein distance, Jaccard similarity, and long string matching algorithm; if any one of the first matching result and the second matching result is a match passed, performing position matching based on the first target string and the preset string, and if the position matching passes, determining that the screen cabinet label meets the construction standards.

[0014] According to another aspect of the present application, a screen cabinet label construction quality detection device based on real-time target monitoring is provided, and the device includes: a first acquisition unit, used to acquire a first target image, wherein the first target image is a screen cabinet image collected in real time; a first input unit, 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, wherein the target detection model is trained based on the YOLOv8 structure; a second input unit, 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; a first determination unit, used to match the first target character with a preset character string, and determine whether the screen cabinet label meets the construction standards based on the matching result.

[0015] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.

[0016] According to another aspect of the present application, a screen 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 are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the described methods.

[0017] Applying the technical solution of this application, first obtain the first target image, which is a screen cabinet image collected in real time; then input the first target image into the target detection model to determine the area containing the label text in the first target image to obtain the second target image, and the target detection model is obtained based on the YOLOv8 structure training; then input the second target image into the OCR recognition model to extract the characters in the second target image to obtain the first target characters; finally, match the first target characters with the preset character string, and determine whether the screen cabinet label meets the construction standards based on the matching results. This application integrates the YOLOv8 target detection algorithm with the OCR text recognition technology, and combines it with the upper-level logical judgment comparison algorithm in the prior art. The YOLOv8 target detection algorithm improves the generalization ability, detection speed and accuracy, and solves the problem that the model that relies on a single target for detection in the prior art has insufficient ability to recognize detailed information, resulting in reduced detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 2 A schematic diagram of a process for detecting the construction quality of a screen cabinet label based on real-time target monitoring provided in an embodiment of the present application is shown;

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

[0021] The above drawings include the following reference numerals:

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

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

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] As introduced in the background technology, the models in the prior art that rely on a single target for detection often have 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. In order to solve the problem that the models in the prior art that rely on a single target for detection have insufficient ability to recognize detailed information, resulting in reduced detection accuracy, the embodiments of the present application 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.

[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[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 running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a screen cabinet label construction quality detection method based on real-time target monitoring according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned 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 above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as 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 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] In this embodiment, a screen cabinet label construction quality detection method based on real-time target monitoring 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 the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0031] Figure 2 1 is a flow chart of a method for detecting the construction quality of a cabinet label based on real-time target monitoring according to an embodiment of the present application. Figure 2As shown, the method comprises the following steps:

[0032] Step S201, obtaining a first target image, where the first target image is a screen cabinet image acquired in real time;

[0033] Specifically, a first target image of the screen cabinet is acquired using a real-time acquisition device (such as a high-definition camera or industrial camera). The image includes the overall view of the screen cabinet and the 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. Real-time image acquisition can quickly reflect the status of the screen cabinet during the construction process, 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 area containing the label text in the first target image, and obtaining a second target image, wherein the target detection model is obtained by training based on the YOLOv8 structure;

[0035] Specifically, the acquired first target image is input into the model trained based on the YOLOv8 target detection algorithm. YOLOv8 can quickly identify the area containing the label text in the image through its efficient feature extraction and target positioning capabilities, and crop it to form the second target image, providing accurate regional information for subsequent OCR recognition. The model is trained using a large amount of labeled cabinet image data through a deep learning method, so it has strong generalization ability and can adapt to the size, shape and position of different labels.

[0036] Furthermore, the YOLOv8 model has higher speed and accuracy than traditional detection methods. By quickly locating the label area, it can effectively eliminate the interference of other irrelevant parts in the image, so that subsequent processing can focus on 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 to obtain first target characters;

[0038] Specifically, the label area (i.e., the second target image) located by the YOLOv8 model is input into the OCR text recognition model to extract and recognize characters. The OCR recognition model uses a convolutional neural network (CNN) to segment and classify characters through image preprocessing (such as denoising, binarization, etc.), and finally outputs the recognized character information. The OCR recognition model will identify each character in the label area and perform high-precision classification based on the characteristics of the characters.

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

[0040] Step S204, matching the first target character with a preset character string, and determining 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 specifications. 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 standards. 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] Furthermore, string matching technology can accurately determine whether the label content meets the specifications, avoiding omissions or misjudgments that may occur during manual inspection. The process is automated and standardized, avoiding interference from human factors 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 screen 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 screen cabinet image is obtained through the real-time acquisition device to ensure the real-time and accuracy of the image data and provide 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, which effectively improves the detection efficiency and accuracy. Then, the label text is accurately recognized by OCR technology, which solves the problem of text recognition in complex environments and ensures the high accuracy of character extraction. Finally, with the help of string matching algorithm and preset label specifications, it is automatically verified whether the label meets the construction standards, and an acceptance report is generated to provide effective support for construction quality control. This method improves the level of automation in the construction process, reduces manual intervention, significantly improves the efficiency and accuracy of quality detection, and solves the problem that the model that relies on a single target for detection in the prior art has insufficient ability to recognize detailed information, resulting in a decrease in detection accuracy.

[0044] The model in this application consists of three parts: Backbone, Neck and Head, which work together to complete efficient target detection. First, Backbone is responsible for extracting features from the input image, which are 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 achieves high efficiency in the feature extraction process. Backbone consists of multiple convolutional layers and C2F modules, in which the C2F module replaces the traditional C3 module, enhances the fluidity of the gradient, and helps solve the problem of gradient disappearance in deep networks. Next, the Neck part is located between the backbone network and the head network, responsible for fusing and enhancing the features in order to provide more accurate feature representation for the subsequent decision-making stage. Finally, the Head part analyzes the fused features, generates the final detection results, and outputs the bounding box and category information of the target. The design of this model enables YOLOv8 to maintain high-precision and high-efficiency target detection capabilities under high real-time requirements.

[0045] As a possible implementation method, 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 area containing the label text in the first target image, and obtain the second target image, including:

[0046] Step S301, controlling the backbone network to extract and output features of the first target image through at least different numbers of convolutional layers to obtain a first feature group;

[0047] Specifically, the first target image is first input into the backbone network of the target detection model. The backbone network uses multiple convolutional layers for feature extraction, extracting spatial information from the image layer by layer from low-level to high-level. 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 area, and other background information in the image. The first feature group output contains rich image features, providing basic data support for subsequent networks.

[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 into the neck network of the target detection model. The neck network is located between the backbone network and the head network. Its main task is to fuse multiple features from the backbone network and integrate features of different scales through multi-level feature fusion modules (such as FPN, PANet, etc.), thereby enhancing the expression of information at different levels. Through these fusion operations, the neck network can extract more comprehensive features with global context information and output the second feature group. This process is crucial for processing complex backgrounds and diverse label areas.

[0050] Step S303: Control the head network to analyze the second feature group to perform bounding box detection and category information labeling to obtain a second target image.

[0051] Specifically, the second feature group is input into the head network of the target detection model. The main task of the head network is to locate and classify the target. By analyzing the second feature group, the head network predicts the bounding box of the cabinet label (i.e., the location of the label area) and marks the category information of the area (such as the type or purpose of the label). Finally, the second target image output by the head network contains the processed image, marked with the bounding box of the label and the corresponding category information.

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

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

[0054] Step S401, performing a first preprocessing on the first target image through an input module to obtain a second target image, wherein the first preprocessing includes cropping, flipping, scaling, brightness adjustment, and contrast adjustment;

[0055] Specifically, the first target image is first preprocessed by the input module to provide suitable input data for subsequent feature extraction. The first preprocessing includes a variety of 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 area in the image may be different due to factors such as ambient lighting, viewing angle changes, or image quality. Through these preprocessing operations, the generalization ability of the target detection model can be improved, so that it can better adapt to input images in different scenarios.

[0056] Step S402, processing the second target image through two convolutional layers and a C2F module in sequence to obtain candidate features;

[0057] Specifically, the second target image after the first preprocessing is processed in turn through two convolutional layers and a C2F module to obtain candidate features. The C2F module stands for the Cascaded Convolutional Fusion module. The main function 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 features and improve the expression ability of the network. The purpose of this stage is to extract diverse features from the input image to prepare for further processing.

[0058] Step S403, processing the candidate features through a convolutional layer and a C2F module in sequence to obtain a first target feature;

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

[0060] Step S404, sequentially processing the first target feature through a convolutional layer and a C2F module to obtain a second target feature;

[0061] Specifically, the first target feature is further processed through a convolution layer and a C2F module to obtain the second target feature. The goal of this step is to further refine and optimize the feature map to ensure that the obtained feature is more compact and has stronger recognition ability.

[0062] Step S405, sequentially processing the second target feature through a convolutional layer, a C2F module, and an SPPF module to obtain a third target feature;

[0063] Specifically, the second target feature is processed through a convolutional layer, a C2F module, and an SPPF module (SpatialPyramid Pooling Fast module) to obtain the 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 joint action of different modules.

[0064] Step S406: determine the first target feature, the second target feature, and the third target feature as a 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 at multiple stages to obtain a more comprehensive and informative feature group. By fusing the features extracted at 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, from local to global, providing a very rich data foundation for subsequent label positioning and classification.

[0066] Through the backbone network design of this embodiment, the original image is first preprocessed through the input module, thereby providing diversified and optimized input data for the subsequent processing stage. The linkage between the convolutional layer and the C2F module ensures the extraction of multi-level features. At the same time, the connection between the features of each layer is fully utilized during the processing process, further improving the detection ability of complex targets. Through the introduction of the SPPF module, the network can handle targets of different scales and enhance the recognition ability 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 changeable and complex construction environment, and can accurately and efficiently complete the detection of screen cabinet labels, providing stable and reliable feature input for subsequent OCR recognition.

[0067] As a possible implementation, the neck network includes an Upsample module, a Concat module, a C2F module and a convolution layer, and the control neck network combines the first feature group to obtain a second feature group, including:

[0068] Step S501, upsampling the third target feature through the Upsample module, and concatenating the upsampled third target feature and the second target feature through the Concat module to obtain a fourth target feature;

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

[0070] Step S502, processing the fourth target feature through the C2F module, upsampling the processed fourth target feature through the Upsample module, and concatenating the upsampled fourth target feature and the first target feature through the Concat module to obtain a fifth target feature;

[0071] Specifically, the fourth target feature is first 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 upsampled fourth target feature is connected to the first target feature by the Concat module to obtain the fifth target feature. The main purpose of this operation is to further fuse feature information from different stages to enhance the multi-scale perception capability of the model.

[0072] Step S503, processing the fifth target feature through the C2F module to obtain a sixth target feature;

[0073] Specifically, the C2F module further extracts high-level information from the fifth target feature and optimizes the details and context information in the feature map. This process helps enhance the network's ability to recognize complex structures in images and improves the ability to accurately locate and accurately identify label locations.

[0074] Step S504, processing the sixth target feature through the convolution layer, performing a concatenation operation on the processed sixth target feature through the Concat module, and processing the concatenated sixth target feature through the C2F module to obtain a seventh target feature;

[0075] Specifically, through the combined effects of the convolutional layer, the Concat module, and the C2F module, the network can extract and optimize image features from multiple perspectives. The convolutional layer can capture features in detail, while the Concat module ensures the effective fusion of multi-layer features, and the C2F module further enhances the contextual relationship of 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] Step S505, processing the seventh target feature through a convolution layer, and concatenating the processed seventh target feature with the third target feature through 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 from 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 contextual information and enhance the model's ability to perceive the target.

[0078] Step S506, processing the eighth target feature through the C2F module to obtain a ninth target feature;

[0079] Specifically, through the processing of the C2F module, the ninth target feature has been further refined and optimized. These features can effectively improve the model's ability to recognize complex targets in the multi-level processing process, especially the precise positioning at different scales and in complex backgrounds. The introduction of the C2F module enhances the network's expressive power, allowing the model to better adapt to the challenges of different scenarios.

[0080] Step S507: determine the sixth target feature, the seventh target feature and the ninth target feature as a second feature group.

[0081] Specifically, the second feature group contains feature information extracted from multiple processing stages, integrates feature maps at different levels, and has strong multi-scale adaptability and spatial context perception capabilities. This feature group can not only enhance the network's target detection performance, but also improve the ability to accurately identify and classify label areas. 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 this embodiment, first through the linkage 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 deep 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 convolutional layers, Concat modules and C2F modules not only enhance the diversity of features, but also effectively improve the model's perception of targets at different levels and scales. Through these steps, the second feature group finally obtained integrates rich multi-dimensional features, which can provide precise support for subsequent target detection and OCR recognition, ensuring the efficiency and accuracy of the entire screen cabinet label detection method.

[0083] As a possible implementation method, the head network includes a convolution layer, a two-dimensional convolution 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 category information labeling to obtain a second target image, including:

[0084] Step S601, processing the sixth target feature through a convolution layer, further processing the processed sixth target feature through a two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through a Boxs Loss module and a 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 a convolution layer to extract deeper feature information. Then, the processed sixth target feature is further processed using a two-dimensional convolution layer to obtain a finer spatial feature. The processed features are respectively subjected to loss function calculations by the Boxs Loss module and the Cls Loss module to obtain the first loss function value and the second loss function value, respectively. The Boxs Loss module is used to calculate the prediction error of the bounding box, while the ClsLoss module is used to calculate the error of the category prediction.

[0086] Step S602, processing the seventh target feature through a convolution layer, further processing the processed seventh target feature through a two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through a Boxs Loss module and a Cls Loss module, respectively, to obtain a third loss function value and a fourth loss function value;

[0087] Specifically, through the combined use of convolutional layers and two-dimensional convolutional layers, the network can extract richer spatial and contextual features. The calculation of the loss function not only improves the accuracy of bounding box detection, but also enhances the ability to classify objects, ensuring that the seventh object feature performs better in detection and classification tasks, providing more accurate feature information for subsequent steps.

[0088] Step S603, processing the eighth target feature through a convolution layer, further processing the processed eighth target feature through a two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through a Boxs Loss module and a 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 to 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 accurate prediction of the bounding box and target category, thereby improving the accuracy of the detection results. This process enhances the model's target detection capabilities in complex scenarios and ensures higher recognition and classification performance.

[0090] Step S604: perform bounding box detection based on the first loss function, the third loss function, and the fifth loss function, and perform category information labeling 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 bounding boxes improves the accuracy of target locations, while the optimization of category information annotation enhances the accuracy of classification. This process ensures the model's accurate recognition and positioning of labels through the weight adjustment of the joint loss function, significantly improving the overall performance of target detection.

[0092] This embodiment analyzes and optimizes the second feature group by introducing multiple technical means such as convolutional layers, two-dimensional convolutional layers, Boxs Loss modules and Cls Loss modules, thereby ensuring efficient performance in target detection tasks. The combined 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 features. In the loss function calculation process, the Boxs Loss module focuses on the positioning accuracy of the target, while the Cls Loss module ensures the accuracy of the classification results. 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, the OCR recognition model includes multiple CNN networks and CNN+softmax networks, and the second target image is input into the OCR recognition model to extract characters in the second target image to obtain the first target characters, including:

[0094] Step S701, cropping the first target image based on the second target image to obtain a third target image;

[0095] Specifically, cropping can effectively reduce the size of the input image and remove redundant information, thereby speeding up subsequent processing and improving the accuracy of text recognition. By focusing on the area 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 a second preprocessing on the third target image to obtain a fourth target image, wherein the second preprocessing includes denoising, binarization, grayscale conversion and image enhancement;

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

[0098] Step S703, analyzing the fourth target image through a sliding window and / or a connected component based on the first CNN network, segmenting the text area in the fourth target image into a single character 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 that has undergone the second preprocessing. The sliding window technology can detect local areas in the image by continuously sliding the window, thereby identifying and segmenting the text area therein. The connected component analysis can help identify the coherence between the texts, segment the text area, obtain single or multiple characters, and finally generate the fifth target image.

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

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

[0102] Step S705: classify and identify the third feature group through the CNN+softmax network to obtain the first target character.

[0103] Specifically, the third feature group obtained by SIFT feature extraction will be input into the CNN+Softmax network for classification and recognition. The CNN network will conduct in-depth analysis of the feature group and identify the character information in the image. The Softmax layer will classify each character according to the output probability value of the network to determine the most likely character category.

[0104] This embodiment realizes the process of accurately extracting characters from the target image by combining 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 connected component analysis techniques effectively segment the text area to ensure that each character can be accurately extracted. SIFT feature extraction technology further enhances the stability and robustness of the image, enabling the OCR model to adapt to complex and changing environments. Finally, the combined use of CNN+Softmax networks achieves efficient and accurate character classification, significantly improving the accuracy and speed of OCR recognition.

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

[0106] Step S801, performing precise matching between the first target character and a preset character string to obtain a first matching result, wherein the precise matching includes one or more of direct character string comparison, hash matching, 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 methods such as direct string comparison, hash matching and regular expression matching. Direct string comparison compares characters one by one, hash matching performs fast matching by calculating the hash value of the character, and regular expression matching matches the string according to preset rules.

[0108] Step S802, determining the first target string that does not match the first matching result as a second target string, and performing fuzzy matching between the second target string and a preset string to obtain a second matching result, wherein the fuzzy matching includes one or more of Levenshtein distance, Jaccard similarity, and long string matching algorithms;

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

[0110] Step S803, when any one of the first matching result and the second matching result is matched successfully, position matching is performed based on the first target character string and the preset character string, and when the position matching is successful, it is determined that the cabinet label meets the construction standard.

[0111] Specifically, when any one of the first matching result and the second matching result passes, a match 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 match passes, that is, the position and content of the label meet the construction standards, it is determined that the cabinet label meets the construction standards.

[0112] This embodiment, through the combination of precise matching and fuzzy matching, can cope with various situations in the label recognition process and ensure efficient and flexible verification of whether the cabinet label meets the construction standards. Through precise matching of direct string comparison, hash matching and regular expression matching, the complete match verification can be quickly performed; if an incomplete match occurs, further fault-tolerant judgment is performed through fuzzy matching algorithms such as Levenshtein distance and Jaccard similarity, thereby 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 specifications. This solution enhances the adaptability and stability of the system in complex construction scenarios, improves the accuracy and reliability of cabinet label construction quality detection, and can efficiently complete construction acceptance and quality monitoring to ensure the safe and stable operation of the power secondary system.

[0113] The embodiment of the present application also provides a screen cabinet label construction quality detection device based on real-time target monitoring. It should be noted that the screen cabinet label construction quality detection device based on real-time target monitoring of the embodiment of the present application can be used to execute the screen cabinet label construction quality detection method based on real-time target monitoring provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been explained will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0114] The following introduces the screen cabinet label construction quality detection device based on real-time target monitoring provided in an embodiment of the present application.

[0115] Figure 3 1 is a structural block diagram of a device for detecting the construction quality of a cabinet label based on real-time target monitoring according to an embodiment of the present application. Figure 3 As 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] A first acquisition unit 10 is used to acquire a first target image, where the first target image is a screen cabinet image acquired in real time;

[0117] Specifically, a first target image of the screen cabinet is acquired using a real-time acquisition device (such as a high-definition camera or industrial camera). The image includes the overall view of the screen cabinet and the 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] A first input unit 20 is used to input the first target image into a target detection model to determine the area containing the label text in the first target image to obtain a second target image, and the target detection model is trained based on the YOLOv8 structure;

[0119] Specifically, the acquired first target image is input into the model trained based on the YOLOv8 target detection algorithm. YOLOv8 can quickly identify the area containing the label text in the image through its efficient feature extraction and target positioning capabilities, and crop it to form the second target image, providing accurate regional information for subsequent OCR recognition. The model is trained using a large amount of labeled cabinet image data through a deep learning method, so it has strong generalization ability and can adapt to the size, shape and position of different labels.

[0120] The second input unit 30 is used to input the second target image into the OCR recognition model to extract characters in the second target image to obtain the first target characters;

[0121] Specifically, the label area (i.e., the second target image) located by the YOLOv8 model is input into the OCR text recognition model to extract and recognize characters. The OCR recognition model uses a convolutional neural network (CNN) to segment and classify characters through image preprocessing (such as denoising, binarization, etc.), and finally outputs the recognized character information. The OCR recognition model will identify each character in the label area and perform high-precision classification based on the characteristics of the characters.

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

[0123] Specifically, the character information recognized by OCR is matched with the preset label specifications. 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 standards. 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] Through this embodiment, a screen cabinet label construction quality detection device based on real-time target monitoring is provided, and the device includes: 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, and the first target image is a screen cabinet image collected in real time; 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, and 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 to obtain first target characters; the first determination unit is used to match the first target character with a preset character string, and determine whether the screen cabinet label meets the construction standard based on the matching result. This application combines the YOLOv8 target detection algorithm with the OCR text recognition technology, and combines the upper-level logic judgment comparison algorithm in the prior art to significantly improve the detection accuracy. Through the YOLOv8 model, the generalization ability, detection speed and accuracy of target detection are improved, thereby solving the shortcomings of the single target detection model in the traditional technology in detail information recognition, and avoiding the problem of reduced detection accuracy due to information omission or error. This technological integration not only enhances the ability to accurately identify cabinet labels, but also effectively improves the reliability of construction quality inspection.

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

[0126] A first control module is used to control the backbone network to extract and output features of the first target image at least through different numbers of convolutional layers to obtain a first feature group;

[0127] A second control module, used for controlling the neck network to obtain a second feature group by combining the first feature group;

[0128] 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 labeling to obtain a second target image.

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

[0130] As a possible implementation method, the backbone network includes an input module, a C2F module, a convolutional layer and an SPPF module, and the first control module includes: 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] A first processing submodule, used for performing a first preprocessing on the first target image through the input module to obtain a second target image, wherein the first preprocessing includes cropping, flipping, scaling, brightness adjustment and contrast adjustment;

[0132] A second processing submodule is used to process the second target image through two convolutional layers and a C2F module in sequence to obtain candidate features;

[0133] A third processing submodule is used to process the candidate features through a convolution layer and a C2F module in sequence to obtain a first target feature;

[0134] A fourth processing submodule, used to process the first target feature through a convolution layer and a C2F module in sequence to obtain a second target feature;

[0135] a fifth processing submodule, configured to process the second target feature in sequence through a convolutional layer, a C2F module, and an SPPF module to obtain a third target feature;

[0136] The confirmation submodule is used 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 this embodiment, the original image is first preprocessed through the input module, thereby providing diversified and optimized input data for the subsequent processing stage. The linkage between the convolutional layer and the C2F module ensures the extraction of multi-level features. At the same time, the connection between the features of each layer is fully utilized during the processing process, further improving the detection ability of complex targets. Through the introduction of the SPPF module, the network can handle targets of different scales and enhance the recognition ability 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 changeable and complex construction environment, and 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 method, the neck network includes an Upsample module, a Concat module, a C2F module and a convolutional layer, and the second control module includes: 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 used to upsample the third target feature through the Upsample module, and concatenate the upsampled third target feature and the second target feature through the Concat module to obtain a fourth target feature;

[0140] A second feature processing submodule is used to process the fourth target feature through the C2F module, upsample the processed fourth target feature through the Upsample module, and concatenate the upsampled fourth target feature and the first target feature through the Concat module to obtain a fifth target feature;

[0141] A third feature processing submodule, used for processing the fifth target feature through the C2F module to obtain a sixth target feature;

[0142] The fourth feature processing submodule is used to process the sixth target feature through the convolution layer, perform a concatenation operation on the processed sixth target feature through the Concat module, and process the sixth target feature after the concatenation operation through the C2F module to obtain the seventh target feature;

[0143] a fifth feature processing submodule, configured to process the seventh target feature through a convolution layer, and concatenate the processed seventh target feature with the third target feature through a Concat module to obtain an eighth target feature;

[0144] a sixth feature processing submodule, configured to process the eighth target feature through the C2F module to obtain a ninth target feature;

[0145] The feature group confirmation submodule is used 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 this embodiment, first through the linkage 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 deep 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 convolutional layers, Concat modules and C2F modules not only enhance the diversity of features, but also effectively improve the model's perception of targets at different levels and scales. Through these steps, the second feature group finally obtained integrates rich multi-dimensional features, which can provide precise support for subsequent target detection and OCR recognition, ensuring the efficiency and accuracy of the entire screen cabinet label detection method.

[0147] As a possible implementation, the head network includes a convolution layer, a two-dimensional convolution layer, a Box 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] A first calculation submodule is used to process the sixth target feature through a convolution layer, further process the processed sixth target feature through a two-dimensional convolution layer, and perform loss function calculation on the further processed Boxes Loss module and Cls Loss module through a Boxs Loss module and a Cls Loss module, respectively, to obtain a first loss function value and a second loss function value;

[0149] a second computing submodule, for processing the seventh target feature through a convolution layer, further processing the processed seventh target feature through a two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through a Boxs Loss module and a Cls Loss module, respectively, to obtain a third loss function value and a fourth loss function value;

[0150] a third computing submodule, for processing the eighth target feature through a convolution layer, further processing the processed eighth target feature through a two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through a Boxs Loss module and a Cls Loss module, respectively, to obtain a fifth loss function value and a sixth loss function value;

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

[0152] This embodiment analyzes and optimizes the second feature group by introducing multiple technical means such as convolutional layers, two-dimensional convolutional layers, Boxs Loss modules and Cls Loss modules, thereby ensuring efficient performance in target detection tasks. The combined 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 features. In the loss function calculation process, the Boxs Loss module focuses on the positioning accuracy of the target, while the Cls Loss module ensures the accuracy of the classification results. 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.

[0153] As a possible implementation method, the OCR recognition model includes multiple CNN networks and CNN+softmax networks, 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] A cropping module, used for cropping the first target image based on the second target image to obtain a third target image;

[0155] A preprocessing module, used for performing a second preprocessing based on the third target image to obtain a fourth target image, wherein the second preprocessing includes denoising, binarization, grayscale conversion and image enhancement;

[0156] a segmentation module, configured to analyze the fourth target image through a sliding window and / or a connected component based on the first CNN network, and segment the text area in the fourth target image into a single character or multiple characters to obtain a fifth target image;

[0157] A feature extraction module, used for searching key points of the fifth target image based on the second CNN network, and calculating the direction of the key points to perform SIFT feature extraction to obtain a third feature group;

[0158] 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.

[0159] This embodiment realizes the process of accurately extracting characters from the target image by combining 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 connected component analysis techniques effectively segment the text area to ensure that each character can be accurately extracted. SIFT feature extraction technology further enhances the stability and robustness of the image, enabling the OCR model to adapt to complex and changing environments. Finally, the combined use of CNN+Softmax networks achieves efficient and accurate character classification, significantly improving the accuracy and speed of OCR recognition.

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

[0161] A first matching module, configured to perform an accurate match between the first target character and a preset character string to obtain a first matching result, wherein the accurate match includes one or more of direct character string comparison, hash comparison, and regular expression matching;

[0162] A second matching module is used to determine the first target string that does not match the first matching result as a second target string, and perform fuzzy matching based on the second target string and a preset string to obtain a second matching result, wherein the fuzzy matching includes one or more of Levenshtein distance, Jaccard similarity and long string matching algorithm;

[0163] The third matching module is used to perform position matching based on the first target character string and the preset character string when any one of the first matching result and the second matching result is matched successfully, and determine that the cabinet label meets the construction standard when the position matching succeeds.

[0164] This embodiment, through the combination of precise matching and fuzzy matching, can cope with various situations in the label recognition process and ensure efficient and flexible verification of whether the cabinet label meets the construction standards. Through precise matching of direct string comparison, hash matching and regular expression matching, the complete match verification can be quickly performed; if an incomplete match occurs, further fault-tolerant judgment is performed through fuzzy matching algorithms such as Levenshtein distance and Jaccard similarity, thereby 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 specifications. This solution enhances the adaptability and stability of the system in complex construction scenarios, improves the accuracy and reliability of cabinet label construction quality detection, and can efficiently complete construction acceptance and quality monitoring to ensure the safe and stable operation of the power secondary system.

[0165] The above-mentioned screen cabinet label construction quality detection device based on real-time target monitoring includes a processor and a memory. The above-mentioned 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 processor executes the above-mentioned program units stored in the memory to realize the corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in any combination.

[0166] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the communication efficiency can be improved by adjusting the kernel parameters.

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

[0168] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the screen cabinet label construction quality detection method based on real-time target monitoring.

[0169] An embodiment of the present invention provides an automatic detection system for screen cabinet labels, characterized in that it 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 one or more processors, and the one or more programs include methods for executing the above-mentioned screen cabinet label construction quality detection method based on real-time target monitoring.

[0170] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the screen cabinet label construction quality detection method based on real-time target monitoring when running.

[0171] An embodiment of the present invention provides a communication system, which includes a primary communication domain, a secondary communication domain processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the above-mentioned steps of the screen cabinet label construction quality detection method based on real-time target monitoring are implemented.

[0172] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes at least the steps of the above-mentioned screen cabinet label construction quality detection method based on real-time target monitoring.

[0173] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0174] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0175] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0178] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0179] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0180] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0181] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

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

[0183] 1) The screen cabinet label construction quality detection method 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 screen cabinet image is obtained through the real-time acquisition equipment to ensure the real-time and accuracy of the image data and provide 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, which effectively improves the detection efficiency and accuracy. Then, the label text is accurately recognized by OCR technology, which solves the problem of text recognition in complex environments and ensures high precision of character extraction. Finally, with the help of string matching algorithm and preset label specifications, it automatically verifies whether the label meets the construction standards, generates an acceptance report, and provides effective support for construction quality control. This method improves the level of automation in the construction process, reduces manual intervention, significantly improves the efficiency and accuracy of quality detection, and solves the problem that the model that relies on a single target for detection in the prior art has insufficient ability to recognize detailed information, resulting in a decrease in detection accuracy.

[0184] 2) The device for detecting the construction quality of the cabinet label based on real-time target monitoring of the present application 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 the first target image, which is a cabinet image collected in real time; the first input unit is used to input the first target image into the target detection model to determine the area containing the label text in the first target image, and obtain the second target image, and the target detection model is obtained based on the YOLOv8 structure training; the second input unit is used to input the second target image into the OCR recognition model to extract the characters in the second target image to obtain the first target characters; the first determination unit is used to match the first target characters with the preset character string, and determine whether the cabinet label meets the construction standard based on the matching result. The present application combines the YOLOv8 target detection algorithm with the OCR text recognition technology, and combines the upper-level logic judgment comparison algorithm in the prior art to significantly improve the detection accuracy. Through the YOLOv8 model, the generalization ability, detection speed and accuracy of target detection are improved, thereby solving the shortcomings of the single target detection model in the traditional technology in detail information recognition, and avoiding the problem of reduced detection accuracy due to information omission or error. This technological integration not only enhances the ability to accurately identify cabinet labels, but also effectively improves the reliability of construction quality inspection.

[0185] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for detecting the construction quality of cabinet labels based on real-time target monitoring, characterized in that: include: Acquire a first target image, where the first target image is a screen cabinet image acquired in real time; Inputting the first target image into a target detection model to determine an area in the first target image that contains label text, thereby obtaining a second target image, wherein the target detection model is trained based on a YOLOv8 structure; Inputting the second target image into an OCR recognition model to extract characters in the second target image to obtain first target characters; The first target character is matched with a preset character string, and whether the cabinet label meets the construction standard is determined according to the matching result.

2. The method according to claim 1, characterized in that 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 area containing the label text in the first target image, and obtain the second target image, including: Controlling the backbone network to extract and output features of the first target image at least through different numbers of convolutional layers to obtain a first feature group; controlling the neck network to obtain a second feature group by combining the first feature group; The head network is controlled to analyze the second feature group to perform bounding box detection and category information labeling to obtain the second target image.

3. The method according to claim 2, characterized in that The backbone network includes an input module, a C2F module, a convolutional layer and an SPPF module, and controls the backbone network to extract and output features of the first target image at least through different numbers of convolutional layers to obtain a first feature group, including: Performing a first preprocessing on the first target image through the input module to obtain a second target image, wherein the first preprocessing includes cropping, flipping, scaling, brightness adjustment, and contrast adjustment; Processing the second target image sequentially through the two convolutional layers and the C2F module to obtain candidate features; The candidate features are processed sequentially through one of the convolutional layers and one of the C2F modules to obtain a first target feature; Processing the first target feature through one of the convolutional layers and one of the C2F modules in sequence to obtain a second target feature; The second target feature is processed sequentially through one of the convolutional layers, one of the C2F modules, and one of the SPPF modules to obtain a third target feature; The first target feature, the second target feature, and the third target feature are determined as the first feature group.

4. The method according to claim 3, characterized in that The neck network includes an Upsample module, a Concat module, a C2F module and a convolutional layer, and the neck network is controlled to obtain a second feature group by combining the first feature group, including: Upsampling the third target feature through the Upsample module, and concatenating 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 concatenating 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 convolution layer, performing a connection operation on the processed sixth target feature through the Concat module, and processing the sixth target feature after the connection operation through the C2F module to obtain a seventh target feature; Processing the seventh target feature through the convolution layer, and concatenating the processed seventh target feature with 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; The sixth target feature, the seventh target feature and the ninth target feature are determined as the second feature group.

5. The method according to claim 4, characterized in that The head network includes a convolution layer, a two-dimensional convolution layer, a Boxs Loss module and a Cls Loss module, and controls the head network to analyze the second feature group to perform bounding box detection and category information labeling to obtain the second target image, including: Processing the sixth target feature through the convolution layer, further processing the processed sixth target feature through the two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module, respectively, to obtain a first loss function value and a second loss function value; Processing the seventh target feature through the convolution layer, further processing the processed seventh target feature through the two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module, respectively, to obtain a third loss function value and a fourth loss function value; Processing the eighth target feature through the convolution layer, further processing the processed eighth target feature through the two-dimensional convolution layer, and performing loss function calculation on the further processed Boxes Loss module and Cls Loss module through the Boxs Loss module and the Cls Loss module, respectively, to obtain a fifth loss function value and a sixth loss function value; Bounding 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.

6. The method according to claim 1, characterized in that The OCR recognition model includes 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 the first target characters, including: Cropping the first target image based on the second target image to obtain a third target image; Performing a second preprocessing on the third target image to obtain a fourth target image, wherein the second preprocessing includes denoising, binarization, grayscale conversion and image enhancement; Based on the first CNN network, the fourth target image is analyzed by a sliding window and / or a connected component, and the text area in the fourth target image is segmented into a single character or multiple characters to obtain a fifth target image; Based on the second CNN network, the fifth target image is searched for key points, and the directions of the key points are calculated to perform SIFT feature extraction to obtain a third feature group; The third feature group is classified and identified through the CNN+softmax network to obtain the first target character.

7. The method according to claim 1, characterized in that Matching the first target character with a preset character string and determining whether the cabinet label meets the construction standard according to the matching result includes: Based on the first target character, an accurate match is performed with the preset character string to obtain a first matching result, wherein the accurate match includes one or more of direct character string comparison, hash comparison, and regular expression matching; Determine the first target string as a second target string corresponding to the first matching result that does not match the first target string, and perform fuzzy matching between the second target string and the preset string to obtain a second matching result, wherein the fuzzy matching includes one or more of Levenshtein distance, Jaccard similarity, and long string matching algorithm; When any one of the first matching result and the second matching result passes the match, position matching is performed based on the first target character string and the preset character string. When the position matching passes, it is determined that the cabinet label meets the construction standard.

8. A screen cabinet label construction quality detection device based on real-time target monitoring, characterized in that: The device comprises: A first acquisition unit is used to acquire a first target image, where the first target image is a screen cabinet image acquired in real time; A 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 to obtain a second target image, wherein the target detection model is trained based on the YOLOv8 structure; A second input unit, used for inputting the second target image into an OCR recognition model to extract characters in the second target image to obtain first target characters; The first determination unit is used to match the first target character with a preset character string, and determine whether the screen cabinet label meets the construction standard according to the matching result.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

10. A screen cabinet label automatic detection system, 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 are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of claims 1 to 7.

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

Cited By

  • Asset data updating method and device, electronic equipment and readable storage medium

    CN120765900A

  • Screen cabinet equipment label automatic verification method and system based on visual identification

    CN121366418A