Shielding target segmentation method based on improved Mask R-CNN

By improving the Mask R-CNN model and using the Duplex Resnet Base network and ClusterNMS algorithm, the robustness and missed detection problems in occluded target detection are solved, the detection accuracy and speed are improved, and high-quality instance segmentation masks are generated.

CN118762183APending Publication Date: 2024-10-11FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410910738.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

The existing technology has insufficient robustness, feature extraction interference, and missed detection problems caused by non-maximum suppression algorithms when dealing with occluded target detection, making it difficult to accurately detect targets in complex occluded environments.

Method used

The Mask R-CNN model is improved, the Duplex Resnet Base network architecture of five convolutional networks forward propagation is used for feature extraction, the bounding box regression loss function is optimized, and the ClusterNMS algorithm is introduced for non-maximum suppression.

Benefits of technology

It improves the accuracy and speed of occlusion target detection, reduces missed detections, and generates high-quality instance segmentation masks, which is suitable for complex occlusion environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762183A_ABST
    Figure CN118762183A_ABST
Patent Text Reader

Abstract

The invention provides an improved Mask R-CNN-based occlusion target segmentation method, which takes a Mask R-CNN as a deep neural network framework and comprises the following steps: firstly, improving a feature extraction network to obtain richer picture feature information and improve the accuracy of network detection; secondly, improving a bounding box regression loss function, and ensuring the accuracy of a target detection result; and finally, a non-maximum suppression algorithm is improved, the possibility that the candidate box is suppressed by mistake is reduced, and the occurrence of missing detection is reduced. According to the method, the occlusion targets in the picture can be effectively detected by continuously learning and training the network, and a high-quality instance segmentation mask is generated for each target, so that the method has very high engineering application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision target detection, and in particular relates to an occluded target segmentation method based on an improved Mask R-CNN. Background Art

[0002] In 2014, R-CNN (regions with convolutional netural network features) significantly improved the mAP (mean average precision) of the PASCAL VOC 2012 dataset by 30 percentage points, successfully applying deep learning to the field of object detection. Since then, researchers have proposed a series of excellent models to improve the performance of object detection. The latest deep learning networks have even surpassed human performance in image classification tasks.

[0003] Although deep learning has greatly promoted the development of object detection, in real-world scenarios, object detection is still a challenging task due to the existence of occlusion. The human visual system enables humans to infer the properties of objects through the contours in the scene even when part of the object information is occluded or lost. However, there is still much room for improvement in the effective detection of occluded objects by computer vision systems based on deep learning. The current difficulties in dealing with occlusion problems are:

[0004] (1) Due to the complexity of the dataset and occlusion, the classifier cannot learn all occlusion situations. Under partial occlusion, the deep convolutional neural network is not robust.

[0005] (2) Occlusion interferes with feature extraction. Two mutually occluded targets may have very similar characteristics, making it impossible for the detector to accurately distinguish and predict them.

[0006] (3) When there is occlusion, the prediction boxes may overlap seriously. Therefore, the prediction boxes of different targets may be regarded as the prediction of one target by the non-maximum suppression (NMS) algorithm and mistakenly suppressed, resulting in missed detection.

[0007] In the prior art:

[0008] The Chinese patent application number is: CN202310550746.9, and its name is a training method for an inter-class occluded target detection network model based on weakly supervised semantic segmentation and feature compensation. This method inputs the preprocessed original image into a convolutional neural network for feature extraction, and then optimizes the features through a weakly supervised semantic segmentation module, and obtains the loss function and segmentation loss function of the convolutional neural network. The optimized feature map is input into the feature compensation module to obtain the compensation loss function, and all losses are superimposed to obtain the overall loss and back-propagated, and the network weights are updated until the network converges. This method is one of the least expensive and most explanatory ways to improve the performance of the detector in an occluded environment by improving the loss function, but the design of most loss functions cannot fully consider the complexity of occlusion conditions, which can easily lead to missed detections;

[0009] The Chinese patent application number is: CN202311489361.2, and its name is a method and system for detecting occluded objects based on deep learning. The method adopts feature enhancement and fusion network units to improve the bidirectional feature pyramid network. The information transmission between feature maps at different levels is achieved through two information transmission links from top to bottom and bottom to top, so that the model can better transmit this information between different levels; the method enhances the perception ability of the occluded object detection model for target information at different scales through feature enhancement and fusion network units, and helps the occluded object detection model to focus on feature maps with more occluded target information; however, multi-level feature fusion will cause the efficiency of the network detection process to slow down, and repeated information fusion may also cause feature redundancy, which cannot guarantee fast and accurate detection tasks. Summary of the invention

[0010] In view of the defects and shortcomings of the above-mentioned prior art, the present invention proposes an occluded target segmentation method based on improved Mask R-CNN, with Mask R-CNN as the deep neural network framework. First, the feature extraction network is improved to obtain richer picture feature information and improve the accuracy of network detection; second, the bounding box regression loss function is improved to ensure the accuracy of the target detection result; finally, the non-maximum suppression algorithm is improved to reduce the possibility of candidate boxes being erroneously suppressed and reduce the occurrence of missed detection. The present invention can effectively detect occluded targets in the picture by continuously learning and training the network, and generate a high-quality instance segmentation mask for each target, which has high engineering application value.

[0011] The technical solution specifically adopted by the present invention to solve the technical problem is:

[0012] An improved Mask R-CNN occluded target segmentation model:

[0013] Use five convolutional networks for forward propagation and utilize skip connections to form a network architecture Duplex ResnetBase. Use multiple Duplex Resnet Base stacks to form a feature extraction network to replace the Resnet network.

[0014] Add the height difference, width difference and center point difference of the bounding box to the intersection-over-union ratio evaluation metric of the bounding box regression loss function;

[0015] The ClusterNMS algorithm is used as the non-maximum suppression algorithm, the GPU is used to accelerate the calculation of NMS, and the suppression box is updated through an iterative algorithm.

[0016] And a method for segmenting occluded targets based on an improved Mask R-CNN is constructed on this basis, including the following steps:

[0017] Step S1: Image preprocessing: perform pixel value normalization preprocessing on the RGB image input to the network model;

[0018] Step S2: Feature extraction: Input the image obtained in step S1 into the feature extraction network, and output several feature maps of the input image. Then input these feature maps into the feature pyramid network, extract feature layers of different sizes, and obtain the prediction feature pyramid.

[0019] Step S3: Generate candidate regions: Use the region proposal network RPN to generate several candidate regions RoIs on the predicted feature pyramid obtained in step S2;

[0020] Step S4: ROI pooling: Perform ROI pooling on each candidate region in step S3 and map it to a feature map of a fixed size;

[0021] Step S5: Target classification and bounding box regression: Input the feature map mapped in step S4 into the network predictor, and use two parallel fully connected sub-networks to perform target classification and bounding box regression to obtain the target category information and bounding box information;

[0022] Step S6: Mask prediction: The feature maps mapped in step S4 are input to the fully convolutional network FCN in parallel, and the label of each pixel is predicted inside each feature map to achieve instance-level semantic segmentation;

[0023] Step S7: Loss calculation: Count the category loss and bounding box loss from step S3 and step S5, and the mask segmentation loss from step S6 respectively and back propagate, and update the network weights until convergence;

[0024] Step S8: Post-processing: Use the non-maximum suppression algorithm to remove the redundant target bounding boxes obtained in step S5, and fine-tune the bounding boxes; filter and merge the possible overlapping areas in the instance segmentation mask obtained in step S6, and then map the processed target bounding boxes and instance segmentation masks back to the original image to obtain the final target detection results and instance segmentation masks.

[0025] Furthermore, the image preprocessing also includes: packaging the original image information, the annotated target bounding box information, the corresponding category label and the instance segmentation mask information, inputting them into the occluded target segmentation model network of the improved Mask R-CNN, randomly flipping the input image horizontally, and scaling the image to a fixed length and width range.

[0026] Furthermore, in step S2, the preprocessed image is input into the Backbone network for feature extraction, and the Backbone network includes a Duplex Resnet network for feature extraction and an FPN network for extracting a prediction feature pyramid;

[0027] The basic structure of the Duplex Resnet network is Duplex Resnet Base. Each Duplex ResnetBase consists of multiple convolutional layers and includes skip connections. Different convolutional layers convert input images into feature maps. Skip connections are used for gradient propagation to alleviate the gradient vanishing problem caused by increasing network depth. The Duplex Resnet network first passes through the convolutional layer and the maximum pooling downsampling layer, and then sequentially connects the layer1, layer2, layer3, and layer4 feature extraction layers stacked by several DRB layers.

[0028] The FPN network is used to extract the outputs of layer1, layer2, layer3, and layer4 in the Duplex Resnet network, and adjust the number of output feature map channels to a uniform size through convolution. Starting from the top feature map, the resolution is increased to match the bottom feature map through upsampling operations, and then connected with the feature maps of the adjacent lower layers to pass more advanced semantic information to the bottom layer, and then a new prediction feature map is formed through convolution operations; through a top-down path, the FPN network obtains a series of multi-scale prediction feature maps.

[0029] Furthermore, the predicted feature pyramid obtained in step S2 is input into the RPN network, and corresponding bounding boxes are generated at each pixel point of the p0-p4 layers respectively, and the probability scores of each generated bounding box as the foreground and background, as well as the bounding box offset coefficient of each bounding box are predicted at each pixel point. The bounding box is adjusted by the predicted bounding box offset coefficient to obtain all candidate bounding boxes, and the bounding box candidate boxes beyond the image boundary are removed. The bounding box candidate boxes whose bounding box intersection-union ratio is greater than a given threshold of 0.7 are suppressed by the non-maximum suppression algorithm, and the first n bounding box candidate boxes are taken according to the predicted probability scores to finally obtain the candidate area to be detected.

[0030] Furthermore, the calculation formula of the bounding box intersection-over-union ratio is:

[0031]

[0032] Where area represents the area of ​​the corresponding box, w1 and w2 represent the width of the corresponding box, w represents the width of the minimum circumscribed rectangle of the two boxes, h1 and h2 represent the height of the corresponding box, h represents the height of the minimum circumscribed rectangle, d1 and d2 represent the center point position of the corresponding box, and c represents the diagonal length of the minimum circumscribed rectangle.

[0033] Furthermore, the Cluster NMS algorithm groups similar candidate bounding boxes to more accurately retain representative bounding boxes without losing important information due to overlap. The input of the algorithm is a group of candidate bounding boxes, each of which has a probability score. First, the intersection-of-union ratio (IoU) between them is calculated through the bounding box intersection-of-union ratio (EIOU) to obtain an IoU matrix X, which is then simplified to an upper triangular matrix, and then the maximum value is taken by column. After binarization with a given NMS threshold, a one-dimensional tensor b is obtained, which is expanded into a diagonal matrix E using b, and E is left-multiplied by the IoU matrix X, and then the maximum value is taken by column to obtain a new tensor b, and the algorithm is iterated back and forth until b does not change, and the bounding box to be suppressed is finally obtained.

[0034] Furthermore, in step S4, a pooling operation is performed on each candidate region on the feature map, and each candidate region is mapped to a feature map of a fixed size, and the mapped feature map is input into FastRCNN Predictor for flattening, and the predicted category information and bounding box offset parameters are obtained through two parallel fully connected layers, and the predicted bounding box offset parameters are applied to the candidate region to obtain the final predicted bounding box information and category information.

[0035] Furthermore, in step S5, the feature map mapped in step S4 is input into the FCN network in parallel, the feature map is gradually enlarged through the transposed convolution layer, and finally through a pixel classification layer, the output of the transposed convolution layer is mapped to the space of the semantic segmentation label, and the classification category of each pixel is predicted to achieve instance-level semantic segmentation.

[0036] Furthermore, the loss function is as follows: L = L acl +L arl +L cla +L seg +L seg ;

[0037] Among them, L acl represents the anchor classification loss of the RPN part; L arl Represents the anchor regression loss of the RPN part. In addition to the classification score, RPN also generates a bounding box correction value for each anchor position, which is used to adjust the anchor position to more accurately match the bounding box of the object. The predicted boundary is calculated using the EIOU loss to calculate the anchor regression loss, which is used to measure the difference between the bounding box and the true bounding box; L cla represents the FastRCNNPredictor network prediction classification loss, and uses binary cross entropy loss to calculate the category classification loss, which is used to measure the classification accuracy of the model for the candidate region; L reg L represents the FastRCNNPredictor network predicting the candidate region boundary regression loss, and uses the EIOU loss to calculate the candidate region bounding box regression loss, which is used to measure the difference between the model predicted bounding box and the true bounding box; seg Represents the difference between the generated mask and the true mask. The mask classification loss is calculated using the binary cross entropy loss, which is used to measure the similarity of each pixel between the generated mask and the true mask.

[0038] Compared with the prior art, the present invention and its preferred solution provide an improved Mask R-CNN occluded target segmentation algorithm, the main improvements of which are:

[0039] 1) Better feature extraction network: Use five convolutional networks for forward propagation and utilize jump connections to form a new network architecture Duplex Resnet Base. Use multiple Duplex Resnet Base stacks to form a new feature extraction network to replace the original Resnet network. Compared with the original network, Duplex Resnet has fewer network parameters, deeper network depth, and richer representation capabilities.

[0040] 2) Improved bounding box regression loss function: Optimize the network prediction bounding box evaluation index, add the bounding box height difference, width difference and center point difference on top of the original bounding box intersection ratio evaluation index, and be more sensitive to the position of the bounding box and its own height and width information, so as to improve the network detection accuracy and accelerate the network convergence speed.

[0041] 3) Improved non-maximum suppression algorithm: Introduced the ClusterNMS algorithm, used GPU to accelerate the calculation of NMS, and updated the suppression box through an iterative algorithm to reduce the possibility of missed detection.

[0042] Compared with the prior art, the present invention optimizes three aspects: feature extraction network and loss function non-maximum suppression algorithm. Compared with other methods in this field, the present invention improves the detection speed and recognition accuracy of obstructed targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0044] Figure 1 This is a flow chart of an occluded target segmentation method based on an improved Mask R-CNN according to an embodiment of the present invention;

[0045] Figure 2 Schematic diagram of the overall structure of the Mask R-CNN network according to an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of the basic structure of a Duplex Resnet feature extraction network according to an embodiment of the present invention;

[0047] Figure 4 This is a schematic diagram of the basic structure of the Feature PyramidNetwork network according to an embodiment of the present invention;

[0048] Figure 5 This is a schematic diagram of Efficient-IoU according to an embodiment of the present invention;

[0049] Figure 6 Schematic diagram of the Cluster-NMS algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail as follows:

[0051] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0052] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0053] First, the basic design scheme of the method flow of the present invention is provided:

[0054] Based on the improved MaskR-CNN occluded target segmentation algorithm, the specific steps are as follows:

[0055] (1) Image preprocessing: Perform pixel value normalization preprocessing on the RGB image input to the network.

[0056] (2) Feature extraction: The image obtained in step (1) is input into the improved feature extraction network, and several feature maps of the input image are output. These feature maps are then input into the feature pyramid network to extract feature layers of different sizes to obtain a prediction feature pyramid.

[0057] (3) Generate candidate regions: Use the region proposal network (RPN) to generate several candidate regions (RoIs) on the predicted feature pyramid obtained in step (2).

[0058] ROI pooling: Perform ROI pooling (Region of Interest Pooling) on ​​each candidate region in step (3) and map it to a feature map of a fixed size.

[0059] Target classification and bounding box regression: The feature map mapped in step (4) is input into the network predictor, and two parallel fully connected sub-networks are used to perform target classification and bounding box regression to obtain the target category information and bounding box information.

[0060] Mask prediction: The feature maps mapped in step (4) are input in parallel to the Fully Convolutional Network (FCN), which predicts the label of each pixel in each feature map to achieve instance-level semantic segmentation.

[0061] Loss calculation: The category loss and bounding box loss from step (3) and step (5), as well as the mask segmentation loss from step (6) are counted and back-propagated, and the network weights are updated until the bounding box loss converges to the improved bounding box loss function.

[0062] Post-processing: Use the improved non-maximum suppression (NMS) algorithm to remove the redundant target bounding boxes obtained in step (5) and make minor adjustments to the bounding boxes; filter and merge the possible overlapping areas in the instance segmentation mask obtained in step (6), and map the target bounding boxes and instance segmentation masks processed above back to the original image to obtain the final target detection results and instance segmentation masks.

[0063] On this basis, combined with the improved points, the scheme of the present invention is specifically demonstrated with specific embodiments:

[0064] like Figure 1 As shown, this embodiment is based on the improved Mask R-CNN occluded target segmentation method process, and the specific steps of implementation are as follows:

[0065] 1) Package the original image information, the labeled target bounding box information, the corresponding category label and the instance segmentation mask information and input them into Figure 2 In the Generailzed RCNN Transform network shown in Figure 1, the input image is randomly flipped horizontally and the image is scaled to a fixed length and width range.

[0066] 2) Input the preprocessed image into the Backbone network for feature extraction. The Backbone network includes the Duplex Resnet network for feature extraction and the FPN (Feature Pyramid Network) network for extracting the prediction feature pyramid. 3) The basic structure of the Duplex Resnet network Duplex Resnet Base (DRB) is as follows Figure 3 As shown, each DRB is composed of multiple convolutional layers, which include skip connections. Different convolutional layers convert the input image into a feature map. The skip connection is used for gradient propagation to alleviate the gradient vanishing problem caused by the increase of network depth. The DuplexResnet network first passes through the convolutional layer and the maximum pooling downsampling layer, and then sequentially connects the layer1, layer2, layer3, and layer4 feature extraction layers stacked by several DRB layers. As a preferred solution of this embodiment, the number of DRBs contained in each layer is: 3, 3, 9, and 3 respectively. 4) The FPN network structure is as follows Figure 4As shown in the figure, FPN extracts the output of layer1, layer2, layer3, and layer4 in the Duplex Resnet network, and adjusts the number of output feature map channels to a uniform size through convolution. Starting from the top feature map, its resolution is increased to match the bottom feature map through upsampling operations, and then it is connected with the feature map of the adjacent lower layer to pass higher-level semantic information to the bottom layer, and then a new prediction feature map is formed through convolution operations. Through the top-down path, FPN obtains a series of multi-scale prediction feature maps, called a prediction feature pyramid.

[0067] Based on the above design, the preprocessed image (3, w, h) is input into the Duplex Resnet network. After the maximum pooling downsampling layer, the basic feature map b(c, w / 4, h / 4) is obtained. Then, through layer1, layer2, layer3, and layer4, the feature maps b0(c0, w / 4, h / 4), b1(c1, w / 8, h / 8), b2(c2, w / 16, h / 16), and b3(c3, w / 32, h / 32) are obtained respectively. Furthermore, the FPN network extracts the output of each layer, and adjusts the number of channels of each feature map to a uniform size through convolution operations. It starts from the top feature map, connects from top to bottom, forms a new feature map through convolution operations, and samples an additional feature map at the top layer. Finally, the predicted feature pyramid is obtained: p0(cx,w / 4,h / 4), p1(cx,w / 8,h / 8), p2(cx,w / 16,h / 16), p3(cx,w / 32,h / 32), p4(cx,w / 64,h / 64).

[0068] 5) Input the predicted feature pyramid into the RPN network, and generate the corresponding area (preferred value: 32) for each pixel point in the p0-p4 layers. 2 , 64 2 , 128 2 , 256 2 , 512 2 ), a bounding box with an aspect ratio of (preferred values: 0.5, 1, 2), and predicts the probability score of each generated bounding box as the foreground and background at each pixel point, as well as the bounding box offset coefficient of each bounding box, and adjusts the bounding box by the predicted bounding box offset coefficient to obtain all candidate bounding boxes, removes the bounding box candidate boxes that exceed the image boundary, and suppresses the bounding box candidate boxes whose bounding box intersection-to-union ratio is greater than a given threshold of 0.7 through the NMS algorithm, and then takes the top n bounding box candidate boxes according to the predicted probability scores, and finally obtains the candidate area to be detected.

[0069] Among them, the bounding box intersection-over-union ratio is calculated by Efficient-IoU, such as Figure 5 As shown, the calculation formula is:

[0070]

[0071] Where area represents the area of ​​the corresponding box, w1 and w2 represent the width of the corresponding box, w represents the width of the minimum circumscribed rectangle of the two boxes, h1 and h2 represent the height of the corresponding box, h represents the height of the minimum circumscribed rectangle, d1 and d2 represent the center point position of the corresponding box, and c represents the diagonal length of the minimum circumscribed rectangle.

[0072] In the embodiment of the present invention, the preferred NMS algorithm used is the Cluster NMS algorithm, such as Figure 6 As shown in the figure, by grouping similar candidate bounding boxes, representative bounding boxes can be retained more accurately, and important information will not be lost due to overlap. The input of the algorithm is a set of candidate bounding boxes, each with a probability score. First, the intersection and union ratio between them is calculated by EIOU to obtain the intersection and union ratio matrix X. Since the intersection and union ratio between two bounding boxes is the same, and the intersection and union ratio of the bounding box itself is meaningless, the intersection and union ratio matrix can be simplified to an upper triangular matrix, and then the maximum value is taken by column. After the given NMS threshold is binarized, a one-dimensional tensor b is obtained, which is expanded into a diagonal matrix E using b. E is left-multiplied by the intersection and union ratio matrix X, and then the maximum value is taken by column to obtain a new tensor b. It is iterated back and forth until b does not change, and the final bounding box to be suppressed is obtained.

[0073] 6) Pooling operation is performed on each candidate region on the feature map, and each candidate region is mapped to a fixed-size feature map. The mapped feature map is input into FastRCNN Predictor for flattening, and the predicted category information and bounding box offset parameters are obtained through two parallel fully connected layers. The predicted bounding box offset parameters are applied to the candidate region to obtain the final predicted bounding box information and category information.

[0074] 7) The mapped feature maps are input into the FCN network in parallel, and the feature maps are gradually enlarged through the transposed convolution layer. Finally, through a pixel classification layer, the output of the transposed convolution layer is mapped to the space of the semantic segmentation label, and the category to which each pixel belongs is predicted to achieve instance-level semantic segmentation.

[0075] 8) Define the loss function and calculate the loss, and improve the Mask R-CNN occluded target segmentation method. The loss function is as follows: L = L acl +L arl +L cla +L reg +Lseg .

[0076] Among them, L acl Represents the anchor classification loss of the RPN part. RPN uses a set of predefined anchors to slide on the image and provides two classification scores for each anchor position, indicating whether the anchor contains the foreground target of the object bounding box and whether it is a background target. The classification loss of the foreground and background is calculated using the binary cross entropy loss to measure the classification accuracy of the model for these anchors. The calculation formula is as follows:

[0077]

[0078] Where y represents the true category, is the predicted foreground output of RPN, with a value of [0,1].

[0079] L arl Represents the anchor regression loss of the RPN part. In addition to the classification score, the RPN also generates a bounding box correction value for each anchor position, which is used to adjust the anchor position to more accurately match the bounding box of the object. The predicted boundary is calculated using the EIOU loss to calculate the anchor regression loss, which is used to measure the difference between the bounding box and the true bounding box. The calculation formula is as follows:

[0080] L acl =1-EIOU

[0081] Where EIOU is Efficient-IoU.

[0082] L cla Represents the FastRCNN Predictor network prediction classification loss, using binary cross entropy loss to calculate the category classification loss, which is used to measure the classification accuracy of the model for the candidate region. The calculation formula is the same as L acl .

[0083] L reg It represents the FastRCNN Predictor network predicting the candidate region boundary regression loss. The EIOU loss is used to calculate the candidate region bounding box regression loss, which is used to measure the difference between the model predicted bounding box and the true bounding box. The calculation formula is the same as L arl .

[0084] L seg Represents the difference between the generated mask and the true mask. The binary cross entropy loss is used to calculate the mask classification loss, which is used to measure the similarity of each pixel between the generated mask and the true mask. The calculation formula is the same as L acl .

[0085] 9) Perform back propagation according to the loss function formula to calculate the overall network loss function L, update the network weights, and repeat the above training steps until the network converges. After each epoch of training is completed, the network model obtained from the last iteration is used for verification, and the network model with the best verification effect is saved.

[0086] 10) Online verification: After the trained model is trained, an RGB image containing the target is input, and the occluded targets in the image are effectively detected, and a high-quality instance segmentation mask is generated for each target.

[0087] As shown above, the main innovative points of the solution provided by the embodiment of the present invention are:

[0088] The improved feature extraction network is to replace the original Resnet network with Duplex Resnet. The Duplex Resnet network can effectively extract hierarchical and abstract feature representations from the original image. It is suitable for all networks that need to extract image feature information. Compared with the Resnet network, Duplex Resnet has fewer network parameters and deeper network depth, and can extract feature representations with richer semantics.

[0089] Improved bounding box regression loss function, the improvement lies in the introduction of EIOU loss function. Compared with the original network SmoothL1 loss function, EIOU loss directly optimizes the IoU indicator commonly used in target detection. Therefore, EIOU loss can more directly promote the model to generate more accurate bounding boxes, thereby improving the accuracy of target detection and further accelerating the network convergence speed.

[0090] The improvement of the non-maximum suppression algorithm lies in the introduction of the ClusterNMS algorithm. Compared with the original network NMS algorithm, the ClusterNMS algorithm adapts to complex scenes. In the case of a large number of dense targets or severe target occlusion, the traditional NMS may delete some real targets. ClusterNMS uses clustering to group targets, which can better adapt to such complex scenes and reduce the possibility of missed target detection.

[0091] The instance segmentation mask generated by the embodiment of the present invention is used for object boundary detection under occlusion conditions, and the object occlusion relationship is further determined in combination with the depth image, so as to subsequently capture the occluded object. The test results on the occlusion dataset show that the improved network has improved mAP@.5 and mAP@.5:.95 by 4.72% and 2.31% respectively compared with the original network. The average inference speed of a single image of the original network is 0.0729 / s, and the average inference speed of a single image of the improved network is 0.0648 / s, which proves the effectiveness of the improved network.

[0092] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0093] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0094] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0095] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0096] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0097] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

[0098] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive various other forms of occluded target segmentation methods based on improved Mask R-CNN under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.

Claims

1. An improved Mask R-CNN occluded target segmentation model, characterized by: Use five convolutional networks for forward propagation and utilize skip connections to form a network architecture Duplex Resnet Base. Use multiple Duplex Resnet Base stacks to form a feature extraction network to replace the Resnet network. Add the height difference, width difference and center point difference of the bounding box to the intersection-over-union ratio evaluation metric of the bounding box regression loss function; The ClusterNMS algorithm is used as the non-maximum suppression algorithm, the GPU is used to accelerate the calculation of NMS, and the suppression box is updated through an iterative algorithm.

2. A method for segmenting occluded objects based on improved Mask R-CNN, characterized in that: Using the occluded target segmentation model according to claim 1, comprising the following steps: Step S1: Image preprocessing: perform pixel value normalization preprocessing on the RGB image input to the network model; Step S2: Feature extraction: Input the image obtained in step S1 into the feature extraction network, and output several feature maps of the input image. Then input these feature maps into the feature pyramid network, extract feature layers of different sizes, and obtain the prediction feature pyramid. Step S3: Generate candidate regions: Use the region proposal network RPN to generate several candidate regions RoIs on the predicted feature pyramid obtained in step S2; Step S4: ROI pooling: Perform ROI pooling on each candidate region in step S3 and map it to a feature map of a fixed size; Step S5: Target classification and bounding box regression: Input the feature map mapped in step S4 into the network predictor, and use two parallel fully connected sub-networks to perform target classification and bounding box regression to obtain the target category information and bounding box information; Step S6: Mask prediction: The feature maps mapped in step S4 are input to the fully convolutional network FCN in parallel, and the label of each pixel is predicted inside each feature map to achieve instance-level semantic segmentation; Step S7: Loss calculation: Count the category loss and bounding box loss from step S3 and step S5, and the mask segmentation loss from step S6 respectively and back propagate, and update the network weights until convergence; Step S8: Post-processing: Use the non-maximum suppression algorithm to remove the redundant target bounding boxes obtained in step S5, and fine-tune the bounding boxes; filter and merge the possible overlapping areas in the instance segmentation mask obtained in step S6, and then map the processed target bounding boxes and instance segmentation masks back to the original image to obtain the final target detection results and instance segmentation masks.

3. The occluded target segmentation method based on an improved Mask R-CNN according to claim 2, characterized in that: The image preprocessing also includes: packaging the original image information, the marked target bounding box information, the corresponding category label and the instance segmentation mask information, inputting them into the occluded target segmentation model network of the improved Mask R-CNN, randomly flipping the input image horizontally, and scaling the image to a fixed length and width range.

4. The occluded target segmentation method based on improved Mask R-CNN according to claim 2, characterized in that: In step S2, the preprocessed image is input into the Backbone network for feature extraction. The Backbone network includes a Duplex Resnet network for feature extraction and an FPN network for extracting a prediction feature pyramid. The basic structure of the Duplex Resnet network is Duplex Resnet Base. Each Duplex ResnetBase consists of multiple convolutional layers and includes skip connections. Different convolutional layers convert input images into feature maps. Skip connections are used for gradient propagation to alleviate the gradient vanishing problem caused by increasing network depth. The Duplex Resnet network first passes through the convolutional layer and the maximum pooling downsampling layer, and then sequentially connects the layer1, layer2, layer3, and layer4 feature extraction layers stacked by several DRB layers. The FPN network is used to extract the outputs of layer1, layer2, layer3, and layer4 in the Duplex Resnet network, and adjust the number of output feature map channels to a uniform size through convolution. Starting from the top feature map, the resolution is increased to match the bottom feature map through upsampling operations, and then connected with the feature maps of the adjacent lower layers to pass more advanced semantic information to the bottom layer, and then a new prediction feature map is formed through convolution operations; through a top-down path, the FPN network obtains a series of multi-scale prediction feature maps.

5. The occluded target segmentation method based on improved Mask R-CNN according to claim 2, characterized in that: The predicted feature pyramid obtained in step S2 is input into the RPN network, and the corresponding bounding boxes are generated at each pixel point of the p0-p4 layer respectively. The probability scores of each generated bounding box as the foreground and background, as well as the bounding box offset coefficient of each bounding box are predicted at each pixel point. The bounding box is adjusted by the predicted bounding box offset coefficient to obtain all candidate bounding boxes, and the bounding box candidate boxes beyond the image boundary are removed. The bounding box candidate boxes whose bounding box intersection-union ratio is greater than the given threshold of 0.7 are suppressed by the non-maximum suppression algorithm, and the first n bounding box candidate boxes are taken according to the predicted probability scores to finally obtain the candidate area to be detected.

6. The occluded target segmentation method based on improved Mask R-CNN according to claim 5, characterized in that: The calculation formula of the bounding box intersection-over-union ratio is: Where area represents the area of ​​the corresponding box, w1 and w2 represent the width of the corresponding box, w represents the width of the minimum circumscribed rectangle of the two boxes, h1 and h2 represent the height of the corresponding box, h represents the height of the minimum circumscribed rectangle, d1 and d2 represent the center point position of the corresponding box, and c represents the diagonal length of the minimum circumscribed rectangle.

7. The occluded target segmentation method based on improved Mask R-CNN according to claim 2, characterized in that: The Cluster NMS algorithm groups similar candidate bounding boxes to more accurately retain representative bounding boxes without losing important information due to overlap. The input of the algorithm is a group of candidate bounding boxes, each of which has a probability score. First, the intersection-of-union ratio between them is calculated through the bounding box intersection-of-union ratio EIOU to obtain the intersection-of-union ratio matrix X, and then the intersection-of-union ratio matrix is ​​simplified to an upper triangular matrix, and then the maximum value is taken by column. After binarization with a given NMS threshold, a one-dimensional tensor b is obtained, which is expanded into a diagonal matrix E using b, and E is left-multiplied by the intersection-of-union ratio matrix X, and then the maximum value is taken by column to obtain a new tensor b, and it is iterated back and forth until b does not change, and the final bounding box to be suppressed is obtained.

8. The occluded target segmentation method based on improved Mask R-CNN according to claim 2, characterized in that: In step S4, a pooling operation is performed on each candidate region on the feature map, and each candidate region is mapped to a fixed-size feature map. The mapped feature map is input into FastRCNN Predictor for flattening, and the predicted category information and bounding box offset parameters are obtained through two parallel fully connected layers. The predicted bounding box offset parameters are applied to the candidate region to obtain the final predicted bounding box information and category information.

9. The occluded target segmentation method based on improved Mask R-CNN according to claim 2, characterized in that: In step S5, the feature map mapped in step S4 is input into the FCN network in parallel, and the feature map is gradually enlarged through the transposed convolution layer. Finally, through a pixel classification layer, the output of the transposed convolution layer is mapped to the space of the semantic segmentation label, and the classification category of each pixel is predicted to achieve instance-level semantic segmentation.

10. The occluded target segmentation method based on improved Mask R-CNN according to claim 2, characterized in that: The loss function is as follows: L = L acl +L arl +L cla +L reg +L seg ; Among them, L acl represents the anchor classification loss of the RPN part; L arl Represents the anchor regression loss of the RPN part. In addition to the classification score, RPN also generates a bounding box correction value for each anchor position, which is used to adjust the anchor position to more accurately match the bounding box of the object. The predicted boundary is calculated using the EIOU loss to calculate the anchor regression loss, which is used to measure the difference between the bounding box and the true bounding box; L cla represents the FastRCNN Predictor network prediction classification loss, and uses binary cross entropy loss to calculate the category classification loss, which is used to measure the classification accuracy of the model for the candidate region; L reg L represents the FastRCNN Predictor network predicting the candidate region boundary regression loss, and uses the EIOU loss to calculate the candidate region bounding box regression loss, which is used to measure the difference between the model predicted bounding box and the true bounding box; seg Represents the difference between the generated mask and the true mask. The mask classification loss is calculated using the binary cross entropy loss to measure the similarity of each pixel between the generated mask and the true mask.