Self-adaptive pointer type instrument reading identification method based on YOLOv11n-SSH

Through the adaptive pointer instrument reading recognition method based on YOLOv11n-SSH, the pointer instrument model is built and combined with deep learning technology, the recognition accuracy and robustness of pointer instruments in complex environments is solved, and the high-precision and high-adaptive instrument reading recognition is achieved.

CN120544174APending Publication Date: 2025-08-26NAVAL UNIV OF ENG PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510536284.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

The existing pointer instrument reading method based on object detection reduces the recognition accuracy and is not strong when the pointer positioning is biased, dial distorted, image blurred, uneven light and tilted.

Method used

Adaptive pointer instrument reading recognition method based on YOLOv11n-SSH is adopted. By constructing a pointer table model, template images are collected and scale points fitted, mask images and key parameters are generated; combined with deep learning rotation object detection and feature matching, the improved YOLOv11n-SSH model is used to detect the pointer rotation box and dial center, and perspective transformation and pointer reading recognition are performed.

Benefits of technology

It improves the robustness and accuracy of pointer instrument readings, can effectively resist interference factors such as light changes, background noise and image distortion, and significantly improves detection accuracy and environmental adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120544174A_ABST
    Figure CN120544174A_ABST
Patent Text Reader

Abstract

The invention provides a self-adaptive pointer type instrument reading recognition method based on YOLOv11n-SSH. The self-adaptive pointer type instrument reading recognition method based on YOLOv11n-SSH comprises the steps that 1, a pointer table model is constructed, and key parameters are stored; 2, converting a template image and a registered image and updating key parameters; and step 3, rotating target detection and pointer meter reading identification based on deep learning. According to the method, the improved YOLOv11n-SSH model is combined with template registration matching, excellent robustness and accuracy are shown in a complex industrial environment, various interference factors such as illumination variation, background noise and image distortion can be effectively resisted, and reliable technical support is provided for instrument reading recognition in an intelligent inspection system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent inspection, and in particular to a method for identifying readings of adaptive pointer-type instruments based on YOLOv11n-SSH. Background Art

[0002] Accurately identifying pointer instrument readings is crucial in the field of intelligent inspection. However, current pointer instrument reading methods based on target detection often suffer from reduced recognition accuracy and weak robustness when encountering conditions such as pointer positioning deviation, dial distortion, blurred images, uneven lighting, and tilt. Summary of the Invention

[0003] The present invention provides an adaptive pointer instrument reading recognition method based on YOLOv11n-SSH, which can improve the robustness and accuracy of pointer instrument reading recognition.

[0004] An adaptive pointer meter reading recognition method based on YOLOv11n-SSH includes the following steps:

[0005] Step 1: Pointer table model construction and key parameter storage:

[0006] Collect the template image of the pointer table, determine the scale coordinates through interactive operations, perform circle fitting on the scale points based on the least squares method, and calculate the coordinates of the circle center and radius;

[0007] Generate a pointer area mask image based on the fitting radius and the preset inner radius, save the key parameters of the rectangular frame center point coordinates, circle center coordinates, mask image, initial angle offset and preset scale value array, and generate a binary configuration file;

[0008] Step 2: Template image and registered image conversion and key parameter update:

[0009] Load the parameters in the binary configuration file generated in step 1 and use interactive calibration to match the scale feature points of the template image in the registered image;

[0010] Based on the matched feature point pairs, the RANSAC algorithm is used to calculate the forward transformation matrix M1 and the inverse transformation matrix M2 from the template image to the registered image, and the updated data are stored in a binary file.

[0011] Step 3: Rotating target detection and pointer meter reading recognition based on deep learning.

[0012] Use the YOLOv11n-SSH model to detect the coordinates of the pointer rotation box vertices and the dial center in the real-time inspection image;

[0013] Load the transformation matrices M1 and M2 stored in step 2, use the SIFT algorithm to match the key points of the real-time inspection image and the registered image, and calculate the perspective transformation matrix M4 from the real-time inspection image to the registered image;

[0014] The transformation matrices M4 and M2 are applied to the pointer coordinates in sequence to map them to the template image. Based on the initial angle offset and the preset scale value array, the instrument reading is calculated through the geometric relationship between the pointer deflection angle and the scale.

[0015] Furthermore, step 1 includes:

[0016] Step 1.1, collect template images: collect clear front images of various pointer meters as template images for model construction;

[0017] Step 1.2, parameter preset: After completing the template image acquisition, enter the parameter preset phase, including checking the parameter configuration file name, optimizing the radius parameter, and unifying the image size;

[0018] Step 1.3, interactive rectangular frame coordinate acquisition and scale value mapping: obtain the coordinate data of the scale points marked in the form of rectangles by real-time tracking of the mouse interaction state, and establish the association relationship between the coordinates and the scale values ​​based on the preset template image scale value configuration file;

[0019] Step 1.4, circle fitting and angle calculation based on scale points: Receive the scale point coordinate data collected from step 1.3, use the least squares method to perform circle fitting, determine the coordinates of the circle center and the fitting radius, and calculate the offset and angle of the center point of the rectangular frame relative to the circle center;

[0020] Step 1.5, pointer area determination: Using the circle center coordinates obtained in step 1.4 as a reference, the fitted radius as the outer radius, and the inner radius parameters preset in step 1.2, determine the pointer area range to form a mask image;

[0021] Step 1.6: Save key parameters: Save the key parameters obtained from steps 1.3 to 1.5 to generate a binary configuration file. The key parameters include the rectangular frame center point coordinate matrix, instrument circle center position coordinates, mask image, template image, initial angle offset, and preset scale value array.

[0022] Furthermore, the parameter configuration file name, optimized radius parameter, and unified image size of step 1.2 parameter preset specifically include:

[0023] Check the parameter configuration file name: Make sure the name of the parameter configuration file in the configuration program is exactly the same as the template image file name to avoid configuration program operation errors caused by name mismatch;

[0024] Optimize radius parameters: Based on the differences in the inner diameter range of pointers on different pointer meters, the minimum radius parameters are adjusted to adapt to different dial structures and improve the accuracy of pointer recognition;

[0025] Unified image size: When you run the configuration program, the system automatically loads the template model image and scales it to 500×500 pixels to enhance program stability and model recognition accuracy.

[0026] Furthermore, step 2 includes:

[0027] Step 2.1. Data initialization: Load the binary configuration file generated by step 1. Pointer table model construction, parse and extract key parameters;

[0028] Step 2.2: Calibrate scale points on the registered image: Generate an adjustable interactive rectangular marker on the registered image based on the distribution of the center points of the rectangular frame of the template image. By comparing and locating the corresponding scale lines, establish a spatial correlation between the template image and the registered image, and complete the calibration and matching of the scale feature points.

[0029] Step 2.3: Align the template image with the registered image: Based on the coordinate array of the center point of the rectangular frame of the template image and the corresponding point set of the interactive annotation of the registered image, construct the spatial corresponding feature point pairs. Use the RANSAC algorithm to calculate the forward matrix M1 and inverse matrix M2 from the template image to the registered image, and establish a bidirectional projection transformation relationship.

[0030] Step 2.4: Use the forward matrix M1 from the template image to the registered image to map the center coordinates of the pointer table in the template image to the center coordinates of the registered image.

[0031] Step 2.5, key parameter update: Add the transformation matrix M1 from the template image to the registered image of the inspection point, the inverse transformation matrix M2 from the registered image to the template image, and the center point coordinate parameters of the registered image to the binary configuration file in step 1.6 to form the final key parameters.

[0032] Furthermore, step 3 specifically includes:

[0033] Step 3.1: Detecting a rotating target of a pointer instrument. Step 3.1 includes:

[0034] Step 3.11. Load the pre-trained model: First, load the YOLOv11n-SSH model that has been optimized and trained for pointer instrument target detection into the program.

[0035] Step 3.12, Image Reasoning and Coordinate Extraction: Specify the real-time inspection image path, and use the YOLOv11n-SSH model from step 3.11 to reason about the real-time inspection image and extract the vertex coordinates of the pointer rotation box and the center coordinates of the dial.

[0036] Step 3.13, determine the pixel positions of the pointer's starting and ending points in the real-time inspection image: determine the pointer's starting and ending points based on the pointer's rotation frame vertex coordinates and the dial's center coordinates, and extract the pointer's pixel positions in the real-time inspection image;

[0037] Step 3.14: Linear fitting to reduce errors: Use the least squares method to perform linear fitting of the pointer start and end points and the dial center point;

[0038] Step 3.2: Identify the pointer meter reading. Step 3.2 includes:

[0039] Step 3.21. Load the binary configuration file of the registered image: During the inspection process, index the real-time inspection image of the inspection point and load the corresponding binary configuration file of the registered image generated in step 2.5 as a reference.

[0040] Step 3.22, feature point matching between the real-time inspection image and the registered image: Use a scale-invariant feature transformation algorithm to determine the corresponding relationship between the feature points of the real-time inspection image and the registered image to form feature point pairs;

[0041] Step 3.23, calculate the perspective transformation matrix of the real-time inspection image and the registered image: Based on the determined feature point pairs, calculate the perspective transformation matrix M4 from the real-time inspection image to the registered image, and its inverse transformation matrix M3;

[0042] Step 3.24, Pointer Coordinate Correction Transformation: Perform two perspective transformations on the pixel position of the pointer in the real-time inspection image obtained in step 3.13 using transformation matrices M4 and M2, first mapping the pointer pixel coordinates from the real-time inspection image to the registration image, and then to the template image. This ultimately results in the pointer position information in the template image transformed from the real-time inspection image.

[0043] Step 3.25, instrument reading identification: For the instrument image after correction transformation, the pointer reading is identified by using the one-to-one correspondence between the pointer deflection angle and the instrument reading.

[0044] Furthermore, step 3.25 specifically includes:

[0045] For pointer instruments with uniform scales, obtain the pointer directions corresponding to the maximum and minimum scales, and identify the readings by establishing a linear correlation. Calculate using the following formula:

[0046]

[0047] Among them, θ0 is the angle from the pointer straight line to the starting scale in the plane coordinate system, θ1 is the angle from the starting scale to the maximum scale in the plane coordinate system, and v minis the starting scale reading, v max is the maximum scale reading, and r is the reading result of the pointer instrument;

[0048] For instruments with uneven scales, first determine the two scales where the pointer is located, and use the angle method to calculate the proportion of the point pointed by the pointer in the scale grid.

[0049] Furthermore, the YOLOv11n-SSH model optimized and trained for pointer instrument target detection proposes an improved YOLOv11-SSH algorithm based on the YOLOv11-OBB framework, by integrating the spatial adaptive feature modulation module SAFMN, the spatial pooling module StripPooling and the hierarchical complementary attention mixer module H-RAMi, including the improvement of combining YOLOv11n-OBB with SAFMN, the improvement of combining YOLOv11n-OBB with StripPooling modules, and the improvement of combining YOLOv11n-OBB with H-RAMi.

[0050] Furthermore, the improvements of combining YOLOv11n-OBB with SAFMN are as follows: SAFMN module is embedded in the key position of the model head, feature depth is processed after upsampling and feature concatenation, aggregated features are normalized with the help of GELU function, attention map is estimated, original input features are adaptively modulated according to the attention map, and long-range dependencies are learned from multi-scale feature representations.

[0051] Furthermore, the improvement of YOLOv11n-OBB combined with StripPooling module is as follows: the StripPooling module is introduced after the 3×3 convolution layer of the C3k2 module, and the long-range dependency and local context information are integrated through the strip-shaped receptive field characteristics of the StripPooling module; the StripPooling module is integrated before the SPPF module of the Backbone network, and its global context modeling capability is used to optimize the input features of SPPF, and the feature representation capability of the network in complex backgrounds is improved through a multi-level feature enhancement mechanism.

[0052] Furthermore, the improvement of combining YOLOv11n-OBB with H-RAMi is as follows: the H-RAMi module is embedded in the contact layer of the feature pyramid network FPN of YOLOv11n. After embedding, the H-RAMi module is integrated at multiple feature layers and scales, retaining rich features to improve the model's detection performance on the target.

[0053] By combining an improved YOLOv11n-SSH model with template registration and matching, this invention demonstrates excellent robustness and accuracy in complex industrial environments. It can effectively resist various interference factors such as illumination changes, background noise, and image distortion, providing reliable technical support for instrument reading recognition in intelligent inspection systems. Compared with traditional image processing methods and unimproved deep learning models, this method exhibits significant advantages in detection accuracy, computational efficiency, and environmental adaptability, fully demonstrating its practical value and application potential in the field of industrial production. This invention provides an efficient and reliable solution for instrument reading recognition in industrial automation production, and has important theoretical significance and practical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a flowchart of a method for adaptive pointer meter reading recognition based on YOLOv11n-SSH in an embodiment of the present invention;

[0055] Figure 2 are different types of standard pointer images according to embodiments of the present invention;

[0056] Figure 3 The red dot represents the scale value in the embodiment of the present invention;

[0057] Figure 4 is a circle fitted with a scale according to an embodiment of the present invention;

[0058] Figure 5 The scale and inner diameter of the embodiment of the present invention determine the pointer area;

[0059] Figure 6 This is a structural diagram of the YOLOv11n-SSH model according to an embodiment of the present invention;

[0060] Figure 7 Schematic diagram of SIFT key point matching between an inspection image and a registration image according to an embodiment of the present invention;

[0061] Figure 8 is a schematic diagram of identifying a pointer through a pointer area and a center point according to an embodiment of the present invention;

[0062] Figure 9 This is a schematic diagram of the principle of angle method reading recognition according to an embodiment of the present invention. DETAILED DESCRIPTION

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0064] The template image used in this invention serves as a standard model for the pointer dial. It is captured under ideal conditions. The lighting is uniform, the pointer dial is distortion-free, and the image is clear. Its primary function is to construct a standard model, providing accurate baseline data for geometric features and scale information for the entire system, serving as a crucial reference for subsequent operations.

[0065] The registered images in this invention correspond one-to-one with inspection points and are captured in a real-world environment. The real-world environment is complex and ever-changing, and registered images are often affected by various factors, including lighting variations, background noise, dial distortion, and image blur. However, multiple registered images can be associated with the same template image. The primary purpose of establishing this association is to combine inspection point information with the template image, thereby laying the foundation for subsequent real-time inspection image reading recognition, ensuring accurate and efficient recognition of pointer instrument readings even in complex real-world environments.

[0066] See also Figure 1 The embodiment of the present invention provides an adaptive pointer meter reading recognition method based on YOLOv11n-SSH, comprising the following steps:

[0067] Step 1: pointer table model construction and key parameter storage. Step 1 specifically includes:

[0068] Step 1.1, collect template images. When constructing the pointer meter model, the first task is to collect clear front images of various pointer meters as template images for model construction (refer to Figure 2 ).

[0069] Step 1.2: Configure parameter presets. After completing template image acquisition, enter the parameter preset phase, which mainly includes the following operations:

[0070] Check the parameter configuration file name: Make sure the name of the parameter configuration file in the configuration program is exactly the same as the template image file name to avoid configuration program operation errors caused by name mismatch.

[0071] Optimized radius parameters: To address the differences in the inner diameter range of pointers on different dials, the minimum radius parameter has been adjusted to accommodate different dial structures and improve the accuracy of pointer recognition.

[0072] Unified image size: When you run the configuration program, the system automatically loads the template model image and scales it to 500×500 pixels to enhance program stability and model recognition accuracy.

[0073] Step 1.3, interactive rectangular frame coordinate acquisition and scale value mapping. By real-time tracking the mouse interaction state, the coordinate data of the scale points marked in the form of rectangles are obtained. Based on the preset template image scale value configuration file, the relationship between the coordinates and the scale values ​​is established to provide accurate input data for subsequent circle fitting and angle calculation (refer to Figure 3 ).

[0074] Step 1.4: Circular fitting and angle calculation based on scale points. Receive the scale point coordinate data collected from step 1.3, use the least squares method to perform circular fitting, determine the coordinates of the circle center and the fitting radius, and calculate the offset and angle of the center point of the rectangular frame relative to the circle center. (Refer to Figure 4 ).

[0075] Step 1.5, determine the pointer area. Using the center coordinates obtained in step 1.4 as the reference, the fitting radius as the outer radius, and the inner radius parameters preset in step 1.2, accurately determine the pointer area range to form a mask image (reference Figure 5 ).

[0076] Step 1.6: Save key parameters. Save the key parameters obtained in steps 1.3 to 1.5, including the rectangular frame center coordinate matrix, instrument center position coordinates, mask image, template image, initial angle offset, and preset scale value array, to generate a binary configuration file.

[0077] Step 2: Template image and registered image conversion and key parameter update. Step 2 includes:

[0078] Step 2.1: Data Initialization. Load the binary configuration file generated by step 1: Pointer Table Model Construction, parse and extract geometric parameters such as the template image rectangle center coordinate matrix, instrument circle center position coordinates, mask image, template image, initial angle offset, and preset scale value array.

[0079] Step 2.2: Calibrate the scale points of the registered image. Based on the distribution of the center points of the rectangular frame of the template image, generate an adjustable interactive rectangular marker frame on the registered image. By comparing the corresponding scale lines, establish a spatial correlation between the template image and the registered image, and complete the calibration and matching of the scale feature points.

[0080] Step 2.3: Align the template image with the registered image. Based on the coordinate array of the template image's rectangular center point and the corresponding point set interactively annotated in the registered image, construct pairs of spatially corresponding feature points. Use the RANSAC algorithm to calculate the forward matrix M1 and inverse matrix M2 from the template image to the registered image, establishing a bidirectional projection transformation relationship.

[0081] Step 2.4: Use the forward matrix M1 from the template image to the registered image to map the center coordinates of the pointer table in the template image to obtain the center coordinates of the registered image.

[0082] Step 2.5: Update key parameters. Add the transformation matrix M1 from the template image to the registered image at the inspection point, the inverse transformation matrix M2 from the registered image to the template image, and the coordinate parameters of the center point of the registered image to the binary configuration file in step 1.6 to form the final key parameters.

[0083] Step 3: Rotating target detection and pointer meter reading recognition based on deep learning

[0084] The main functions of this step are rotating target detection and pointer meter recognition reading. It aims to accurately obtain pointer readings in real-time inspection images through a combination of feature matching and deep learning technology, thereby improving the accuracy and efficiency of inspection work. Step 3 specifically includes:

[0085] Step 3.1: Detecting a rotating target of a pointer instrument. Step 3.1 includes:

[0086] Step 3.11, load the pre-trained model. First, load the YOLOv11n-SSH model trained for pointer instrument target detection into the program (see the model network structure). Figure 6 shown).

[0087] Step 3.12: Image Reasoning and Coordinate Extraction. Specify the real-time inspection image path and perform reasoning on the real-time inspection image based on the pre-trained model in step 3.11 to extract the vertex coordinates of the pointer rotation box and the center coordinates of the dial.

[0088] Step 3.13: Determine the pixel positions of the pointer's starting and ending points in the real-time inspection image. Determine the pointer's starting and ending points based on the coordinates of the pointer's rotation frame vertices and the dial's center coordinates, and extract the pointer's pixel positions in the real-time inspection image.

[0089] Step 3.14: Linear fitting to reduce errors. Use the least squares method to perform linear fitting of the pointer start and end points and the dial center point to achieve high-precision detection and analysis of pointer instruments.

[0090] Step 3.2: Identify the pointer meter reading. Step 3.2 includes:

[0091] Step 3.21: Load the binary configuration file of the registered image. During the inspection process, index the real-time inspection image of the inspection point and load the corresponding binary configuration file of the registered image generated in step 2.5 as a reference.

[0092] Step 3.22, feature point matching between the real-time inspection image and the registered image. Use the scale-invariant feature transform (SIFT) algorithm to determine the corresponding relationship between the feature points of the real-time inspection image and the registered image, and form feature point pairs (such as Figure 8 shown).

[0093] Step 3.23: Calculate the perspective transformation matrix between the real-time inspection image and the registered image. Based on the determined feature point pairs, calculate the perspective transformation matrix M4 from the real-time inspection image to the registered image, and its inverse transformation matrix M3.

[0094] Step 3.24, pointer coordinate correction transformation. The pixel position of the pointer in the real-time inspection image obtained in step 3.13 is transformed twice using the transformation matrices M4 and M2 in sequence. That is, the pointer pixel coordinates are first mapped from the real-time inspection image to the registration image, and then mapped to the template image. Finally, the position information of the pointer in the real-time inspection image transformed to the template image is obtained (such as Figure 7 shown).

[0095] Step 3.25: Identify the instrument reading. For the instrument image after the correction transformation, use the one-to-one correspondence between the pointer deflection angle and the instrument reading to identify the pointer reading. Specifically:

[0096] For pointer instruments with uniform scales, obtain the pointer directions corresponding to the maximum and minimum scales and identify the readings by establishing a linear correlation. The following formula can be used for calculation:

[0097]

[0098] Among them, θ0 is the angle from the pointer straight line to the starting scale in the plane coordinate system, θ1 is the angle from the starting scale to the maximum scale in the plane coordinate system, and v min is the starting scale reading, v max is the maximum scale reading, and r is the reading result of the pointer instrument. Figure 9 shown.

[0099] For instruments with uneven scales, first determine the two scales where the pointer is located, and use the angle method to calculate the proportion of the point pointed by the pointer in the scale grid.

[0100] The YOLOv11n-SSH model is specifically described as follows:

[0101] In the field of target detection, the traditional YOLO model has obvious limitations when processing pointer instrument images: it is difficult to effectively capture long-distance dependencies, and it is not adaptable enough to scenes such as complex backgrounds, dial distortion, and lighting changes, resulting in limited pointer positioning accuracy. To address this key issue, the present invention proposes an improved YOLOv11-SSH algorithm based on the YOLOv11-OBB framework. By integrating the spatial adaptive feature modulation module (SAFMN), the spatial pooling module (StripPooling), and the hierarchical complementary attention mixer module (H-RAMi), the model's feature extraction capability and context modeling efficiency are significantly improved, effectively solving detection problems in actual engineering scenarios such as pointer positioning deviation and image blur. The details are as follows:

[0102] (1) Improvement of YOLOv11n-OBB and SAFMN

[0103] The SAFMN module effectively integrates cross-scale details of the dial and hands through multi-scale feature processing. This improves the model's discriminability and robustness, adapting to various dial types and accurately locating hands in blurred images. Integrating it into the YOLOv11n-OBB model significantly enhances image detail recovery and feature discriminability, thereby improving the position and orientation accuracy and overall performance of directed bounding box detection. Specifically, the SAFMN module is embedded in key locations within the model head. After upsampling and feature concatenation, it deeply processes features. It uses the GELU function to normalize aggregated features, estimates an attention map, and adaptively modulates the original input features based on the attention map to learn long-range dependencies from multi-scale feature representations.

[0104] (2) Improvement of YOLOv11n-OBB and StripPooling modules

[0105] The StripPooling module uses an innovative strip-shaped pooling operation to effectively extract multi-scale features through vertical and horizontal strip convolution kernels. This maintains the integrity of the dial structure at the global level and retains the detailed features of the pointer at the local level. This multi-scale feature fusion mechanism significantly improves the robustness of the model in complex scenarios, especially in the presence of interference factors such as dial geometric distortion, viewing angle tilt, and uneven lighting. Specifically: the StripPooling module is introduced after the 3×3 convolution layer of the C3k2 module. Through its strip-shaped receptive field characteristics, it effectively fuses long-range dependencies with local context information, significantly improving the richness and spatial accuracy of the module's output features, and systematically enhancing the model's detection performance for targets of different scales. The StripPooling module is integrated before the SPPF module of the Backbone network, leveraging its global context modeling capabilities to optimize the input features of the SPPF. The multi-level feature enhancement mechanism significantly improves the network's feature representation capabilities in complex backgrounds.

[0106] (3) Improvement of YOLOv11n-OBB and H-RAMi

[0107] H-RAMi integrates multi-scale and dual-dimensional attention mechanisms. By extracting features at multiple scales and combining them with weighted noise reduction using the attention mechanism, it reduces information loss and adapts to dynamic changes, enabling accurate pointer detection in complex environments. Specifically, to enhance the model's detection capabilities for objects such as pointers and dial dots and restore downsampled blurred details, the H-RAMi module is embedded in the contact layer of YOLOv11n's Feature Pyramid Network (FPN). Once embedded, the H-RAMi module fuses features at multiple scales across multiple feature layers, preserving rich features and significantly improving the model's target detection performance. It excels in pointer detection tasks in complex scenarios.

[0108] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. An adaptive pointer instrument reading recognition method based on YOLOv11n-SSH, characterized in that: The steps include: Step 1: Pointer table model construction and key parameter storage: Collect the template image of the pointer table, determine the scale coordinates through interactive operations, perform circle fitting on the scale points based on the least squares method, and calculate the coordinates of the circle center and radius; Generate a pointer area mask image based on the fitting radius and the preset inner radius, save the key parameters of the rectangular frame center point coordinates, circle center coordinates, mask image, initial angle offset and preset scale value array, and generate a binary configuration file; Step 2: Template image and registered image conversion and key parameter update: Load the parameters in the binary configuration file generated in step 1 and use interactive calibration to match the scale feature points of the template image in the registered image; Based on the matched feature point pairs, the RANSAC algorithm is used to calculate the forward transformation matrix M1 and the inverse transformation matrix M2 from the template image to the registered image, and the updated data are stored in a binary file. Step 3: Rotating target detection and pointer meter reading recognition based on deep learning. Use the YOLOv11n-SSH model to detect the coordinates of the pointer rotation box vertices and the dial center in the real-time inspection image; Load the transformation matrices M1 and M2 stored in step 2, use the SIFT algorithm to match the key points of the real-time inspection image and the registered image, and calculate the perspective transformation matrix M4 from the real-time inspection image to the registered image; The transformation matrices M4 and M2 are applied to the pointer coordinates in sequence to map them to the template image. Based on the initial angle offset and the preset scale value array, the instrument reading is calculated through the geometric relationship between the pointer deflection angle and the scale.

2. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH according to claim 1, characterized in that: Step 1 includes: Step 1.1, collect template images: collect clear front images of various pointer meters as template images for model construction; Step 1.2, parameter preset: After completing the template image acquisition, enter the parameter preset phase, including checking the parameter configuration file name, optimizing the radius parameter, and unifying the image size; Step 1.3, interactive rectangular frame coordinate acquisition and scale value mapping: obtain the coordinate data of the scale points marked in the form of rectangles by real-time tracking of the mouse interaction state, and establish the association relationship between the coordinates and the scale values ​​based on the preset template image scale value configuration file; Step 1.4, circle fitting and angle calculation based on scale points: Receive the scale point coordinate data collected from step 1.3, use the least squares method to perform circle fitting, determine the coordinates of the circle center and the fitting radius, and calculate the offset and angle of the center point of the rectangular frame relative to the circle center; Step 1.5, pointer area determination: Using the circle center coordinates obtained in step 1.4 as a reference, the fitted radius as the outer radius, and the inner radius parameters preset in step 1.2, determine the pointer area range to form a mask image; Step 1.6: Save key parameters: Save the key parameters obtained from steps 1.3 to 1.5 to generate a binary configuration file. The key parameters include the rectangular frame center point coordinate matrix, instrument circle center position coordinates, mask image, template image, initial angle offset, and preset scale value array.

3. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH as claimed in claim 2, characterized in that The parameter configuration file name, optimized radius parameter, and unified image size in step 1.2 parameter preset are specifically as follows: Check the parameter configuration file name: Make sure the name of the parameter configuration file in the configuration program is exactly the same as the template image file name to avoid configuration program operation errors caused by name mismatch; Optimize radius parameters: Based on the differences in the inner diameter range of pointers on different pointer watches, the minimum radius parameters are adjusted to adapt to different dial structures and improve the accuracy of pointer recognition; Unified image size: When you run the configuration program, the system automatically loads the template model image and scales it to 500×500 pixels to enhance program stability and model recognition accuracy.

4. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH as claimed in claim 2, characterized in that Step 2 includes: Step 2.

1. Data initialization: Load the binary configuration file generated by step 1. Pointer table model construction, parse and extract key parameters; Step 2.2: Calibrate scale points on the registered image: Generate an adjustable interactive rectangular marker on the registered image based on the distribution of the center points of the rectangular frame of the template image. By comparing and locating the corresponding scale lines, establish a spatial correlation between the template image and the registered image, and complete the calibration and matching of the scale feature points. Step 2.3: Align the template image with the registered image: Based on the coordinate array of the center point of the rectangular frame of the template image and the corresponding point set of the interactive annotation of the registered image, construct the spatial corresponding feature point pairs. Use the RANSAC algorithm to calculate the forward matrix M1 and inverse matrix M2 from the template image to the registered image, and establish a bidirectional projection transformation relationship. Step 2.4: Use the forward matrix M1 from the template image to the registered image to map the center coordinates of the pointer table in the template image to the center coordinates of the registered image. Step 2.5, key parameter update: Add the transformation matrix M1 from the template image to the registered image of the inspection point, the inverse transformation matrix M2 from the registered image to the template image, and the center point coordinate parameters of the registered image to the binary configuration file in step 1.6 to form the final key parameters.

5. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH as claimed in claim 4, characterized in that: Step 3 specifically includes: Step 3.1: Detecting a rotating target of a pointer instrument. Step 3.1 includes: Step 3.

11. Load the pre-trained model: First, load the YOLOv11n-SSH model that has been optimized and trained for pointer instrument target detection into the program. Step 3.12, Image Reasoning and Coordinate Extraction: Specify the real-time inspection image path, and use the YOLOv11n-SSH model from step 3.11 to reason about the real-time inspection image and extract the vertex coordinates of the pointer rotation box and the center coordinates of the dial. Step 3.13, determine the pixel positions of the pointer's starting and ending points in the real-time inspection image: determine the pointer's starting and ending points based on the pointer's rotation frame vertex coordinates and the dial's center coordinates, and extract the pointer's pixel positions in the real-time inspection image; Step 3.14: Linear fitting to reduce errors: Use the least squares method to perform linear fitting of the pointer start and end points and the dial center point; Step 3.2: Identify the pointer meter reading. Step 3.2 includes: Step 3.

21. Load the binary configuration file of the registered image: During the inspection process, index the real-time inspection image of the inspection point and load the corresponding binary configuration file of the registered image generated in step 2.5 as a reference. Step 3.22, feature point matching between the real-time inspection image and the registered image: Use a scale-invariant feature transformation algorithm to determine the corresponding relationship between the feature points of the real-time inspection image and the registered image to form feature point pairs; Step 3.23, calculate the perspective transformation matrix of the real-time inspection image and the registered image: Based on the determined feature point pairs, calculate the perspective transformation matrix M4 from the real-time inspection image to the registered image, and its inverse transformation matrix M3; Step 3.24, Pointer Coordinate Correction Transformation: Perform two perspective transformations on the pixel position of the pointer in the real-time inspection image obtained in step 3.13 using transformation matrices M4 and M2, first mapping the pointer pixel coordinates from the real-time inspection image to the registration image, and then to the template image. This ultimately results in the pointer position information in the template image transformed from the real-time inspection image. Step 3.25, instrument reading identification: For the instrument image after the correction transformation, the pointer reading is identified by using the one-to-one correspondence between the pointer deflection angle and the instrument reading.

6. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH according to claim 5, characterized in that: Step 3.25 specifically includes: For pointer instruments with uniform scales, obtain the pointer directions corresponding to the maximum and minimum scales, and identify the readings by establishing a linear correlation. Calculate using the following formula: Among them, θ0 is the angle from the pointer straight line to the starting scale in the plane coordinate system, θ1 is the angle from the starting scale to the maximum scale in the plane coordinate system, and v min is the starting scale reading, v max is the maximum scale reading, and r is the reading result of the pointer instrument; For instruments with uneven scales, first determine the two scales where the pointer is located, and use the angle method to calculate the proportion of the point pointed by the pointer in the scale grid.

7. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH according to claim 5, characterized in that: The YOLOv11n-SSH model optimized and trained for pointer instrument target detection proposes an improved YOLOv11-SSH algorithm based on the YOLOv11-OBB framework, which integrates a spatial adaptive feature modulation module SAFMN, a spatial pooling module StripPooling, and a hierarchical complementary attention mixer module H-RAMi, including an improved combination of YOLOv11n-OBB and SAFMN, an improved combination of YOLOv11n-OBB and StripPooling modules, and an improved combination of YOLOv11n-OBB and H-RAMi.

8. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH according to claim 7, characterized in that: The improvements combined with YOLOv11n-OBB and SAFMN are as follows: the SAFMN module is embedded in the key position of the model head, the features are deeply processed after upsampling and feature splicing, the aggregated features are normalized with the help of the GELU function, the attention map is estimated, the original input features are adaptively modulated according to the attention map, and long-range dependencies are learned from multi-scale feature representations.

9. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH according to claim 7, characterized in that: The specific improvements of the combination of YOLOv11n-OBB and StripPooling modules are as follows: the StripPooling module is introduced after the 3×3 convolutional layer of the C3k2 module, and the long-range dependency and local context information are integrated through the strip-shaped receptive field characteristics of the StripPooling module; the StripPooling module is integrated before the SPPF module of the Backbone network, and its global context modeling capability is used to optimize the input features of SPPF, and the network's feature representation capability in complex backgrounds is improved through a multi-level feature enhancement mechanism.

10. The adaptive pointer meter reading recognition method based on YOLOv11n-SSH according to claim 7, characterized in that: The improvement of combining YOLOv11n-OBB with H-RAMi is as follows: the H-RAMi module is embedded in the contact layer of YOLOv11n's feature pyramid network FPN. After embedding, the H-RAMi module is integrated at multiple feature layers and scales, retaining rich features to improve the model's detection performance on targets.