Target identification method and system based on Mask R-CNN
By combining the feature pyramid network and the domain generation network, the problem of artifact misidentification in image recognition by the Mask R-CNN model is solved, and the accurate division of object boundaries and the true determination of object areas are achieved.
Patent Information
- Application Number
- CN202510960068.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-09-26
AI Technical Summary
The existing Mask R-CNN model easily misidentifies artifacts as object area edges during image recognition, resulting in the inability to accurately obtain the true object boundaries.
Multi-scale feature extraction of the target image is performed through the feature pyramid network and domain generation network, anchor frames of different sizes are generated, feature matching and candidate region determination are performed, and the classification parameters are adjusted by combining the suppression degree of high-feature signal points and pseudo-edge gradient characteristics, eliminating pseudo-edges and obtaining accurate object boundaries.
The accuracy of object boundaries is improved, ensuring the authenticity and accuracy of object boundaries in object area images.
Smart Images

Figure CN120708031A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a target recognition method and system based on Mask R-CNN. Background Art
[0002] Mask R-CNN (Mask Region-based Convolutional Neural Network) is an advanced computer vision model based on deep learning. Its contribution to image recognition is mainly reflected in its innovative combination of object detection and instance segmentation tasks. The model can accurately distinguish the pixel-level ownership of overlapping objects in complex scenes, promoting the practical application of instance segmentation technology. It has become a benchmark method for subsequent research and is widely used in autonomous driving, medical imaging, and other fields.
[0003] In related technologies, the object area in the image is mainly acquired through the original Mask R-CNN, but there is a disadvantage of misidentifying artifacts as the edge of the object area, so it is impossible to obtain an accurate object area image. Summary of the Invention
[0004] The main purpose of this application is to provide a target recognition method and system based on Mask R-CNN, which aims to solve the technical problem in related technologies that artifacts are obtained during image recognition, the real object boundaries cannot be accurately obtained, and the real object area image cannot be determined.
[0005] To achieve the above objectives, the present invention provides a method for object recognition based on Mask R-CNN, including:
[0006] Acquire the target image to be identified;
[0007] Input the target image into a preset image recognition model, perform recognition processing on the target image based on the preset image recognition model, and obtain an image recognition result. The preset image recognition model is a Mask R-CNN model. The image recognition result is obtained by dividing the object boundary of the target image based on the high feature signal positions obtained after multiple convolution operations and the degree to which the high feature signal positions reflect the pseudo edge gradient features in the target image;
[0008] Based on the image recognition result, the object area image corresponding to the target image is determined.
[0009] In one possible implementation of the present application, the preset image recognition model includes a feature pyramid network. Based on the preset image recognition model, recognition processing is performed on the target image to obtain an image recognition result, including:
[0010] Based on the feature pyramid network, multi-scale feature extraction is performed on the target image to obtain a multi-level feature map;
[0011] Based on the domain generation network, multi-level feature maps are processed to generate multiple anchor boxes of different sizes;
[0012] Perform feature matching on each anchor frame to determine multiple candidate regions;
[0013] Obtain high-feature signal points from multiple pixel points in each candidate area;
[0014] Adjust the classification parameters of each pixel based on the degree of suppression of other characteristic signal points by high characteristic signal points, the pixel spacing between pixels, and the area of the candidate area;
[0015] According to the gradient characteristics of the pseudo edges in the target image and the adjusted classification parameters of each pixel, the pseudo edges of each pixel are eliminated to obtain the image recognition result.
[0016] In a possible implementation of the present application, feature matching is performed on each anchor frame to determine multiple candidate regions, including:
[0017] Calculate the first intersection of each anchor box and the ground truth box, and predict the coordinate parameters of the ground truth box through the preset regression model;
[0018] Based on the coordinate parameters, the position and size of each anchor frame are adjusted to obtain multiple adjusted anchor frames;
[0019] Determine the intersection-over-union ratio difference between the current adjusted anchor frame and the anchor frames of the adjacent layers to the current adjusted anchor frame;
[0020] Based on the first intersection-in-union ratio and the intersection-in-union ratio difference, the frame selection suitability of the currently adjusted anchor frame is calculated;
[0021] For any anchor box, multiple candidate regions are determined based on the box selection suitability.
[0022] In a possible implementation of the present application, before adjusting the classification parameters of each pixel based on the degree of suppression of other characteristic signal points by high characteristic signal points, the pixel spacing between each pixel, and the area of the candidate area, the following method is further included:
[0023] The candidate area is mapped to a preset feature map, and based on the classification confidence algorithm, multiple pixels in the candidate area are calculated to obtain multiple classification confidences and the overall category confidence corresponding to the candidate area;
[0024] Based on the area of the candidate region and the overall category confidence, a restoration reference region of the classification confidence of the pixel point is determined, wherein the pixel point with the largest classification confidence in the restoration reference region is the point with the greatest suppression ability;
[0025] Calculate the edge classification confidence of the pixel point in the restored reference area, and calculate the sum of the first differences between the classification confidence of the pixel point in other candidate areas and the edge classification confidence;
[0026] Selecting a first candidate region including the current pixel and the point with the maximum suppression ability;
[0027] Calculating a first difference between the classification confidences corresponding to the pixel points in the first candidate area and the point with the maximum inhibition ability, and calculating a second difference between the pixel points in the restored reference area and the point with the maximum inhibition ability;
[0028] Adding the difference between each first difference value and each second difference value to obtain a second difference sum;
[0029] Based on the first difference sum and the second difference sum, the degree of suppression of the point with the maximum suppression ability on other characteristic signal points is calculated.
[0030] In a possible implementation of the present application, determining a restoration reference area for the classification confidence of a pixel point based on the area of the candidate area and the overall category confidence includes:
[0031] Multiply the area of the candidate region and the overall category confidence to get the confidence product;
[0032] Normalize the confidence product to obtain the restored reference bias value;
[0033] The candidate area corresponding to the maximum value of the restored reference bias value is selected as the restoration reference area for the classification confidence of the pixel point.
[0034] In one possible implementation of the present application, the classification parameters include classification confidence, and the classification parameters of each pixel are adjusted based on the degree of suppression of other characteristic signal points by high characteristic signal points, the pixel spacing between pixels, and the area of the candidate region, including:
[0035] Calculate the distance between each pixel in the restored reference area and the pixel of the point with the maximum suppression ability, and obtain the area of the restored reference area;
[0036] Based on the degree of suppression, area, and pixel spacing, the classification confidence recovery value is calculated;
[0037] For any pixel in the restored reference area, classification confidence restoration processing is performed on the pixel based on the classification confidence restoration value.
[0038] In a possible implementation of the present application, the classification parameters further include classification confidence. According to the gradient characteristics of the pseudo edges in the target image and the classification parameters adjusted for each pixel, the pseudo edges of each pixel are eliminated to obtain an image recognition result, including:
[0039] Divide the edge classification confidence of the pixel point into multiple confidence segments at preset intervals;
[0040] Obtaining a first confidence segment corresponding to a maximum edge classification confidence value in the restored reference area, and extracting a first image composed of pixels in the first confidence segment;
[0041] Add the corresponding pixel points to the first image in order according to the confidence segment sorting size to obtain the boundary curve;
[0042] Calculate the boundary curve as the boundary conformity of the object boundary image;
[0043] When the boundary conformity is greater than a preset conformity threshold, an image recognition result is generated based on the boundary curve.
[0044] In a possible implementation of the present application, before inputting the target image into the preset image recognition model, the method further includes:
[0045] Acquire image data to be trained including the target object;
[0046] Perform pixel-level mask annotation on the training image data using a preset annotation tool to generate a target format label file;
[0047] Based on the image data to be trained and the target format label file, the recognition model to be trained is iteratively trained until the detection index corresponding to the recognition model to be trained reaches the preset accuracy standard, thereby obtaining a trained image recognition model.
[0048] In a possible implementation of the present application, determining an object region image corresponding to a target image based on an image recognition result includes:
[0049] Based on the image recognition results, determine the pixel position of each pixel;
[0050] When determining that the same pixel position is within the coverage of different candidate regions, the candidate region with the highest classification confidence is retained through the non-maximum suppression method;
[0051] Calculate the mask prediction value of the pixel point in the corresponding candidate area;
[0052] If it is determined that the mask prediction value is greater than or equal to the preset threshold, the category of the pixel point is marked as the category of the candidate area corresponding to the mask prediction value;
[0053] If it is determined that any pixel point is covered by multiple candidate areas and all of them meet the threshold conditions corresponding to the preset threshold, the category of any pixel point is marked as the category of the candidate area with the highest classification confidence;
[0054] Generate an object area image based on the pixels marked as objects.
[0055] This application also provides a target recognition system based on Mask R-CNN. The target recognition system based on Mask R-CNN includes:
[0056] An acquisition module is used to acquire a target image to be identified;
[0057] A processing module, which is used to input a target image into a preset image recognition model, perform recognition processing on the target image based on the preset image recognition model, and obtain an image recognition result. The preset image recognition model is a Mask R-CNN model, and the image recognition result is obtained by dividing the object boundary of the target image based on the high feature signal positions obtained after multiple convolution operations and the degree to which the high feature signal positions reflect the pseudo-edge gradient features in the target image;
[0058] The determination module is used to determine the object area image corresponding to the target image based on the image recognition result.
[0059] The present application provides a target recognition method and system based on Mask R-CNN. Compared with the related art, which obtains artifacts during image recognition and cannot accurately obtain the real object boundary, and thus cannot determine the real object area image, in the present application, by obtaining a target image to be identified and inputting the target image into a preset image recognition model, the target image is recognized and processed by the preset image recognition model to obtain an image recognition result. Since the image recognition result is based on the high feature signal position obtained after multiple convolution operations and the degree to which the high feature signal position reflects the pseudo-edge gradient feature in the target image, the object boundary in the target image is divided, which can make the object boundary in the obtained image more accurate, and thus determine the real object boundary in the object area image. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a flowchart of the first embodiment of the target recognition method based on Mask R-CNN of this application;
[0061] Figure 2 This is a schematic diagram of the Mask R-CNN model architecture involved in the Mask R-CNN-based object recognition method of this application;
[0062] Figure 3This is a flowchart of the second embodiment of the target recognition method based on Mask R-CNN of this application;
[0063] Figure 4 This is a flowchart of the third embodiment of the target recognition method based on Mask R-CNN of this application;
[0064] Figure 5 This is a flowchart of the fourth embodiment of the target recognition method based on Mask R-CNN of this application;
[0065] Figure 6 This is a schematic diagram of the overall execution flow involved in the target recognition method based on Mask R-CNN in this application;
[0066] Figure 7 This is a schematic diagram of the object boundary output involved in the target recognition method based on Mask R-CNN in this application;
[0067] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application. DETAILED DESCRIPTION
[0068] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0069] The present application embodiment provides a target recognition method based on Mask R-CNN. In the first embodiment of the target recognition method based on Mask R-CNN in the present application, Figure 1 , methods include:
[0070] Step S10, obtaining a target image to be identified;
[0071] Step S20: Input the target image into a preset image recognition model, and perform recognition processing on the target image based on the preset image recognition model to obtain an image recognition result. The preset image recognition model is a Mask R-CNN model, and the image recognition result is obtained by dividing the object boundary of the target image based on the high feature signal positions obtained after multiple convolution operations and the degree to which the high feature signal positions reflect the pseudo edge gradient features in the target image;
[0072] Step S30: determining the object region image corresponding to the target image based on the image recognition result.
[0073] The purpose of this embodiment is to: obtain a target image to be identified, input the target image into a preset image recognition model, and perform recognition processing on the target image through the preset image recognition model to obtain an image recognition result. Since the image recognition result is based on the high feature signal position obtained after multiple convolution operations and the degree to which the high feature signal position reflects the pseudo-edge gradient features in the target image, the object boundaries in the target image are divided, which can make the object boundaries in the obtained image more accurate, and thus determine the real object area in the object area image.
[0074] In this embodiment, the research and development background is:
[0075] When identifying a target image, Mask R-CNN is used to obtain the edges of objects in the image. Although it can achieve better results compared to other earlier algorithms, it has the disadvantage of also obtaining artifacts in the image. In this way, the model will also take the artifacts into account and cannot accurately identify the required area image, resulting in recognition errors. Therefore, this type of technical problem needs to be solved.
[0076] The specific steps are as follows:
[0077] Step S10: Acquire a target image to be identified.
[0078] As an example, the target recognition method based on Mask R-CNN can be applied to a target recognition device based on Mask R-CNN. The target recognition device based on Mask R-CNN belongs to a target recognition system based on Mask R-CNN, and the target recognition system based on Mask R-CNN belongs to a target recognition device based on Mask R-CNN.
[0079] As an example, the target image may be image data that requires model detection, such as pictures of cats and dogs.
[0080] In step S20, the target image is input into a preset image recognition model, and recognition processing is performed on the target image based on the preset image recognition model to obtain an image recognition result, wherein the preset image recognition model is a Mask R-CNN model, and the image recognition result is obtained by dividing the object boundary of the target image based on the high feature signal position obtained after multiple convolution operations and the degree to which the high feature signal position reflects the pseudo-edge gradient feature in the target image.
[0081] As an example, the preset image recognition model may be a Mask R-CNN model. The structural diagram of the Mask-RCNN model is as follows: Figure 2As shown in the figure, the Mask R-CNN model is an advanced computer vision model based on deep learning. The model can achieve accurate target recognition. By presetting the image recognition model, the target image is recognized and processed to obtain the image recognition result.
[0082] As an example, in related technologies, when the Mask R-CNN model identifies the edges of objects in a target image, it also obtains artifacts of the target objects, making it impossible to accurately identify the edges of the objects. The Mask R-CNN model includes a feature pyramid network and a domain generation network. This application obtains reasonable candidate regions by comparing the changes in feature matching results of multiple anchor frames at the same position in different convolutional layers obtained through the feature pyramid network. By comparing the classification confidence of different pixels obtained under different candidate region size analyses, the suppression of other feature signal points by high feature signal points in different candidate regions is judged, and the suppression is removed based on the suppression, candidate region size, and distance between pixels. The pseudo edges in the image are eliminated based on the gradient characteristics of the pseudo edges to obtain the accurate true boundaries of the objects.
[0083] As an example, the position of the high feature signal is the position of the pixel with high activation recognized by the model. During processing, the pseudo edges obtained by the model will show a gradual change in the classification confidence of the edge classification in the same pseudo edge area. The pseudo edge may exist on both sides of the real edge of the object, but the confidence of the real edge is greater, and its gradient feature is reflected in the distribution size of the confidence. Therefore, by gradually increasing the size of the pixel classification confidence, the real edge of the target object can be revealed, thereby dividing the object boundary of the target image and obtaining an accurate object image.
[0084] Before step S20 of inputting the target image into the preset image recognition model, the method further includes:
[0085] Obtain image data to be trained that includes the target object.
[0086] As an example, the image data to be trained may be picture data of target objects such as cats and dogs. When obtaining the image data to be trained, images containing target objects may be collected first, covering different lighting, angles, and occlusion scenes to ensure the diversity of the training data.
[0087] Use the preset annotation tool to perform pixel-level mask annotation on the training image data and generate the target format label file.
[0088] As an example, a pre-defined annotation tool such as LabelMe or VIA is an open-source annotation tool. These tools perform pixel-level mask annotation (precise boundaries) and bounding box annotation on training image data, generating a target-formatted label file (JSON or COCO format). For complex objects, object outlines and key points must be annotated.
[0089] As an example, annotations need to cover target edge details and avoid jagged boundaries, which can be optimized through manual review or semi-automatic annotation tools (such as pre-trained model-assisted annotation).
[0090] As an example, before model training, the image data to be trained is preprocessed through image normalization, resolution adjustment, slicing and splicing, etc. Data enhancement is also performed through geometric transformation, color adjustment, semantic enhancement, etc.
[0091] Based on the image data to be trained and the target format label file, the recognition model to be trained is iteratively trained until the detection index corresponding to the recognition model to be trained reaches the preset accuracy standard, thereby obtaining a trained image recognition model.
[0092] As an example, the model architecture configuration of the recognition model to be trained mainly includes the following:
[0093] Backbone network selection: Use ResNet (50 / 101 layers) combined with Feature Pyramid Network (FPN) to achieve multi-scale feature fusion and improve small target detection capabilities.
[0094] Domain Propagation Network (RPN) configuration: Set the size and aspect ratio of the anchors (e.g., [32, 64, 128] pixels and [0.5, 1, 2] ratios) to cover different object shapes. Use the RPN to filter high-quality candidate regions and reduce subsequent computational effort.
[0095] ROIAlign optimization: replaces traditional ROIPooling and uses bilinear interpolation to eliminate quantization errors and ensure that the candidate region is aligned with the original image.
[0096] As an example, after generating the target format label file, the image data to be trained and the target format label file are input into the recognition model to be trained, and multiple iterative training is performed until its classification loss (Class Loss), bounding box regression loss (Box Loss) and mask loss (Mask Loss) all tend to be stable. At this time, the detection index corresponding to the recognition model to be trained reaches the preset accuracy standard, the model converges, and the trained image recognition model is obtained.
[0097] As an example, the specific process of model training is as follows:
[0098] Dataset division and loading:
[0099] The dataset is divided into training set (70-80%), validation set (10-20%), and test set (10%) to ensure balanced distribution of categories.
[0100] Define a dataset class (such as DronesDataset), load images and labels, and convert to TensorFlow / PyTorch tensor format.
[0101] Transfer learning and parameter initialization:
[0102] Training weight loading: Use COCO pre-trained weights to initialize the backbone network to accelerate convergence and improve small dataset performance.
[0103] Layer settings: Freeze the first few layers of the backbone network (such as conv1-block3 of ResNet) during initial training, and only fine-tune high-level and task-specific layers (RPN, classification head, mask header).
[0104] Training parameter configuration:
[0105] Set hyperparameters such as batch size, learning rate, and training cycle (Epochs).
[0106] The loss functions such as classification loss (Cross-Entropy), bounding box regression loss (Smooth L1), and mask loss (BinaryCross-Entropy) are combined by weighted summation.
[0107] Training optimization strategy:
[0108] Multi-stage training:
[0109] Phase 1: Freeze the backbone network and only train the RPN and detection head for fast convergence.
[0110] Phase 2: Unfreeze all layers, fine-tune all parameters, and reduce the learning rate to 1 / 10 of the initial value.
[0111] After the above steps are completed, a trained image recognition model for dividing the boundaries in the image is obtained.
[0112] Step S30: determining the object region image corresponding to the target image based on the image recognition result.
[0113] As an example, the image recognition results include candidate areas of multiple categories, each of which includes multiple pixel points. The categories corresponding to different candidate areas may be background, target object edge, target object center, etc. Finally, according to user needs, the object area image corresponding to the target image is extracted.
[0114] The present application provides a target recognition method based on Mask R-CNN. Compared with the related art, which obtains artifacts during image recognition and cannot accurately obtain the real object boundary and determine the real edge image, in the present application, by obtaining a target image to be identified and inputting the target image into a preset image recognition model, the target image is recognized and processed by the preset image recognition model to obtain an image recognition result. Since the image recognition result is based on the high feature signal position obtained after multiple convolution operations and the degree to which the high feature signal position reflects the pseudo edge gradient feature in the target image, the object boundary in the target image is divided, which can make the object boundary in the obtained image more accurate, and thus determine the real object boundary in the object area image.
[0115] Further, refer to Figure 3 Based on the first embodiment of the present application, another embodiment of the present application is provided. In this embodiment, step S20 of the target recognition method based on Mask R-CNN includes:
[0116] In step S21 , multi-scale feature extraction is performed on the target image based on a feature pyramid network to obtain a multi-level feature map.
[0117] As an example, after the target image is input into the Mask R-CNN model, the backbone network ResNet-FPN (feature pyramid network) is first used to extract multi-scale features of the target image to generate a multi-level feature map, which can also be called a feature pyramid.
[0118] As an example, the multi-level feature map includes feature maps of different levels such as P2-P6, where the FPN structure fuses semantic and spatial information of different levels through top-down and lateral connections.
[0119] In step S22, based on the domain generation network, the multi-level feature maps are processed to generate multiple anchor boxes of different sizes.
[0120] As an example, the domain generation network primarily operates on each layer of the multi-level feature map, assigning different anchor box base scales to each feature map layer, such as 32×32 pixels for the P2 layer, 64×64 pixels for the P3 layer, 128×128 pixels for the P4 layer, 256×256 pixels for the P5 layer, and 512×512 pixels for the P6 layer. Based on the fixed anchor box size, each layer generates candidate anchor boxes of different shapes by adjusting their aspect ratios. The FPN layer-by-layer anchor box assignment achieves more accurate scale-level matching.
[0121] Step S23: perform feature matching on each anchor frame to determine multiple candidate regions.
[0122] As an example, the domain generation network uses the IOU (Intersection-over-Union) calculation formula in the classification and regression branches to obtain the IOU value of each anchor box and the true box, determines the anchor box corresponding to the feature position based on the IOU value, and uses the anchor box as the candidate region.
[0123] The step S23 of performing feature matching on each anchor frame to determine multiple candidate regions includes:
[0124] Calculate the first intersection of each anchor box and the true box, and predict the coordinate parameters of the true box through the preset regression model.
[0125] As an example, the first intersection over union (IoU) value may be the intersection over union (IoU) ratio between each anchor box and the ground-truth box. The IoU calculation formula is as follows:
[0126] IoU = intersection of two regions (overlapping area) / union of two regions (total area minus overlapping area).
[0127] As an example, the four coordinate parameters of the real box are predicted by presetting the regression model, (t x ,t y ,t w ,t h ), these coordinate parameters are the X / Y coordinates and the length and width of the box.
[0128] Based on the coordinate parameters, the position and size of each anchor frame are adjusted to obtain multiple adjusted anchor frames.
[0129] As an example, the position and size of each anchor box are adjusted according to these predicted coordinate parameters, so that the position and size of each adjusted anchor box are closer to the real target box.
[0130] Determine the intersection-over-union (IoU) difference between the current adjusted anchor box and the anchor boxes at adjacent levels to the current adjusted anchor box.
[0131] As an example, after adjusting the position and size of each anchor frame, the adjusted anchor frames are analyzed in the feature maps of different levels. For a single position in each layer, the one with the largest cross-ratio is selected for analysis. When the K-th anchor frame i at the same position in the feature map is pointed to, the IoU k,i The larger the value, the larger the size of the adjacent anchor box. The IoU corresponding to the anchor box at the same position in level k+1 k+1,i Difference IoU k,k+1,i The larger ′ is, the more appropriate the size of the anchor box k is for selecting this feature position.
[0132] As an example, IoU k,k+1,i ′ is the calculated union-intersection ratio difference of the anchor boxes between the kth layer and the k+1th layer.
[0133] Based on the first intersection-in-union ratio and the intersection-in-union ratio difference, the selection suitability of the currently adjusted anchor box is calculated.
[0134] As an example, for the k-th layer anchor box i, the box selection suitability is calculated as follows:
[0135]
[0136] Among them, IoU k,i is the first intersection over union ratio of the anchor box i in the kth layer, IoU k,k+1,i ′ is the difference of parallel-cross ratio,
[0137] ( IoU′ is the IoU obtained for all two anchor boxes at the same position k,k+1,i The maximum value of Q is obtained by using the minimum-maximum normalization method. k,i Normalize to get the final frame selection suitability q k,i , whose value range is (0,1).
[0138] For any anchor box, multiple candidate regions are determined based on the box selection suitability.
[0139] As an example, based on the calculated frame selection suitability, the frame selection suitability is compared with a preset suitability threshold, where the preset suitability threshold can be 0.6, 0.7, etc., and is not specifically limited. The anchor box corresponding to the value greater than the preset suitability threshold is used as the candidate area. For the last level, since there is no larger level k+1, it can be compared with the k-1th level to obtain the frame selection suitability.
[0140] As an example, during training, when the q-value of an anchor box corresponding to a ground-truth box is the maximum between the ground-truth box and all anchor boxes, or when the q-value of an anchor box corresponding to any ground-truth box is greater than 0.7, this anchor box is considered a positive sample (labeled 1). When the q-value of an anchor box corresponding to all ground-truth boxes is less than 0.3, it is set as a negative sample (labeled 0). The remaining anchor boxes are set as uninterested samples and do not participate in training.
[0141] As an example, in the subsequent processing of candidate regions, the overlapping candidate regions can also be processed by non-maximum suppression (NMS) to reduce the number of candidate regions that need to be further processed, thereby reducing the amount of calculation.
[0142] Step S24: obtaining high-feature signal points from the multiple pixel points in each candidate area.
[0143] As an example, each candidate area contains multiple pixels at different positions, among which there are signal points corresponding to high activation areas, that is, high-feature signal points. For example, for cats or dogs, high-feature signal points can be whiskers, ears, noses, etc.
[0144] Step S25 , adjusting the classification parameters of each pixel based on the degree of suppression of other characteristic signal points by the high characteristic signal points, the pixel spacing between pixels, and the area of the candidate region.
[0145] As an example, high-feature signal points may affect other feature signal points through spatial attention mechanisms or feature propagation. The degree of influence on pixels at different positions is also different. In order to reduce the degree of inhibition of high-feature signal points on other pixels and output accurate classification and recognition results, the classification parameters of each pixel need to be adjusted.
[0146] Step S26 , performing a pseudo-edge elimination process on each pixel point according to the gradient characteristics of the pseudo-edge in the target image and the adjusted classification parameters of each pixel point, to obtain an image recognition result.
[0147] As an example, the classification parameter can be the classification confidence. The pseudo edges of objects in the target image will have the characteristic of gradual change. Based on these gradual features and the pixel points after adjusting the classification confidence, the pixel points can be constructed into a complete boundary image to determine the accurate object boundary, and then, the pseudo edges of each pixel point can be eliminated to output the image recognition result.
[0148] The classification parameters also include edge classification confidence. According to the gradient characteristics of the pseudo edges in the target image and the adjusted classification parameters of each pixel, the pseudo edges of each pixel are eliminated to obtain the image recognition result in step S26, which includes:
[0149] The edge classification confidence of the pixel point is divided into multiple confidence segments at preset intervals.
[0150] As an example, the edge classification confidence is the classification confidence of the current pixel point for the edge type. The preset interval can be 0.1 or 0.2, and there is no specific limitation. The specific method of dividing it into multiple confidence segments can be: the value range of the edge classification confidence of a single pixel point 0-1 is divided into multiple confidence segments with an interval of 0.2.
[0151] A first confidence segment corresponding to the maximum edge classification confidence value in the restored reference area is obtained, and a first image composed of pixels in the first confidence segment is extracted.
[0152] As an example, the restored reference region is a candidate region group with overlapping regions, and the area S l is larger, and the overall category confidence Z of the candidate region is l A larger candidate region is used as a reference region for restoring the classification confidence of a single pixel. The method for selecting the restored reference region is described in detail in the third embodiment. The restored reference region is used to eliminate the known ability of high-characteristic signal points to affect other pixels and restore the classification confidence of each pixel.
[0153] As an example, after determining the first confidence segment corresponding to the maximum classification confidence value in the restored reference area, a boundary image consisting of multiple pixels included in the first confidence segment is extracted, that is, the first image.
[0154] The corresponding pixel points are added to the first image in sequence according to the confidence segment sorting size to obtain the boundary curve.
[0155] As an example, after determining the first confidence segment corresponding to the maximum classification confidence value, there are adjacent smaller confidence segments in sequence. The pixel points corresponding to these confidence segments are sorted according to the confidence values of the confidence segments, and are added to the pixel constituent image in sequence to form a boundary curve. The sooner the constituent image is connected into a complete boundary, the more likely the connected complete boundary is to be a real object boundary.
[0156] The boundary curve is calculated as the boundary conformity of the object boundary image.
[0157] As an example, when a single image is acquired by calculating the Euclidean distance formula, the distance between each pixel and its nearest pixel is l c,j , and the smaller the number of pixel increases c in the current restored reference area g, and
[0158] The closeness of the distance between each pixel obtained ( The larger the distance between each pixel and its nearest pixel after adding pixels for the cth time is, the more likely the curve image formed by the added pixels is to be the boundary image of the object.
[0159] As an example, it can be obtained that when the pixel points in the restored reference area g are increased for the cth time, the curve formed by the obtained pixel points is the boundary conformity D of the object boundary image. g,c for:
[0160]
[0161] Among them, l c,j is the distance between each pixel and its nearest pixel, is the closeness of the distance between pixels.
[0162] When the boundary conformity is greater than a preset conformity threshold, an image recognition result is generated based on the boundary curve.
[0163] As an example, the preset compliance threshold may be 0.7, 0.8, etc., or other values, which are not specifically limited.
[0164] As an example, D is subjected to the sigmoid function. g,c Perform normalization to obtain the final boundary conformity d g,c , and the boundary conformity degree d g,c Compared with the preset compliance threshold, when d g,c When it is >0.7, the boundary curve formed by the pixel points is determined to be the true boundary of the object, and then the image recognition result is output.
[0165] In this embodiment, the pseudo edge of each pixel is eliminated based on the gradient characteristics of the pseudo edge in the target image and the adjusted classification confidence of each pixel, thereby obtaining a true and accurate object boundary.
[0166] Further, refer to Figure 4 Based on the first and second embodiments of the present application, a third embodiment of the present application is provided. In this embodiment, before step S25 of the target recognition method based on Mask R-CNN, the method further includes:
[0167] In step S210 , the candidate region is mapped onto a preset feature map, and based on a classification confidence algorithm, multiple pixels in the candidate region are calculated to obtain multiple classification confidences and an overall category confidence corresponding to the candidate region.
[0168] As an example, after generating the candidate region, the candidate region is passed to the RoIAlign layer, and the bilinear difference sampling method is used to map the candidate region to a fixed-size feature map to eliminate the double quantization error of RoIPooling.
[0169] As an example, the classification confidence calculation method of the mask branch architecture in the model is used to calculate the classification confidence of different pixels in different candidate areas under different classifications, as well as the overall category confidence of a single candidate area.
[0170] Step S220 , based on the area of the candidate region and the overall category confidence, a restoration reference region of the classification confidence of the pixel point is determined, wherein the pixel point with the maximum classification confidence in the restoration reference region is the point with the maximum suppression ability.
[0171] As an example, when determining the restoration reference area, a candidate area with a larger area and overall category confidence in the candidate area group with overlapping areas is selected as the restoration reference area for the classification confidence of a single pixel.
[0172] As an example, in the restored reference area, the pixel point with the highest classification confidence has the greatest suppression ability on other pixel points, and this pixel point is regarded as the point with the greatest suppression ability.
[0173] The step S220 of determining the restoration reference area of the classification confidence of the pixel points based on the area of the candidate area and the overall category confidence includes:
[0174] Multiply the area of the candidate region and the overall category confidence to get the confidence product.
[0175] The confidence product is normalized to obtain the restored reference bias value.
[0176] As an example, the calculation method for restoring the reference bias value may be:
[0177] W Z =sig(S l ×Z l )
[0178] Among them, S l is the area of the candidate region, Z l is the overall category confidence, and sig() represents the sigmoid function.
[0179] The candidate area corresponding to the maximum value of the restored reference bias value is selected as the restoration reference area for the classification confidence of the pixel point.
[0180] As an example, the obtained W ZThe candidate region with the largest value is used as the restoration reference region at this position. The pixel point with the largest classification confidence in the restoration reference region is used as the point o with the maximum suppression ability.
[0181] Step S230 , calculating the edge classification confidence of the pixel in the restored reference area, and calculating the sum of the first differences between the classification confidence and the edge classification confidence of the pixel in other candidate areas.
[0182] As an example, a single pixel point j in the reference region g is restored. Among the multiple candidate regions m where the current pixel point j is located, the edge classification confidence of the pixel point j for edge classification is z j,m .
[0183] As an example, the first difference and E of the classification confidence obtained by pixel j in other candidate regions m and the edge classification confidence obtained by pixel j in the restored reference region are calculated. g , where E g The calculation method can be:
[0184] Among them, z j,m ′ is the difference between the classification confidence of the pixel point in a single candidate area and the edge classification confidence, n j is the number of pixels in the restored reference area, n m is the number of other candidate regions containing pixel j.
[0185] Step S240: Select a first candidate region including the current pixel and the point with the maximum suppression ability.
[0186] As an example, the first candidate region is a candidate region that includes both the pixel point j and the point o with the maximum suppression ability, and can be directly selected from various candidate regions.
[0187] Step S250 , calculating the first difference between the classification confidences corresponding to the pixels in the first candidate area and the points with the maximum suppression capability, and calculating the second difference between the pixels in the restored reference area and the points with the maximum suppression capability.
[0188] As an example, the first difference is the difference between the classification confidences obtained between the pixel point j in the first candidate area and the point o with the maximum suppression ability.
[0189] As an example, the second difference is the difference in classification confidence between the pixel point j in the restored reference area and the point o with the maximum suppression ability.
[0190] Step S260: Add the differences between each first difference and each second difference to obtain a second difference sum.
[0191] As an example, the calculation formula for the second difference sum may be:
[0192]
[0193] Among them, n m ′ is the number of candidate regions that contain both pixel j and the point o with the maximum suppression ability, in addition to the restored reference region, z j,o,m ′ is the difference between the first difference between the classification confidence obtained by the pixel point j in the candidate area m excluding the restored reference area and the point o with the maximum inhibition ability and the second difference between the classification confidence obtained by the pixel point j in the restored reference area and the point o with the maximum inhibition ability.
[0194] Step S270: Based on the first difference sum and the second difference sum, calculate the degree of suppression of other characteristic signal points by the point with the maximum suppression ability.
[0195] As an example, there are multiple candidate regions of different sizes in the target image that contain the same pixel. When the edge classification confidence z of a single pixel j in the smaller candidate region m containing it is j,m The greater the difference between the classification confidence in the larger candidate area, the more serious the suppression of pixel j in the larger candidate area by other pixels with larger classification confidence. In order to obtain a more accurate object edge, the classification confidence of pixel j should be restored to a greater extent.
[0196] That is, when the classification confidence of the pixels in the other candidate regions is better than that in the restored reference region g, g The larger the value, the greater the suppression ability. When is larger, the suppression ability of the maximum suppression point o in the reference area g is restored, and the classification confidence of other pixels should be restored more.
[0197] As an example, based on the first difference sum and the second difference sum, a method for calculating the degree of suppression of other characteristic signal points by the point with the maximum suppression capability may be:
[0198]
[0199] Among them, E g is the first difference sum, is the second difference sum, R g,o It indicates the degree of suppression of other characteristic signal points by the point o with the maximum suppression ability in the restored reference area g.
[0200] The above analysis operation is performed on all restored reference areas to obtain the corresponding suppression ability evaluation values.
[0201] The step S25 of adjusting the classification parameters of each pixel based on the degree of suppression of other characteristic signal points by the high characteristic signal points, the pixel spacing between the pixels, and the area of the candidate region includes:
[0202] The distance between each pixel in the restored reference area and the pixel with the maximum suppression ability is calculated, and the area of the restored reference area is obtained.
[0203] As an example, the pixel spacing can be the distance between each pixel and the point with the maximum suppression ability, and the area size S of the restored reference area g can be g is the area of the region.
[0204] Based on the degree of suppression, region area, and pixel spacing, the classification confidence recovery value is calculated.
[0205] As an example, the calculation formula for the classification confidence recovery value can be:
[0206]
[0207] Among them, l g,j Indicates the pixel spacing, S g is the area of the region, R g,o Indicates the degree of inhibition, z g,j Represents the classification confidence of pixel j in the restored reference area g before adjustment.
[0208] For any pixel in the restored reference area, classification confidence restoration processing is performed on the pixel based on the classification confidence restoration value.
[0209] As an example, the attention mechanism may suppress noise more effectively in larger areas, thereby indirectly enhancing the suppression ability of high-confidence points, so when the area of the reference area S is restored g The larger the value, the greater the distance l between pixel j and the point with the maximum suppression ability. g,j The smaller the value, the more the suppression ability R of the reference area g is restored. g,o The larger it is, the larger the classification confidence recovery size of pixel j should be.
[0210] As an example, the above operation is performed on all pixels in the restored reference area g, and then the corresponding classification confidence is restored for all pixels, so that the classification confidence at different positions in the target image can more accurately represent the edge of the object.
[0211] In this embodiment, by determining the restoration reference area and calculating the classification confidence restoration value of the pixel points in the restoration reference area, the classification confidence of all pixel points is restored through the classification confidence restoration value, so that the classification confidence of different positions in the target image can more accurately represent the edge of the object.
[0212] Further, refer to Figure 5 Based on the first, second, and third embodiments of the present application, another embodiment of the present application is provided. In this embodiment, step S30 of determining an object region image corresponding to a target image based on an image recognition result includes:
[0213] Step S31: Determine the pixel position of each pixel based on the image recognition result.
[0214] As an example, after the image recognition result is generated, the pixel position of each pixel point is determined based on the image recognition result.
[0215] Step S32: When it is determined that the same pixel position is within the coverage of different candidate regions, the candidate region with the highest classification confidence is retained by a non-maximum suppression method.
[0216] As an example, in the Mask R-CNN model, when the same pixel position is within the coverage of different candidate regions (i.e., overlapping regions), the candidate regions can be screened based on the classification confidence first, and the candidate regions with the highest classification confidence can be retained first through non-maximum suppression (NMS). The confidence of the overlapping regions can be dynamically adjusted through Soft-NMS improvements (such as MS-RCNN) instead of directly eliminating low-scoring frames.
[0217] Step S33: Calculate the mask prediction value of the pixel point in the corresponding candidate area.
[0218] As an example, after screening the candidate area positions, pixel-level attribution judgment is performed. When the pixel point is in the mask prediction value of the corresponding candidate area, the mask prediction value is the model's predicted probability of the category to which each pixel point belongs.
[0219] Step S34: If it is determined that the mask prediction value is greater than or equal to the preset threshold, the category of the pixel point is marked as the category of the candidate area corresponding to the mask prediction value.
[0220] As an example, the preset threshold may be 0.4 / 0.5, etc., which is not specifically limited.
[0221] As an example, when it is determined that the mask prediction value is greater than or equal to a preset threshold, the category of the pixel point is marked as the category of the candidate area corresponding to the mask prediction value, and the pixel point category can be marked as a target object or an object edge.
[0222] In step S35 , if it is determined that any pixel point is covered by multiple candidate areas and all of them satisfy the threshold conditions corresponding to the preset threshold value, the category of any pixel point is marked as the category of the candidate area with the highest classification confidence.
[0223] As an example, when any pixel is covered by multiple candidate regions and all of them meet the threshold condition, the category corresponding to the candidate region with the highest classification confidence is marked as the category of the pixel.
[0224] Step S36: Generate an object region image based on the pixel points marked as objects.
[0225] As an example, pixel points marked as objects are extracted to generate an object region image. The object region image may be an object boundary image or other images.
[0226] Specifically, the overall execution flow diagram involved in this application is as follows: Figure 6 As shown in the figure, before the model is used, data is collected and labeled, and the model is trained. By comparing the changes in the feature matching results of multiple anchor boxes at the same position in the feature maps of different convolutional layers obtained by FPN, a reasonable candidate area is obtained. By analyzing the classification confidence of different pixels in different candidate areas, the suppression of high feature signal points on other feature signal points in different candidate areas is judged, and the suppression is removed according to the suppression situation, the size of the candidate area, the pixel spacing, etc.; then, the pseudo edges in the image are eliminated according to the gradient characteristics of the pseudo edges to obtain the accurate true boundary of the object.
[0227] Furthermore, the object boundary image diagram output by the model is as follows Figure 7 As shown by Figure 7 It can be seen that the left side is the input target image and the right side is the output object boundary image.
[0228] In this embodiment, pixel classification is performed on candidate areas with overlapping portions to avoid inaccurate pixel classification.
[0229] Specifically, the present application also provides a target recognition system based on Mask R-CNN, which includes:
[0230] An acquisition module is used to acquire a target image to be identified;
[0231] A processing module, which is used to input a target image into a preset image recognition model, perform recognition processing on the target image based on the preset image recognition model, and obtain an image recognition result. The preset image recognition model is a Mask R-CNN model, and the image recognition result is obtained by dividing the object boundary of the target image based on the high feature signal positions obtained after multiple convolution operations and the degree to which the high feature signal positions reflect the pseudo-edge gradient features in the target image;
[0232] The determination module is used to determine the object area image corresponding to the target image based on the image recognition result.
[0233] Reference Figure 8 , Figure 8 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0234] like Figure 8 As shown, the target recognition device based on Mask R-CNN may include: a processor 1001, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005.
[0235] Optionally, the Mask R-CNN-based target recognition device may further include a user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, a WiFi module, and the like. The user interface may include a display screen and an input submodule such as a keyboard. The optional user interface may further include a standard wired interface and a wireless interface. The network interface may include a standard wired interface and a wireless interface (such as a WiFi interface).
[0236] Those skilled in the art will understand that Figure 8 The structure of the target recognition device based on Mask R-CNN shown in the figure does not constitute a limitation on the target recognition device based on Mask R-CNN, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0237] like Figure 8 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, and a target recognition program based on Mask R-CNN. The operating system is a program that manages and controls the hardware and software resources of the target recognition device based on Mask R-CNN, and supports the operation of the target recognition program based on Mask R-CNN and other software and / or programs. The network communication module is used to realize communication between the components within the memory 1005, as well as communication with other hardware and software in the target recognition system based on Mask R-CNN.
[0238] exist Figure 8 In the target recognition device based on Mask R-CNN shown, the processor 1001 is used to execute the target recognition program based on Mask R-CNN stored in the memory 1005 to implement any of the steps of the target recognition method based on Mask R-CNN mentioned above.
[0239] The specific implementation of the target recognition device based on Mask R-CNN in this application is basically the same as the above-mentioned embodiments of the target recognition method based on Mask R-CNN, and will not be repeated here.
[0240] The present application also provides a target recognition device based on Mask R-CNN, which includes:
[0241] An acquisition module, used for acquiring a target image to be identified;
[0242] A generation module is used to input a target image into a preset image recognition model, perform recognition processing on the target image based on the preset image recognition model, and obtain an image recognition result. The preset image recognition model is a Mask R-CNN model. The image recognition result is obtained by dividing the object boundary of the target image based on the high feature signal positions obtained after multiple convolution operations and the degree to which the high feature signal positions reflect the pseudo-edge gradient features in the target image;
[0243] The filtering module is used to determine the object area image corresponding to the target image based on the image recognition result.
[0244] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0245] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0246] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as mentioned above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of each embodiment of the present application.
[0247] The above are only preferred embodiments of the present application and do not limit the scope of application of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application description and drawings, or directly or indirectly applied in other related technical fields, are also included in the scope of protection of the present application.
[0248] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0249] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A target recognition method based on Mask R-CNN, characterized in that: The method comprises: Acquire the target image to be identified; Inputting the target image into a preset image recognition model, and performing recognition processing on the target image based on the preset image recognition model to obtain an image recognition result, wherein the preset image recognition model is a Mask R-CNN model, and the image recognition result is obtained by dividing the object boundary of the target image based on the high feature signal positions obtained after multiple convolution operations and the degree to which the high feature signal positions reflect the pseudo edge gradient features in the target image; Based on the image recognition result, an object area image corresponding to the target image is determined.
2. The target recognition method based on Mask R-CNN according to claim 1, wherein: The preset image recognition model includes a feature pyramid network, and the recognition processing of the target image based on the preset image recognition model to obtain an image recognition result includes: Based on the feature pyramid network, multi-scale feature extraction is performed on the target image to obtain a multi-level feature map; Based on a domain generation network, the multi-level feature map is processed to generate multiple anchor boxes of different sizes; Performing feature matching on each of the anchor frames to determine multiple candidate regions; Acquire high-feature signal points from a plurality of pixel points in each candidate area; Adjusting the classification parameters of each pixel based on the degree to which the high characteristic signal point suppresses other characteristic signal points, the pixel spacing between the pixels, and the area of the candidate area; According to the gradient characteristics of the pseudo edges in the target image and the adjusted classification parameters of each pixel point, the pseudo edges of each pixel point are eliminated to obtain an image recognition result.
3. The target recognition method based on Mask R-CNN according to claim 2, characterized in that The performing feature matching on each anchor frame to determine multiple candidate regions includes: Calculating the first intersection-in-union ratio of each anchor frame to the ground truth frame, and predicting the coordinate parameters of the ground truth frame using a preset regression model; Based on the coordinate parameters, adjusting the position and size of each anchor frame to obtain a plurality of adjusted anchor frames; Determine the intersection-over-union ratio difference between the current adjusted anchor frame and the anchor frames of the adjacent layers to the current adjusted anchor frame; Calculating the frame selection suitability of the currently adjusted anchor frame based on the first intersection-in-union ratio and the intersection-in-union ratio difference; For any of the anchor boxes, multiple candidate regions are determined based on the box selection suitability.
4. The target recognition method based on Mask R-CNN according to claim 2, wherein: Before adjusting the classification parameters of each pixel point based on the degree of suppression of other characteristic signal points by the high characteristic signal point, the pixel spacing between the pixels, and the area of the candidate area, the method further includes: Mapping the candidate area to a preset feature map, and calculating multiple pixels in the candidate area based on a classification confidence algorithm to obtain multiple classification confidences and an overall category confidence corresponding to the candidate area; Determine, based on the area of the candidate region and the overall category confidence, a restoration reference region for the classification confidence of the pixel point, wherein the pixel point with the maximum classification confidence in the restoration reference region is the point with the maximum suppression ability; Calculating the edge classification confidence of the pixel point in the restored reference area, and calculating the sum of first differences between the classification confidence of the pixel point in other candidate areas and the edge classification confidence; Selecting a first candidate region including the current pixel point and the point with the maximum suppression ability; Calculating a first difference between the classification confidences corresponding to the pixel points in the first candidate area and the point with the maximum suppression ability, and calculating a second difference between the pixel points in the restored reference area and the point with the maximum suppression ability; Adding the difference between each of the first difference values and each of the second difference values to obtain a second difference sum; Based on the first difference sum and the second difference sum, the degree of suppression of other characteristic signal points by the point with the maximum suppression capability is calculated.
5. The target recognition method based on Mask R-CNN according to claim 4, characterized in that The determining, based on the area of the candidate region and the overall category confidence, a restoration reference region for the classification confidence of the pixel point includes: Multiplying the area of the candidate region and the overall category confidence to obtain a confidence product; Normalizing the confidence product to obtain a restored reference bias value; The candidate region corresponding to the maximum value of the restored reference deviation value is selected as the restoration reference region for the classification confidence of the pixel point.
6. The target recognition method based on Mask R-CNN according to claim 4, characterized in that The classification parameters include classification confidence, and the adjustment of the classification parameters of each pixel based on the degree of suppression of other characteristic signal points by the high characteristic signal point, the pixel spacing between the pixels, and the area of the candidate area includes: Calculating the distance between each pixel in the restoration reference area and the pixel of the point with the maximum suppression ability, and obtaining the area of the restoration reference area; Calculating a classification confidence recovery value based on the suppression degree, the area of the region, and the pixel spacing; For any pixel point in the restoration reference area, classification confidence restoration processing is performed on the pixel point based on the classification confidence restoration value.
7. The target recognition method based on Mask R-CNN according to claim 6, characterized in that The classification parameters also include edge classification confidence. The pseudo edges of the pixels are eliminated based on the gradient characteristics of the pseudo edges in the target image and the adjusted classification parameters of the pixels to obtain an image recognition result, including: Dividing the edge classification confidence of the pixel point into a plurality of confidence segments at preset intervals; Obtaining a first confidence segment corresponding to the maximum edge classification confidence value in the restored reference area, and extracting a first image composed of pixels in the first confidence segment; Adding corresponding pixel points to the first image in order according to the confidence segment sorting size to obtain a boundary curve; Calculating the boundary conformity of the boundary curve to the boundary image of the object; When the boundary conformity is greater than a preset conformity threshold, an image recognition result is generated based on the boundary curve.
8. The target recognition method based on Mask R-CNN according to claim 1, wherein: Before inputting the target image into the preset image recognition model, the method further includes: Acquire image data to be trained including the target object; Performing pixel-level mask annotation on the image data to be trained using a preset annotation tool to generate a target format label file; Based on the image data to be trained and the target format label file, the recognition model to be trained is iteratively trained until the detection index corresponding to the recognition model to be trained reaches a preset accuracy standard, thereby obtaining a trained image recognition model.
9. The object recognition method based on Mask R-CNN according to claim 1, wherein: The determining, based on the image recognition result, an object region image corresponding to the target image includes: Determining the pixel position of each pixel based on the image recognition result; When determining that the same pixel position is within the coverage of different candidate regions, the candidate region with the highest classification confidence is retained through the non-maximum suppression method; Calculating a mask prediction value of the pixel point in the corresponding candidate area; If it is determined that the mask prediction value is greater than or equal to the preset threshold, marking the category of the pixel point as the category of the candidate area corresponding to the mask prediction value; If it is determined that any pixel point is covered by multiple candidate areas and all of them meet the threshold condition corresponding to the preset threshold, the category of the any pixel point is marked as the category of the candidate area with the highest classification confidence; Generate an object area image based on the pixels marked as objects.
10. A target recognition system based on Mask R-CNN, characterized in that: The Mask R-CNN-based target recognition system includes: An acquisition module, configured to acquire a target image to be identified; a processing module, the processing module being configured to input the target image into a preset image recognition model, and perform recognition processing on the target image based on the preset image recognition model to obtain an image recognition result, wherein the preset image recognition model is a Mask R-CNN model, and the image recognition result is obtained by dividing the object boundary of the target image based on the positions of high feature signals obtained after multiple convolution operations and the degree to which the high feature signal positions reflect the pseudo-edge gradient features in the target image; A determination module is used to determine the object area image corresponding to the target image based on the image recognition result.