Instrument automatic reading method and system for intelligent point inspection of equipment, electronic equipment and storage medium

Through the YOLOv8 model combined with median filtering and Canny edge detection, the Hough transform was used to identify key straight lines in the instrument image of cigarette equipment, which solved the problem of inefficient manual readings, realized automated instrument readings, improved detection accuracy and stability of equipment monitoring, and promoted the intelligent development of cigarette equipment inspection system.

CN120375149APending Publication Date: 2025-07-25ZHANGJIAKOU CIGARETTE FACTORY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510439999.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The operation monitoring of cigarette equipment instrument equipment relies on manual reading, which leads to inefficiency and error prone, affects the timely detection and handling of equipment failures, and restricts the improvement of equipment maintenance and management level.

Method used

The instrument object detection model based on the YOLOv8 model is used to combine median filtering and Canny edge detection to identify key straight lines in the instrument image through the Hough transform to achieve automated instrument readings.

Benefits of technology

It improves the accuracy and detection efficiency of instrument readings, reduces the influence of human factors, ensures the continuity and accuracy of equipment monitoring, and promotes the intelligent upgrade of the cigarette equipment inspection system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120375149A_ABST
    Figure CN120375149A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic instrument reading method and system for intelligent point inspection of equipment, electronic equipment and a storage medium. The method comprises the following steps: S1, detecting an instrument image: constructing an instrument target detection model based on a YOLOv8 model, and positioning the position of an instrument panel in the image; s2, instrument image processing: median filtering and Canny edge detection are combined to acquire a pixel set so as to determine the accurate position of each element in the instrument image; and S3, instrument reading identification: detecting three key straight lines in the image through Hough transform, wherein the three key straight lines include a 0 scale line, a maximum range scale line and a straight line where a pointer is located, and obtaining the instrument reading through data processing. According to the method, the YOLOv8 model is improved based on the YOLOv8 model to establish the instrument target detection model, the instrument target detection model is introduced into the field of cigarette equipment instrument identification and reading, a complete and innovative instrument automatic identification and reading technical system is formed by combining canny edge detection and an optimized Hough transform method, and a new technical thought and method are provided for industrial instrument equipment monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cigarette equipment management, and particularly to an automatic instrument reading method, system, electronic device, and storage medium for intelligent inspection of equipment. Background Art

[0002] In the cigarette production industry, the stable operation of equipment plays a crucial role in product quality and production efficiency. During the long-term and high-intensity operation of cigarette equipment, various components are prone to problems such as wear and aging, which can lead to equipment failures, affect the continuity of production, and even cause a decline in product quality and an increase in production costs. Therefore, regularly inspecting cigarette equipment to promptly detect and eliminate potential fault hazards has become a key link in ensuring the smooth progress of cigarette production.

[0003] Traditional inspection of cigarette equipment mainly relies on manual operation, and this method has many obvious disadvantages.

[0004] To improve the efficiency and management level of cigarette equipment inspection, the industry has introduced NFC tag inspection in cooperation with a software management system. By pasting NFC tags on the equipment, inspection personnel can quickly obtain basic information and historical inspection records of the equipment by using a handheld terminal to read the tag information, and upload the current inspection data to the software management system in real time. This method has realized the digital management of equipment inspection, greatly improved the inspection efficiency, and facilitated the development of equipment maintenance management work.

[0005] However, in the operation monitoring of instrument equipment in cigarette equipment, there are still technical bottlenecks at present. As an important tool for monitoring the operation status of equipment, instruments can directly reflect various operation parameters of the equipment, such as temperature, pressure, flow rate, etc. Accurately obtaining the instrument readings is crucial for judging whether the equipment is operating normally. Existing monitoring methods cannot automatically identify the instrument readings and still rely on manual monitoring. Manual reading of instrument readings is not only inefficient but also prone to human reading errors. Especially in some environments with poor conditions and inconvenient observation of the instrument installation location, the difficulty and error of manual monitoring are further increased. Due to the inability to obtain instrument data in real time and accurately, it is difficult to promptly detect abnormal situations of instrument equipment, which may lead to the failure of equipment faults to be detected and processed in time, affecting the stability of the entire cigarette production process and product quality.

[0006] In summary, although certain progress has been made in the overall management of cigarette equipment inspection through NFC tags and software management systems, the problem of manual reading in the operation monitoring of instrument equipment seriously restricts the further improvement of equipment maintenance management level.

[0007] Therefore, there is an urgent need for a new technical solution to solve this problem, realize the automatic recognition of instrument readings, improve the intelligence and accuracy of equipment spot checks, and provide more powerful guarantees for the efficient and stable operation of cigarette production. Based on such a background, the present invention is committed to providing an automatic instrument reading method for equipment spot checks to fill the gaps in the existing technology and promote the development of cigarette equipment maintenance management to a higher level. Summary of the Invention

[0008] Based on the above background, the present invention provides an automatic instrument reading method, system, electronic device and storage medium for intelligent equipment spot checks. The present invention is applied in the process of equipment spot checks. Through automatic instrument reading, it can effectively reduce the dependence on manual labor, reduce the influence of human factors on the detection results, make the whole equipment spot check process more stable and reliable, and ensure the continuity and accuracy of equipment instrument monitoring.

[0009] The technical solution adopted by the present invention to solve its technical problems is as follows: An automatic instrument reading method for intelligent equipment spot checks, including S1 Detection of instrument images Construct an instrument target detection model based on the YOLOv8 model, and locate the position of the instrument panel in the collected image through this model; The backbone network of the instrument target detection model adopts EfficientViT, and the EfficientViT includes a multi-scale linear attention module, which generates three different-sized feature layers during the feature extraction process, respectively containing key information of the image at different resolutions; In order to make full use of the key information in these feature layers and enhance the feature extraction ability, this model adds a CBAM attention mechanism to the three different-sized feature maps generated by the backbone network; The CBAM attention mechanism includes a channel attention module and a spatial attention module; Among them, the channel attention module performs global maximum pooling and global average pooling operations on the input features based on width and height respectively, then processes them through a multi-layer perceptron, performs an element-wise addition operation on the features output by the multi-layer perceptron, and then processes them through an activation function to generate the final channel attention feature map. Then, the channel attention feature map is multiplied element-wise with the input feature map to generate the input features required by the spatial attention module; The output of the instrument target detection model is the probability that the detected region of the input image belongs to the instrument panel region. Through post-processing operations such as setting a threshold for screening and non-maximum suppression, the position of the instrument panel in the image is determined. At the same time, the output also includes target position prediction, presented in normalized bounding box coordinates (x, y, w, h), where (x, y) is the center point coordinates of the instrument panel bounding box, and w and h are its width and height respectively. By converting such normalized coordinates into actual image coordinates, the bounding box of the instrument panel can be accurately drawn on the image to achieve precise positioning; The final output is a list of detection results containing information such as the instrument panel category, bounding box coordinates, confidence level, etc.; S2 Processing of instrument images To solve the problem of unclear positioning of instrument images, median filtering is combined with Canny edge detection to reduce the noise level of the positioning image and retain important features in the image, and its pixel set is obtained to determine the precise positions of various elements in the positioning instrument image; S3 Recognition of instrument readings To achieve pointer detection in the pixel set of the instrument image, it is transformed from the image space to the parameter space through the Hough transform, and with the help of a voting mechanism, the parameter combination with the highest frequency of occurrence is statistically obtained. Subsequently, these parameters are substituted into a specific feature equation to achieve precise recognition of the target graph; The Hough transform is optimized using the cumulative distribution function method, and the Hough transform is optimized by the following content of the cumulative distribution function method: Random sampling: Instead of performing the Hough transform on every edge point in the instrument image, a part of the edge points is randomly selected for transformation; Limited range: The accumulator only focuses on those points that may form a straight line, and the size of the accumulator is relatively small because it does not need to cover the entire parameter space; Probability estimation: The probability estimation is used to evaluate whether the value in the current accumulator is sufficient to confirm the existence of a straight line, which is achieved by comparing the value in the accumulator with a preset threshold; Based on this, three key straight lines in the image are detected through the Hough transform: the 0 scale line, the maximum range scale line, and the straight line where the pointer is located; By calculating the angle between the 0 scale line and the pointer line, and the proportional relationship between the 0 scale line and the maximum range scale line, the reading of the instrument is obtained.

[0010] The present invention also adopts the following technical solutions to solve its technical problems: An automatic instrument reading system for intelligent equipment spot-checking, including An instrument image detection module, used to construct an instrument target detection model based on the YOLOv8 model, and locate the position of the instrument panel in the collected image through this model; An instrument image processing module, which combines median filtering and Canny edge detection to reduce the noise level of the positioning image and retain important features in the image, obtains its pixel set to determine the precise positions of various elements in the positioned instrument image; An instrument reading recognition module, which detects three key straight lines in the image through Hough transform: the 0 scale line, the maximum range scale line, and the straight line where the pointer is located, and then obtains the reading of the instrument through data processing.

[0011] The present invention also adopts the following technical solutions to solve its technical problems: An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the instrument automatic reading method for device intelligent spot inspection as described above are implemented.

[0012] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the instrument automatic reading method for device intelligent spot inspection as described above are implemented.

[0013] The beneficial effects brought by the present invention are as follows: Based on the YOLOv8 model, the present invention improves and establishes a dedicated instrument target detection model, introduces it into the field of instrument reading of cigarette equipment, and combines the canny edge detection and Hough transform methods to form a complete and innovative instrument automatic reading technology system. Compared with the existing method that relies on manual monitoring of instrument readings, it is a brand-new technical path, providing new technical ideas and methods for the monitoring of industrial instrument equipment. The present invention can achieve: Improve detection efficiency: The backbone network of the instrument target detection model adopts EfficientViT, which can significantly improve the accuracy of target detection while maintaining the light weight of the model, enabling this model to have the ability to quickly process images and locate the position of the instrument in the image in a very short time.

[0014] Improve reading accuracy: The instrument pixel set image is obtained by using median filtering and canny edge detection, which not only significantly reduces the noise level in the image, but also retains important features in the image through precise edge detection. Then, the key straight lines in the image are detected by optimized Hough transform to obtain the instrument reading, avoiding visual errors and subjective judgment differences that may occur in manual reading, and being able to obtain the instrument reading more accurately.

[0015] Enhance system stability: The automated instrument reading method reduces the dependence on manual labor, reduces the impact of human factors on the detection results, makes the instrument reading monitoring in the entire equipment spot inspection process more stable and reliable, and ensures the continuity and accuracy of equipment operation monitoring.

[0016] Intelligent upgrade: It has achieved the leap from manual monitoring to automatic intelligent recognition, taking a big step forward in the intelligent direction for the cigarette equipment inspection system. The present invention has the ability to automatically analyze, process images and obtain key data, conforms to the development trend of industrial intelligent production and equipment management, and helps to improve the intelligent level of the entire cigarette production industry. Brief Description of the Drawings

[0017] In order to more clearly illustrate the embodiments in the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments. The drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0018] Figure 1 It is a schematic diagram of the architecture reference of the YOLOv8 model for step S1; Figure 2 It is a schematic diagram of the EfficientViT network structure for step S1; Figure 3 It is a schematic diagram of the CBAM attention mechanism network structure for step S1; Figure 4 It is a schematic diagram of the architecture reference of the instrument target detection model for step S1; Figure 5 It is a schematic diagram of the input image of the instrument target detection model for step S1; Figure 6 It is a schematic diagram of the output image of the instrument target detection model for step S1; Figure 7 It is a schematic diagram of the image before Canny edge detection processing for step S2; Figure 8 It is a schematic diagram of the image after Canny edge detection processing for step S2; Figure 9 It is a schematic diagram of the instrument image after Hough transform processing for step S3; Figure 10 It is a schematic diagram of the structure of the instrument automatic recognition system of the present invention; Figure 11 It is a schematic diagram of the structure of an electronic device of the present invention. Detailed Description of the Invention

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0020] Moreover, the following description is for illustration rather than limitation. Specific details such as specific system structures and technologies are proposed to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.

[0021] The first embodiment of the present invention relates to an automatic instrument recognition method for intelligent equipment spot inspection, including S1 Detection of instrument images Referring to Figure 1 , construct an instrument target detection model based on the YOLOv8 model, and locate the position of the instrument panel in the collected image through this model; Although the backbone network of the YOLOv8 model is very advanced in design, there are still some potential drawbacks. In complex environments, such as when the target scales of various instrument panels involved in this embodiment are diverse, the appearances are similar, or there are occlusions, the backbone network of the YOLOv8 model may be difficult to accurately capture the features of small and weak targets, resulting in missed detections or false detections. Moreover, in terms of feature fusion, the backbone network of the YOLOv8 model cannot make full use of feature information at different levels, resulting in poor detection effects in some complex scenarios.

[0022] Referring to Figure 2, in this embodiment, the backbone network of the instrument target detection model is replaced with EfficientViT. The left part of the figure shows the basic structure of the EfficientViT module. The input data first passes through the "Multi - ScaleLinear Att" module to capture feature information of different scales, and then is further processed by the "FFN+DWC onv" module to output feature information. The right part of the figure details the internal calculation process: the input data first undergoes a linear transformation to obtain Q, K, and V, aggregates nearby tokens through depthwise separable convolutions (DWConv) and 1x1 grouped convolutions (1x1GConv) of different sizes to obtain multi - scale Q / K / V tokens, then each branch calculates the attention weights through a linear attention module with a ReLU activation function, and finally the results are fused and passed through a linear transformation to obtain the final output.

[0023] In this embodiment, choosing the EfficientViT network structure to replace the YOLOv8 backbone has many improvements. First, the computational efficiency is higher. Through designs such as depthwise separable convolutions and linear attention mechanisms, EfficientViT significantly reduces the amount of computation and the number of parameters. When performing the inference of the dashboard pointer target detection in this application, the model can obtain results faster and also reduces energy consumption. Second, the multi - scale feature extraction ability is enhanced. Its multi - scale linear attention mechanism can more effectively extract feature information at different scales, has better adaptability to detecting target objects of different sizes in the image, thus improving the detection accuracy of various targets, especially small target objects. Third, the model is more lightweight. The structure design of EfficientViT makes the volume of the entire model smaller and is more easily deployable on resource - constrained devices.

[0024] To make full use of the key information in these feature layers and enhance the feature extraction ability, the CBAM attention mechanism is set on the three different - sized feature maps generated by the backbone of this detection model, as Figure 3 shown. The CBAM attention mechanism includes a channel attention module and a spatial attention module. Among them, the channel attention module performs global max - pooling and global average - pooling operations on the input feature based on width and height respectively, then processes them through a multi - layer perceptron (MLP), performs an element - wise addition operation on the features output by the MLP, and then processes them through a Sigmoid activation function to generate the final channel attention feature map. Then, the channel attention feature map is multiplied element - wise with the input feature map to generate the input feature required by the spatial attention module.

[0025] Refer to Figure 4, taking the real-time collected dashboard image as input, first input it into the EfficientViT module of the model for feature extraction. EfficientViT efficiently extracts image features using its unique architecture; the extracted features then enter the CBAM attention module. After being processed by the CBAM attention module, the features are output as three different-scale feature maps, namely Feat1 with a size of 80×80×256, Feat1 with a size of 40×40×512, and Feat1 with a size of 20×20×512. These different-scale feature maps have different uses. The large-scale feature maps (such as 80×80×256) retain more detailed information of the pointer image and are helpful for detecting small targets in the image; the small-scale feature maps (such as 20×20×512) have a larger receptive field after multiple downsamplings and can capture more macroscopic semantic information of the image, which is suitable for detecting large targets. This design enables the model to provide richer and multi-level feature expressions.

[0026] Figure 5 , Figure 6 respectively show the input image and the output image of the instrument target detection model. The output of the instrument target detection model is the probability that the detected area of the input image belongs to the dashboard area. By performing post-processing operations such as setting a threshold for screening and non-maximum suppression, the position of the dashboard in the image is determined. At the same time, the output also includes the prediction of the target position, presented in normalized bounding box coordinates (x, y, w, h), where (x, y) is the center point coordinates of the dashboard bounding box, and w and h are its width and height respectively. Converting such normalized coordinates to actual image coordinates can accurately draw the bounding box of the dashboard on the image, realizing the precise positioning of the dashboard. The final output is a list of detection results containing information such as the dashboard category, bounding box coordinates, and confidence level. These results can be used to mark the dashboard in the image, providing a basis for subsequent reading and analysis of dashboard data.

[0027] S2 Processing of Instrument Images Refer to Figure 7 , Figure 8 , to solve the problem of unclear positioning of instrument images, it is necessary to perform denoising processing on them.

[0028] In this embodiment, median filtering is combined with Canny edge detection to reduce the noise level in the image and retain the important features in the image, and obtain its pixel set to determine the precise positions of various elements in the instrument image.

[0029] Among them, median filtering can well preserve edge information while removing noise. Its principle is to sort the pixel values in the matrix and replace the data in the center of the matrix with the median of the sequence. Canny edge detection uses a double threshold for gradient screening. The reason is that single threshold screening only retains the edges greater than the highest threshold, then the problem that the edges may not be closed may occur. While the double threshold deletes the gradients below the minimum threshold by setting a minimum threshold, and retains the gradients between the minimum threshold and the maximum threshold as the pending edges. If the edges formed by the gradients higher than the maximum threshold cannot be closed, the gradients in the corresponding area are selected from the pending edges as supplements, so that the extracted edges can be closed as much as possible.

[0030] Recognition of S3 instrument readings The set of instrument image pixels includes pointer information and scale information, specifically the information of the 0 scale line, reading pointer, and maximum range in the instrument image. Through the Hough transform, it is converted from the image space to the parameter space, and with the help of the voting mechanism, the parameter combination with the highest occurrence frequency is accurately counted; subsequently, these parameters are substituted into a specific feature equation.

[0031] A straight line can be represented by the polar coordinate equation in the parameter space ρ = x cos θ + y sin θ (where ρ is the perpendicular distance from the origin to the straight line, θ is the included angle between the perpendicular line and the positive direction of the x axis). Through the Hough transform and the voting mechanism, a set of parameter combinations ([[]] ρmax , θmax ) with the highest occurrence frequency is obtained. Then for the pointer or scale line, its feature equation can be: Let the coordinates of a certain point in the image be ([[]] xi , yi ); When this point satisfies ∣ ρmax − xi cos θmax − yi sin θmax ∣< ϵ ( ϵ is a very small threshold used to consider the noise and precision error in the actual image), it is considered that this point belongs to the point on the target straight line (pointer or scale line). In this way, by traversing all the points in the image and using the above feature equation, the specific position and shape of the pointer or scale line in the image can be determined to achieve accurate recognition.

[0032] In this embodiment, the Hough transform is further optimized by using the cumulative distribution function method. By leveraging the characteristics of the cumulative distribution function, the parameter combinations that are most likely to represent the target figure can be more efficiently located in the parameter space, thus avoiding a large amount of redundant calculations in the traditional Hough transform; The cumulative distribution function method optimizes the Hough transform through the following steps: Random sampling: Instead of performing the Hough transform on every edge point in the instrument image, a part of the edge points are randomly selected for transformation; Limited range: The accumulator only focuses on those points that may form a straight line, and the size of the accumulator is relatively small because it does not need to cover the entire parameter space; Probability estimation: The probability estimation is used to evaluate whether the value in the current accumulator is sufficient to confirm the existence of a straight line, which is achieved by comparing the value in the accumulator with a preset threshold.

[0033] Refer to Figure 9 , and three key straight lines in the image are detected by the Hough transform: the 0 scale line, the maximum range scale line, and the straight line where the pointer is located; By calculating the angle between the 0 scale line and the pointer line, and the proportional relationship between the 0 scale line and the maximum range scale line, the reading of the instrument can be accurately obtained.

[0034] The key straight line information in the image is detected by the Hough transform and the reading of the instrument is obtained. The specific process is as follows: 1. Center point location Use the Hough circle detection to obtain the center coordinates (cx, cy) of the dial circles = cv2.HoughCircles(edges, cv2.HOUGH_GRADIENT, 1, 20,param1=50, param2=30, minRadius=0, maxRadius=0) 2. Key point detection Detect the 0 scale line, the maximum range scale line, the pointer line, and the endpoint coordinates Example result: 0 scale point (x0, y0), max scale point (x_max, y_max), pointer endpoint (x_p, y_p) 3. Vector calculation # Establish a vector with the center as the origin vec_0 = np.array([x0 - cx, y0 - cy]) # 0 scale direction vector vec_max = np.array([x_max - cx, y_max - cy]) # Maximum range direction vector vec_p = np.array([x_p - cx, y_p - cy]) # Pointer direction vector 4. Angle calculation def angle_between(v1, v2): dot = v1[0]*v2[0]+ v1[1]*v2[1] det = v1[0]*v2[1]- v1[1]*v2[0] return np.arctan2(det, dot) # Radian value [-π, π] theta_0_to_max = angle_between(vec_0, vec_max) # Total range angle theta_0_to_p = angle_between(vec_0, vec_p) # Pointer offset angle 5. Reading conversion Reading = (theta_0_to_p / theta_0_to_max) * Maximum range value.

[0035] Reference Figure 10 , the second embodiment of the present invention relates to an instrument automatic reading system for intelligent equipment spot inspection. This system is used to implement the method for automatic reading of instruments for intelligent equipment spot inspection in the first embodiment, and mainly includes An instrument image detection module 21, which is used to construct an instrument target detection model based on the YOLOv8 model, and locate the position of the instrument panel in the collected image through this model; An instrument image processing module 22, which is used to combine median filtering and Canny edge detection to reduce the noise level of the located image and retain important features in the image, and obtain its pixel set to determine the precise positions of various elements in the located instrument image; An instrument reading recognition module 23, which is used to detect three key lines in the image through Hough transform: the 0 scale line, the maximum range scale line, and the line where the pointer is located, and then obtain the reading of the instrument through data processing.

[0036] Reference Figure 11, the third embodiment of the present invention relates to an electronic device 30. The electronic device 30 of this embodiment includes: a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and executable on the processor 31, such as an instrument automatic reading method program. When the processor 31 executes the computer program 33, the steps in the above-mentioned embodiments of the instrument automatic reading method are implemented. Alternatively, when the processor 31 executes the computer program 33, the functions of the modules in the above-mentioned embodiments of the instrument automatic reading system are implemented, such as Figure 10 the functions of the modules 21 to 23 shown.

[0037] Exemplarily, the computer program 33 can be divided into one or more modules / units. One or more modules / units are stored in the memory 32 and executed by the processor 31 to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 33 in the electronic device 30.

[0038] The electronic device 30 can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The electronic device 30 may include, but is not limited to, a processor 31 and a memory 32. Those skilled in the art can understand that Figure 11 merely examples of the electronic device 30, which do not constitute a limitation on the electronic device 30, may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the electronic device 30 may further include input / output devices, network access devices, buses, etc.

[0039] The so-called processor 31 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0040] The memory 32 can be an internal storage unit of the electronic device 30, such as the hard disk or memory of the electronic device 30. The memory 32 can also be an external storage device of the electronic device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a FlashCard, etc. equipped on the electronic device 30. Further, the memory 32 can also include both the internal storage unit of the electronic device 30 and the external storage device. The memory 32 is used to store computer programs as well as other programs and data required by the electronic device 30. The memory 32 can also be used to temporarily store the data that has been output or will be output.

[0041] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be described herein again.

[0042] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0043] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0044] In the embodiments provided by the present invention, it should be understood that the disclosed device / electronic device and method can be implemented in other ways. For example, the device / electronic device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0045] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0046] In addition, each functional unit in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0047] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0048] It should be noted that the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An automatic instrument reading method for intelligent spot inspection of equipment, characterized in that: including Detection of S1 instrument images Construct an instrument target detection model based on the YOLOv8 model, and use this model to locate the position of the instrument panel in the collected image; The backbone network of the instrument target detection model uses EfficientViT, and the EfficientViT includes a multi-scale linear attention module, which generates three different sizes of feature layers during the feature extraction process, respectively containing the key information of the image at different resolutions; The CBAM attention mechanism is added to the three different sizes of feature maps generated by the backbone network of the instrument target detection model; The output of the instrument target detection model is the probability that the detected area of the input image belongs to the instrument panel area. By setting thresholds for screening and non-maximum suppression and other post-processing operations, the position of the instrument panel in the image is determined; S2 Processing of instrument images By combining median filtering and Canny edge detection, reduce the noise level of the located image and retain the important features in the image, and obtain its pixel set to determine the precise positions of the various elements in the located instrument image; S3 Recognition of instrument readings To achieve pointer detection in the pixel set of the instrument image, it is transformed from the image space to the parameter space through the Hough transform, and the parameter combination with the highest occurrence frequency is statistically obtained by means of a voting mechanism. Subsequently, these parameters are substituted into a specific feature equation to achieve precise recognition of the target graph; Use the cumulative distribution function method to optimize the Hough transform. Detect three key lines in the image through the Hough transform: the 0 scale line, the maximum range scale line, and the line where the pointer is located, and then obtain the reading of the instrument through data processing.

2. The instrument automatic recognition method for intelligent spot inspection of equipment according to claim 1, characterized in that: The CBAM attention mechanism includes a channel attention module and a spatial attention module; Among them, the channel attention module performs global max-pooling and global average-pooling operations on the input features based on width and height respectively, then processes them through a multi-layer perceptron respectively, performs an element-wise addition operation on the features output by the multi-layer perceptron, and then processes them through an activation function to generate the final channel attention feature map. Then, perform an element-wise multiplication operation on the channel attention feature map and the input feature map to generate the input features required by the spatial attention module.

3. The automatic instrument reading method for equipment intelligent spot-checking according to claim 1, characterized in that: The output of the instrument target detection model also includes target position prediction, presented in normalized bounding box coordinates (x, y, w, h), where (x, y) is the center point coordinates of the instrument panel bounding box, and w and h are its width and height respectively. Convert such normalized coordinates to actual image coordinates to accurately draw the bounding box of the instrument panel on the image and achieve precise positioning; The final output is a list of detection results including instrument panel category, bounding box coordinates, and confidence information.

4. The automatic instrument reading method for equipment intelligent spot-checking according to claim 1, characterized in that: The cumulative distribution function method optimizes the Hough transform through the following content: Random sampling: Instead of performing the Hough transform on each edge point in the instrument image, randomly select a part of the edge points for transformation; Limited range: The accumulator only focuses on the points that may form a straight line, and the size of the accumulator is relatively small because it does not need to cover the entire parameter space; Probability estimation: Use probability estimation to evaluate whether the value in the current accumulator is sufficient to confirm the existence of a straight line, which is achieved by comparing the value in the accumulator with a preset threshold.

5. The method for automatic recognition of instrument readings for intelligent equipment spot-checking according to claim 1, characterized in that: The data processing includes: obtaining the reading of the instrument by calculating the angle between the 0 scale line and the pointer line, and the proportional relationship between the 0 scale line and the maximum range scale line.

6. An automatic instrument reading system for intelligent on-site inspection of equipment, characterized in that: The system for implementing the method for automatic recognition of instrument readings for intelligent equipment spot-checking according to any one of claims 1 to 5 includes An instrument image detection module, configured to build an instrument target detection model based on the YOLOv8 model, and locate the position of the instrument panel in the collected image through this model; An instrument image processing module, configured to reduce the noise level of the located image and retain the important features in the image by combining median filtering and Canny edge detection, and obtain its pixel set to determine the precise positions of the various elements in the located instrument image; An instrument reading recognition module, configured to detect three key straight lines in the image through the Hough transform: the 0 scale line, the maximum range scale line, and the straight line where the pointer is located, and then obtain the reading of the instrument through data processing.

7. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for automatic recognition of instrument readings for intelligent equipment spot-checking according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the steps of the method for automatic recognition of instrument readings for intelligent equipment spot-checking according to any one of claims 1 to 5 are implemented.

Citation Information

Cited By

  • Meter identification method based on deep learning and dynamic distortion correction

    CN120544211A