METHOD AND EQUIPMENT FOR INSTANCE SEGMENTATION

A contrasting loss function enhances instance segmentation by improving feature consistency, reducing segmentation errors and increasing accuracy in complex scenarios.

DE112022008022T5Pending Publication Date: 2025-09-04ROBERT BOSCH GMBH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE112022008022
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

Existing instance segmentation methods, particularly in complex scenarios like occlusion or poor illumination, suffer from inconsistent feature representations leading to segmentation errors such as false positives and negatives, resulting in unsatisfactory performance.

Method used

Employing a contrasting loss function to contract features on the same instance and differentiate them from different instances and background, using supervised learning to enhance feature consistency.

Benefits of technology

Improves the completeness and accuracy of predicted masks by learning more compact instance feature representations, significantly reducing segmentation errors and enhancing average precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present disclosure provides a computer-implemented method for instance segmentation. The method comprises: obtaining an overall loss function by inducing a contrastive loss function that aims to pull features on the same instance closer together and features on different instances, as well as features between instances and background, farther apart; and performing supervised learning in a network for an instance segmentation task using the overall loss function.
Need to check novelty before this filing date? Find Prior Art

Description

AREA

[0001] Aspects of the present disclosure relate generally to artificial intelligence, and more particularly to a method and network for instance segmentation. BACKGROUND

[0002] Artificial Intelligence (AI) is used in numerous fields, such as computer vision, speech recognition, natural language processing, and other areas of commercial interest. The vision community has rapidly advanced image classification and object detection in recent years. Instance segmentation, a fundamental task of computer vision, presents a greater challenge, as it generally requires the correct detection of all objects in an image while simultaneously requiring precise segmentation of each instance within the image.

[0003] Although there are some improvements in existing instance segmentation methods or algorithms, their performance may still be unsatisfactory, especially in some complex scenarios such as occlusion or poor illumination, etc.

[0004] It may be desirable to provide an improved method or algorithm for instance segmentation. SUMMARY

[0005] The following is a simplified summary of one or more aspects according to the present disclosure to provide a basic understanding of such aspects. This summary is not a comprehensive overview of all aspects considered and is not intended to identify key or critical elements of all aspects, nor to delimit the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in simplified form in anticipation of the more detailed description presented below.

[0006] In one aspect of the disclosure, a computer-implemented method for instance segmentation is provided, comprising obtaining an overall loss function by inducing a contrastive loss function that aims to pull features on the same instance closer together and features on different instances, as well as features between instances and background, farther apart; and performing supervised learning in a network for an instance segmentation task using the overall loss function.

[0007] In another aspect of the disclosure, an apparatus for instance segmentation is provided, comprising a memory and at least one processor coupled to the memory. The at least one processor is configured to obtain an overall loss function by inducing a contrastive loss function that aims to pull features on the same instance closer together and features on different instances, as well as features between instances and background, farther apart; and performing supervised learning in a network for an instance segmentation task using the overall loss function.

[0008] In a further aspect of the disclosure, a computer program product for instance segmentation is provided, comprising processor-executable computer code for obtaining an overall loss function by inducing a contrastive loss function that aims to draw features on the same instance closer together and draw features on different instances, as well as features between instances and background, farther apart; and for performing supervised learning in a network for an instance segmentation task using the overall loss function.

[0009] In another aspect of the disclosure, a computer-readable medium stores computer code for instance segmentation. The computer code, when executed by a processor, causes the processor to obtain an overall loss function by inducing a contrastive loss function that tends to pull features on the same instance closer together and features on different instances, as well as features between instances and background, farther apart; and to perform supervised learning in a network for an instance segmentation task using the overall loss function.

[0010] Under the supervision of the contrastive loss function, the network can learn more compact instance feature representations, e.g., the network is encouraged to learn a more consistent feature representation for different pixels of the same instance, thereby improving the completeness of the predicted masks.

[0011] Other aspects or variations of the disclosure, as well as other advantages, will become apparent upon consideration of the following detailed description and accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The disclosed aspects are described below in conjunction with the accompanying drawings, which are provided to illustrate and not limit the disclosed aspects. Fig. 1A, Fig. 1B and Fig.1C illustrate schematic diagrams for three types of segmentation faults according to one or more aspects of the present disclosure. Fig. Figure 2 illustrates an example framework of Mask R-CNN for instance segmentation. Fig. 3 illustrates an exemplary workflow of a method for instance segmentation by integrating plug-and-play contrastive learning according to one or more aspects of the present disclosure. Fig. 4 illustrates another exemplary workflow of a method for instance segmentation according to one or more aspects of the present disclosure. Fig. 5 illustrates a schematic diagram for integrating the proposed contrastive loss function into a Mask R-CNN framework according to one or more aspects of the present disclosure. Fig.6 illustrates an example of a hardware implementation for a device according to one or more aspects of the present disclosure. DETAILED DESCRIPTION

[0013] The present disclosure will now be discussed with reference to several example implementations. It should be understood that these implementations are discussed only to enable those skilled in the art to better understand and thus implement embodiments of the present disclosure, and not to suggest limitations on the scope of the present disclosure.

[0014] Instance segmentation, a fundamental task in computer vision (it plays an important role in many application areas, such as geographic information systems, medical imaging, autonomous driving, robotics, and the like), has received extensive attention in the community. The purpose of instance segmentation is to predict an instance-level mask separately for each object in an image. To achieve this, typical multi-stage methods (such as the Mask Region-based Convolutional Network (Mask R-CNN) and its variants, Cascade R-CNN, Hybrid Task Cascade (HTC) for instance segmentation, RefineMask, Mask Scoring R-CNN, and the like) follow a detect-then-segment approach.These methods generally first use a detector to locate an object, extract its corresponding features, and apply a segmentation head to obtain a final mask for the object. Recently, one-stage methods (such as conditional convolutions for instance segmentation (Condlnst), SOLOv2, and PolarMask, etc.) that directly segment objects (e.g., Condlnst and SOLOv2 directly predict a set of instance-level convolution kernels for segmentation, and PolarMask predicts a polar coordinate representation of an instance mask) have gradually become a new trend. In addition, transformer-based models (such as the Masked Attention Mask Transformer for universal image segmentation, the Instance Segmentation Transformer (ISTR), etc.) have also achieved competitive results.

[0015] Despite some improvements by these methods, their performance (especially in some complex scenarios) can still be unsatisfactory. Instance segmentation is a complex task, and an instance segmentation procedure can lead to different types of errors. Errors can occur for different reasons, such as from the perspective of detection and segmentation. Typically, detection requires accurate localization of objects, which creates two primary challenges. First, numerous candidate object localizations (often referred to as "proposals") can be processed. Second, these candidates only allow for a coarse localization, which can be refined to achieve precise localization.If an error occurs during the detection process, it may happen that a predicted mask does not match any ground-truth mask, or that a ground-truth mask does not match any predicted mask (e.g., via intersection-over-union (IoU)). Even within a matching pair of masks, differences may exist between them, which can be defined here as segmentation errors.

[0016] Fig. 1A, Fig. 1B and Fig. 1C illustrate schematic diagrams for three types of segmentation errors according to one or more aspects of the present disclosure. For a given image, M ground truth masks and N predicted masks may be {Gi}i=1M (e.g., as shown by circles 110) or {Di}i=1M (e.g., as represented by circle 120). Each element in the sets (ie G i or D i) can comprise a set of pixels. For a given prediction mask D i can give him a ground truth mask Gi* with the largest mask IoU (marked by the double arrow) and can be assigned to G j another neighboring instance of the same class. The sections 130 can each represent three types of segmentation faults. As shown in Fig. 1A, section 130 may represent a Foreground False Positive (FFP) error, i.e., over-segmented pixels belonging to the foreground (e.g., another instance with mask G j ), indicating that a method or model may confuse different foreground instances (e.g., to predict only one mask for two neighboring people). As in Fig.1B, section 130 may represent a Background False Positive (BFP) error, i.e., over-segmented pixels belonging to the background, indicating that the method or model may mistakenly treat background pixels as part of the foreground. As shown in Fig.As shown in Figure 1C, section 130 may represent a False Negative (FN) error, i.e., under-segmented pixels, indicating that the method or model might mistakenly treat foreground pixels as background pixels. For example, FN errors in the Cityscapes dataset can cause a significant performance degradation of approximately 18.8% average precision (AP) for Mask R-CNN. This can be attributed to the fact that instance segmentation networks in complex scenes (e.g., occlusion or poor illumination, etc.) cannot predict consistent feature representations for different pixels in the same instance, which may result in some foreground pixels being incorrectly classified as background.

[0017] To mitigate these errors, the present disclosure employs (dense) contrastive learning to pull features on the same instance closer together and features on different instances, as well as features between instances and the background, further apart. The proposed contrastive learning can operate as a plug-and-play approach and can be applied to any instance segmentation methods or algorithms described above (e.g., multi-stage methods including Mask R-CNN and single-stage methods including Condlnst) or other existing instance segmentation methods or algorithms without incurring any inference overhead.

[0018] Contrastive learning can be flexible in that different goals can be achieved through different positive and negative image sample definitions and loss function designs. Researchers have made some efforts to propose unsupervised (e.g., self-supervised) learning approaches to extract representations from high-dimensional data. Other works have proposed performing unsupervised clustering using contrastive losses for segmentation problems. However, the above-mentioned efforts or works using contrastive learning mainly focus on unsupervised tasks or clustering. In contrast, the present disclosure focuses on fully supervised instance segmentation and utilizes contrastive learning to mitigate the errors described above.

[0019] Fig.Figure 2 illustrates an example framework of Mask R-CNN 200 for instance segmentation. Given an image 210, framework 200 may first use a backbone network and a Feature Pyramid Network (FPN) 220 to extract image-level features 250. Then, the extracted image-level features may be passed through a Region Proposal Network (RPN) 230 to obtain field proposals 240. The field proposals 240 may be fed into Region of Interest Align (RolAlign) for corresponding instance-level Rol features 260. Based on the instance-level Rol features 260, Rol heads 270 may predict the class 291, bounding box 292, and mask of the corresponding instance 293. Typically, the instance-level Rol features 260 can be passed through fully connected (FC) layers 280 to summarize them into short output vectors to obtain the class 291 and bounding box 292.In parallel, the instance-level Rol features 260 can be passed through a fully convolutional network 290 containing multiple convolutional and upsampling layers to obtain the mask of the corresponding instance 293, which is generally supervised by a binary cross-entropy loss. The loss of Mask R-CNN can be denoted as follows: L. rcnn , including RPN 230 and Rol heads 270.

[0020] However, instance features supervised only by a binary cross-entropy loss may not be optimal. Due to the individual pixel supervision, feature consistency on the same instance may not be guaranteed. The proposed contrastive learning can help existing methods (e.g., Mask R-CNN and RefineMask, etc.) improve feature consistency on the same instance.

[0021] Fig.3 illustrates an exemplary workflow of a method 300 for instance segmentation by integrating contrastive learning through plug-and-play, according to one or more aspects of the present disclosure. At block 310, an overall loss function may be obtained by inducing a contrastive loss function that aims to pull features on the same instance closer together and features on different instances, as well as features between instances and background, farther apart. For example, the network may use a multi-stage model (e.g., framework 200 of Mask R-CNN, as described in Fig. 2, RefineMask and HTC, etc.) or a single-stage model for predicting instance-level masks (e.g., Condlnst, SOLOv2, and PolarMask, etc.). For output, the features can be referenced to all available feature maps before the last network layer. For example, as shown in Fig.2, the features may be the input features for the final layer to output the mask 293. Features of the same instance may be obtained from features of positive image samples defined for that instance, and features of other instances or backgrounds may be obtained from features of negative image samples defined for that instance.

[0022] For example, positive image samples for the features of the same instance can be selected from pixels of a target instance of an image, while negative image samples for the features of other instances and / or the background can be selected from pixels of the remaining image section that do not correspond to the target instance and / or are from other images. The overall loss function can be obtained by integrating an original loss function of the network (e.g., L rcnn , as referred to in Fig. 2) and the contrastive loss function can be obtained.

[0023] At block 320, supervised learning can be performed in the network using the overall loss function. By introducing the contrastive loss function, the network can learn more compact instance feature representations.

[0024] It will be apparent to those skilled in the art that method 300 may be applied with any of the above-described methods or algorithms or other methods or algorithms for instance segmentation without departing from the present disclosure.

[0025] Fig.4 illustrates another example workflow of a method 400 for instance segmentation according to one or more aspects of the present disclosure. Method 400 may be a specific implementation of method 300 and may be applied with the framework of Mask R-CNN 200 or other existing methods or algorithms for instance segmentation. At block 405, anchors, positive image samples, and negative image samples may be obtained for each of a plurality of regions of an image by randomly sampling pixels on a corresponding ground-truth instance mask of that region as anchors or positive image samples and by randomly sampling pixels in the remaining zone of that region as negative image samples.A contrastive loss function can be defined for one or more of the plurality of regions containing adequate image samples to reward similarity between features corresponding to the anchors and the positive image samples and penalize similarity between features corresponding to the anchors and the negative image samples. The contrastive loss function can allow features on the same instance to be pulled closer together and features on different instances to be pulled further apart, as well as features between instances and the background.

[0026] In one aspect of the present disclosure, the plurality of regions of interest (ROIs) may comprise ground-truth bounding boxes or other regions of the image. The one or more of the plurality of regions for which the contrastive loss function is defined may each have a number of anchors, positive image samples, and negative image samples without repetition that is not less than a threshold.

[0027] In one example, for each Rol of an image, pixels on the corresponding ground truth instance mask of that Rol may be randomly or uniformly sampled as positive image samples or anchors, and pixels in the remaining zone of that Rol may be randomly or uniformly sampled as negative image samples.

[0028] In particular, there may be a number of rols in an image, can be used for the i th Rol the corresponding ground truth instance mask as M iand can be completed in this role as M i Both positive image samples P i and anchor A i can be randomly or evenly selected from M i In the meantime, the negative image samples N i randomly or uniformly from M i For example, the same number of positive image samples, negative image samples, and anchors can be sampled, i.e. |P i | = |N i | = |A i | = K. As another example, different numbers of positive image samples, negative image samples, and anchors can be sampled.

[0029] In one aspect of the present disclosure, if the corresponding ground truth instance mask within a role is too large or too small to sample enough points, e.g., |M i | < K or |M i| < K, these Rol are ignored when calculating the contrastive loss function (e.g. also called invalid Rol).

[0030] For the i th Rol, a loss function can be defined as Lcontrasti=−∑u∈Ai∑v∈Pilogexp(Fui⋅F^vi / τ)exp(Fui⋅F^vi / τ)+∑w∈Niexp(Fui⋅F^wi / τ) where F i is the role feature (e.g. input feature for the last layer for mask output), F̂ i its L2-normalized version in one channel dimension. F^vi and F^wi denote feature vectors corresponding to the spatial locations of an anchor u, a positive image sample v, and a negative image sample w, respectively. Temperature τ is a hyperparameter that can influence the strength of the penalties imposed by the contrastive loss function on hard negative image samples.

[0031] The contrastive loss function can be a sum of all valid roles: Lcontrast=∑iLcontrasti,if|Mi|≥K and|M¯i|≥K

[0032] Theoretically, under the supervision of L contrast , the features corresponding to the anchor can be close to the positive image samples and away from the negative image samples, resulting in better feature consistency within the same instance. In particular, in complex scenes (e.g., occlusion, poor illumination, etc.), instance segmentation networks cannot predict consistent feature representations for different pixels on the same instance, which may lead to some foreground pixels being incorrectly classified as background, i.e., the error of FN, as shown in Fig. 1C, which is achieved by using L contrast is significantly weakened. Furthermore, AP of bounding boxes can also be significantly improved, which may be due to the benefits of better instance features for localization.

[0033] At block 410, which is similar to block 310, an overall loss function for a network can be obtained by inducing the contrastive loss function.

[0034] In particular, the total loss function can be given as follows: L=Lrcnn+λLcontrast where L rcnn denotes an original Mask R-CNN loss function, and λ denotes a weight to compensate for the newly added loss. In one example, the weight λ can be set to 1.2.

[0035] At block 420, which is similar to block 320, supervised learning may be performed on the network using the overall loss function. Under the supervision of the contrastive loss function, the learned network may generate consistent features on different pixels of the same instance.

[0036] Fig.Figure 5 illustrates a schematic diagram for integrating the proposed contrastive loss function into a Mask R-CNN framework according to one or more aspects of the present disclosure. The Mask R-CNN framework of Fig. 5 can be Fig. 2. For a given image 510, there may be one or more Rols, e.g., Rol 240, suggested by RPN 230. For a given Rol, e.g., Rol 240, there may be a target ground truth instance mask 512 (e.g., covering the preceding horse, as in Fig. 5), which is known as M i can be represented, and the addition in this Rol 240 can be considered M iAnchors (e.g., anchor 520, indicated by a dot with a shadow) and positive image samples (e.g., positive image sample 530, indicated by a hollow dot) may be sampled from target ground truth instance mask 512, while negative image samples (e.g., negative image sample 540, indicated by a bold dot) may be sampled from the quiet zone of roll 240 excluding target ground truth instance mask 512.

[0037] After the image 510 has been passed through the Mask R-CNN framework, a corresponding feature map 513 can be obtained for this role 240 at the input of the last layer, for example, to output a predicted mask. Feature vectors can be obtained from the feature map 513 at the positions of the sampled anchors (e.g., anchor 520), positive image samples (e.g., positive image sample 530), and negative image samples (e.g., negative image sample 540). Based on the feature vectors, the contrastive loss function L contrast be calculated according to formulas (1) to (2) to draw the features of the anchor 520 and the positive image sample 530 closer together and at the same time draw the feature of the anchor 520 and the feature of the negative image sample 540 further apart.

[0038] Under the supervision of the contrastive loss function, Mask R-CNN can learn more compact instance feature representations. For example, the model is encouraged to learn a more consistent feature representation for different pixels of the same instance, thereby improving the completeness of the predicted masks. For example, Mask R-CNN can be given an image frame as input and output instance-level masks for each of the objects in the image frame with higher mask accuracy, which, for example, can achieve the results discussed above with reference to Fig. 1A, Fig. 1 B and Fig. 1C significantly reduces the segmentation error described.

[0039] Those skilled in the art will appreciate that one or more aspects of the methods or processes described above may be combined, and the integration of the contrastive loss function into Mask R-CNN is merely one example. Without departing from the present disclosure, contrastive loss learning may also be integrated into other models or algorithms, such as by integrating the contrastive loss function into Sparse Instance Activation for Real-Time Instance Segmentation (Sparselnst) by using ground-truth bounding boxes for sampling anchors, as well as positive and negative image samples, in a manner similar to the ROLS in the above example.

[0040] In one aspect of the present disclosure, the similarity between different features may be determined by a projection layer ϕ θ (·) can be learned. For example, the projection layer ϕ θ(·) can be implemented as two or more fully connected layers. The similarity between feature vectors f1 and f2 can be expressed in a formula as follows: sθ(f1,f2)=ϕθ(f1)⋅ϕθ(f2)‖ϕθ(f1)‖2‖ϕθ(f2)‖2

[0041] Accordingly, the cosine similarity as defined in formula (1) (e.g., dot product of two vectors) can be replaced by the learnable similarity, and the formulation (1) can be rewritten as follows: LKontrasti'=−∑u∈Ai∑v∈Pilogexp(sθ(Fui⋅F^vi) / τ)exp(sθ(Fui⋅F^vi) / τ)+∑w∈Niexp(sθ(Fui⋅F^wi) / τ)

[0042] The model parameters, including the projection layer ϕ θ , can be trained end-to-end. Learnable similarity can further improve the network's performance.

[0043] In another aspect of the present disclosure, the temperature τ can influence the degree of penalization by the contrastive loss function for hard, negative image samples, and lower temperatures can result in a greater emphasis on the hard, negative image samples. For example, the temperature τ can be set to 0.07.

[0044] In another aspect of the present disclosure, inadequate image samples may lead to insufficient supervision. If a ground truth instance mask within a Rol is too large (e.g., resulting in inadequate negative image samples) or too small (e.g., resulting in inadequate positive image samples or anchors), that Rol may not be considered in the contrastive loss function (referred to, for example, as an invalid Rol). However, not considering too many Rols may also lead to insufficient supervision. Thus, the number of image samples K must not be set too large; for example, if K = 128, approximately 10% of the Rols were not considered during training, resulting in a degradation of performance. For example, the number of image samples K may be set to a relatively small number, e.g.,32, to achieve a balance between adequate image samples within a Rol and a sufficient number of valid Rols.

[0045] In another aspect of the present disclosure, the number of anchors, positive image samples, and negative image samples may be different. For example, there may be a larger number of negative image samples to be sampled for a target instance of an image relative to anchors or positive image samples. The anchors or positive image samples may be sampled from pixels on a ground-truth instance mask of the target instance within a corresponding rol of the image. The negative image samples may be sampled from pixels in one or more of the remaining zones of the corresponding rol, other rols for other instances of the image, and other images.

[0046] Fig.6 illustrates an example of a hardware implementation for a device 600 according to one or more aspects of the present disclosure. The device 600 for instance segmentation may include a memory 610 and at least one processor 620. The processor 620 may be coupled to the memory 610 and configured to perform the methods 300 and 400 as described above with reference to Fig. 3, Fig. 4 and Fig. 5. Processor 620 may be a general-purpose processor or may be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. Memory 610 may store input data, output data, data generated by processor 620, and / or instructions executed by processor 620.

[0047] The various operations, models, and networks described herein in connection with the disclosure may be implemented in hardware, processor-executed software, firmware, or any combination thereof. According to one embodiment of the disclosure, a computer program product for instance segmentation may include processor-executable computer code for performing the methods 300 and 400 described above with reference to Fig. 3, Fig. 4 and Fig. 5. According to another embodiment of the disclosure, a computer-readable medium may store computer code for instance segmentation, wherein the computer code, when executed by a processor, may cause the processor to perform the methods 300 and 400 described above with reference to Fig. 3, Fig. 4 and Fig.5. Computer-readable media includes both non-transitory, computer-readable storage media and communication media, including any media that supports the transfer of a computer program from one location to another. Any connection may be referred to as a computer-readable medium. Other embodiments and implementations are within the scope of the disclosure.

[0048] Using the proposed method described above and existing methods, some experiments were conducted on the Cityscapes dataset (with only fine annotations). Cityscapes is a real-world urban street scene dataset containing 2975, 500, and 1525 images as training, validation, and test sets, respectively. The experiments were based on the popular Detectron2 framework. The corresponding results are listed in Table 1. Table 1 Proceedings AP val AP Test person driver car motorcycle Bicycle Mask R-CNN 36,4 32,0 34,8 27,0 49,1 24,1 18,7 Mask R-CNN with the proposed contrastive loss function 38,6 33,5 38,3 30,6 54,2 25,3 21,1 RefineMask 37,6 32,0 37,4 29,3 55,6 23,4 20,8 RefineMask with proposed contrastive loss function 39,0 33,6 39,3 30,4 56,9 24,5 21,5

[0049] As shown in Table 1, the proposed method with the (dense) contrastive loss function can achieve consistent improvement on different baseline models and improve the average precision (AP) of the test set by 1.6% on the high-performance RefineMask baseline.

[0050] In addition, additional experiments were conducted on other datasets, such as COCO and COCO-OCC (a subset of the COCO validation set with more occlusion). The corresponding results are presented in Table 2. Table 2 Proceedings data set AP val Mask R-CNN COCO 35,2 COCO-OCC 31,5 Mask R-CNN with the proposed contrastive loss function COCO 35,7 COCO-OCC 32,3

[0051] Without introducing any inference overhead, the proposed contrastive learning can achieve consistent improvement across different baseline methods or algorithms for instance segmentation and different datasets.

[0052] The foregoing description of the disclosed embodiments is provided to enable those skilled in the art to make or use the various embodiments. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the scope of the various embodiments. Thus, the claims are not intended to be limited to the embodiments shown herein, but are to be accorded the broadest scope consistent with the following claims and the principles and novel features disclosed herein.

Claims

[1] Computer-implemented method for instance segmentation, comprising: Obtaining an overall loss function by inducing a contrastive loss function that aims to pull features on the same instance closer together and features on different instances, as well as features between instances and background, farther apart; and performing supervised learning in a network for an instance segmentation task using the overall loss function. [2] The computer-implemented method of claim 1, further comprising: Obtaining anchors, positive image samples and negative image samples for each of a plurality of regions of an image by randomly sampling pixels on a corresponding ground truth instance mask of that region as anchors or positive image samples and by randomly sampling pixels in the remaining zone of this region as negative image samples; and wherein the contrastive loss function is defined for one or more of the plurality of regions to determine a similarity between features corresponding to the anchors and to reward features corresponding to the positive image samples and to penalize similarity between features corresponding to the anchors and the negative image samples. [3] The computer-implemented method of claim 2, wherein a temperature τ is used to influence a strength of penalty by the contrastive loss function on hard negative image samples. [4] A computer-implemented method according to claim 2, wherein the similarity is learnable by a projection layer. [5] The computer-implemented method of claim 2, wherein the plurality of regions of interest (ROIs) comprise ground truth bounding boxes of the image. [6] The computer-implemented method of claim 2, wherein the one or more of the plurality of regions each have a number of anchors, positive image samples, and negative image samples without repetition that is not less than a threshold. [7] The computer-implemented method of claim 2, wherein the number of anchors, positive image samples, and negative image samples for each of the one or more of the plurality of non-repeat regions is the same and equal to thirty-two. [8] The computer-implemented method of claim 1, wherein the network comprises a multi-stage model or a single-stage model for predicting instance-level masks. [9] The computer-implemented method of claim 1, wherein the learned network enables the generation of consistent features on the same instance. [10] A computer-implemented method according to claim 1, comprising: Providing the network for the instance segmentation task with an image frame as input; and Obtain one or more image frame instance-level masks from the network as output. [11] Facility for instance segmentation, comprising: a memory; and at least one processor coupled to the memory and configured to carry out the method according to any one of claims 1 to 10. [12] Computer program product for instance segmentation, comprising: processor-executable computer code for performing the method according to one of claims 1 to 10. [13] A computer-readable medium storing computer code for instance segmentation, the computer code, when executed by a processor, causing the processor to perform the method of any one of claims 1 to 10.