Instance segmentation method and apparatus based on point supervision, and storage medium
By dividing the instance attention map of the instance object into multiple component attention maps and using key point offsets, the problem of low segmentation performance caused by semantic differences in the existing technology is solved, and more accurate instance segmentation and component cutting are achieved.
Patent Information
- Application Number
- PCT/CN2024/084077
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-31
- Filing Date
- 2024-03-27
- Publication Date
- 2024-10-03
AI Technical Summary
Existing point-supervised instance segmentation methods are difficult to accurately segment objects that contain multiple semantic components, resulting in low performance due to semantic differences.
By dividing the instance attention map of the instance object into multiple component attention maps, key point offsets and feature density updates are used to improve internal feature correlation, thereby achieving more accurate segmentation.
Significantly improves the accuracy and performance of instance segmentation, reduces the similarity between components, and enhances the estimation ability of fine-grained semantics.
Smart Images

Figure CN2024084077_03102024_PF_FP_ABST
Abstract
Description
Instance segmentation method, device and storage medium based on point supervision
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 31, 2023, with application number 202310379811.6 and application name “Point-supervised instance segmentation method, device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer vision, and in particular to a method, device, and storage medium for instance segmentation based on point supervision. Background Art
[0003] Instance segmentation is one of the key issues in the field of image understanding and computer vision. It is a task to predict the category of a single pixel in an image and provide different instance labels for separate instances belonging to the same class. Currently, instance segmentation technology has been widely used in image processing, human-computer interaction, and assisted driving. However, as shown in Figure 1, instance segmentation based on full supervision requires detailed pixel-level annotation of each object in the image, which puts a huge burden on manual annotation, especially in the era of big data. Instance segmentation based on point supervision is an instance segmentation method with a very efficient annotation process. During the training process, it only needs to use a point and category label inside the instance object for supervision to achieve complete segmentation of the entire instance object. Instance segmentation based on point supervision can reduce the object annotation cost to 20% of full supervision, while keeping the annotation cost similar to that of weakly supervised instance segmentation, and achieve performance far exceeding the latter.
[0004] Currently, work in the field of point-supervised instance segmentation primarily includes the BESTIE and WISE-Net algorithms. Both algorithms first estimate a pseudo-label for each object and then refine this pseudo-label using a segmentation network. BESTIE leverages point supervision to convert the results of weakly supervised semantic segmentation into instance segmentation information, generating refined instance segmentation pseudo-labels. WISE-Net locates each object region and achieves object segmentation by calculating the similarity between foreground regions.
[0005] However, these methods generate pseudo-labels for objects directly from a single point, failing to account for the potential semantic differences between an object's components. For example, while "dog's tail" and "dog's head" are both components of a dog, their semantics can differ significantly. Using only a single supervisory point, these methods may only locate the most discriminative regions of the object, or the area surrounding the supervisory point, resulting in poor segmentation performance.
[0006] Summary of the Invention
[0007] In view of this, a method, device and storage medium for instance segmentation based on point supervision are proposed. The embodiment of the present application effectively improves the internal feature correlation of the required segmentation target by dividing the instance attention map corresponding to the instance object into multiple component attention maps, thereby making the segmentation accuracy more accurate.
[0008] In a first aspect, an embodiment of the present application provides an instance segmentation method based on point supervision, the method comprising:
[0009] Acquire a target image, where the target image includes n instance objects, where n is a positive integer;
[0010] Determine an instance attention map corresponding to each of the n instance objects;
[0011] For at least one of the instance objects, dividing the instance attention map corresponding to the instance object into a plurality of component attention maps, wherein the plurality of component attention maps indicate maximum similarity between image features of the instance attention map and key point features of each semantic component of the instance object;
[0012] Determine a segmentation result of the instance object based on the multiple component attention maps corresponding to at least one of the instance objects.
[0013] In this implementation, a target image is obtained, where n instance objects are included, where n is a positive integer; instance attention maps corresponding to each of the n instance objects are determined; for at least one instance object, the instance attention map corresponding to the instance object is divided into multiple component attention maps, where the multiple component attention maps indicate the maximum similarity between the image features of the instance attention map and the key point features of each semantic component of the instance object; a segmentation result of the instance object is determined based on the multiple component attention maps corresponding to the at least one instance object; since there is a non-negligible semantic deviation between the semantic components within the instance object, it is difficult to estimate the complete area of the object based on a single point, and the segmentation result of the instance object is obtained by dividing the instance attention map corresponding to the instance object into multiple component attention maps, thereby effectively improving the internal feature correlation of the required segmentation target, making the instance segmentation accuracy more accurate, and improving the instance segmentation performance based on point supervision.
[0014] In one possible implementation, determining the instance attention maps corresponding to the n instance objects includes:
[0015] For at least one of the instance objects, the instance attention map corresponding to the instance object is determined based on the image block token and the preset reference token, the image block token indicates the image features of the image block of the target image, and the instance attention map indicates the similarity between the image block token and the reference token.
[0016] In this implementation, for at least one instance object, an instance attention map corresponding to the instance object is determined based on an image block token and a preset reference token, where the image block token indicates the image features of the image block of the target image, and the instance attention map indicates the similarity between the image block token and the reference token; by determining the instance attention map corresponding to the instance object based on the image block token and the preset reference token, the accuracy of the determined instance attention map is ensured.
[0017] In another possible implementation, determining the instance attention map corresponding to the instance object according to the image block token and the preset reference token includes:
[0018] Determining instance features and background features corresponding to the instance object based on the correlation between the image block token and the preset reference token;
[0019] Determine the instance attention map corresponding to the instance object according to the instance feature, the background feature, the instance threshold and the background threshold.
[0020] In this implementation, the instance features and background features corresponding to the instance object are determined based on the correlation between the image block token and the preset reference token; the instance attention map corresponding to the instance object is determined based on the instance features, background features, instance threshold and background threshold, further ensuring the accuracy of the determined instance attention map.
[0021] In another possible implementation, dividing the instance attention map corresponding to the instance object into a plurality of component attention maps includes:
[0022] Randomly initialize a plurality of key points in the instance attention map corresponding to the instance object;
[0023] According to the multiple key points, the instance attention map is divided into the multiple component attention maps, where the multiple component attention maps correspond one-to-one to the multiple key points;
[0024] Update the position of the corresponding key point according to the feature density of each component attention map;
[0025] Re-dividing the plurality of component attention maps according to the updated plurality of key points;
[0026] The steps of updating the positions of the key points corresponding to the feature densities of the component attention maps are performed in an iterative manner, and re-dividing the multiple component attention maps according to the updated multiple key points, and obtaining the re-divided multiple component attention maps after the iteration is completed.
[0027] In this implementation, multiple key points are randomly initialized in the instance attention map corresponding to the instance object; based on the multiple key points, the instance attention map is divided into multiple component attention maps, and the multiple component attention maps correspond one-to-one to the multiple key points; the position of the corresponding key point is updated according to the feature density of each component attention map; the multiple component attention maps are re-divided according to the updated multiple key points; the next two steps are iterated, and after the iteration is completed, the re-divided multiple component attention maps are obtained, that is, the instance attention map is decomposed into multiple component attention maps, these component attention maps are represented by key points, and the fine-grained semantics are estimated through key point offset to make component cutting more accurate.
[0028] In another possible implementation, updating the position of the corresponding key point according to the feature density of each component attention map includes:
[0029] For each of the component attention maps, determining a feature density weight corresponding to each of the plurality of image block tokens of the component attention map, the feature density weight indicating a feature density of the image block token;
[0030] According to the feature density weights corresponding to each of the multiple image block tokens, the positions of the key points corresponding to the component attention map are updated.
[0031] In this implementation, for each component attention map, the feature density weights corresponding to the multiple image block tokens of the component attention map are determined, and the feature density weights indicate the feature density of the image block tokens; according to the feature density weights corresponding to the multiple image block tokens, the positions of the key points corresponding to the component attention map are updated; that is, by performing key point offsets in the feature space to find stable extreme points to represent the components of the instance object, the accuracy of component cutting is further guaranteed.
[0032] In another possible implementation, the key points are independently shifted to the mean of the feature vectors of the corresponding semantic components.
[0033] In this implementation, key points are independently offset to the mean of the feature vectors of the corresponding semantic components, so that the key points can better represent the components of the instance object, thereby making the segmentation accuracy more accurate.
[0034] In another possible implementation, before dividing the instance attention map corresponding to the instance object into a plurality of component attention maps, the method further includes:
[0035] removing at least one key point in a target region of the instance attention map, wherein the target region is a region whose confidence is less than a confidence threshold; and / or,
[0036] Merge multiple key points whose similarity is higher than the similarity threshold.
[0037] In this implementation, before dividing the instance attention map corresponding to the instance object into multiple component attention maps, at least one key point in the target area of the instance attention map is removed, and the target area is an area with a confidence less than a confidence threshold; and / or, multiple key points with a similarity higher than a similarity threshold are merged; that is, noisy key points are filtered, and / or similar key points are merged, which solves the problem of key points being erroneously offset to the background area or other object area due to the existence of key point offset, and further ensures the accuracy of subsequent segmentation.
[0038] In a second aspect, an embodiment of the present application provides an instance segmentation device based on point supervision, the device comprising:
[0039] an acquisition unit, configured to acquire a target image, wherein the target image includes n instance objects, where n is a positive integer;
[0040] A first determining unit is configured to determine an instance attention map corresponding to each of the n instance objects;
[0041] a dividing unit, configured to divide, for at least one of the instance objects, the instance attention map corresponding to the instance object into a plurality of component attention maps, wherein the plurality of component attention maps indicate maximum similarity between image features of the instance attention map and key point features of each semantic component of the instance object;
[0042] The second determining unit is used to determine the segmentation result of the instance object based on the multiple component attention maps corresponding to at least one of the instance objects.
[0043] In a possible implementation manner, the first determining unit is further configured to:
[0044] For at least one of the instance objects, the instance attention map corresponding to the instance object is determined based on the image block token and the preset reference token, the image block token indicates the image features of the image block of the target image, and the instance attention map indicates the similarity between the image block token and the reference token.
[0045] In another possible implementation manner, the first determining unit is further configured to:
[0046] Determining instance features and background features corresponding to the instance object based on the correlation between the image block token and the preset reference token;
[0047] Determine the instance attention map corresponding to the instance object according to the instance feature, the background feature, the instance threshold and the background threshold.
[0048] In another possible implementation, the dividing unit is further configured to:
[0049] Randomly initialize a plurality of key points in the instance attention map corresponding to the instance object;
[0050] According to the multiple key points, the instance attention map is divided into the multiple component attention maps, where the multiple component attention maps correspond one-to-one to the multiple key points;
[0051] Update the position of the corresponding key point according to the feature density of each component attention map;
[0052] Re-dividing the plurality of component attention maps according to the updated plurality of key points;
[0053] The steps of updating the positions of the key points corresponding to the feature densities of the component attention maps are performed in an iterative manner, and re-dividing the multiple component attention maps according to the updated multiple key points, and obtaining the re-divided multiple component attention maps after the iteration is completed.
[0054] In another possible implementation, the dividing unit is further configured to:
[0055] For each of the component attention maps, determining a feature density weight corresponding to each of the plurality of image block tokens of the component attention map, the feature density weight indicating a feature density of the image block token;
[0056] According to the feature density weights corresponding to each of the multiple image block tokens, the positions of the key points corresponding to the component attention map are updated.
[0057] In another possible implementation, the key points are independently shifted to the mean of the feature vectors of the corresponding semantic components.
[0058] In another possible implementation, the apparatus further includes: a key point filtering unit; the key point filtering unit is configured to:
[0059] removing at least one key point in a target region of the instance attention map, wherein the target region is a region whose confidence is less than a confidence threshold; and / or,
[0060] Merge multiple key points whose similarity is higher than the similarity threshold.
[0061] In a third aspect, an embodiment of the present application provides an instance segmentation device based on point supervision, the device comprising:
[0062] processor;
[0063] a memory for storing processor-executable instructions;
[0064] The processor is configured to implement the method provided by the first aspect or any possible implementation manner of the first aspect when executing the instruction.
[0065] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method provided by the first aspect or any possible implementation of the first aspect.
[0066] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a computing device, the processor in the computing device executes the method provided in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and, together with the description, serve to explain the principles of the application.
[0068] FIG1 is a schematic diagram showing the difference between a fully supervised instance segmentation algorithm and a point-supervised instance segmentation algorithm provided in the related art.
[0069] FIG2 shows a schematic structural diagram of a computing device provided by an exemplary embodiment of the present application.
[0070] FIG3 shows a flowchart of an instance segmentation method based on point supervision provided by an exemplary embodiment of the present application.
[0071] FIG4 shows a schematic diagram showing the principle of an instance segmentation method based on point supervision provided by another exemplary embodiment of the present application.
[0072] FIG5 shows a block diagram of an instance segmentation apparatus based on point supervision provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0073] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0074] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0075] In addition, numerous specific details are provided in the detailed description below to better illustrate the present application. Those skilled in the art will appreciate that the present application can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present application.
[0076] First, the application scenarios involved in this application are introduced.
[0077] The embodiment of the present application provides an instance segmentation method based on point supervision, which is executed by a computing device. Please refer to Figure 2, which shows a schematic diagram of the structure of a computing device provided by an exemplary embodiment of the present application.
[0078] The computing device can be a terminal or a server. Terminals include mobile terminals and fixed terminals, such as mobile phones, tablet computers, laptop computers, and desktop computers. The server can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.
[0079] As shown in FIG2 , the computing device includes a processor 10, a memory 20, and a communication interface 30. Those skilled in the art will appreciate that the structure shown in FIG2 does not limit the computing device, and the computing device may include more or fewer components than shown, or may combine certain components, or arrange the components differently.
[0080] Processor 10 is the control center of the computing device. It connects the various components of the computing device using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 20 and accessing data stored in memory 20, it performs various functions of the computing device and processes data, thereby providing overall control of the computing device. Processor 10 can be implemented by a CPU or a graphics processing unit (GPU).
[0081] The memory 20 can be used to store software programs and modules. The processor 10 executes various functional applications and data processing by running the software programs and modules stored in the memory 20. The memory 20 may mainly include a program storage area and a data storage area. The program storage area may store an operating system 21, an acquisition unit 22, a first determination unit 23, a partitioning unit 24, a second determination unit 25, and applications required for at least one function; the data storage area may store data created based on the use of the computing device. The memory 20 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Accordingly, the memory 20 may further include a memory controller to provide the processor 10 with access to the memory 20 .
[0082] Among them, the processor 10 performs the following functions by running the acquisition unit 22: acquiring a target image, where the target image includes n instance objects, where n is a positive integer; the processor 10 performs the following functions by running the first determination unit 23: determining the instance attention maps corresponding to each of the n instance objects; the processor 10 performs the following functions by running the division unit 24: for at least one instance object, dividing the instance attention map corresponding to the instance object into multiple component attention maps, where the multiple component attention maps indicate the maximum similarity between the image features of the instance attention map and the key point features of each semantic component of the instance object; the processor 10 performs the following functions by running the second determination unit 25: determining the segmentation result of the instance object based on the multiple component attention maps corresponding to the at least one instance object.
[0083] The embodiment of the present application includes two parts: (1) Token Querying, which divides the instance attention map corresponding to a single instance object into multiple component attention maps, and preliminarily cuts the single instance object into multiple components based on them; (2) Key-point Shift, which re-estimates the attention maps of each component and optimizes the component cutting results.
[0084] Below, an exemplary embodiment is used to introduce the instance segmentation method based on point supervision provided in the embodiment of the present application.
[0085] Please refer to Figure 3, which shows a flowchart of a method for instance segmentation based on point supervision provided by an exemplary embodiment of the present application. This embodiment uses the method as an example for use in the computing device shown in Figure 2. The method includes the following steps.
[0086] Step 301: Acquire a target image, where the target image includes n instance objects, where n is a positive integer.
[0087] The computing device obtains an input target image, where the target image is an image including n instance objects, where n is a positive integer.
[0088] Step 302: Determine the instance attention map corresponding to each of the n instance objects.
[0089] Optionally, to generate instance attention maps, a learnable benchmark token is introduced and a point prediction task is defined. The computing device determines instance attention maps and a background attention map corresponding to each of n instance objects based on the benchmark token.
[0090] The computing device receives an input target image and divides it into W×H image blocks. Each image block corresponds to an image token that indicates the image features of the image block, where W and H are both positive integers. A component area in an instance object typically contains multiple image blocks.
[0091] Multiple image tokens are concatenated with a reference token and then fed into a backbone model for feature extraction. The features of the reference tokens are then fed into two multi-layer perception models to predict point coordinates and categories. Point supervision uses a binary matching loss to drive point coordinate and category prediction. The backbone model is based on a Vision Transformer (ViT) network, while the multi-layer perception model is based on a Multi-Layer Perception (MLP) network.
[0092] It should be noted that a point supervision can only be matched with one reference token. The reference token that matches the point supervision can perceive the instance object, that is, the reference token can be used to generate an instance attention map for each instance object, while the unmatched reference token will be regarded as the background. In other words, each instance object in the target image is the foreground, and the rest of the target image except the foreground is the background. Schematically, x reference tokens are preset (x>n), of which x reference tokens can be matched one by one with n instance attention maps in the target image, and the remaining reference tokens are matched with the background image.
[0093] Optionally, for at least one instance object, the computing device determines an instance attention map corresponding to the instance object based on the image block token and a preset reference token, where the image block token indicates image features of the image block of the target image, and the instance attention map indicates the similarity between the image block token and the reference token.
[0094] Optionally, the computing device determines the instance features and background features corresponding to the instance object based on the correlation between the image block token and the preset reference token; and determines the instance attention map corresponding to the instance object based on the instance features, background features, instance threshold and background threshold.
[0095] Optionally, the computing device obtains the instance region and the background region based on the correlation between the reference token and the image block token, and calculates each instance feature and background feature. The instance region and the background region are regions with a confidence greater than a confidence threshold, the instance region is also referred to as the foreground region, and the instance feature is also referred to as the foreground feature. Each image block token calculates its similarity distribution with the instance feature and the background feature, and obtains the instance attention map of each instance object by jointly estimating the distribution of the two.
[0096] Schematically, in order to fully activate the object, a corresponding self-attention map is generated for each instance object based on the reference token in, Represents a single image patch token φ i,j The similarity between the matched base token and the base token is expressed as: Where D represents the dimension of the feature.
[0097] Considering A S is learned under the supervision of one point, so A S It suffers from semantic bias problems and is affected by partial activations and background noise. Therefore, it is only used as a guide to divide the image patch tokens into high-confidence instance regions Φ + , high confidence background area Φ - , and ignored tokens. By S Set the foreground threshold and background threshold on the graph, and use the following formula (1) to estimate the instance attention map
[0098] Where d(a,b) represents the cosine similarity between feature vector a and feature vector b. as well as Represent the instance region Φ + and background area Φ -The first term in the above formula (1) optimizes the estimation of the instance area, and the second term can reduce the background noise in the background area.
[0099] In step 303 , for at least one instance object, the instance attention map corresponding to the instance object is divided into a plurality of component attention maps, where the plurality of component attention maps indicate the maximum similarity between the image features of the instance attention map and the key point features of each semantic component of the instance object.
[0100] Since the instance attention map is still affected by the non-negligible semantic deviation between the various parts of the object, in order to reduce the impact of semantic deviation, the instance attention map can be divided into multiple component attention maps, these components are represented by key points, and the fine-grained semantics are estimated by key point offset.
[0101] Optionally, for at least one instance object, the computing device randomly initializes multiple key points in the instance attention map corresponding to the instance object; divides the instance attention map into multiple component attention maps based on the multiple key points, and the multiple component attention maps correspond one-to-one to the multiple key points; updates the position of the corresponding key point based on the feature density of each component attention map; re-divides the multiple component attention maps based on the updated multiple key points; iteratively executes the steps of updating the position of the corresponding key point based on the feature density of each component attention map, and re-divides the multiple component attention maps based on the updated multiple key points, and obtains multiple re-divided component attention maps after the iteration is completed.
[0102] It should be noted that a component region typically contains multiple image blocks. A keypoint corresponds to a component. A weight is calculated for each image block feature within the component region, and these weights are used to update the keypoint's position. When calculating the weights, each keypoint is independent and does not affect each other.
[0103] Optionally, the computing device updates the position of the corresponding key point according to the feature density of each component attention map, including: for each component attention map, determining the feature density weight corresponding to each of the multiple image block tokens of the component attention map, the feature density weight indicating the feature density of the image block token; and updating the position of the key point corresponding to the component attention map according to the feature density weight corresponding to each of the multiple image block tokens.
[0104] Optionally, the shifted keypoints are stable extreme points in the instance attention map. Optionally, the keypoints are independently shifted to the mean of the feature vectors of the corresponding semantic components.
[0105] Schematically, the computing device converts a single instance attention map A I Divided into K component attention maps However, in the point-based supervision setting, the precise object components are not provided. For complex and irregular objects, directly learning object components is very challenging. Assuming that the image patch token features within a subregion share fine-grained semantics and are therefore dense in the feature space, the stable extreme points of the feature vector can be used to represent each subregion of the instance object.
[0106] To achieve this goal, K key points are randomly initialized in the feature space of the instance object, and are gradually shifted to stable extreme points in the feature space through iteration. The key point is denoted as Q = {Q k ,k=1,2,···,K}, where Is the position subscript of the key point. k =(i,j) represents the kth key point in the feature space and the image block feature φ i,j The distance between the key points is the shortest. The feature vector of the key point is recorded as For example, given an instance attention map A I , from A I K points are uniformly sampled from the high confidence region of as the initialization of key points. The features of these key points ψ k Initialized to Based on these initialized key points, the instance attention map A is transformed into I Divided into component attention graphs
[0107] in, Represents the image block token φ i,j and key points ψ k The cosine similarity between .
[0108] Since keypoints are randomly initialized, they are not sufficient to represent the components of the object. We can learn from this by shifting keypoints in the feature space to find stable extreme points to represent the components of the instance object.
[0109] First, the token φ of each image block is calculated by the following formula (3): i,j Calculate a feature density weight ω:
[0110] Among them, β k is an adaptive bandwidth, as shown in the following formula (4), β k is defined as:
[0111] Among them, β k The value of ψ k The density of the surrounding feature distribution, when ψ kWhen the surrounding features are more densely distributed, β k The value of is larger. α is a temperature coefficient. It can be seen that ω represents the feature density around the key point. By weighting ω(·), the distance from the key point ψ k Near feature φ i,j It will make a greater contribution in the process of migration. Based on the weights defined above, as shown in the following formula (5), the key point ψ k It can be expressed as:
[0112] Among them, only when hour, The value of is 1, otherwise The value of is 0.
[0113] Finally, when the key point positions converge, the quantized position of the kth key point can be calculated according to the following formula (6):
[0114] Among them, formula (5) enables the key points to be moved to the high-density area in the feature space. Based on the updated key points, the component attention map can be updated by formula (2). By iteratively calculating formula (3) and formula (5) N times (N is a preset value, for example, N is set to 10 through experiments), each key point can be independently offset to the mean of the feature vector of each component. It should be noted that the embodiment of the present application does not limit the method of key point offset.
[0115] Since the keypoint migration process may cause keypoints to be mistakenly migrated to the background area or other object areas, the computing device can perform keypoint filtering, i.e., filtering out noisy keypoints and / or merging similar keypoints. In other words, keypoints that are not located in the high-confidence area of the instance attention map are removed, and then highly similar keypoints are merged.
[0116] Optionally, before the computing device divides the instance attention map corresponding to the instance object into multiple component attention maps, it also includes: removing at least one key point in the target area of the instance attention map, the target area is an area with a confidence level less than a confidence threshold; and / or merging multiple key points with a similarity higher than a similarity threshold.
[0117] The confidence threshold is set by default or is user-defined. Similarly, the similarity threshold is set by default or is user-defined. This embodiment of the present application does not limit this.
[0118] Optionally, after performing keypoint filtering, the computing device performs attention map re-estimation. That is, the computing device can estimate the position of each keypoint using the above formula (4). By using these keypoints as supervision, the image features can perceive the fine-grained semantics within the object range, and the instance attention map is re-estimated using the above formula (1).
[0119] Step 304: Determine a segmentation result of the instance object based on the multiple component attention maps corresponding to the at least one instance object.
[0120] Optionally, the computing device iteratively updates multiple component attention maps corresponding to each instance object, and finally synthesizes the instance segmentation results.
[0121] In summary, the embodiment of the present application provides an instance segmentation method based on point supervision of block estimation, which divides the instance attention map corresponding to the instance object and obtains the attention map of each component through an iterative estimation method. This method can effectively estimate the fine-grained semantics of the object and systematically alleviate the problem of semantic deviation. In addition, the embodiment of the present application also proposes a target semantic center positioning method based on attention offset, which iteratively finds the semantic center of each component and represents this center point as the component key point, thereby achieving simple and effective optimization of the component attention map.
[0122] In an illustrative example, as shown in FIG4 , for each input image, the instance segmentation method based on point supervision provided in an embodiment of the present application is used to obtain the segmentation result of the instance object, including but not limited to the following steps: first, the image features are extracted through the backbone network ViT, and each single-point supervision is converted into an instance attention map through token query; then, through the key point offset, the attention map in the feature space is re-estimated, and the key points corresponding to each component of the instance object are obtained. After obtaining the key points, the key points are used as supervision points to supervise the object mask predicted by the instance segmentation. It should be noted that the relevant details of each step can be referred to the relevant description in the above embodiment, and will not be repeated here.
[0123] Experiments were conducted on the public datasets Pascal VOC 2012, MSCOCO val2017, and MSCOCO test-dev. The experiments demonstrated that the implementation of the present invention significantly outperformed several existing methods. On the Pascal VOC 2012 dataset, as shown in Table 1, the present invention surpassed the current best method, BESTIE, by 7.7% in mAP50 (54.4% vs. 46.7%). On the MSCOCO dataset, as shown in Table 2, using ViT-S as the backbone network, the present invention surpassed the current method by 1.4% in average precision (AP) (19.1% vs. 17.7%). On the AP50 metric, the method provided by the present invention significantly surpassed Method 13 by 4.8% (38.8% vs. 34.0%). On the more challenging AP75 metric, the method provided by the present invention still surpassed Method 13 by more than 1% (17.4% vs. 16.4%). These results show that the embodiment of the present application still has strong superiority on the more challenging dataset MSCOCO. When using ViT-B as the backbone network, the method provided by the embodiment of the present application further achieves an AP value of 21.1%. Among them, F, I, and P respectively represent the supervision used during the training process: full supervision (mask supervision), image category supervision, and point supervision.
[0124] Table 1
[0125] Table 2
[0126] In summary, the point-supervised instance segmentation method provided by the embodiments of the present application effectively improves the internal feature correlation of the target to be segmented, thereby making the segmentation accuracy more accurate, and the results are significantly improved compared to the baseline (for example, 8.8%). In addition, the method provided by the embodiments of the present application makes component segmentation more accurate, effectively improving the feature similarity of each pixel point within the component and reducing the similarity between components.
[0127] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0128] Please refer to Figure 5, which shows a block diagram of an apparatus for instance segmentation based on point supervision according to an exemplary embodiment of the present application. The apparatus can be implemented as all or part of a computing device through software, hardware, or a combination of both. The apparatus may include: an acquisition unit 510, a first determination unit 520, a segmentation unit 530, and a second determination unit 540.
[0129] An acquisition unit 510 is configured to acquire a target image, where the target image includes n instance objects, where n is a positive integer;
[0130] A first determining unit 520 is configured to determine an instance attention map corresponding to each of the n instance objects;
[0131] a dividing unit 530 configured to divide, for at least one instance object, an instance attention map corresponding to the instance object into a plurality of component attention maps, where the plurality of component attention maps indicate maximum similarity between image features of the instance attention map and key point features of semantic components of the instance object;
[0132] The second determining unit 540 is configured to determine a segmentation result of the instance object based on multiple component attention maps corresponding to at least one instance object.
[0133] In a possible implementation, the first determining unit 520 is further configured to:
[0134] For at least one instance object, an instance attention map corresponding to the instance object is determined based on the image block token and a preset reference token, where the image block token indicates the image features of the image block of the target image, and the instance attention map indicates the similarity between the image block token and the reference token.
[0135] In another possible implementation, the first determining unit 520 is further configured to:
[0136] Determine the instance features and background features corresponding to the instance object based on the correlation between the image block token and the preset reference token;
[0137] According to the instance features, background features, instance threshold and background threshold, the instance attention map corresponding to the instance object is determined.
[0138] In another possible implementation, the dividing unit 530 is further configured to:
[0139] Randomly initialize multiple key points in the instance attention map corresponding to the instance object;
[0140] According to multiple key points, the instance attention map is divided into multiple component attention maps, and the multiple component attention maps correspond one-to-one to the multiple key points;
[0141] Update the position of the corresponding key point according to the feature density of each component attention map;
[0142] Re-divide the attention maps of multiple components according to the updated multiple key points;
[0143] The steps of updating the positions of the corresponding key points according to the feature density of each component attention map and re-dividing the multiple component attention maps according to the updated multiple key points are performed in an iterative manner. After the iteration is completed, the re-divided multiple component attention maps are obtained.
[0144] In another possible implementation, the dividing unit 530 is further configured to:
[0145] For each component attention map, determining a feature density weight corresponding to each of a plurality of image block tokens of the component attention map, where the feature density weight indicates a feature density of the image block token;
[0146] According to the feature density weights corresponding to multiple image block tokens, the positions of the key points corresponding to the component attention map are updated.
[0147] In another possible implementation, key points are independently shifted to the mean of the feature vectors of the corresponding semantic components.
[0148] In another possible implementation, the device further includes: a key point filtering unit; the key point filtering unit is configured to:
[0149] Removing at least one key point in a target region of the instance attention map, where the target region is a region whose confidence is less than a confidence threshold; and / or,
[0150] Merge multiple key points whose similarity is higher than the similarity threshold.
[0151] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0152] An embodiment of the present application provides an instance segmentation device based on point supervision, the device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the method performed by the computing device in each of the above embodiments when executing the instructions.
[0153] An embodiment of the present application provides a non-volatile computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the methods performed by the computing device in the above-mentioned various embodiments are implemented.
[0154] An embodiment of the present application provides a computer program product, which includes computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a computing device, a processor in the computing device executes the methods performed by the computing device in the above-mentioned embodiments.
[0155] A computer-readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof.
[0156] The computer-readable program instructions or code described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0157] The computer program instructions for performing the operations of the present application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, by utilizing the state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions, thereby implementing various aspects of the present application.
[0158] Various aspects of the present application are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0159] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0160] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0161] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and the part for the module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be performed substantially in parallel, and they can sometimes also be performed in the opposite order, depending on the function involved.
[0162] It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by hardware (such as a circuit or ASIC (Application Specific Integrated Circuit)) that performs the corresponding function or action, or can be implemented by a combination of hardware and software, such as firmware.
[0163] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art can understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0164] The embodiments of the present application have been described above. The above description is illustrative and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.
Claims
1. A point-supervised instance segmentation method, It is characterized in that The method comprises: Acquire a target image, wherein the target image includes n instance objects, where n is a positive integer; Determine an instance attention map corresponding to each of the n instance objects; For at least one of the instance objects, dividing the instance attention map corresponding to the instance object into a plurality of component attention maps, wherein the plurality of component attention maps indicate a maximum similarity between an image feature of the instance attention map and key point features of each semantic component of the instance object; Determine a segmentation result of the instance object according to the multiple component attention maps corresponding to at least one of the instance objects.
2. The method according to claim 1, It is characterized in that The determining the instance attention maps corresponding to the n instance objects respectively includes: For at least one of the instance objects, the instance attention map corresponding to the instance object is determined based on an image block token and a preset reference token, wherein the image block token indicates an image feature of an image block of the target image, and the instance attention map indicates a similarity between the image block token and the reference token.
3. The method according to claim 2, It is characterized in that The determining, according to the image block token and the preset reference token, the instance attention map corresponding to the instance object comprises: Determining instance features and background features corresponding to the instance object according to the correlation between the image block token and the preset reference token; The instance attention map corresponding to the instance object is determined according to the instance feature, the background feature, the instance threshold and the background threshold.
4. The method according to any one of claims 1 to 3, It is characterized in that The step of dividing the instance attention map corresponding to the instance object into a plurality of component attention maps comprises: Randomly initialize a plurality of key points in the instance attention map corresponding to the instance object; According to the multiple key points, the instance attention map is divided into the multiple component attention maps, and the multiple component attention maps correspond to the multiple key points one by one; Update the position of the corresponding key point according to the feature density of each component attention map; Re-dividing the plurality of component attention maps according to the updated plurality of key points; The steps of updating the positions of the key points corresponding to the feature densities of the component attention maps in an iterative manner and re-dividing the multiple component attention maps according to the updated multiple key points are performed, and the re-divided multiple component attention maps are obtained after the iteration is completed.
5. The method according to claim 4, It is characterized in that The updating of the position of the corresponding key point according to the feature density of each component attention map includes: For each of the component attention maps, determining a feature density weight corresponding to each of a plurality of image block tokens of the component attention map, wherein the feature density weight indicates a feature density of the image block token; According to the feature density weights corresponding to each of the multiple image block tokens, the positions of the key points corresponding to the component attention map are updated.
6. The method according to claim 5, It is characterized in that The key points are independently shifted to the mean of the feature vectors of the corresponding semantic components.
7. The method according to any one of claims 4 to 6, It is characterized in that Before dividing the instance attention map corresponding to the instance object into a plurality of component attention maps, the method further includes: Removing at least one key point in a target area of the instance attention map, wherein the target area is an area whose confidence is less than a confidence threshold; and / or, Merge multiple key points whose similarity is higher than the similarity threshold.
8. A point-supervised instance segmentation device, It is characterized in that The device comprises: An acquisition unit, configured to acquire a target image, wherein the target image includes n instance objects, where n is a positive integer; A first determining unit, configured to determine an instance attention map corresponding to each of the n instance objects; a dividing unit, configured to divide, for at least one of the instance objects, the instance attention map corresponding to the instance object into a plurality of component attention maps, wherein the plurality of component attention maps indicate a maximum similarity between an image feature of the instance attention map and key point features of each semantic component of the instance object; The second determining unit is used to determine the segmentation result of the instance object according to the multiple component attention maps corresponding to at least one of the instance objects.
9. A point-supervised instance segmentation device, It is characterized in that The device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method according to any one of claims 1 to 7 when executing the instructions.
10. A non-volatile computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, It is characterized in that When the computer readable code is executed in a computing device, a processor in the computing device executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Object attention mining method and system based on local-to-global knowledge migration
CN114913321A
Instance segmentation method and device based on point supervision and storage medium
CN116503595A
Segmentation using attention-weighted loss and discriminative feature learning
US11450008B1
Weakly Supervised Image Segmentation Via Curriculum Learning
US20210027098A1
Method and system for improved attention map guidance for visual recognition in images
WO2021194490A1
Cited By
Zero sample object instance segmentation system and method in robot environment
CN119784778A
Target detection method and device based on registration instance segmentation, equipment and medium
CN121121162A
