A method for identifying an inflection point
By using deep learning and template matching techniques, combined with YOLO and CRNN models, components, text, and connections in nuclear power plant images are automatically identified, solving the problem of automatic identification of connection inflection points and improving modeling efficiency and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA NUCLEAR POWER OPERATION TECH CORP
- Filing Date
- 2022-11-28
- Publication Date
- 2026-07-10
AI Technical Summary
In the development of a full-range nuclear power plant simulator, manual modeling is inefficient and has a high error rate. How can we achieve automatic identification of connection inflection points to improve modeling efficiency and quality?
By employing deep learning and template matching techniques, combined with the YOLO model and CRNN text recognition model, the system automatically identifies the positional information of components, text, and lines in images, thereby identifying inflection points.
It enables automatic identification of inflection points in images, providing a basis for subsequent intelligent image recognition and automatic modeling, and improving modeling efficiency and quality.
Smart Images

Figure CN115731562B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and specifically relates to a method for inflection point recognition. Background Technology
[0002] The development of a full-scale nuclear power plant simulator requires simulation modeling of hundreds of power plant process systems, hundreds of power distribution systems, thousands of DCS (Distributed Control System) control logic diagrams, and various styles of process flow diagrams, teaching control diagrams, and control panel diagrams. Manual modeling is inefficient and prone to errors, a key factor affecting simulator development efficiency. Therefore, there is an urgent need to implement automated modeling methods to automatically convert design drawings into simulation models, thereby improving modeling efficiency and quality.
[0003] To achieve automated modeling, intelligent map reading is essential, and the identification of connectivity relationships is crucial for this. The inflection points of lines are a key factor in determining connectivity, and how to automatically identify these inflection points is a problem that this invention urgently needs to solve. Summary of the Invention
[0004] The purpose of this invention is to provide a method for identifying inflection points, thereby solving the problem of automatically identifying connecting inflection points in an image.
[0005] The technical solution of the present invention is as follows: an inflection point identification method, which specifically includes the following steps:
[0006] S1. Obtain the target image;
[0007] S2. Identify the components and text in the target image, and remove the identified components and text from the target image;
[0008] S2.1 Construct a component recognition model to identify components in target images based on deep learning;
[0009] S2.2 Recognize the text in the target image and remove the components and text from the target image;
[0010] S3. Identify the position information of connecting lines in the target image;
[0011] S4. Based on the location information of the detected connection, identify the inflection point in the target image.
[0012] The specific steps for identifying components in the target image based on deep learning in step 2.1 are as follows:
[0013] Construct a YOLO model by dividing the target image into a grid and assigning each grid to detect if the center point falls within the target object.
[0014] S2.1.1 Preprocess the target image to be identified;
[0015] S2.1.2 Perform data labeling;
[0016] Select and mark the components in the target image, including the type of the component and the position of the mark box;
[0017] S2.1.3 Perform sample data augmentation
[0018] After S2.1.4 performs sample training and updates, component detection and identification are carried out.
[0019] A YOLO component recognition model was constructed, and after training the model using the first sample set, component detection and recognition were carried out.
[0020] The specific steps for adding value to the sample data in step S2.1.3 are as follows:
[0021] Randomly crop local regions from the same image and generate a first sample image based on the distribution of the cropped local regions;
[0022] The type and location information of each element in the sample image are labeled. A rectangular area is randomly extracted from the image. Based on the position of the rectangular area in the original image and the position of each element in the original image, the position coordinates of each element in the rectangular area relative to the rectangular area can be calculated. Thus, the labeling information of the elements in the rectangular area can be obtained, thereby obtaining a large number of new training samples.
[0023] Random noise information is added to the first sample image to generate a new first sample image;
[0024] Construct virtual sample data; extract several component templates from a preset standard template library, and stitch the extracted component templates together to form several first sample images.
[0025] The specific steps for constructing the YOLO component recognition model and performing component detection and recognition are as follows:
[0026] The input target image is divided into S×S grids, each grid responsible for detecting target objects whose center point falls within it. Each grid contains B bounding boxes, each bounding box consisting of a five-dimensional prediction parameter, including the center point coordinates (x, y), width and height (w, h), and a confidence score S. i Among them, the confidence score S i It is calculated by the following formula:
[0027] s i =Pr(o)×IoU
[0028] Where Pr(o) represents the probability that an object exists within the current mesh bounding box, and o represents the target object; IoU (Intersection over Union) demonstrates the accuracy of the target bounding box position predicted by the current model; assuming the predicted target bounding box is P, and the true target bounding box is t, box... t The box represents the bounding box of a real object in an image. p The target bounding box is represented; then the IoU is calculated by the following formula:
[0029]
[0030] Pr(C i |O) represents the posterior probability that the target belongs to a certain type of object i given that the bounding box contains the target; assuming there are K types of objects in the object detection task, then each grid predicts the object C of type i. i The conditional probability is Pr(C) i |O), i = 1, 2, ..., K;
[0031] After calculating Pr(C) i After |O), during testing, the confidence level that an object exists within a target bounding box can be calculated, as shown in the following formula:
[0032]
[0033] Component identification is performed based on the confidence level of the presence of objects within the target bounding box.
[0034] A method for identifying inflection points, which specifically includes the following steps:
[0035] S1. Obtain the target image;
[0036] S2. Identify the components and text in the target image, and remove the identified components and text from the target image;
[0037] S2.1 Component recognition in a target image is achieved based on template matching;
[0038] Establish a standard template library;
[0039] Establish multiple template libraries, with component templates in different libraries having different resolutions;
[0040] Perform template matching and identify components in the target image based on the matching results;
[0041] S2.2 Recognize the text in the target image and remove the components and text from the target image;
[0042] S3. Identify the position information of connecting lines in the target image;
[0043] S4. Based on the location information of the detected connection, identify the inflection point in the target image.
[0044] The specific steps for identifying components in a target image based on template matching are as follows:
[0045] Establish a standard template library;
[0046] Construct component templates that include process components, electrical components, and panel components;
[0047] Establish multiple template libraries, with component templates in different libraries having different resolutions;
[0048] Extract several component templates of different resolutions to form multiple different template libraries;
[0049] The component template libraries of different resolutions are sorted from high to low resolution and used as input for baseline resolution optimization.
[0050] Using component template libraries of different resolutions, template matching is performed on different flowcharts. All categories of elements are identified, and the component matching values and average values on different flowcharts are output.
[0051] Select the optimal resolution template to obtain the template library with the optimal resolution;
[0052] Perform template matching and identify components in the target image based on the matching results;
[0053] Based on the target image, the target is searched in the template library; the image to be detected is traversed from left to right and from top to bottom using a matching algorithm, and then the template is matched with the sub-image blocks from top to bottom; and the components in the target image are identified based on the matching results.
[0054] The specific matching of the component template with the target image sub-image can be achieved by any one of the following methods and combinations thereof: feature matching, edge contour matching, segmentation matching, pixel ratio matching, and color matching;
[0055] The feature matching process involves extracting image features from the component template and the sub-image block, and determining whether the component template and the sub-image block match based on the matching degree of their image features. This process involves selecting multiple features for comprehensive matching and obtaining the optimal feature matching parameters through parameter tuning. The feature extraction algorithms that can be used include: LBP local feature matching, SIFT feature matching, ORB feature matching, and SURF feature matching.
[0056] The edge contour matching is achieved by extracting the image contours in the component template and the sub-image block, and determining whether the component template and the sub-image block match based on the matching degree of the image contours in the component template and the sub-image block.
[0057] The segmentation matching involves segmenting the component template and sub-image blocks, and matching the corresponding segmented regions of the component template and sub-image blocks.
[0058] The pixel ratio matching is based on the ratio of the number of pixels with gray values greater than a predetermined threshold in the element template and the sub-image block to determine whether the element template and the sub-image block are matched.
[0059] The color matching is based on the color information of the specified area in the component template and the sub-image block to determine whether the component template and the sub-image block match.
[0060] A method for identifying inflection points, which specifically includes the following steps:
[0061] S1. Obtain the target image;
[0062] S2. Identify the components and text in the target image, and remove the identified components and text from the target image;
[0063] S2.1 Component recognition in the target image is achieved based on keyword matching;
[0064] The system identifies keywords corresponding to each element in the target image, matches auxiliary keywords corresponding to element templates with the identified keywords, and identifies elements in the target image based on the matching results.
[0065] S2.2 Recognize the text in the target image and remove the components and text from the target image;
[0066] S3. Identify the position information of connecting lines in the target image;
[0067] S4. Based on the location information of the detected connection, identify the inflection point in the target image.
[0068] The specific steps for recognizing text in the target image are as follows:
[0069] (1) Perform image preprocessing on the acquired target image;
[0070] (1.1) Perform image grayscale processing on the acquired image to be identified;
[0071] (1.2) Filter the grayscale image to reduce image noise;
[0072] (1.3) Binarize the filtered image;
[0073] (2) Target detection is performed on the text region in the target image;
[0074] The YOLO algorithm is used to obtain boundary coordinates and class probabilities from image pixels, and the positions and information of all targets in the target image are confirmed and identified.
[0075] (3) Collect and recognize the text in the target image;
[0076] The CRNN text recognition model is used to recognize text in a target image. The text recognition model is obtained by training a pre-trained model and a constructed data sample set.
[0077] The specific steps for the text recognition model to recognize text in a target image are as follows:
[0078] (1) Perform sliding recognition on the target image;
[0079] (1.1) Sub-image segmentation: The entire target image is divided into multiple sub-images by cropping.
[0080] (1.2) Perform image sliding: Use sliding sub-images to make the segmentation box slide throughout the target image;
[0081] (1.3) Image merging: Non-maximum suppression algorithm is used to remove duplicate recognition regions and then image merging is performed;
[0082] (2) Detect the direction of text in the target image;
[0083] (2.1) The detection is performed by a binary classification model, which divides horizontal text and vertical text into two categories of samples. The binary classification model is trained to determine the direction of the text, and the text direction is then corrected.
[0084] (2.2) Rule-based detection is performed to determine the direction of the text based on the length and width of the text area.
[0085] The specific steps for identifying the connection location information in the target image in step S3 are as follows:
[0086] The connection in the target image is identified as a separate element, and the position information of the connection is finally output. After binarizing the target image, the number of consecutive pixels is determined to be continuous by detecting whether there is a number of consecutive pixels whose average pixel value is less than a predetermined pixel threshold. If the number of consecutive pixels exceeds a preset threshold and whose average pixel value is close to 0, the number of consecutive pixels is determined to be continuous.
[0087] The specific steps for identifying inflection points in the target image based on the detected line position information in step S4 are as follows:
[0088] S4.1 Based on the detected position information of the connecting lines, identify the position information of the corner points in the target image;
[0089] Corner points include the intersections of lines in an image, and the positional information of corner points can be identified using the Shi-Tomasi detection algorithm.
[0090] S4.2 Based on the position information of the corner points in the target image, identify the inflection points in the target image;
[0091] Based on the obtained connection positions and corner point position information, determine whether there are at least two lines connecting each corner point in the target image and both of them are straight lines; for any corner point, if there are at least two lines connecting the corner point and both of them are straight lines, the corner point is identified as an inflection point.
[0092] When the line connecting the corner points is a horizontal or vertical line, the specific steps for identifying the inflection point are as follows:
[0093] Based on the identified connection and corner position information, determine whether the connecting lines to each corner in the target image form a right angle. If the connecting lines to the corner form a right angle, the corner is identified as an inflection point.
[0094] The specific steps for right-angle detection are as follows:
[0095] For any corner point, a rectangular target area is defined with that corner point as the center, and a central rectangular area is defined at the center of the target area. The areas above and below the central area within the target area are defined as the vertical detection area, and the areas to the left and right of the central area within the target area are defined as the horizontal detection area. When there is a vertical line in the vertical detection area and the length of the vertical line is approximately equal to the height of the vertical detection area, and there is a horizontal line in the horizontal detection area and the length of the horizontal line is approximately equal to the width of the horizontal detection area, it is determined that the line connecting to the corresponding corner point forms a right angle.
[0096] The significant advantage of this invention is that the inflection point recognition method described in this invention can automatically identify inflection points in target images, providing a basis for subsequent intelligent image recognition and laying the foundation for subsequent automatic modeling to realize the automatic conversion from design drawings to simulation models. Attached Figure Description
[0097] Figure 1 This is a flowchart of an inflection point identification method according to the present invention;
[0098] Figure 2A schematic diagram showing the contact points formed by curves and the corner points formed by straight lines;
[0099] Figure 3 This is a schematic diagram of common inflection point types in an image. Detailed Implementation
[0100] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0101] like Figures 1-3 As shown, an inflection point identification method includes the following steps:
[0102] S1. Obtain the target image;
[0103] Acquire target images related to system flowcharts such as electrical diagrams, process diagrams, and panel diagrams. The acquired target images include several components, text corresponding to the components, and lines connecting these components.
[0104] S2. Identify the components and text in the target image, and remove the identified components and text from the target image;
[0105] S2.1 Construct a component recognition model to identify components in target images based on deep learning;
[0106] Construct a YOLO model by dividing the target image into a grid and assigning each grid to detect if the center point falls within the target object.
[0107] S2.1.1 Preprocess the target image to be identified;
[0108] S2.1.2 Perform data labeling;
[0109] Select and mark the component bounding boxes in the target image, including the type of the component and the position of the marked box. The marked box should contain the entire component and have the smallest possible area of blank space.
[0110] S2.1.3 Perform sample data augmentation
[0111] S2.1.3.1 Randomly extract local regions from the same image and generate a first sample image based on the distribution of the extracted local regions;
[0112] The type and location information of each element in the sample image are labeled. A rectangular area is randomly extracted from the image. Based on the position of the rectangular area in the original image and the position of each element in the original image, the position coordinates of each element in the rectangular area relative to the rectangular area can be calculated. Thus, the labeling information of the elements in the rectangular area can be obtained, thereby obtaining a large number of new training samples.
[0113] S2.1.3.2 Add random noise information to the first sample image and generate a new first sample image;
[0114] Random noise, including Gaussian noise, salt-and-pepper noise, image blurring, and image brightness variations, is added to the first sample image to make each element in each training sample different, increase the features of the training samples, and improve the generalization ability of the element recognition model.
[0115] S2.2.3.3 Constructing virtual sample data;
[0116] Extract several component templates from a pre-defined standard template library, and stitch the extracted component templates together to form several first sample images;
[0117] After S2.1.4 performs sample training and updates, component detection and identification are carried out;
[0118] A YOLO component recognition model was constructed, and after training the model using the first sample set, component detection and recognition were carried out.
[0119] The input target image is divided into S×S grids, each grid responsible for detecting target objects whose center point falls within it. Each grid contains B bounding boxes, each bounding box consisting of a five-dimensional prediction parameter, including the center point coordinates (x, y), width and height (w, h), and a confidence score S. i Among them, the confidence score S i It is calculated by the following formula:
[0120] s i =Pr(o)×IoU
[0121] Where Pr(o) represents the probability that an object exists within the current mesh bounding box, and o represents the target object; IoU (Intersection over Union) demonstrates the accuracy of the target bounding box position predicted by the current model; assuming the predicted target bounding box is P, and the true target bounding box is t, box... t The box represents the bounding box of a real object in an image. p The target bounding box is represented; then the IoU is calculated by the following formula:
[0122]
[0123] Pr(C i |O) represents the posterior probability that the target belongs to a certain type of object i given that the bounding box contains the target; assuming there are K types of objects in the object detection task, then each grid predicts the object C of type i. i The conditional probability is Pr(C) i|O), i = 1, 2, ..., K;
[0124] After calculating Pr(C) i After |O), during testing, the confidence level that an object exists within a target bounding box can be calculated, as shown in the following formula:
[0125]
[0126] Component identification is performed based on the confidence level that an object exists within the target bounding box;
[0127] S2.2 Component recognition in target images is achieved based on template matching;
[0128] S2.2.1 Establish a standard template library;
[0129] Construct component templates corresponding to process components, electrical components, and panel components. The template library for process components includes schematic diagrams of component icons, icon names, numbers, English names, icon file paths, auxiliary identification keywords, flow direction, interface direction, number of interfaces, and local identification elements. The template library for electrical components has similar elements to that for process components. The template library for panel components includes knobs, dials, etc. The panel diagram template library only needs to extract the key components at a uniform resolution.
[0130] S2.2.2 Establish multiple template libraries, with component templates in different template libraries having different resolutions;
[0131] S2.2.2.1 Extract several component templates of different resolutions to form multiple different template libraries;
[0132] S2.2.2.2 Sort the component template libraries of different resolutions from high to low resolution as input for baseline resolution optimization;
[0133] S2.2.2.3 Use component template libraries of different resolutions to perform template matching on different flowcharts. All categories of elements are identified and the component matching values and average values on different flowcharts are output.
[0134] S2.2.2.4 Select the optimal resolution template to obtain the template library with the optimal resolution;
[0135] Templates with a matching mean greater than 0.95 accounting for more than 90% of the total number of component categories are used as the optimal resolution templates;
[0136] S2.2.3 Perform template matching and identify components in the target image based on the matching results;
[0137] Based on the target image, the target is searched in the template library; the image to be detected is traversed from left to right and from top to bottom using a matching algorithm, and then the template is matched with the sub-image blocks from top to bottom; and the components in the target image are identified based on the matching results.
[0138] Matching the component template with the sub-image block specifically includes: feature matching, edge contour matching, segmentation matching, pixel proportion matching, and color matching;
[0139] Feature matching involves extracting image features from a component template and a sub-image patch, and determining whether the component template and the sub-image patch match based on the matching degree of their image features. This is achieved by selecting multiple features for comprehensive matching and by adjusting parameters to obtain the optimal feature matching parameters. The feature extraction algorithms that can be used include, but are not limited to, LBP local feature matching, SIFT feature matching, ORB feature matching, and SURF feature matching.
[0140] Edge contour matching is achieved by extracting the image contours of the component template and the sub-image block, and determining whether the component template and the sub-image block match based on the degree of matching between the component template and the image contours of the sub-image block.
[0141] Segmentation matching involves segmenting the component template and sub-image blocks, and then matching the corresponding segmented regions of the component template and sub-image blocks.
[0142] Pixel ratio matching is based on the ratio of the number of pixels with gray values greater than a predetermined threshold in the element template and the sub-image block to determine whether the element template and the sub-image block match.
[0143] Color matching determines whether a component template and a sub-image block match based on the color information of a specified area in the component template and the sub-image block.
[0144] S2.3 Component recognition in the target image is achieved based on keyword matching;
[0145] Identify the keywords corresponding to each element in the target image, match the auxiliary keywords corresponding to the element templates with the identified keywords, and identify the elements in the target image based on the matching results;
[0146] S2.4 Recognize the text in the target image;
[0147] S2.4.1 Perform image preprocessing on the acquired target image;
[0148] S2.4.1.1 Perform image grayscale processing on the acquired image to be identified;
[0149] S2.4.1.2 Filter the grayscale image to reduce image noise;
[0150] S2.4.1.3 Binarize the filtered image;
[0151] S2.4.2 Perform target detection on text regions in the target image;
[0152] The YOLO algorithm is used to obtain boundary coordinates and class probabilities from image pixels, and the positions and information of all targets in the target image are confirmed and identified.
[0153] S2.4.3 Collect and recognize text in the target image;
[0154] The CRNN text recognition model is used to recognize text in a target image. This model is trained using a pre-trained model and a constructed dataset. The sample data used by both the text region detection model and the text recognition model is obtained through data augmentation. The specific steps are as follows:
[0155] Random noise is added to the sample images by randomly adding salt and pepper noise, Gaussian noise, image blur noise, and image erosion noise to form new sample data.
[0156] For images containing numbers, letters, and standard symbols that are originally image data samples, a template set of standard characters is established, and a large number of sample images are randomly generated using sample synthesis.
[0157] The specific steps for performing sliding recognition on the target image are as follows:
[0158] Sub-image partitioning: The entire target image is divided into multiple sub-images by cropping.
[0159] Image sliding: Use sliding sub-images to make the segmentation box slide across the entire target image;
[0160] Image merging: The non-maximum suppression (NMS) algorithm is used to remove duplicate regions before image merging.
[0161] When recognizing text in a target image, it is necessary to detect the direction of the text corresponding to each text region. On the one hand, a binary classification model can be used to detect the text, dividing horizontal and vertical text into two categories of samples. The binary classification model is trained to determine the direction of the text, and the direction of the text is then corrected. On the other hand, rule-based detection can be used. Since text is composed of multiple characters, the direction of the text can be determined based on the length and width of the text region.
[0162] S3. Identify the position information of connecting lines in the target image;
[0163] The connection in the target image is identified as a separate element, and the position information of the connection is finally output. After binarizing the target image, the number of consecutive pixels is determined to be continuous by detecting whether there is a number of consecutive pixels whose average pixel value is less than a predetermined pixel threshold. If the number of consecutive pixels exceeds a predetermined threshold and the average pixel value is close to 0, the number of consecutive pixels is determined to be continuous.
[0164] S4. Based on the detected position information of the connecting lines, identify the inflection points in the target image.
[0165] S4.1 Based on the detected position information of the connecting lines, identify the position information of the corner points in the target image;
[0166] Corner points include the intersections of lines in an image, and the positional information of corner points can be identified using the Shi-Tomasi detection algorithm.
[0167] S4.2 Based on the position information of the corner points in the target image, identify the inflection points in the target image;
[0168] Based on the obtained connection positions and corner point positions, determine whether there are at least two lines connecting each corner point in the target image and both of them are straight lines; for any corner point, if there are at least two lines connecting it and both of them are straight lines, then the corner point is identified as an inflection point.
[0169] For cases where the connecting lines are horizontal or vertical, the inflection point can be determined by detecting the right-angled sides. The specific steps are as follows:
[0170] Based on the identified connection and corner position information, determine whether the connecting lines to each corner in the target image form a right angle. If the connecting lines to the corner form a right angle, the corner is identified as an inflection point.
[0171] The specific steps for the right angle detection are as follows:
[0172] For any corner point, a rectangular target area is defined with that corner point as the center. A central area of a rectangle is defined at the center of the rectangular target area. The areas above and below the central area within the target area are defined as the vertical detection area, and the areas to the left and right of the central area within the target area are defined as the horizontal detection area. When there is a vertical line in the vertical detection area and the length of the vertical line is approximately equal to the height of the vertical detection area, and there is a horizontal line in the horizontal detection area and the length of the horizontal line is approximately equal to the width of the horizontal detection area, it is determined that the line connecting to the corresponding corner point forms a right angle.
Claims
1. A method for identifying inflection points in intelligent image recognition, characterized in that, The method specifically includes the following steps: S1. Obtain the target image; S2. Identify the components and text in the target image, and remove the identified components and text from the target image; S2.1 Construct a component recognition model to identify components in the target image based on deep learning; The identification of components in the target image includes constructing and training a component identification model for identification. When training the component identification model, sample data enhancement is performed in the following way: constructing virtual sample data, extracting several component templates from a preset standard template library, and stitching the extracted component templates into several sample images. S2.2 Recognize the text in the target image and remove the components and text from the target image; S3. Identify the position information of connecting lines in the target image; S4. Based on the detected position information of the connecting line, identify the inflection points in the target image, specifically including: S4.1 Based on the detected position information of the connecting lines, identify the position information of the corner points in the target image; Corner points include the intersections of lines in an image, and the positional information of corner points can be identified using the Shi-Tomasi detection algorithm. S4.2 Based on the position information of the corner points in the identified target image, identify the inflection points in the target image; Based on the obtained connection positions and corner point position information, determine whether there are at least two lines connecting each corner point in the target image and both of them are straight lines; for any corner point, if there are at least two lines connecting the corner point and both of them are straight lines, the corner point is identified as an inflection point.
2. The inflection point recognition method applied to intelligent image recognition according to claim 1, characterized in that, The specific steps for identifying components in the target image based on deep learning in step 2.1 are as follows: Construct a YOLO model by dividing the target image into a grid and assigning each grid to detect if the center point falls within the target object. S2.1.1 Preprocess the target image to be identified; S2.1.2 Perform data labeling; Select and mark the components in the target image, including the type of the component and the position of the mark box; S2.1.3 Perform sample data augmentation; After S2.1.4 performs sample training and updates, component detection and identification are carried out; A YOLO component recognition model was constructed, and after training the model using the first sample set, component detection and recognition were carried out.
3. The inflection point recognition method applied to intelligent image recognition according to claim 2, characterized in that, The specific steps for sample data augmentation in step S2.1.3 are as follows: Randomly crop local regions from the same image and generate a first sample image based on the distribution of the cropped local regions; The type and location information of each element in the sample image are labeled. A rectangular area is randomly extracted from the image. Based on the position of the rectangular area in the original image and the position of each element in the original image, the position coordinates of each element in the rectangular area relative to the rectangular area can be calculated. Thus, the labeling information of the elements in the rectangular area can be obtained, thereby obtaining a large number of new training samples. Random noise information is added to the first sample image to generate a new first sample image; Construct virtual sample data; extract several component templates from a preset standard template library, and stitch the extracted component templates together to form several first sample images.
4. The inflection point recognition method applied to intelligent image recognition according to claim 2, characterized in that, The specific steps for constructing the YOLO component recognition model and performing component detection and recognition are as follows: The input target image is divided into S×S grids, each grid is responsible for detecting target objects whose center point falls within it. Each grid contains B target bounding boxes, each bounding box consisting of a five-dimensional prediction parameter, including the center point coordinates (x, y), width and height (w, h), and a confidence score S. i Among them, the confidence score S i It is calculated by the following formula: in, The value 'o' represents the probability that an object exists within the current mesh bounding box; IoU (Intersection over Union) indicates the accuracy of the target bounding box location predicted by the current model. Assuming the predicted target bounding box is P and the true target bounding box is t, box... t The box represents the bounding box of a real object in an image. p The target bounding box is represented; then the IoU is calculated by the following formula: This represents the posterior probability that an object belongs to a certain class of object i, given that an object exists within the bounding box. Assuming there are K types of objects in the object detection task, each grid cell predicts the object of class i. C i The conditional probability is ,i=1, 2,…,K ; In the calculation Then, during testing, the confidence level that an object exists within a target bounding box can be calculated, as shown in the following formula: Component identification is performed based on the confidence level of the presence of objects within the target bounding box.
5. The inflection point recognition method applied to intelligent image recognition according to claim 1, characterized in that, The method specifically includes the following steps: S2.1 Component recognition in a target image is achieved based on template matching; Establish a standard template library; Establish multiple template libraries, with component templates in different libraries having different resolutions; Perform template matching and identify components in the target image based on the matching results; S2.2 Recognize the text in the target image and remove the components and text from the target image; S3. Identify the position information of connecting lines in the target image; S4. Based on the location information of the detected connection, identify the inflection point in the target image.
6. The inflection point recognition method for intelligent image recognition according to claim 5, characterized in that, The specific steps for identifying components in a target image based on template matching are as follows: Establish a standard template library; Construct component templates that include process components, electrical components, and panel components; Establish multiple template libraries, with component templates in different libraries having different resolutions; Extract several component templates of different resolutions to form multiple different template libraries; The component template libraries of different resolutions are sorted from high to low resolution and used as input for baseline resolution optimization. Using component template libraries of different resolutions, template matching is performed on different flowcharts. All categories of elements are identified, and the component matching values and average values on different flowcharts are output. Select the optimal resolution template to obtain the template library with the optimal resolution; Perform template matching and identify components in the target image based on the matching results; Based on the target image, the target is searched in the template library; the image to be detected is traversed from left to right and from top to bottom using a matching algorithm, and then the template is matched with the sub-image blocks from top to bottom; and the components in the target image are identified based on the matching results.
7. The inflection point recognition method for intelligent image recognition according to claim 6, characterized in that, The specific matching of the component template with the target image sub-image can be achieved by any one of the following methods and combinations thereof: feature matching, edge contour matching, segmentation matching, pixel ratio matching, and color matching; The feature matching process involves extracting image features from the component template and the sub-image block, and determining whether the component template and the sub-image block match based on the matching degree of their image features. This process involves selecting multiple features for comprehensive matching and obtaining the optimal feature matching parameters through parameter tuning. The feature extraction algorithms that can be used include: LBP local feature matching, SIFT feature matching, ORB feature matching, and SURF feature matching. The edge contour matching is achieved by extracting the image contours in the component template and the sub-image block, and determining whether the component template and the sub-image block match based on the matching degree of the image contours in the component template and the sub-image block. The segmentation matching involves segmenting the component template and sub-image blocks, and matching the corresponding segmented regions of the component template and sub-image blocks. The pixel ratio matching is based on the ratio of the number of pixels with gray values greater than a predetermined threshold in the element template and the sub-image block to determine whether the element template and the sub-image block are matched. The color matching is based on the color information of the component template and the specified area in the sub-image block to determine whether the component template and the sub-image block match.
8. The inflection point recognition method for intelligent image recognition according to claim 1, characterized in that, The method specifically includes the following steps: S2.1 Component recognition in the target image is achieved based on keyword matching; Identify the keywords corresponding to each element in the target image, match the auxiliary keywords corresponding to the element templates with the identified keywords, and identify the elements in the target image based on the matching results; S2.2 Recognize the text in the target image and remove the components and text from the target image; S3. Identify the position information of connecting lines in the target image; S4. Based on the location information of the detected connection, identify the inflection point in the target image.
9. The inflection point recognition method applied to intelligent image recognition according to any one of claims 1, 3, and 8, characterized in that, The specific steps for recognizing text in the target image are as follows: (1) Perform image preprocessing on the acquired target image; (1.1) Perform image grayscale processing on the acquired image to be identified; (1.2) Filter the grayscale image to reduce image noise; (1.3) Binarize the filtered image; (2) Target detection is performed on the text regions in the target image; The YOLO algorithm is used to obtain boundary coordinates and class probabilities from image pixels, and the positions and information of all targets in the target image are confirmed and identified. (3) Collect and recognize the text in the target image; The CRNN text recognition model is used to recognize text in a target image. The text recognition model is obtained by training a pre-trained model and a constructed data sample set.
10. The inflection point recognition method applied to intelligent image recognition according to claim 9, characterized in that, The specific steps for the text recognition model to recognize text in a target image are as follows: (1) Perform sliding recognition on the target image; (1.1) Sub-image division: The entire target image is divided into multiple sub-images by cropping. (1.2) Perform image sliding: Use sliding sub-images to make the segmentation box slide throughout the target image; (1.3) Image merging: Non-maximum suppression algorithm is used to remove duplicate recognition areas and then image merging is performed; (2) Detect the direction of text in the target image; (2.1) The detection is performed by a binary classification model, which divides horizontal text and vertical text into two categories of samples. The binary classification model is trained to determine the direction of the text, and the text direction is then corrected. (2.2) Rule-based detection is performed to determine the direction of the text based on the length and width of the text area.
11. The inflection point recognition method applied to intelligent image recognition according to claim 9, characterized in that, The specific steps for identifying the position information of the connecting lines in the target image in step S3 are as follows: The connection in the target image is identified as a separate element, and the position information of the connection is finally output. After binarizing the target image, the number of consecutive pixels is determined to be continuous by detecting whether there is a number of consecutive pixels whose average pixel value is less than a predetermined pixel threshold. If the number of consecutive pixels exceeds a preset threshold and whose average pixel value is close to 0, the number of consecutive pixels is determined to be continuous.
12. The inflection point recognition method applied to intelligent image recognition according to claim 11, characterized in that, When the line connecting the corner points is a horizontal or vertical line, the specific steps for identifying the inflection point are as follows: Based on the identified connection and corner position information, determine whether the connecting lines to each corner in the target image form a right angle. If the connecting lines to the corner form a right angle, the corner is identified as an inflection point. The specific steps for right-angle detection are as follows: For any corner point, a rectangular target area is defined with that corner point as the center, and a central rectangular area is defined at the center of the target area. The areas above and below the central area within the target area are defined as the vertical detection area, and the areas to the left and right of the central area within the target area are defined as the horizontal detection area. When there is a vertical line in the vertical detection area and the length of the vertical line is approximately equal to the height of the vertical detection area, and there is a horizontal line in the horizontal detection area and the length of the horizontal line is approximately equal to the width of the horizontal detection area, it is determined that the line connecting to the corresponding corner point forms a right angle.