Crowd instance segmentation method and system based on mask optimization and reinforcement point selection

By using a crowd instance segmentation method that optimizes masking and enhances point selection, we have solved the problems of lack of individual information and poor segmentation results in traditional methods, and achieved high-precision crowd instance segmentation in extremely crowded scenarios.

CN122336281APending Publication Date: 2026-07-03HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
Filing Date
2026-04-01
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Traditional crowd counting methods cannot obtain instance-level information about individuals in the crowd, density maps lack a direct correspondence with location coordinates, and large-scale visual models do not perform well in segmentation in extremely crowded scenarios.

Method used

A crowd instance segmentation method based on mask optimization and enhanced point selection is adopted. By optimizing the point-to-mask in dense areas, sampling the preliminary predicted points, comparing them with the real mask annotations, selecting the highest-scoring predicted mask segmentation result, and training the point selection network to improve the segmentation accuracy.

Benefits of technology

In situations with dense crowds and severe occlusion, it significantly improves the accuracy of individual segmentation and the actual shape conformity of the segmentation mask, thereby enhancing the precision of crowd instance segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122336281A_ABST
    Figure CN122336281A_ABST
Patent Text Reader

Abstract

This invention relates to the field of crowd instance segmentation technology, and provides a crowd instance segmentation method and system based on mask optimization and enhanced point selection. The method includes: performing a dense region point-to-mask optimization step on the current crowd image based on the location coordinates of the individuals to be segmented in the current crowd image and the image segmentation basic model, to obtain a predicted mask segmentation result; processing the predicted mask segmentation result using a crowd counting model to obtain preliminary predicted points; sampling the preliminary predicted points and combining the sampled points with their corresponding preliminary predicted points to form a new set of predicted points; performing the dense region point-to-mask optimization step again on each set of new predicted points for segmentation; assigning the highest score to the predicted point in each set whose predicted mask is closest to the real mask; selecting the highest-scoring predicted mask segmentation result from each set; and then training the image segmentation basic model to obtain a trained image segmentation model, which can improve the accuracy of crowd instance segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of crowd instance segmentation technology, and in particular to a crowd instance segmentation method and system based on mask optimization and reinforcement point selection. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Instance segmentation has garnered increasing attention due to its broad application potential in fields such as surveillance, traffic management, and commerce. Traditional crowd analysis methods often employ crowd counting models. The density map predicted by these models reveals the distribution of the crowd, while the location coordinates predicted indicate the position of individuals within the crowd; both can predict the number of individuals in the crowd. However, crowd counting methods fail to obtain instance-level information about individuals within the crowd, and the resulting density map and location coordinates lack a direct, physically meaningful correspondence. Furthermore, the ground truth point annotations commonly found in traditional datasets do not contain fine-grained information about individuals, and the limited number of box annotations lacks accuracy in extremely crowded areas.

[0004] The emergence of large-scale visual models has provided new methods for instance detection and segmentation. However, in extremely complex scenes such as dense crowds, problems such as mutual occlusion between individuals or the small size of human heads making it difficult to distinguish them from the background mean that directly using large-scale visual models for crowd segmentation on crowd datasets does not yield ideal results. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a crowd instance segmentation method and system based on mask optimization and enhanced point selection, which can improve the accuracy of crowd instance segmentation.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a crowd instance segmentation method based on mask optimization and reinforcement point selection.

[0007] In one or more embodiments, a crowd instance segmentation method based on mask optimization and reinforcement point selection is provided, including: Based on the location coordinates of the individuals to be segmented in the current crowd image and the basic image segmentation model, a dense region point-to-mask optimization step is performed on the current crowd image to obtain the predicted mask segmentation result. The predicted mask segmentation results are processed using a crowd counting model to obtain preliminary predicted points; Sample the preliminary prediction points and combine the sampled points with their corresponding preliminary prediction points to form a new set of prediction points; For each group of new prediction points, the dense region point-to-mask optimization step is performed again to segment them, and the results are compared with the actual mask annotation. The prediction point whose segmented prediction mask is closest to the actual mask in each group is assigned the highest score, and the prediction mask segmentation result with the highest score in each group is selected. The point selection network is trained based on the highest score prediction mask segmentation results of each group to obtain a trained point selection network, which is then used to select the optimal segmentation prediction point for each group of predicted points obtained after sampling to perform crowd instance segmentation.

[0008] As one implementation method, the point-to-mask optimization process for dense regions is as follows: The coordinates of the individuals to be segmented in the current crowd image are used as a cue and input together with the current crowd image into the image segmentation model to obtain the preliminary segmentation mask of the individuals in the crowd; Based on the location coordinates of each individual in the crowd, calculate the maximum circle of the possible area where the segmentation mask may be located, such that the maximum circle restricts each segmentation mask to contain one and only one individual. Then, determine the optimized mask segmentation result, i.e., the predicted mask segmentation result, by taking the intersection of the maximum circle and the initial segmentation mask.

[0009] In one implementation, if the intersection of the largest circle and the initial segmentation mask is non-empty, then the intersection is taken as the final mask segmentation result.

[0010] In one implementation, if the intersection of the maximum circle and the initial segmentation mask is empty, the maximum circle is directly used as the final mask segmentation result.

[0011] As one implementation method, the crowd counting model is trained using a loss function based on real mask supervision.

[0012] As one implementation method, the loss function used to train the point selection network is the GRPO loss function.

[0013] A second aspect of the present invention provides a crowd instance segmentation system based on mask optimization and enhanced point selection.

[0014] In one or more embodiments, a crowd instance segmentation system based on mask optimization and reinforcement point selection includes: The mask optimization module is used to perform a dense region point-to-mask optimization step on the current crowd image based on the location coordinates of the individuals to be segmented in the current crowd image and the basic image segmentation model, so as to obtain the predicted mask segmentation result. The preliminary prediction module is used to process the predicted mask segmentation results using a crowd counting model to obtain preliminary prediction points; The prediction point sampling module is used to sample the preliminary prediction points and combine the sampled points with their corresponding preliminary prediction points to form a new set of prediction points. The mask segmentation and filtering module is used to perform the dense region point-to-mask optimization step again on each group of new prediction points to segment them, and compare them with the real mask annotation. The prediction point whose predicted mask is closest to the real mask in each group is assigned the highest score, and the prediction mask segmentation result with the highest score in each group is filtered out. The point selection network training module is used to train the point selection network based on the prediction mask segmentation results of the highest scores in each group, so as to obtain a trained point selection network. This network is then used to select the optimal segmentation prediction point for each group of predicted points obtained after sampling to perform crowd instance segmentation.

[0015] A third aspect of the present invention provides a computer-readable storage medium.

[0016] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the crowd instance segmentation method based on mask optimization and reinforcement point selection as described above.

[0017] A fourth aspect of the present invention provides an electronic device.

[0018] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the crowd instance segmentation method based on mask optimization and reinforcement point selection as described above.

[0019] A fifth aspect of the present invention provides an electronic device.

[0020] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps in the crowd instance segmentation method based on mask optimization and reinforcement point selection as described above.

[0021] Compared with the prior art, the beneficial effects of the present invention are: This invention considers the location coordinates of individuals to be segmented in a current crowd image. Combining a basic image segmentation model, it performs a dense region point-to-mask optimization step on the current crowd image to obtain preliminary predicted points. These preliminary predicted points are then sampled to form a new set of predicted points. The dense region point-to-mask optimization step is performed again for segmentation, and the results are compared with the actual mask annotations. The highest-scoring predicted mask segmentation results from each group are selected, and the point selection network is then trained to improve the accuracy of the image segmentation model for crowd instance segmentation in crowd images. Attached Figure Description

[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0023] Figure 1 This is a flowchart of the crowd instance segmentation method based on mask optimization and enhancement point selection according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the crowd instance segmentation system based on mask optimization and enhancement point selection according to an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0025] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0026] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0027] Figure 1 A schematic diagram of the crowd instance segmentation method based on mask optimization and enhancement point selection according to an embodiment of the present invention is provided. Figure 1 The crowd instance segmentation method based on mask optimization and reinforcement point selection in this embodiment may include the following steps S101 to S105.

[0028] The specific implementation process of steps S101 to S105 is as follows: Step S101: Based on the location coordinates of the individuals to be segmented in the current crowd image and the basic image segmentation model, perform a dense region point-to-mask optimization step on the current crowd image to obtain the predicted mask segmentation result; The process of optimizing the point-to-mask method for dense regions is as follows: The coordinates of the individuals to be segmented in the current crowd image are used as a cue and input together with the current crowd image into the image segmentation model to obtain the preliminary segmentation mask of the individuals in the crowd; Based on the location coordinates of each individual in the crowd, calculate the largest circle of the possible area where the segmentation mask may be located, such that the largest circle restricts each segmentation mask to contain one and only one individual. Then, determine the optimized mask segmentation result, i.e. the predicted mask segmentation result, based on the intersection of the large circle and the initial segmentation mask.

[0029] In this embodiment, the Nearest Neighbor Exclusive Circle (NNEC) algorithm is used to constrain and limit the segmentation mask. Specifically, it is implemented as a set of location coordinates of n individuals in the crowd. Calculate the largest circle in the region where the mask may be located, where the radius of the largest circle is... Satisfy the following formula:

[0030] in, and Set of position coordinates The elements in the array have indices i and j as the corresponding individuals.

[0031] By using the maximum circle constraint that each segmentation mask contains exactly one individual, the one-to-one correspondence between the final mask and the individual is guaranteed.

[0032] If the intersection of the largest circle and the initial segmentation mask is non-empty, then the intersection is taken as the final mask segmentation result.

[0033] If the intersection of the maximum circle and the initial segmentation mask is empty, then the maximum circle is directly used as the final mask segmentation result.

[0034] Step S102: Process the predicted mask segmentation results using a crowd counting model to obtain preliminary predicted points; This paper optimizes crowd counting models (such as the PET model) based on point coordinate prediction. The optimized model is trained using a loss function supervised by a real mask to further improve the accuracy of predicted point coordinates. The formula for the loss function supervised by a mask is shown below:

[0035] in These represent the number of predicted points and the number of actual points, respectively. The definition is as follows:

[0036] in This represents the cost matrix between corresponding pixels. Represents the actual mask area, when and When two points lie in the corresponding mask, the cost is the Euclidean distance between them. Otherwise .

[0037]

[0038] in Representative prediction point Is it consistent with reality? A successful pairing is indicated by a value of 1 when a match is successful and 0 otherwise. This loss function uses the region containing the true mask to match predicted points with true points, and continuously reduces the distance between paired predicted points and true points, thereby obtaining more accurate predicted points.

[0039] Step S103: Sample the preliminary prediction points and combine the sampled points with their corresponding preliminary prediction points to form a new set of prediction points; For example, the obtained preliminary prediction points are sampled, and the sampled points are combined with the corresponding preliminary prediction points to form a new set of prediction points. ; This represents the number of prediction points within the new prediction point.

[0040] Step S104: Perform the dense region point-to-mask optimization step again for each group of new prediction points to segment them, and compare them with the real mask annotation. Assign the highest score to the prediction point in each group whose predicted mask is closest to the real mask, and select the prediction mask segmentation result with the highest score in each group. Step S105: Train the point selection network based on the prediction mask segmentation results of the highest scores in each group to obtain the trained point selection network, and use it to select the optimal segmentation prediction point for each group of predicted points obtained after sampling to perform crowd instance segmentation.

[0041] All new predicted points are fed into the point selection network, which then scores each predicted point in each group. A reward function is set up: each group of new predicted points is segmented and compared with the actual mask annotation. The predicted point in each group whose segmented predicted mask is closest to the actual mask is assigned the highest score. GRPO Loss is used to continuously supervise the training of the point selection network, enabling it to select the best-performing points in each group of predicted points. The specific calculation formula for the GRPO Loss function is as follows:

[0042] in The number of groups of predicted points obtained. The score given by the point selection network to the predicted points in each group. The score is the best-scoring prediction point in each group of prediction points calculated by the reward function; c is the c-th prediction point within the new prediction point; subscript The definition is as follows: ; in This refers to the score that the reward function assigns to the predicted points in each group based on the result of the segmentation mask; This means finding the optimal prediction point within the new prediction points that maximizes the score of the reward function.

[0043] Extensive experiments have demonstrated that this invention achieves better segmentation results for individuals compared to existing segmentation models (such as SAM, FastSAM, and CrowdSAM) in extreme cases involving dense crowds and occlusion. Furthermore, the individual segmentation mask obtained using this method more closely matches the actual shape of an individual's head. The results tested on the ShanghaiTech partA crowd counting dataset are shown in Table 1.

[0044] Table 1. Results of tests on the ShanghaiTech partA dataset for crowd counting.

[0045] IoU (Intersection over Union) describes the degree of overlap between the predicted and actual results. Precision, Recall, and F1 score are evaluation metrics calculated from the confusion matrix. The specific calculation formulas are as follows:

[0046] Where TP represents the number of pixels correctly segmented into the target region, FP represents the number of pixels where the background was incorrectly segmented into the target region, and FN represents the number of pixels where the target region was incorrectly segmented into the background.

[0047] Furthermore, the model of this invention segments individuals within the crowd based on the original point labels in the dataset, and then obtains accurate mask labels through manual correction. We designed a loss function based on real mask supervision and applied it to existing traditional crowd counting models. Extensive experiments have demonstrated that the mask-supervised loss function can improve the accuracy of crowd counting to a certain extent. Table 2 shows the specific results of the experimental comparison of point-supervised and mask-supervised loss functions based on the CLIP-EBC model, PET model, and ZIP model on the ShanghaiTechpartA dataset.

[0048] Table 2. Specific results of the experimental comparison of each model on the ShanghaiTech partA dataset.

[0049] MAE (Mean Absolute Error) and RMSE (Root Mean Square Error) are the two terms.

[0050] like Figure 2 As shown, the crowd instance segmentation system based on mask optimization and enhanced point selection provided in this embodiment of the invention can be implemented in software. The crowd instance segmentation system based on mask optimization and enhanced point selection includes the following software modules: mask optimization module 201, preliminary prediction module 202, prediction point sampling module 203, mask segmentation filtering module 204, and point selection network training module 205.

[0051] The following section introduces the functions of each software module in the crowd instance segmentation system based on mask optimization and enhancement point selection: The mask optimization module 201 is used to perform a dense region point-to-mask optimization step on the current crowd image based on the location coordinates of the individuals to be segmented in the current crowd image and the image segmentation basic model, so as to obtain the predicted mask segmentation result. The preliminary prediction module 202 is used to process the prediction mask segmentation results using a crowd counting model to obtain preliminary prediction points; The prediction point sampling module 203 is used to sample the preliminary prediction points and combine the sampled points with their corresponding preliminary prediction points to form a new set of prediction points; The mask segmentation and filtering module 204 is used to perform the dense region point-to-mask optimization step again on each group of new prediction points to segment them, and compare them with the real mask annotation. The prediction point whose predicted mask is closest to the real mask in each group is assigned the highest score, and the highest score prediction mask segmentation result of each group is filtered out. The point selection network training module 205 is used to train the point selection network based on the prediction mask segmentation results of the highest scores in each group, so as to obtain a trained point selection network, which is then used to select the optimal segmentation prediction point for each group of predicted points obtained after sampling for crowd instance segmentation.

[0052] It should be noted that each module in the crowd instance segmentation system based on mask optimization and reinforcement point selection in this embodiment corresponds one-to-one with each step in the crowd instance segmentation method based on mask optimization and reinforcement point selection in the above embodiment, and their specific implementation processes are the same, so they will not be repeated here.

[0053] The structure of the electronic device according to an embodiment of the present invention will be described in detail below. Figure 3 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention. It can be understood that... Figure 3 The diagram shows only an exemplary structure of the electronic device, not the entire structure. Some or all of the structures shown may be implemented as needed.

[0054] The electronic device provided in this embodiment of the invention includes: at least one processor 301, a memory 302, a user interface 303, and at least one network interface 304. The various components in the crowd instance segmentation system based on mask optimization and enhancement point selection are coupled together via a bus system 305. It can be understood that the bus system 305 is used to implement communication between these components. In addition to a data bus, the bus system 305 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 3 The general designated all buses as Bus System 305.

[0055] The user interface 303 may include a monitor, keyboard, mouse, trackball, click wheel, buttons, touchpad, or touch screen.

[0056] It is understood that memory 302 can be volatile memory or non-volatile memory, or both. In this embodiment of the invention, memory 302 is capable of storing data to support the operation of the terminal. Examples of this data include any computer programs used to operate on the terminal, such as operating systems and applications. The operating system includes various system programs, such as framework layers, core library layers, driver layers, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications.

[0057] In some embodiments, the crowd instance segmentation system based on mask optimization and enhancement point selection provided in this invention can be implemented using a combination of hardware and software. For example, the crowd instance segmentation system based on mask optimization and enhancement point selection provided in this invention can be a processor in the form of a hardware decoding processor, programmed to execute the crowd instance segmentation method based on mask optimization and enhancement point selection provided in this invention. For instance, the processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0058] As an example, processor 301 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0059] As an example of the hardware implementation of the crowd instance segmentation system based on mask optimization and enhancement point selection provided in this embodiment of the invention, the device provided in this embodiment of the invention can be directly executed by a processor 301 in the form of a hardware decoding processor. For example, it can be executed by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the crowd instance segmentation method based on mask optimization and enhancement point selection provided in this embodiment of the invention.

[0060] The memory 302 in this embodiment of the invention is used to store various types of data to support the operation of a crowd instance segmentation system based on mask optimization and reinforcement point selection, or to store data for execution. Figure 1 The program code for the method shown. Examples of this data include: any executable instructions for operating on a crowd instance segmentation system based on mask optimization and reinforcement point selection, such as executable instructions that can be included in the executable instructions to implement the crowd instance segmentation method based on mask optimization and reinforcement point selection of embodiments of the present invention.

[0061] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including functions for executing... Figure 1 The program code for the method shown. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by the central processing unit, it performs the various functions defined in the apparatus of this application.

[0062] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0063] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A crowd instance segmentation method based on mask optimization and reinforcement point selection, characterized in that, include: Based on the location coordinates of the individuals to be segmented in the current crowd image and the basic image segmentation model, a dense region point-to-mask optimization step is performed on the current crowd image to obtain the predicted mask segmentation result. The predicted mask segmentation results are processed using a crowd counting model to obtain preliminary predicted points; Sample the preliminary prediction points and combine the sampled points with their corresponding preliminary prediction points to form a new set of prediction points; For each group of new prediction points, the dense region point-to-mask optimization step is performed again to segment them, and the results are compared with the actual mask annotation. The prediction point whose segmented prediction mask is closest to the actual mask in each group is assigned the highest score, and the prediction mask segmentation result with the highest score in each group is selected. The point selection network is trained based on the highest score prediction mask segmentation results of each group to obtain a trained point selection network, which is then used to select the optimal segmentation prediction point for each group of predicted points obtained after sampling to perform crowd instance segmentation.

2. The crowd instance segmentation method based on mask optimization and reinforcement point selection as described in claim 1, characterized in that, The process of optimizing point-to-mask mapping in dense regions is as follows: The coordinates of the individuals to be segmented in the current crowd image are used as a cue and input together with the current crowd image into the image segmentation model to obtain the preliminary segmentation mask of the individuals in the crowd; Based on the location coordinates of each individual in the crowd, calculate the maximum circle of the possible area where the segmentation mask may be located, such that the maximum circle restricts each segmentation mask to contain one and only one individual. Then, determine the optimized mask segmentation result, i.e., the predicted mask segmentation result, by taking the intersection of the maximum circle and the initial segmentation mask.

3. The crowd instance segmentation method based on mask optimization and reinforcement point selection as described in claim 2, characterized in that, If the intersection of the largest circle and the initial segmentation mask is non-empty, then the intersection is taken as the final mask segmentation result.

4. The crowd instance segmentation method based on mask optimization and reinforcement point selection as described in claim 2, characterized in that, If the intersection of the maximum circle and the initial segmentation mask is empty, then the maximum circle is directly used as the final mask segmentation result.

5. The crowd instance segmentation method based on mask optimization and reinforcement point selection as described in claim 1, characterized in that, The crowd counting model is trained using a loss function supervised by real masks.

6. The crowd instance segmentation method based on mask optimization and reinforcement point selection as described in claim 1, characterized in that, The loss function used for training the point selection network is the GRPO loss function.

7. A crowd instance segmentation system based on mask optimization and reinforcement point selection, characterized in that, The crowd instance segmentation method based on mask optimization and reinforcement point selection as described in any one of claims 1-6 includes: The mask optimization module is used to perform a dense region point-to-mask optimization step on the current crowd image based on the location coordinates of the individuals to be segmented in the current crowd image and the basic image segmentation model, so as to obtain the predicted mask segmentation result. The preliminary prediction module is used to process the predicted mask segmentation results using a crowd counting model to obtain preliminary prediction points; The prediction point sampling module is used to sample the preliminary prediction points and combine the sampled points with their corresponding preliminary prediction points to form a new set of prediction points. The mask segmentation and filtering module is used to perform the dense region point-to-mask optimization step again on each group of new prediction points to segment them, and compare them with the real mask annotation. The prediction point whose predicted mask is closest to the real mask in each group is assigned the highest score, and the prediction mask segmentation result with the highest score in each group is filtered out. The point selection network training module is used to train the point selection network based on the prediction mask segmentation results of the highest scores in each group, so as to obtain a trained point selection network. This network is then used to select the optimal segmentation prediction point for each group of predicted points obtained after sampling to perform crowd instance segmentation.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the crowd instance segmentation method based on mask optimization and reinforcement point selection as described in any one of claims 1-6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the crowd instance segmentation method based on mask optimization and reinforcement point selection as described in any one of claims 1-6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps in the crowd instance segmentation method based on mask optimization and reinforcement point selection as described in any one of claims 1-6.