Element identification method and device of electric energy meter circuit board and computer equipment
By acquiring and screening the video image data of the power meter circuit board, combining shooting angle and clarity information, determining the target video frame, and using a pre-trained model for identification, the problem of reduced recognition accuracy in the dual-layer board design of the power meter PCB is solved, achieving more efficient and accurate component recognition.
Patent Information
- Application Number
- CN202510138738.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-05-02
AI Technical Summary
The double-layer board design of the power meter PCB is prone to problems such as uneven light and occlusion in image recognition, resulting in reduced component recognition accuracy.
By acquiring the video image data of the power meter circuit board, combining the shooting angle information and image clarity evaluation information of each video frame, the target video frame is determined, and the pre-trained component recognition model is used for identification.
It significantly improves the accuracy and robustness of the identification of power meter circuit board components, effectively solving the problem of degradation of recognition accuracy caused by uneven light, occlusion or blur.
Smart Images

Figure CN119919858A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for identifying components of an electric energy meter circuit board. Background Art
[0002] In the field of electronic manufacturing, the automatic identification of printed circuit board (PCB) components of electric energy meters is one of the key technologies for realizing intelligent detection and fault diagnosis. Traditional manual detection methods are not only inefficient, but also greatly affected by human factors, and it is difficult to meet the requirements of high precision and high efficiency for large-scale production. In recent years, target detection algorithms based on deep learning have been widely used in PCB component recognition, which significantly improves the recognition effect by utilizing the efficiency and accuracy of the model.
[0003] However, in actual applications, many electric energy meter PCBs are double-layer boards, which are more prone to uneven lighting and occlusion when taking images, affecting component recognition and reducing the accuracy of component recognition results. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for component identification of an electric energy meter circuit board, which can improve the accuracy of component identification of the electric energy meter circuit board, in order to address the above technical problems.
[0005] In a first aspect, the present application provides a method for identifying components of an electric energy meter circuit board, comprising:
[0006] Acquire video image data of the circuit board of the electric energy meter to be identified;
[0007] Determining a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data;
[0008] According to the target video frame and the pre-trained component recognition model, a component recognition result of the electric energy meter circuit board to be recognized is obtained.
[0009] In one embodiment, determining a target video frame from the video frames of the video image data according to the shooting angle information and the image clarity evaluation information of each video frame in the video image data comprises:
[0010] Determining shooting angle information of each video frame according to the shooting time corresponding to each video frame in the video image data;
[0011] Determining candidate video frames from the video frames of the video image data according to the shooting angle information of each video frame;
[0012] Determining image clarity assessment information of the candidate video frame;
[0013] A target video frame is determined from the candidate video frames according to the image definition evaluation information of the candidate video frames.
[0014] In one of the embodiments, determining the image clarity evaluation information of the candidate video frame includes:
[0015] Calculating image gradient information of each pixel in the candidate video frame;
[0016] Image definition evaluation information of the candidate video frame is determined according to image gradient information of all pixels in the candidate video frame.
[0017] In one embodiment, obtaining the component recognition result of the electric energy meter circuit board to be recognized according to the target video frame and the pre-trained component recognition model includes:
[0018] Performing image preprocessing on the target video frame to obtain a processed target video frame;
[0019] Inputting the processed target video frame into the pre-trained component recognition model to obtain output recognition frame information;
[0020] According to the identification frame information, a component identification result of the electric energy meter circuit board to be identified is determined.
[0021] In one of the embodiments, the identification frame information includes identification frame confidence, identification frame coordinate information and component identification information;
[0022] Determining the component recognition result of the electric energy meter circuit board to be recognized according to the recognition frame information includes:
[0023] Calculating the intersection-and-union ratio between two identified frames according to the identified frame coordinate information in the identified frame information;
[0024] For the two recognition frames whose intersection-over-union ratio is greater than a preset threshold, removing the recognition frame with the lowest confidence level;
[0025] The component identification result of the electric energy meter circuit board to be identified is obtained based on the identification frame coordinate information and the component identification information of the screened and retained identification frame.
[0026] In one embodiment, the step of obtaining video image data of a circuit board of an electric energy meter to be identified includes:
[0027] The circuit board of the electric energy meter to be identified is fixed vertically at the center position of the surround shooting;
[0028] According to preset shooting parameters, the camera device is controlled to perform surround shooting of the circuit board of the electric energy meter to be identified, so as to obtain video image data of the circuit board of the electric energy meter to be identified.
[0029] In a second aspect, the present application also provides a component identification device for an electric energy meter circuit board, comprising:
[0030] A video acquisition module, used to acquire video image data of the circuit board of the electric energy meter to be identified;
[0031] a target frame determination module, configured to determine a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data;
[0032] The component recognition module is used to obtain the component recognition result of the electric energy meter circuit board to be identified according to the target video frame and the pre-trained component recognition model.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Acquire video image data of the circuit board of the electric energy meter to be identified;
[0035] Determining a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data;
[0036] According to the target video frame and the pre-trained component recognition model, a component recognition result of the electric energy meter circuit board to be recognized is obtained.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0038] Acquire video image data of the circuit board of the electric energy meter to be identified;
[0039] Determining a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data;
[0040] According to the target video frame and the pre-trained component recognition model, a component recognition result of the electric energy meter circuit board to be recognized is obtained.
[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0042] Acquire video image data of the circuit board of the electric energy meter to be identified;
[0043] Determining a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data;
[0044] According to the target video frame and the pre-trained component recognition model, a component recognition result of the electric energy meter circuit board to be recognized is obtained.
[0045] The above-mentioned method, device, computer equipment, computer-readable storage medium and computer program product for component identification of electric energy meter circuit boards first obtain video image data of the electric energy meter circuit board to be identified. By obtaining the video image data, compared with a single-frame image, the video data can capture the performance of the electric energy meter circuit board under different angles, lighting and views, and can fully cover multiple angles and areas of the electric energy meter circuit board, providing basic data support for subsequent target frame screening, which helps to more accurately extract high-quality images and reduce recognition errors caused by single-angle defects; then, according to the shooting angle information and image clarity evaluation information of each video frame in the video image data, the target video frame is determined from the video frame of the video image data, and by combining The shooting angle information and image clarity evaluation information can effectively screen out the target video frames that meet the requirements of optimal viewing angle and clarity, thereby avoiding component recognition errors caused by image blur, uneven lighting or occlusion, ensuring the quality of input data and improving the accuracy of component recognition from the source; finally, according to the target video frame and the pre-trained component recognition model, the component recognition result of the electric energy meter circuit board to be identified is obtained. By inputting the screened target video frame into the pre-trained component recognition model, the component category, position and boundary can be recognized quickly and efficiently. The pre-trained model uses rich prior knowledge and can maintain a high recognition accuracy even in the case of complex component layout, thereby improving the robustness of the component recognition task. In the above method, by acquiring video image data, screening target video frames and performing component recognition based on a pre-trained model, the accuracy and robustness of component recognition on the electric energy meter circuit board are significantly improved. In particular, by combining shooting angle information and clarity assessment information, the problem of reduced recognition accuracy caused by uneven lighting, occlusion or blur can be effectively solved, thereby ensuring the optimization of the entire process from image acquisition to recognition results, and providing a more reliable solution for component recognition in complex electric energy meter circuit board scenarios such as double-layer circuit boards. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A schematic diagram of a flow chart of a component identification method for an electric energy meter circuit board in one embodiment;
[0048] Figure 2 A schematic flow chart of a target video frame determination step in one embodiment;
[0049] Figure 3 A schematic flow chart of a step of determining a component recognition result in one embodiment;
[0050] Figure 4 It is a flowchart of a component identification method of an electric energy meter circuit board in another embodiment;
[0051] Figure 5 A schematic diagram of labeling training samples for identifying components on a circuit board of an electric energy meter in one embodiment;
[0052] Figure 6 A schematic diagram of a model structure of a component identification model in an embodiment;
[0053] Figure 7 A schematic diagram of component recognition results of a target electric energy meter circuit board in one embodiment;
[0054] Figure 8 It is a structural block diagram of a component identification device of an electric energy meter circuit board in one embodiment;
[0055] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] In one embodiment, Figure 1As shown, a method for identifying components of an electric energy meter circuit board is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:
[0058] Step S101, obtaining video image data of a circuit board of an electric energy meter to be identified.
[0059] The video image data refers to the image sequence collected by the camera device to represent the circuit board of the electric energy meter under specific angles and lighting conditions, which contains the image information of the layout of the components on the surface of the circuit board of the electric energy meter. The video image data can be obtained by shooting from multiple angles, providing a variety of viewing angles and image features for the subsequent target video frame screening.
[0060] Exemplarily, the terminal can perform dynamic video shooting of the electric energy meter circuit board to be identified through a camera device installed on a mechanical arm, a rotating pan-tilt head or a track system to obtain video image data from multiple angles. Specifically, the terminal first fixes the electric energy meter circuit board in the shooting area, and moves or adjusts the shooting angle on a preset track through the camera device to gradually scan and shoot the entire surface of the electric energy meter circuit board. In this process, the terminal can ensure that each acquired video frame has different viewing angle information by controlling the pitch angle, rotation angle or moving speed of the camera device, thereby capturing the complete video data of the electric energy meter circuit board at multiple angles. In addition, in order to improve the clarity and stability of the collected video image data, the terminal can further optimize the quality of the video data by setting appropriate lighting conditions, using high-resolution camera equipment, and introducing image anti-shake technology. Finally, the terminal stores the acquired video image data in a database for use in subsequent steps.
[0061] Step S102 : determining a target video frame from the video frames of the video image data according to the shooting angle information and the image definition evaluation information of each video frame in the video image data.
[0062] Among them, shooting angle information refers to the camera angle, position and direction data of each video frame obtained by the camera device during shooting, which reflects the viewing angle of the electric energy meter circuit board corresponding to the video frame; image clarity evaluation information refers to the quantitative index of image clarity obtained by performing quality detection on each video frame by the terminal, which is used to determine whether the video frame has high-quality features that can be used for identification.
[0063] Exemplarily, the terminal first extracts the shooting angle information of each video frame from the video image data, for example, by recording the pitch angle, rotation angle and position coordinates of the camera, and marking the viewing angle of each frame. Then, the terminal evaluates the clarity of each video frame and calculates the corresponding clarity score, for example, by counting the number of edge details through a gradient detection method, or by comprehensively judging the clarity of the frame through contrast analysis, noise detection and other methods. Next, the terminal filters the video frames according to a preset angle range and clarity threshold. Specifically, the terminal preferentially selects video frames whose shooting angles meet the set range (such as deviations from the vertical direction of the electric energy meter circuit board are less than a specific angle) and whose clarity scores are higher than the threshold as candidates for the target video frames. For multiple candidate video frames, the terminal can further compare the clarity scores and select the best frame as the final target video frame.
[0064] Step S103, obtaining a component recognition result of the electric energy meter circuit board to be recognized according to the target video frame and the pre-trained component recognition model.
[0065] Among them, the pre-trained component recognition model refers to a model pre-trained by a deep learning algorithm, which can detect the component category and its corresponding position on the electric energy meter circuit board based on the input image.
[0066] Exemplarily, the terminal first normalizes the target video frame to meet the input requirements of the pre-trained component recognition model, such as adjusting the image resolution, normalizing the grayscale value range, or enhancing edge features. Subsequently, the terminal inputs the processed target video frame into the pre-trained component recognition model, and the model extracts the feature information of the components in the frame through structures such as convolutional neural networks and generates corresponding outputs. The output results usually include multiple recognition bounding boxes and related information, such as: the position coordinates of each bounding box (including the center point, width, and height); the predicted probability of the component category to which the component in each bounding box belongs (such as resistors, capacitors, etc.); and the confidence score of each bounding box (indicating the credibility of the bounding box containing the component).
[0067] Next, after receiving the model output results, the terminal further uses the non-maximum suppression (NMS) algorithm to post-process the bounding box to remove redundant borders with high overlap and retain bounding boxes with high confidence and non-overlapping positions as the final component recognition results.
[0068] In the above-mentioned component recognition method of the electric energy meter circuit board, first, the video image data of the electric energy meter circuit board to be recognized is obtained. By obtaining the video image data, compared with a single-frame image, the video data can capture the performance of the electric energy meter circuit board under different angles, lighting and views, and can comprehensively cover multiple angles and areas of the electric energy meter circuit board, so as to provide basic data support for subsequent target frame screening, help to more accurately extract high-quality images, and reduce recognition errors caused by single-angle defects; then, according to the shooting angle information and image clarity evaluation information of each video frame in the video image data, the target video frame is determined from the video frames of the video image data, and by combining the shooting angle information and image clarity evaluation information, the target video frame is determined from the video frames of the video image data. The estimation information can effectively filter out the target video frames that meet the requirements of the best viewing angle and clarity, thereby avoiding component recognition errors caused by problems such as image blur, uneven illumination or occlusion, ensuring the quality of input data and improving the accuracy of component recognition from the source; finally, according to the target video frame and the pre-trained component recognition model, the component recognition result of the electric energy meter circuit board to be identified is obtained. By inputting the filtered target video frame into the pre-trained component recognition model, the component category, position and boundary can be quickly and efficiently recognized. The pre-trained model uses rich prior knowledge and can maintain a high recognition accuracy in the case of complex component layout, thereby improving the robustness of the component recognition task. In the above method, by acquiring video image data, filtering target video frames and performing component recognition based on the pre-trained model, the accuracy and robustness of component recognition of the electric energy meter circuit board are significantly improved. In particular, by combining the shooting angle information and the clarity evaluation information, the problem of reduced recognition accuracy caused by uneven illumination, occlusion or blur can be effectively solved, thereby ensuring the optimization of the entire process from image acquisition to recognition results, and providing a more reliable solution for component recognition of complex electric energy meter circuit board scenes such as double-layer circuit boards.
[0069] In an exemplary embodiment, Figure 2 As shown, the above step S102 determines the target video frame from the video frames of the video image data according to the shooting angle information and the image definition evaluation information of each video frame in the video image data, and can also be implemented by the following steps:
[0070] Step S201, determining shooting angle information of each video frame according to the shooting time corresponding to each video frame in the video image data;
[0071] Step S202, determining candidate video frames from the video frames of the video image data according to the shooting angle information of each video frame;
[0072] Step S203, determining image definition evaluation information of the candidate video frame;
[0073] Step S204: determining a target video frame from the candidate video frames according to the image definition evaluation information of the candidate video frames.
[0074] Exemplarily, the terminal can first calculate the shooting angle information of each video frame based on the shooting time information of each video frame in the video image data, combined with the trajectory and posture parameters (such as rotation angle and pitch angle) of the camera at the corresponding time point. Specifically, the camera device will add timestamp information to each frame of video data when recording, and record the specific shooting time of the frame. The terminal obtains the shooting time corresponding to each frame by parsing the timestamp information in the video data, ensuring that the time information of each frame of video data is synchronized with the trajectory record of the camera device. Then, the terminal presets the motion trajectory of the camera device, for example: rotating platform: the device rotates around the electric energy meter circuit board at a fixed speed (such as 10 degrees per second); mechanical arm: the device moves along a set orbiting path (such as a circular or elliptical trajectory); track device: the device moves in a plane around the electric energy meter circuit board and advances at a uniform speed. The terminal calculates the position of the camera device at each time point according to the motion control logic of the camera device and combined with the time information, for example, calculating the rotation angle of the camera device according to the rotation angular velocity. At each time point, the terminal records the attitude parameters of the camera device, including: pitch angle: describes the up and down tilt angle of the camera device; rotation angle: describes the rotation angle of the camera device in the horizontal plane; viewing direction: indicates the direction of the camera lens. The attitude parameters are usually obtained in real time through a built-in gyroscope or position sensor. Finally, the terminal calculates the specific shooting angle information of each video frame based on the shooting time of the camera device at that time point and the motion trajectory and attitude parameters of the camera device.
[0075] By analyzing the shooting angle information, the terminal can determine whether each video frame meets the preset shooting angle range. For example, the terminal can set the video frames whose angles deviate from the front viewing angle of the circuit board by no more than 10 degrees as the candidate range, thereby eliminating invalid frames with large angle deviations.
[0076] Subsequently, the terminal further evaluates the image clarity of the selected candidate video frames. Specifically, the terminal can use a gradient analysis method (such as the Sobel operator or the Tenengrad gradient function) to calculate the clarity score of the candidate video frames. The terminal detects the gradient amplitude of the grayscale value change in the candidate video frame, counts the number of pixels whose gradient amplitude exceeds a preset threshold, or directly obtains a clarity score based on the gradient amplitude. For candidate frames with low clarity scores, the terminal removes them from the candidate set.
[0077] Finally, the terminal sorts the candidate video frames according to the clarity score and further selects the target video frame based on the shooting angle information. The frame with the highest clarity score is selected as the target video frame. If there are multiple frames with similar scores, the frame with the smallest shooting angle deviation is further selected to ensure the best quality of the target video frame.
[0078] In this embodiment, by combining the shooting angle information and image clarity evaluation information of each video frame in the video image data, the target video frame with reasonable viewing angle and highest clarity is accurately screened out. This not only improves the quality of input data, but also effectively solves the problem of reduced component recognition accuracy caused by shooting angle deviation or image blur, thereby significantly improving the reliability and efficiency of subsequent recognition tasks.
[0079] In an exemplary embodiment, the above-mentioned step S203 determines the image clarity evaluation information of the candidate video frame, and also includes: calculating the image gradient information of each pixel in the candidate video frame; and determining the image clarity evaluation information of the candidate video frame based on the image gradient information of all pixels in the candidate video frame.
[0080] Among them, image gradient information refers to the degree of change in the grayscale value of each pixel, which is used to represent the intensity of edges or details in the image; image clarity assessment information is a quantitative indicator obtained by summarizing pixel gradient information, which is used to evaluate the overall clarity of candidate video frames.
[0081] Exemplarily, the terminal first grayscales the candidate video frame and converts the color image into a single-channel grayscale image to simplify the gradient calculation process. Then, the terminal calculates the horizontal gradient G of each pixel in the candidate video frame by a gradient calculation method (for example, using the Sobel operator). x and the longitudinal gradient G y Perform the calculation:
[0082]
[0083]
[0084] Among them, G x and G y The corresponding Sobel operators are:
[0085]
[0086] Among them, g(x, y) is the grayscale value of the pixel (x, y) in the candidate video frame.
[0087] Then, the terminal calculates the gradient amplitude of each pixel based on the horizontal and vertical gradients of each pixel:
[0088]
[0089] The larger the gradient amplitude, the more significant the grayscale change of the pixel point is, and the point may be located at the edge or detail area of the image.
[0090] The terminal counts the gradient amplitudes of all pixels in the candidate video frame and calculates the image clarity evaluation information. For example, the terminal can count the number of pixels whose gradient amplitudes exceed a preset threshold, or calculate the average or sum of all gradient amplitudes to quantify the overall clarity of the candidate video frame; or it can count the sum of the gradient amplitudes of all pixels whose gradient amplitudes are greater than a certain threshold T, that is, the image clarity evaluation information D(f):
[0091] .
[0092] A clear image usually has obvious edges and details, while a blurry image lacks clear edges. If an image has obvious edges, the calculated gradient value is larger, which means that the grayscale changes in the image are stronger; if an image lacks obvious edges, the calculated gradient value is smaller, and the grayscale changes in the image are relatively gentle. Therefore, the larger the gradient amplitude, the clearer it can be considered.
[0093] In this embodiment, by calculating the image gradient information of each pixel in the candidate video frame, the overall clarity of the candidate video frame is comprehensively evaluated to ensure that the screened image has sufficient details and edge features. This can effectively avoid the problem of video frame misselection caused by blur or noise, thereby improving the accuracy and robustness of subsequent component recognition tasks.
[0094] In an exemplary embodiment, Figure 3 As shown, the above step S103 obtains the component recognition result of the electric energy meter circuit board to be recognized according to the target video frame and the pre-trained component recognition model, and can also be implemented by the following steps:
[0095] Step S301, performing image preprocessing on the target video frame to obtain a processed target video frame;
[0096] Step S302, inputting the processed target video frame into a pre-trained component recognition model to obtain output recognition frame information;
[0097] Step S303: determining the component recognition result of the electric energy meter circuit board to be recognized according to the recognition frame information.
[0098] Among them, image preprocessing is a series of optimization operations on the target video frame to eliminate the impact of background, reflection, noise or size inconsistency on recognition performance during the shooting process, thereby improving the quality of input data; recognition border information is the prediction result of the model output about the component category and position; component recognition result is the final classification and positioning information screened after post-processing.
[0099] Exemplarily, the terminal performs the following preprocessing steps on the target video frame:
[0100] Background and reflection processing: The terminal processes the background and reflection problems in the target video frame through background subtraction and histogram equalization: Background subtraction: The terminal obtains a pure background image of the shooting area, and then performs pixel-level subtraction operations on the target video frame and the background image to eliminate background interference and retain only the information of the target object, such as the component area of the electric energy meter circuit board. It can effectively reduce the impact of background noise on subsequent recognition tasks. Reflection processing: The terminal applies histogram equalization technology to the target video frame, redistributes the grayscale values of the image, makes the grayscale histogram in the image more uniform, and enhances the contrast between darker and brighter areas, thereby reducing local overexposure or missing details caused by reflections. The processed video frame can better highlight the edges of components and detail areas, providing clearer input data for the model.
[0101] Data cleaning: The terminal cleans the noise data that may exist in the target video frame to ensure the purity and validity of the data: the target video frame is denoised using the median filter algorithm. Specifically, the terminal calculates the median of the grayscale value in the neighborhood window of each pixel in the image, and replaces the original grayscale value of the pixel with the median. This method can effectively eliminate salt and pepper noise and local mutation noise, while retaining the edge information of the image, thereby removing invalid data while retaining the detailed features that are useful for component identification.
[0102] Size normalization: The terminal adjusts the target video frame to the fixed size required by the pre-trained component recognition model: Size normalization ensures that all images are consistent in an important dimension (such as resolution) to facilitate subsequent data processing and model training. The terminal will scale or crop the target video frame to ensure that it meets the model requirements.
[0103] Next, the terminal inputs the target video frame that has undergone the above preprocessing into the pre-trained component recognition model. The model outputs the recognition border information, including the coordinate position of the border, the component category, and the confidence value through feature extraction and classification operations. Subsequently, the terminal uses the non-maximum suppression algorithm to remove redundant borders based on the recognition border information, and only retains the optimal border as the final component recognition result.
[0104] In this embodiment, background subtraction and histogram equalization are used to significantly reduce the impact of background interference and reflection on image quality; median filtering is used to remove noise data to ensure the validity of input data; and size normalization is used to unify the specifications and distribution of input data to improve the stability and accuracy of model recognition. Combined with the recognition results of the pre-trained model and the subsequent border redundancy removal processing, accurate classification and positioning of the components of the electric energy meter circuit board are achieved, providing high-quality basic data for subsequent detection and analysis tasks.
[0105] In an exemplary embodiment, the identification border information includes identification border confidence, identification border coordinate information and component identification information; the above-mentioned step S303 determines the component identification result of the electric energy meter circuit board to be identified based on the identification border information, and also includes: calculating the intersection and union ratio between each two identification borders based on the identification border coordinate information in the identification border information; for two identification borders whose intersection and union ratio is greater than a preset threshold, removing the identification border with the lowest identification border confidence; obtaining the component identification result of the electric energy meter circuit board to be identified based on the identification border coordinate information and component identification information of the identification borders that have been screened and retained.
[0106] Among them, the recognition border information refers to the prediction results of the position, category and confidence of the components on the power meter circuit board output by the pre-trained component recognition model, including the recognition border confidence (indicating the degree of credibility of the model's prediction of the target category in the border), recognition border coordinate information (the coordinates of the center point of the border and the width and height information) and component recognition information (component category, such as resistors, capacitors, etc.). The intersection over union (IoU) is an indicator used to measure the degree of overlap between two recognition borders. Its value is between 0 and 1. The larger the value, the higher the degree of overlap between the two borders.
[0107] Exemplarily, the terminal processes the identified border information as follows:
[0108] First, calculate the intersection-over-union ratio between the two identified borders: for each identified border, calculate the area of the border according to its identified border coordinate information, and compare it with other identified borders one by one to calculate the intersection-over-union ratio (IoU) of the two borders. The calculation formula for the intersection-over-union ratio is: IoU = the union area of border A and border B / the intersection area of border A and border B.
[0109] If the IoU of two bounding boxes is greater than a preset threshold (eg, 0.5), they are considered to be redundant detections of the same component and need further screening.
[0110] Then, remove the border with the lowest confidence level: for two recognized borders whose intersection-over-union ratio is greater than a preset threshold, the terminal compares the confidence level of each border, retains the border with higher confidence level, and removes the border with lower confidence level. This operation can effectively reduce redundant borders and ensure that only one high-quality border is retained for each component in the final result.
[0111] Finally, the final component recognition result is determined based on the selected and retained borders: the terminal uses the selected and retained borders as the final valid border set, extracts the border coordinate information and component recognition information from them, and generates the component recognition result of the electric energy meter circuit board to be identified. Each retained border corresponds to a component, and its type is marked by the component category information (such as resistor, capacitor, etc.), and the position information (coordinates and size) of the border is recorded at the same time.
[0112] In this embodiment, the intersection-and-union ratio of the recognition frame is calculated to accurately screen out the best frame covering the same component, avoiding the interference of redundant frames on the final recognition result. In addition, by removing low-confidence frames through confidence comparison, the accuracy and reliability of the recognition result can be significantly improved. The final component recognition result can accurately reflect the type, location and distribution of components on the electric energy meter circuit board, providing high-quality data support for subsequent circuit board analysis, detection and fault diagnosis.
[0113] In an exemplary embodiment, the above-mentioned step S101 obtains the video image data of the electric energy meter circuit board to be identified, and also includes: vertically fixing the electric energy meter circuit board to be identified at the center position of surround shooting; according to preset shooting parameters, controlling the camera device to perform surround shooting of the electric energy meter circuit board to be identified to obtain the video image data of the electric energy meter circuit board to be identified.
[0114] Among them, vertical fixation of the electric energy meter circuit board to be identified means that the electric energy meter circuit board is kept in a vertical plane position by a fixing device to ensure that it will not tilt or shake during the shooting process, thereby ensuring the stability and consistency of the video image data; preset shooting parameters refer to the shooting equipment parameters set in advance to ensure the shooting effect, including the rotation speed, angle interval, shooting resolution and exposure settings of the camera equipment; surround shooting means that the camera equipment moves around the electric energy meter circuit board with a preset trajectory to capture image data at different angles in turn.
[0115] For example, first, the circuit board of the energy meter is fixed: the terminal uses a dedicated fixing device (such as a vertical clamp or a fixing bracket) to vertically fix the circuit board of the energy meter to be identified in the center of the surrounding shooting area to ensure that it remains stable during the entire shooting process. At the same time, the height and angle of the fixing device are adjusted to keep the main plane of the circuit board of the energy meter in a positive relationship with the viewing angle of the shooting device to reduce deviation.
[0116] Then, the camera equipment is controlled and set: the terminal sets the shooting parameters of the camera equipment according to the size and structural characteristics of the electric energy meter circuit board to be identified. For example: resolution: set the resolution of the video recording to ensure the clarity of the video; frame rate: set the number of frames captured per second (such as 30fps or 60fps) to ensure that the continuous video can fully record the movement details of the electric energy meter circuit board; exposure setting: adjust the exposure time, aperture size and ISO parameters of the camera equipment to avoid overly bright or dark areas in the video; video encoding format: select a video format suitable for subsequent processing to optimize storage efficiency and compatibility.
[0117] Next, the surround recording process: the terminal controls the camera to continuously record along the preset trajectory around the electric energy meter circuit board to ensure the capture of video image data from different angles. The specific process is as follows: If the camera is installed on a rotating platform, the terminal controls the rotating platform to rotate at a uniform speed, and the camera is fixed on the platform to aim at the electric energy meter circuit board for recording; if the camera is installed on a robotic arm, the terminal controls the robotic arm to move along the preset surround trajectory, while adjusting the viewing angle of the camera to always aim at the electric energy meter circuit board; if the camera is installed on a track device, the terminal controls the track device to move smoothly around the electric energy meter circuit board to record video data from multiple angles. During the recording process, the terminal can attach shooting angle, timestamp and other information to each frame of the image recorded by the camera for subsequent processing and analysis.
[0118] In this embodiment, the electric energy meter circuit board is captured in a surround manner by continuous video recording, thereby capturing multi-angle and complete visual information of the electric energy meter circuit board. Compared with single-frame shooting, video recording can more accurately cover each area of the electric energy meter circuit board and reduce the problem of missing component information due to a single perspective or sudden interference. In addition, by reasonably setting the recording parameters (such as frame rate, resolution, and exposure settings), the quality and stability of the video data are guaranteed, laying a solid foundation for subsequent target video frame screening and component identification.
[0119] In another exemplary embodiment, Figure 4 As shown, the present application provides a method for identifying components of an electric energy meter circuit board, the method comprising:
[0120] Step S401, capturing panoramic video of the electric energy meter circuit board.
[0121] Step S402: data preprocessing.
[0122] Step S403: extract static key frames based on comprehensive evaluation of shooting angle and clarity.
[0123] Step S404: Generate and annotate a training set.
[0124] Step S405: training a YOLO target recognition model.
[0125] Step S406, saving the YOLO target recognition model and recognition results.
[0126] Step S407: panoramic video capture and static key frame extraction of the target electric energy meter circuit board.
[0127] Step S408: Identify component targets based on the trained YOLO target recognition model.
[0128] Exemplarily, step S401, panoramic video acquisition of the electric energy meter circuit board: first, select a high-precision, high-stability manipulator or pan-tilt head to fix the camera, and select a camera with high resolution and high frame rate. Secondly, build a shooting scene, the manipulator / pan-tilt head is fixed on the circular shooting track, and connected to a computer and other control devices, the electric energy meter circuit board is vertically fixed to the center of the circular track to ensure sufficient light in the shooting environment. Then, use the control software to plan the shooting path of the manipulator / pan-tilt head to ensure that the camera moves at a constant speed at a specified speed. Then, set the camera's shooting parameters in the control software, such as resolution, frame rate, exposure, white balance, etc., to ensure picture quality. Start the automated shooting program, the manipulator / pan-tilt head moves the camera at a constant speed along the preset path, and automatically shoots the video. After the shooting is completed, the camera angle information is obtained by using the camera calibration method in the early stage, and the photo data and the corresponding angle information are transferred to the computer for post-processing.
[0129] Step S402, data preprocessing: preprocess the collected data, and the preprocessing steps include: ① Background and reflection processing: background subtraction is to obtain a pure background image, and then subtract the background image from the original image to obtain an image containing only the target object; the processing of the reflection problem is to use the principle of histogram equalization to stretch the grayscale histogram of the original image to make the grayscale distribution more uniform, so as to enhance the contrast between the darker and brighter areas in the image and reduce the areas with excessive brightness caused by reflection. ② Data cleaning: remove invalid or noisy data to ensure data quality. The median filtering algorithm in the nonlinear filtering method is used for processing. The principle is to use the median grayscale value of a pixel point in the adjacent area to replace the grayscale value of this point, so that the pixel values of the surrounding points are close to the true value, thereby achieving the effect of filtering image noise. ③ Size normalization: Size normalization can ensure that all images are consistent in an important dimension, which is convenient for data management and subsequent model training. For a dataset containing a large number of images of electric energy meter circuit boards, after size normalization, the data distribution is more regular, which is conducive to data partitioning and can better ensure the performance stability of the model on different data subsets. ④ Data enhancement technology: Aims to improve the robustness of the model for component recognition under different environmental conditions. Methods such as random rotation, color jitter, horizontal flipping, and scale scaling are used, which not only increases the diversity of training data, but also helps the model learn to recognize components from different angles and lighting conditions.
[0130] Step S403, extracting static key frames based on the comprehensive evaluation of shooting angle and clarity: There are many components on the electric energy meter circuit board, the volume difference is large, and most of them are double-layer boards, so the image obtained by video shooting is likely to be blocked. In addition, during the video shooting process, the movement of the camera itself and the changes in the external environment may cause image blur, and these factors will affect component recognition. Only video frames that fully capture the entire picture of the electric energy meter circuit board, are unobstructed, and have a standard clarity can be used for target component recognition. This type of video frame is defined as a static key frame, so the video frame should be comprehensively evaluated and screened in combination with factors such as shooting angle and clarity. The shooting angle determines the viewing angle range, light distribution, and whether there is occlusion. The clarity evaluation uses the Tenengrad gradient evaluation function, which determines the clarity of the image by calculating the Sobel gradient value of the image. The quality of the video frame is evaluated based on the result calculated by the Tenengrad gradient function. The higher the average gradient value, the clearer the image can be considered.
[0131] Step S404, generate and annotate a training set: In the task of identifying components on the electric energy meter circuit board, various components belong to different categories, so the training set and the validation set need to maintain similar category distributions. A sufficient amount of data is crucial for the training set, which can ensure that the model fully learns various patterns and features. Usually, the training set occupies a large proportion of the total data set. Taking the common 8:2 division as an example, 80% of the data is assigned to the training set. This proportion can basically meet the needs of model learning and help the model to fully capture the characteristics and patterns of the components on the electric energy meter circuit board. The remaining 20% of the data is used as a test set to evaluate the performance of the model on unseen data, test the generalization ability of the model, and ensure that the model has the ability to accurately identify components for new electric energy meter circuit board images in practical applications. For the generated training set, the user uses the LabelImg tool to select and annotate the target components in the image. The Pascal VOC format is used by default to save the annotation information. The generated file suffix is .xml, which is the same as the corresponding image file name and is saved in the same folder. Repeat the above annotation and saving steps until all images in the training set are annotated. Figure 5 The following is a schematic diagram of training sample annotation.
[0132] Step S405, training the YOLO target recognition model: YOLOv8 is the latest real-time object detection algorithm, and its structure is as follows Figure 6As shown in the figure. It uses Darknet53, which is efficient and outstanding in object detection, as the backbone network. This network structure has been adopted in YOLOv3. On this basis, YOLOv8 has made further optimizations, introduced the C3 module from YOLOv5, and also borrowed the Efficient Layer Aggregation networks (ELAN) technology from YOLOv7 to improve the feature extraction capability and enhance the network representation performance. Among them, the C3 module is composed of Bottleneck. While extracting features, these Bottleneck modules avoid the potential gradient disappearance problem by introducing residual connections, ensuring that information can be effectively propagated even in the case of a deep network. This design not only makes the network more efficient in extracting features, but also helps the network learn more complex feature representations, which is crucial to improving the accuracy and robustness of the model. In addition, YOLOv8 uses PANet to enhance the feature pyramid connection, strengthen the connection between features of different scales, improve the model's detection performance for targets of different scales, and especially significantly improve the accuracy of small target detection. In the actual training process, the corresponding YOLOv8 model structure needs to be initialized first. Then, the model is trained through the YOLOTrainer class. This process includes multiple epochs of iterations. In each iteration, the model forward propagates the input data and calculates the loss value. Then, based on the loss value, the backpropagation algorithm is executed to update the model parameters. At the end of the training, the trained model and its parameters are saved for subsequent use.
[0133] Step S407, panoramic video acquisition and static key frame extraction of the target power meter circuit board: panoramic video acquisition, static key frame extraction and preprocessing of the target power meter circuit board are performed using the same method as the training set to obtain an input image in the standard format required by the target recognition model.
[0134] Step S408, identifying component targets based on the trained YOLO target recognition model: When carrying out the task of identifying components on the electric energy meter circuit board based on the trained YOLO target recognition model, first load the model and initialize it. This process needs to ensure that the model structure definition is consistent with the training stage, so as to ensure that the model can be accurately loaded. Subsequently, the key frame image that has completed image preprocessing is input into the loaded YOLO model for inference. The output results obtained by model inference need to be post-processed to obtain component recognition results that are easy to understand and apply. Specifically, it includes: decoding the bounding box parameters output by the YOLO model and converting them into actual bounding box coordinates; by comparing the category probabilities corresponding to each bounding box, selecting the category with the largest probability as the prediction result; for multiple overlapping bounding boxes that the model may predict for the same component, a non-maximum suppression algorithm is used to remove redundancy, thereby obtaining an accurate component bounding box. As Figure 7 The figure shows a schematic diagram of component identification results of the target electric energy meter circuit board.
[0135] Through the above series of steps, the bounding boxes and category prediction results of the components on the electric energy meter circuit board can be accurately obtained, and efficient recognition of typical electronic components can be achieved.
[0136] In this embodiment, the key frames are extracted based on the comprehensive evaluation of shooting angle and clarity, which effectively improves the limitations of traditional data sets such as small scale and poor diversity. From the perspective of shooting angle, a suitable shooting angle can fully present the layout and details of the components on the electric energy meter circuit board. For example, if the camera shoots at a certain tilt angle with the electric energy meter circuit board, some components may be blocked, affecting the judgment of the overall state of the components. However, through a reasonable shooting angle, it can be ensured that each component is clearly visible to avoid information omission. When extracting key frames based on the shooting angle, it can be ensured that the extracted key frames can fully display the situation of the electric energy meter circuit board, providing a complete information basis for subsequent component analysis. Clarity is also crucial for key frame extraction. A clear image can make the edges, logos and subtle features of the components clearly identifiable. If the image clarity is insufficient, stains on the components may be misjudged as defects, or the model identification of tiny components may not be recognized. When comprehensively evaluating the extraction of key frames, high-quality images can be screened out using clarity as an indicator. The comprehensive evaluation of shooting angle and clarity is used to extract key frames, which can significantly improve the quality of key frames. On the one hand, high-quality key frames reduce misjudgments caused by image quality problems and improve the accuracy of the entire power meter circuit board component detection process; on the other hand, they provide a reliable data basis for subsequent key-frame-based target recognition, data analysis and other tasks, improving work efficiency and detection reliability. In the target recognition of power meter circuit board components, the YOLO model divides the image into grids through feature pyramid networks and path aggregation networks, accurately predicts the component boundary box, closely fits the component contour, and has extremely small positioning errors for components such as resistors, capacitors, chips, etc. of different shapes and sizes. After learning a large amount of data, the model can capture the unique features of various components, such as the long strips and color rings of resistors, and the various shapes and colors of capacitors. The accuracy rate of common component category recognition exceeds 95%. In the face of complex scenes, such as components blocking each other, complex circuit patterns, welding marks and reflections, the model's powerful feature extraction capabilities and robustness enable it to effectively eliminate interference and accurately identify. Secondly, YOLO uses a lightweight network structure to reduce the amount of calculation, and can quickly output results when processing a large number of video frames to meet real-time requirements.
[0137] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0138] Based on the same inventive concept, the embodiment of the present application also provides a component identification device for an electric energy meter circuit board for implementing the component identification method for an electric energy meter circuit board involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more component identification devices for electric energy meter circuit boards provided below can refer to the limitations of the component identification method for electric energy meter circuit boards above, and will not be repeated here.
[0139] In an exemplary embodiment, Figure 8 As shown, a component identification device for an electric energy meter circuit board is provided, comprising: a video acquisition module 801, a target frame determination module 802 and a component identification module 803, wherein:
[0140] The video acquisition module 801 is used to acquire video image data of the circuit board of the electric energy meter to be identified;
[0141] A target frame determination module 802 is used to determine a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data;
[0142] The component recognition module 803 is used to obtain a component recognition result of the electric energy meter circuit board to be recognized according to the target video frame and the pre-trained component recognition model.
[0143] In one of the embodiments, the target frame determination module 802 is further used to determine shooting angle information of each video frame according to the shooting time corresponding to each video frame in the video image data; determine candidate video frames from the video frames of the video image data according to the shooting angle information of each video frame; determine image clarity evaluation information of the candidate video frames; and determine target video frames from the candidate video frames according to the image clarity evaluation information of the candidate video frames.
[0144] In one of the embodiments, the target frame determination module 802 is further used to calculate the image gradient information of each pixel in the candidate video frame; and determine the image clarity evaluation information of the candidate video frame based on the image gradient information of all pixels in the candidate video frame.
[0145] In one embodiment, the component identification module 803 is further used to perform image preprocessing on the target video frame to obtain a processed target video frame; the processed target video frame is input into a pre-trained component identification model to obtain output identification border information; and the component identification result of the electric energy meter circuit board to be identified is determined based on the identification border information.
[0146] In one of the embodiments, the identification border information includes identification border confidence, identification border coordinate information and component identification information; the above-mentioned component identification module 803 is also used to calculate the intersection and union ratio between each two identification borders based on the identification border coordinate information in the identification border information; for two identification borders whose intersection and union ratio is greater than a preset threshold, the identification border with the lowest identification border confidence is removed; based on the identification border coordinate information and component identification information of the identification borders that have been screened and retained, the component identification result of the electric energy meter circuit board to be identified is obtained.
[0147] In one of the embodiments, the video acquisition module 801 is also used to vertically fix the circuit board of the electric energy meter to be identified at the center position of the surround shooting; according to the preset shooting parameters, the camera device is controlled to perform surround shooting of the circuit board of the electric energy meter to be identified to obtain the video image data of the circuit board of the electric energy meter to be identified.
[0148] Each module in the above-mentioned component identification device for the electric energy meter circuit board can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0149] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a component identification method for an electric energy meter circuit board is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0150] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0151] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0152] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0153] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0154] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0155] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0156] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0157] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for identifying components of an electric energy meter circuit board, characterized in that: The method comprises: Acquire video image data of the circuit board of the electric energy meter to be identified; Determining a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data; According to the target video frame and the pre-trained component recognition model, a component recognition result of the electric energy meter circuit board to be recognized is obtained.
2. The method according to claim 1, characterized in that The step of determining a target video frame from the video frames of the video image data according to the shooting angle information and the image definition evaluation information of each video frame in the video image data comprises: Determining shooting angle information of each video frame according to the shooting time corresponding to each video frame in the video image data; Determining candidate video frames from the video frames of the video image data according to the shooting angle information of each video frame; Determining image clarity assessment information of the candidate video frame; A target video frame is determined from the candidate video frames according to the image definition evaluation information of the candidate video frames.
3. The method according to claim 2, characterized in that The determining of the image definition evaluation information of the candidate video frame comprises: Calculating image gradient information of each pixel in the candidate video frame; Image definition evaluation information of the candidate video frame is determined according to image gradient information of all pixels in the candidate video frame.
4. The method according to claim 1, characterized in that The step of obtaining a component recognition result of the electric energy meter circuit board to be recognized based on the target video frame and the pre-trained component recognition model includes: Performing image preprocessing on the target video frame to obtain a processed target video frame; Inputting the processed target video frame into the pre-trained component recognition model to obtain output recognition frame information; According to the identification frame information, a component identification result of the electric energy meter circuit board to be identified is determined.
5. The method according to claim 4, characterized in that The identification frame information includes identification frame confidence, identification frame coordinate information and component identification information; Determining the component recognition result of the electric energy meter circuit board to be recognized according to the recognition frame information includes: Calculating the intersection-and-union ratio between two identified frames according to the identified frame coordinate information in the identified frame information; For the two recognition frames whose intersection-over-union ratio is greater than a preset threshold, removing the recognition frame with the lowest confidence level; The component identification result of the electric energy meter circuit board to be identified is obtained based on the identification frame coordinate information and the component identification information of the screened and retained identification frame.
6. The method according to any one of claims 1 to 5, characterized in that: The step of obtaining video image data of a circuit board of an electric energy meter to be identified comprises: The circuit board of the electric energy meter to be identified is fixed vertically at the center position of the surround shooting; According to preset shooting parameters, the camera device is controlled to perform surround shooting of the circuit board of the electric energy meter to be identified, so as to obtain video image data of the circuit board of the electric energy meter to be identified.
7. A component identification device for an electric energy meter circuit board, characterized in that: The device comprises: A video acquisition module, used to acquire video image data of the circuit board of the electric energy meter to be identified; a target frame determination module, configured to determine a target video frame from the video frames of the video image data according to shooting angle information and image definition evaluation information of each video frame in the video image data; The component recognition module is used to obtain the component recognition result of the electric energy meter circuit board to be identified according to the target video frame and the pre-trained component recognition model.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
PCB path planning method based on element information
CN121600233A
Video quality intelligent verification method and system for grouting construction
CN121985115A