An electrode direction identification method, system, device and medium
By using convolution kernels and electrode detectors in the carbon workshop of an aluminum plant to simplify electrode orientation identification, the shortcomings of manual monitoring and complex algorithms are solved, and fast and accurate electrode orientation identification is achieved in an STM32 microcontroller, reducing equipment cost and complexity.
Patent Information
- Application Number
- CN202311344768.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-10-18
AI Technical Summary
In the existing technology, electrode orientation identification in the carbon workshop of aluminum plants relies on manual monitoring and automatic control devices, which has problems such as human fatigue, negligence and high equipment costs. Moreover, the complex image recognition algorithm is not suitable for STM32 series microcontrollers.
Edge detection in the vertical and horizontal directions is performed using convolution kernels. The candidate rectangular boxes for electrodes are determined by the edge image projection array, and the electrode orientation is determined by the electrode detector of the downsampled convolutional computation unit and the fully connected layer, which simplifies the electrode orientation recognition process.
It achieves fast and accurate electrode orientation identification in STM32 microcontroller, meeting the real-time and accuracy requirements in the field, and reducing equipment cost and complexity.
Smart Images

Figure CN117315029B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image recognition, in particular to an electrode direction recognition method, system, device and medium. BACKGROUND
[0002] In the production of carbon electrode in the carbon plant of the aluminum factory, the error of the direction of the carbon electrode will not only cause the interruption of production and the damage of equipment, but also cause serious economic losses, and more likely to cause safety accidents, so it is important to correctly judge the direction of the electrode.
[0003] At present, most of them are manual monitoring and automatic control devices on site, and manual work is easy to be tired and careless, and the cost of control equipment is high, and the installation is troublesome. The production workshop generally has installed a camera, so it is a very good choice to judge the direction of the electrode based on AI technology and using image recognition algorithm. The main work of image recognition includes: target detection of the electrode and direction judgment of the electrode. The current popular target detection algorithm, for example: R-CNN series and YOLO series, the model is too complex and has too many functions, and is not suitable for being placed in the STM32 series single chip. SUMMARY
[0004] Based on this, the embodiment of the present application provides an electrode direction recognition method, system, device and medium to realize the recognition of the direction of the electrode simply and quickly, and meets the realization needs of STM32.
[0005] To achieve the above object, the embodiment of the present application provides the following scheme:
[0006] An electrode direction recognition method comprises:
[0007] Obtaining a target on-site image;
[0008] Using a convolution kernel to perform edge detection on the target on-site image in the vertical and horizontal directions to obtain a vertical edge image and a horizontal edge image;
[0009] Vertically projecting the pixel value of the vertical edge image to obtain a vertical projection array, and horizontally projecting the pixel value of the horizontal edge image to obtain a horizontal projection array;
[0010] Determining a detection electrode candidate rectangular frame according to the vertical projection array and the horizontal projection array, and segmenting a sub-image from the target on-site image according to the detection electrode candidate rectangular frame;
[0011] Inputting the sub-image into an electrode detector to judge whether the sub-image contains a target electrode; the electrode detector comprises a plurality of down-sampling convolution calculation units and a full connection layer;
[0012] When the target electrode is contained, determining whether the direction of the target electrode is correct according to the width-height ratio of the detection sub-image.
[0013] Optionally, the target live image is subjected to edge detection in vertical and horizontal directions by using convolution kernels to obtain a vertical edge image and a horizontal edge image, specifically including:
[0014] The target live image is subjected to grayscale processing to obtain a grayscale image;
[0015] The grayscale image is subjected to edge detection in a vertical direction by using a first convolution kernel to obtain a vertical edge image; the first convolution kernel is
[0016] The grayscale image is subjected to edge detection in a horizontal direction by using a second convolution kernel to obtain a horizontal edge image; the second convolution kernel is
[0017] Optionally, pixel values of the vertical edge image are subjected to vertical projection to obtain a vertical projection array, and pixel values of the horizontal edge image are subjected to horizontal projection to obtain a horizontal projection array, specifically including:
[0018] The pixel values of the vertical edge image are projected onto a vertical coordinate axis, and the pixel values after vertical projection are accumulated to obtain an initial vertical projection array;
[0019] The initial vertical projection array is subjected to mean value smoothing to remove noise to obtain a vertical projection array;
[0020] The pixel values of the horizontal edge image are projected onto a horizontal coordinate axis, and the pixel values after horizontal projection are accumulated to obtain an initial horizontal projection array;
[0021] The initial horizontal projection array is subjected to mean value smoothing to remove noise to obtain a horizontal projection array.
[0022] Optionally, a detection electrode candidate rectangular frame is determined according to the vertical projection array and the horizontal projection array, and a sub-image is segmented from the target live image according to the detection electrode candidate rectangular frame, specifically including:
[0023] Characteristic wave peak data are searched from the vertical projection array to obtain a horizontal strip-shaped candidate area, and characteristic wave peak data are searched from the horizontal projection array to obtain a vertical strip-shaped candidate area;
[0024] A rectangular frame composed of the horizontal strip-shaped candidate area and the vertical strip-shaped candidate area is determined as the detection electrode candidate rectangular frame;
[0025] The detection electrode candidate rectangular frame is screened according to a set aspect ratio range to obtain a screened candidate rectangular frame;
[0026] According to the size of the candidate rectangular frame after screening, a sub-image is segmented from the target live image.
[0027] Optionally, the sub-image is input into an electrode detector to determine whether the sub-image contains a target electrode, specifically comprising:
[0028] The sub-image is input into the electrode detector, and if a probability value output by the electrode detector is greater than a set value, it is determined that the sub-image contains a target electrode, otherwise, the sub-image does not contain a target electrode.
[0029] Optionally, when the target electrode is contained, the direction of the target electrode is determined according to an aspect ratio of the detection sub-image, specifically comprising:
[0030] If the aspect ratio of the detection sub-image is less than a set aspect ratio value, it is determined that the direction of the target electrode is correct, otherwise, the direction of the target electrode is incorrect.
[0031] When the direction of the target electrode is incorrect, an alarm information is output.
[0032] Optionally, the size of the convolution kernel is 3*3.
[0033] The electrode detector comprises four down-sampling convolution calculation units and one fully connected layer; the down-sampling convolution calculation unit comprises a convolution layer, a batch normalization layer and a ReLU function connected in sequence; and the size of the convolution layer is 3*3.
[0034] The application further provides an electrode direction identification system, comprising:
[0035] An image acquisition module is configured to acquire a target live image.
[0036] An edge detection module is configured to perform edge detection in vertical and horizontal directions on the target live image by using a convolution kernel to obtain a vertical edge image and a horizontal edge image.
[0037] A pixel projection module is configured to perform vertical projection on pixel values of the vertical edge image to obtain a vertical projection array, and perform horizontal projection on pixel values of the horizontal edge image to obtain a horizontal projection array.
[0038] A candidate frame determination module is configured to determine a detection electrode candidate rectangular frame according to the vertical projection array and the horizontal projection array, and segment a sub-image from the target live image according to the detection electrode candidate rectangular frame.
[0039] An electrode detection module is configured to input the sub-image into an electrode detector to determine whether the sub-image contains a target electrode; the electrode detector comprises a plurality of down-sampling convolution calculation units and one fully connected layer.
[0040] An electrode direction identification module is configured to determine whether the direction of the target electrode is correct according to the aspect ratio of the detection sub-graph when the target electrode is included.
[0041] The application further provides an electronic device including a memory and a processor, wherein the memory is configured to store a computer program, and the processor is configured to execute the computer program to enable the electronic device to perform the electrode direction identification method.
[0042] The application further provides a computer readable storage medium storing a computer program, wherein the computer program is configured to enable a processor to perform the electrode direction identification method.
[0043] According to the embodiments of the application, the following technical effects are achieved:
[0044] In the embodiments of the application, the convolution kernels are used to perform edge detection in the vertical and horizontal directions of the target field image, the edge image is projected, and the detection electrode candidate rectangular frame is determined according to the projection array. On this basis, the electrode detector including only the down-sampling convolution calculation unit and the full connection layer can realize the detection of the target electrode, and finally realize the identification of the direction of the target electrode. The embodiments of the application can realize the identification of the electrode direction simply and quickly. The spatial scale of the two convolution kernels and the electrode detector can fully meet the demand of the processor with limited computing and storage capacity such as STM32 for the electrode direction identification, and the real-time performance and the accuracy in the field are achieved. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can be obtained without creative labor based on these drawings.
[0046] Figure 1 The flow of the electrode direction identification method provided by the embodiments of the application Figure 1 ;
[0047] Figure 2 The flow of the electrode direction identification method provided by the embodiments of the application Figure 2 ;
[0048] Figure 3 The structural schematic diagram of the electrode detector Object Detector provided by the embodiments of the application
[0049] Figure 4 The structural schematic diagram of a down-sampling convolution calculation unit CBRx provided by the embodiments of the application
[0050] Figure 5 The flowchart of the electrode direction recognition method provided by the embodiment of the present application Figure 3 ;
[0051] Figure 6 The control chart of the gray-scale image and the horizontal projection array data line chart provided by the embodiment of the present application
[0052] Figure 7 The statistical diagram of the pixel vertical projection and the horizontal projection provided by the embodiment of the present application
[0053] Figure 8 The structural diagram of the electrode direction recognition system provided by the embodiment of the present application DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0055] The purpose of the present application is to provide an electrode direction recognition method, system, device and medium, which detects electrodes and recognizes electrode directions by using an image recognition algorithm, and requires the algorithm to be as simple as possible under the premise of meeting the on-site requirements and to be placed in an STM32 series single-chip microcomputer, so that the algorithm can meet the real-time and precision requirements in a device with limited computing and storage capacity.
[0056] In order to make the above-mentioned purposes, characteristics and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0057] Embodiment one
[0058] Referring to Figure 1 and Figure 2 , the electrode direction recognition method of the present embodiment comprises:
[0059] Step 101: obtaining a target on-site image.
[0060] Step 102: performing edge detection in the vertical and horizontal directions on the target on-site image by using a convolution kernel to obtain a vertical edge image and a horizontal edge image.
[0061] Step 103: performing vertical projection on the pixel values of the vertical edge image to obtain a vertical projection array, and performing horizontal projection on the pixel values of the horizontal edge image to obtain a horizontal projection array.
[0062] Step 104: determining a detection electrode candidate rectangular frame according to the vertical projection array and the horizontal projection array, and segmenting a sub-image from the target on-site image according to the detection electrode candidate rectangular frame.
[0063] Step 105: inputting the subgraph into an electrode detector to determine whether the subgraph contains a target electrode; the electrode detector includes a plurality of down-sampling convolution calculation units and a full connection layer.
[0064] Step 106: when the target electrode is contained, determining whether the direction of the target electrode is correct according to the aspect ratio of the detection subgraph.
[0065] The electrode direction identification method of the embodiment can realize position detection of the electrode and direction identification of the electrode, and is a method that can meet the requirements of precision and speed and realize a simplified method that meets the computing power and storage power of an STM32 single-chip microcomputer.
[0066] In one example, step 102 specifically includes:
[0067] graying the target live image to obtain a gray image; the target live image can have a size of 320x320x3.
[0068] performing edge detection in a vertical direction on the gray image by using a first convolution kernel to obtain a vertical edge image VConv; the first convolution kernel is
[0069] performing edge detection in a horizontal direction on the gray image by using a second convolution kernel to obtain a horizontal edge image HConv; the second convolution kernel is The size of the first convolution kernel and the size of the second convolution kernel can both be 3x3.
[0070] In one example, step 103 specifically includes:
[0071] projecting pixel values of the vertical edge image VConv onto a vertical coordinate axis (Y axis) and accumulating the pixel values after vertical projection to obtain an initial vertical projection array VProj.
[0072] removing noise in the initial vertical projection array VProj by using a mean smoothing method to obtain a vertical projection array VSM.
[0073] projecting pixel values of the horizontal edge image HConv onto a horizontal coordinate axis (X axis) and accumulating the pixel values after horizontal projection to obtain an initial horizontal projection array HProj.
[0074] removing noise in the initial horizontal projection array HProj by using a mean smoothing method to obtain a horizontal projection array HSM.
[0075] The vertical projection array VSM and the horizontal projection array HSM provide data for subsequent search for a target object candidate box.
[0076] In one example, step 104 specifically includes:
[0077] Searching feature peak data from the vertical projection array VSM to obtain a horizontal strip-shaped candidate region, and searching feature peak data from the horizontal projection array HSM to obtain a vertical strip-shaped candidate region.
[0078] A rectangular frame formed by intersecting the horizontal strip-shaped candidate region and the vertical strip-shaped candidate region is determined as a detection electrode candidate rectangular frame CCBox.
[0079] The detection electrode candidate rectangular frame CCBox is screened according to a set aspect ratio range to obtain a screened candidate rectangular frame DropBox. Specifically, the set aspect ratio range can be a range in which the aspect ratio is less than 1.0 or greater than 2.6, that is, the rectangular frame with the aspect ratio less than 1.0 or greater than 2.6 is screened from the detection electrode candidate rectangular frame CCBox as the screened candidate rectangular frame DropBox.
[0080] Sub-images SplitImages are segmented (clipped) from the target live image according to the size of the screened candidate rectangular frame.
[0081] In one example, step 105 specifically includes:
[0082] The sub-images are input into an electrode detector Object Detector, and if the probability value output by the electrode detector Object Detector is greater than a set value (for example, 0.5), it is determined that the sub-image contains a target electrode, otherwise, the sub-image does not contain a target electrode.
[0083] Specifically, in actual application, the size of the sub-image is first unified (Resize) and then detected by the electrode detector Object Detector.
[0084] Specifically, the electrode detector Object Detector is responsible for detecting the sub-image clipped according to the candidate rectangular frame, judging whether the sub-image contains a valid detection target, and outputting a probability value of 0 to 1 to realize binary classification. A probability greater than 0.5 indicates that the sub-image contains a detection target, and vice versa.
[0085] Specifically, refer to Figure 3The electrode detector Object Detector can include four down-sampling convolution calculation units CBR4 and one full connection layer FC. A flatten layer can be further connected between the four down-sampling convolution calculation units CBR4 and the full connection layer FC to implement a flatten operation, and a Sigmoid function is connected after the full connection layer FC.
[0086] Referring to Figure 4 Any one of the down-sampling convolution calculation units CBRx can include a convolution layer Conv, a batch normalization layer BN and a ReLU function connected in sequence. The size of the convolution layer Conv can be 3*3.
[0087] In one example, the step 106 specifically includes:
[0088] If the width-to-height ratio W / H of the detection sub-graph is less than a set width-to-height ratio value (for example, 2), it is determined that the direction of the target electrode is correct, otherwise the direction of the target electrode is incorrect; when the direction of the target electrode is incorrect, an alarm information Warning is output.
[0089] A more specific example is given below in combination with Figure 5 The electrode direction identification method is further described.
[0090] Referring to Figure 5 The method specifically includes:
[0091] 1. Resize the three-channel input image to (320, 320, 3), and then gray-scale the image (320, 320, 1).
[0092] 2. Use a convolution kernel to perform edge detection in the vertical and horizontal directions of the image.
[0093] 3. Project the pixel value statistics of the vertical edge image and the horizontal edge image in the vertical direction and the horizontal direction respectively to obtain projection arrays with a size of 320.
[0094] 4. Denoise the projection array data. In this example, the mean smoothing method is used to process the projection array, Figure 6 The contrast of the gray-scale image and the horizontal projection array data is shown in the line chart of Figure 6 Part (a) of shows the horizontal projection array, Figure 6 Part (b) of shows the gray-scale image.
[0095] 5. Search for the horizontal band region of the target from the vertical direction projection statistical array, and search for the vertical band region from the horizontal direction projection statistical array, as shown in Figure 7 .
[0096] The vertical band region and the horizontal band region together cross the rectangular region as a candidate Box, and there are generally multiple such candidate Boxes, which need to be further screened and judged.
[0097] 6. The effective width-height ratio range of the target electrode in different directions in the image is 1.0-2.6, and the candidate Box with a width-height ratio less than 1.0 or greater than 2.6 is removed.
[0098] 7. If no effective candidate Box is searched, it means that there is no electrode in the image; otherwise, a subgraph is segmented from the original graph according to the candidate Box, and a subgraph list is generated.
[0099] 8. The scale of the subgraph is unified, that is, resized to (32, 16, 3).
[0100] 9. Each subgraph is input into an electrode target detector to determine whether the subgraph contains an electrode. The electrode detector is a plurality of down-sampling convolution calculation units and a full connection, which uses Sigmoid for logistic regression binary classification.
[0101] 10. If the subgraph is not an electrode target, it is ignored; otherwise, according to the width-height ratio of the electrode rectangular frame, it is determined whether the direction of the electrode is correct. In addition, if the electrode direction is correct, it is ignored; otherwise, an alarm is started.
[0102] The electrode direction recognition method of the embodiment has the following advantages:
[0103] (1) The target detection method is simplified, and the model does not need to be trained. The parameters of the model are directly given convolution kernels, two convolution kernels (3x3), which occupy a total of 9 floating-point number spaces.
[0104] (2) The electrode detector only uses 4 down-sampling convolution calculations, convolution layers (3x3), and the model occupies a total of 28705 floating-point number spaces.
[0105] (3) The size of the model completely meets the requirements of the STM32 processor with limited computing and storage capacity for algorithm implementation, and achieves the requirements of real-time and accuracy in the field.
[0106] Embodiment Two
[0107] In order to perform the method corresponding to the above-mentioned embodiment one to realize the corresponding functions and technical effects, an electrode direction recognition system is provided below.
[0108] Referring to Figure 8 , the system comprises:
[0109] An image acquisition module 801 is configured to acquire a target field image.
[0110] The edge detection module 802 is configured to perform edge detection on the target live image in vertical and horizontal directions by using a convolution kernel to obtain a vertical edge image and a horizontal edge image.
[0111] The pixel projection module 803 is configured to perform vertical projection on pixel values of the vertical edge image to obtain a vertical projection array, and perform horizontal projection on pixel values of the horizontal edge image to obtain a horizontal projection array.
[0112] The candidate frame determination module 804 is configured to determine a detection electrode candidate rectangular frame according to the vertical projection array and the horizontal projection array, and segment a sub-image from the target live image according to the detection electrode candidate rectangular frame.
[0113] The electrode detection module 805 is configured to input the sub-image into an electrode detector to determine whether the sub-image contains a target electrode; the electrode detector includes a plurality of down-sampling convolution calculation units and a full connection layer.
[0114] The electrode direction identification module 806 is configured to, when the target electrode is contained, determine whether the direction of the target electrode is correct according to an aspect ratio of the detection sub-image.
[0115] Embodiment three
[0116] The embodiment provides an electronic device, including a memory and a processor, the memory is used for storing a computer program, and the processor runs the computer program to make the electronic device execute the electrode direction identification method in the embodiment one.
[0117] Optionally, the electronic device can be a server.
[0118] In addition, the embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the electrode direction identification method in the embodiment one.
[0119] In the specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the related parts can be referred to the method part.
[0120] The principles and implementation manners of the present application are described by using specific examples in the present application, and the above embodiment description is only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed. In conclusion, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for identifying electrode orientation, characterized in that, include: Acquire images of the target site; The target scene image is subjected to vertical and horizontal edge detection using a convolution kernel to obtain a vertical edge image and a horizontal edge image. The pixel values of the vertical edge image are vertically projected to obtain a vertically projected array, and the pixel values of the horizontal edge image are horizontally projected to obtain a horizontally projected array. Candidate bounding boxes for detection electrodes are determined based on the vertical projection array and the horizontal projection array, and sub-images are segmented from the target scene image based on the candidate bounding boxes for detection electrodes. The noise removal of the projected array data is performed using the mean smoothing method. Search for the horizontal band region of the target from the vertical projection statistics array, and search for the vertical band region from the horizontal projection statistics array; The rectangular area where the vertical and horizontal bands intersect is considered a candidate box for the target. The effective aspect ratio of the target electrode in the image varies from 1.0 to 2.6 depending on its orientation. If no effective candidate box is found, it means that the electrode does not exist in the image. The sub-image is input into the electrode detector to determine whether the sub-image contains the target electrode; If the probability value output by the electrode detector is greater than a set value, it is determined that the sub-graph contains the target electrode; otherwise, the sub-graph does not contain the target electrode. The electrode detector includes: multiple downsampling convolution calculation units and a fully connected layer. When the target electrode is included, the orientation of the target electrode is determined based on the aspect ratio of the detection sub-image. If the aspect ratio W / H of the detection sub-image is less than the set aspect ratio value, the orientation of the target electrode is determined to be correct; otherwise, the orientation of the target electrode is incorrect. When the orientation of the target electrode is incorrect, an alarm message "Warning" is output. The electrode detector includes: four downsampling convolutional computation units and a fully connected layer; the downsampling convolutional computation unit includes: a convolutional layer, a batch normalization layer and a ReLU function connected in sequence; the size of the convolutional layer is 3×3; a flattening layer is connected between the four downsampling convolutional computation units and the fully connected layer to achieve the flattening operation, and a Sigmoid function is connected after the fully connected layer.
2. The electrode orientation identification method according to claim 1, characterized in that, The target scene image is subjected to vertical and horizontal edge detection using convolution kernels to obtain vertical edge images and horizontal edge images, specifically including: The target scene image is converted to grayscale to obtain a grayscale image; The first convolutional kernel is used to perform vertical edge detection on the grayscale image to obtain a vertical edge image; the first convolutional kernel is... ; The grayscale image is subjected to horizontal edge detection using a second convolution kernel to obtain a horizontal edge image; the second convolution kernel is... .
3. The electrode orientation identification method according to claim 1, characterized in that, The pixel values of the vertical edge image are vertically projected to obtain a vertically projected array, and the pixel values of the horizontal edge image are horizontally projected to obtain a horizontally projected array, specifically including: The pixel values of the vertical edge image are projected onto the vertical coordinate axis, and the vertically projected pixel values are accumulated to obtain the initial vertically projected array. The noise in the initial vertical projection array is removed by mean smoothing to obtain the vertical projection array; The pixel values of the horizontal edge image are projected onto the horizontal coordinate axis, and the horizontally projected pixel values are accumulated to obtain an initial horizontally projected array; The noise in the initial horizontal projection array is removed by mean smoothing to obtain the horizontal projection array.
4. The electrode orientation identification method according to claim 1, characterized in that, Based on the vertical projection array and the horizontal projection array, candidate bounding boxes for detection electrodes are determined, and sub-images are segmented from the target scene image based on the candidate bounding boxes for detection electrodes. Specifically, this includes: Searching for feature peak data in the vertical projection array yields horizontal strip candidate regions, and searching for feature peak data in the horizontal projection array yields vertical strip candidate regions. The rectangular frame formed by the intersection of the horizontal and vertical strip-shaped candidate regions is defined as the candidate rectangular frame for the detection electrode. According to the set aspect ratio range, the candidate rectangular frames of the detection electrode are filtered to obtain the filtered candidate rectangular frames; Sub-images are segmented from the target scene image based on the size of the selected candidate rectangles.
5. An electrode orientation recognition system, characterized in that, include: The image acquisition module is used to acquire images of the target site. The edge detection module is used to perform vertical and horizontal edge detection on the target scene image using a convolution kernel to obtain a vertical edge image and a horizontal edge image; The pixel projection module is used to project the pixel values of the vertical edge image vertically to obtain a vertical projection array, and to project the pixel values of the horizontal edge image horizontally to obtain a horizontal projection array. The candidate bounding box determination module is used to determine candidate bounding boxes for detection electrodes based on the vertical projection array and the horizontal projection array, and to segment sub-images from the target scene image based on the candidate bounding boxes for detection electrodes; The noise removal of the projected array data is performed using the mean smoothing method. Search for the horizontal band region of the target from the vertical projection statistics array, and search for the vertical band region from the horizontal projection statistics array; The rectangular area where the vertical and horizontal bands intersect is considered a candidate box for the target. The effective aspect ratio of the target electrode in the image varies from 1.0 to 2.6 depending on its orientation. If no effective candidate box is found, it means that the electrode does not exist in the image. The electrode detection module is used to input the sub-image into the electrode detector to determine whether the sub-image contains the target electrode; If the probability value output by the electrode detector is greater than a set value, it is determined that the sub-graph contains the target electrode; otherwise, the sub-graph does not contain the target electrode. The electrode detector includes: multiple downsampling convolution calculation units and a fully connected layer. The electrode orientation recognition module is used to determine whether the orientation of the target electrode is correct based on the aspect ratio of the detection sub-image when the target electrode is included; if the aspect ratio W / H of the detection sub-image is less than a set aspect ratio value, the orientation of the target electrode is determined to be correct, otherwise the orientation of the target electrode is incorrect; when the orientation of the target electrode is incorrect, an alarm message "Warning" is output. The electrode detector includes: four downsampling convolutional computation units and a fully connected layer; the downsampling convolutional computation unit includes: a convolutional layer, a batch normalization layer and a ReLU function connected in sequence; the size of the convolutional layer is 3×3; a flattening layer is connected between the four downsampling convolutional computation units and the fully connected layer to achieve the flattening operation, and a Sigmoid function is connected after the fully connected layer.
6. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the electrode orientation identification method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the electrode orientation identification method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Image segmentation method and device
CN106504261A
Image processing method and device, equipment and storage medium
CN113486828A
Inflection point identification method
CN115731562A