Image segmentation method and device, electronic equipment and storage medium

By generating and streamlining the mask in the image, the problem of difficulty in segmenting non-subject entities in the prior art is solved, flexible segmentation and special effects addition of images are achieved, and the artistic quality and user experience of image processing are improved.

CN118918127APending Publication Date: 2024-11-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411096083.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The prior art is difficult to freely select and segment non-subject entity areas in images, limiting the flexibility and artistic nature of image special effects addition.

Method used

By acquiring the original image, multiple masks and their confidence values ​​are generated, and the image segmentation results are obtained based on the overlap relationship and confidence values ​​between the masks, and the segmentation of the image subject and non-subject entities are achieved.

Benefits of technology

Free segmentation of subjects and non-subject entities in the image is realized, which improves the flexibility and artistry of image processing, and enhances user selection and editing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918127A_ABST
    Figure CN118918127A_ABST
Patent Text Reader

Abstract

The invention relates to an image segmentation method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an original image; the original image comprises a plurality of entities; based on the original image, a plurality of first masks and confidence values of the first masks are obtained, and the first masks correspond to entities; the confidence value of the first mask is used for reflecting the credibility that the entity exists in the first mask indication area; based on the overlapping relationship between different first masks and the confidence values of the first masks, carrying out simplification processing on the plurality of first masks to obtain a simplification processing result; and based on the simplified processing result, segmenting the original image, and obtaining and outputting an image segmentation result. The essence of the image segmentation method is that a segmentation method is provided, the segmentation method is adopted to segment the main body entity in the image, but segment the main body entity and the non-main body entity of the image, so that a user can freely select areas in the image according to own needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to an image segmentation method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of digital image technology, people have put forward higher requirements for the visual effects of images. In order to increase the appreciation and artistry of images, adding special effects to images has become an important technical means. Special effects can bring richer visual effects to images, making them more attractive and valuable to watch.

[0003] However, in practice, in order to add certain features, users want to freely select areas in the image for adding special effects, rather than just selecting areas occupied by the main entity in the image for adding special effects. Summary of the invention

[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides an image segmentation method, device, electronic device and storage medium.

[0005] In a first aspect, the present disclosure provides an image segmentation method, comprising:

[0006] Acquire an original image; the original image includes multiple entities;

[0007] Based on the original image, a plurality of first masks and confidence values ​​of the first masks are obtained, wherein the first masks correspond to the entity; the confidence values ​​of the first masks are used to reflect the credibility of the existence of the entity in the area indicated by the first mask;

[0008] Based on the overlapping relationship between different first masks and the confidence values ​​of the first masks, the plurality of first masks are simplified to obtain a simplified processing result;

[0009] Based on the simplified processing result, the original image is segmented to obtain and output an image segmentation result.

[0010] In a second aspect, the present disclosure further provides an image segmentation device, comprising: an acquisition model, used to acquire an original image; the original image comprises a plurality of entities;

[0011] A segmentation model, used to obtain a plurality of first masks and confidence values ​​of the first masks based on the original image, wherein the first masks correspond to the entity; the confidence values ​​of the first masks are used to reflect the credibility of the existence of the entity in the area indicated by the first mask;

[0012] A simplified model, used for performing a simplified processing on the plurality of first masks based on the overlapping relationship between different first masks and the confidence values ​​of the first masks to obtain a simplified processing result;

[0013] The result output model is used to segment the original image based on the simplified processing result to obtain an image segmentation result.

[0014] In a third aspect, the present disclosure further provides an electronic device, the electronic device comprising:

[0015] one or more processors;

[0016] A storage device for storing one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the image segmentation method as described above.

[0018] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image segmentation method as described above.

[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0020] In the technical solution provided by the embodiment of the present disclosure, a plurality of first masks and confidence values ​​of the first masks are obtained by setting based on the original image, wherein the first mask corresponds to the entity; the confidence value of the first mask is used to reflect the credibility of the existence of the entity in the area indicated by the first mask; based on the overlapping relationship between different first masks and the confidence value of the first mask, the plurality of first masks are simplified to obtain a simplified processing result; based on the simplified processing result, the original image is segmented to obtain and output the image segmentation result; its essence is to provide a segmentation method, which is used not only to segment the main entity in the image, but also to segment both the main entity and the non-main entity of the image, so that the user can freely select the area in the image according to his own needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0023] Figure 1 A flowchart of an image segmentation method provided by an embodiment of the present disclosure;

[0024] Figure 2 A schematic diagram of an original image provided by an embodiment of the present disclosure;

[0025] Figure 3 and Figure 4 Respectively Figure 2 The mask corresponding to the person entity in ;

[0026] Figure 5 For Figure 2 A schematic diagram of a corresponding index map;

[0027] Figure 6 A flowchart of a method for implementing S130 provided in an embodiment of the present disclosure;

[0028] Figure 7 A schematic diagram of a simplified processing process provided by an embodiment of the present disclosure;

[0029] Figure 8 For Figure 2 A schematic diagram of another corresponding index map;

[0030] Fig. 9 is a structural schematic diagram of an image segmentation device in an embodiment of the present disclosure;

[0031] Fig.10 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0034] Figure 1This is a flowchart of an image segmentation method provided in an embodiment of the present disclosure. This embodiment is applicable to the case where image segmentation is performed in a client. The method can be executed by an image segmentation device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device, etc. Alternatively, this embodiment is applicable to the case where image segmentation is performed in a server. The method can be executed by an image segmentation device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.

[0035] like Figure 1 As shown, the method may specifically include:

[0036] S110, obtaining an original image; the original image includes multiple entities.

[0037] The original image is the image that needs to be segmented, which can be an image taken by a user or an image downloaded from the Internet.

[0038] Entities, for example, can refer to individuals or units in the original image that have clear semantic information, are identifiable, and are countable or uncountable. They constitute the visual content of the original image through their own attribute characteristics and are the basic objects of image processing and analysis. In particular, in the task of image cutout, entities are targets that need to be accurately extracted and separated. Entities in the original image can specifically include people, buildings, trees, vehicles, and animals in the original image. For example, see Figure 2 , if the original image includes two characters, each character is an entity.

[0039] S120. Based on the original image, obtain a plurality of first masks and confidence values ​​of the first masks, wherein the first masks correspond to the entity; the confidence value of the first mask is used to reflect the credibility of the existence of the entity in the area indicated by the first mask.

[0040] In the present application, the first mask can be, for example, a binary image of the same size as the original image, in which the white area represents the location of the entity predicted by the entity segmentation model (the entity is the entity corresponding to the first mask), and the black area represents the background, non-entity area or other entity area. The confidence value of the first mask is used to reflect the degree of belief of the entity segmentation model that an entity does exist in the area indicated by the first mask. It should be noted here that the confidence value of the first mask reflects the degree of trust of the entity segmentation model in the existence of "a certain entity" in the area indicated by it rather than specifically "what type of entity". In other words, the entity segmentation model at this stage focuses on "there is an entity here" rather than "what this entity is".

[0041] For example, suppose the original image is a photo of a zoo, which contains a group of animals, including lions, zebras, giraffes, and several trees. Our goal is to identify and segment the animal entities in the image through the image segmentation model. By using the entity segmentation model to segment the original image, if a first mask is obtained that can accurately cover the outline of a lion, it means that the task of this first mask is to indicate the position of the lion in the original image. That is, the first mask corresponds to the lion. In this first mask, all pixels of the lion's body are marked as white, while the surrounding grass, other animals, and background are marked as black.

[0042] If the first mask fits the actual outline of the lion almost perfectly, without missing or mistaking the background, and has a clear boundary with other animals or objects, then the confidence value corresponding to the first mask will be very high. On the contrary, in cases where the lion and the background are similar in color, or part of the lion's body is blocked, part of the lion's body may be misjudged as the background, or the mask boundary is blurred and mixed with the surrounding environment, resulting in unclear recognition of the lion's shape, and the confidence value of the first mask will be very low.

[0043] It should also be noted that, in practice, due to the limitations of the entity segmentation model algorithm logic itself, the limitations of the entity segmentation model accuracy and the limitations of the original image quality, it may happen that one first mask corresponds to one entity, or one first mask corresponds to multiple entities.

[0044] S130 , based on the overlapping relationship between different first masks and the confidence values ​​of the first masks, simplify the multiple first masks to obtain a simplified processing result.

[0045] Different first masks have an overlapping relationship, for example, different first masks have overlapping areas. For example, if the original image includes both apples and pears, if the first mask corresponding to the apple and the first mask corresponding to the pear have an overlapping relationship, it means that the pixels in the overlapping area are attributed to both the apple and the pear.

[0046] In practice, in the original image, it is often clear which entity the pixels in the overlapping area constitute. Entity segmentation is essentially a screening mechanism that achieves the purpose of entity segmentation through entity recognition conditions. Ideally, the entity recognition conditions of different entities should be completely mutually exclusive in the effective area, so that a pixel belongs to only one first mask, and there should be no situation where different first masks have overlapping areas. However, in practice, due to the limitations of the entity segmentation model and the quality of the original image, the pixels in the overlapping area may meet the recognition conditions of different entities at the same time, resulting in the overlap of the two first masks in this area.

[0047] In practice, first masks with low confidence and first masks with overlapping relationships cannot well reflect the area occupied by the entity. Therefore, the value of such first masks is low, and the probability and significance of subsequent image processing or analysis based on these low-value first masks are low. The purpose of streamlining multiple first masks is to remove or reduce some of the low-value first masks. There are many ways to streamline multiple first masks, such as deleting low-value first masks or merging low-value first masks with other masks to improve the value of the mask.

[0048] The result of the simplification process, for example, may be a mask set, which includes first masks of relatively high value. Exemplarily, if the set consisting of all first masks obtained in S120 is the first set, and if the simplification process includes deleting first masks of lower value from the first set, the result of the simplification process is a set consisting of first masks retained in the first set after deleting first masks of lower value from the first set. For another example, if the set consisting of all first masks obtained in S120 is the first set, the first set includes four categories of first masks: first-category first masks and second-category first masks are both of lower value, and third-category first masks and fourth-category first masks are both of higher value. The simplification process includes: deleting first-category first masks, merging second-category first masks with third-category first masks, and obtaining fifth-category first masks. The result of the simplification process is a set consisting of fifth-category first masks and fourth-category first masks.

[0049] S140: Segment the original image based on the simplified processing result to obtain and output an image segmentation result.

[0050] Since the simplified processing result is a collection of masks, the essence of this step is to perform matting on the original image under the guidance of the masks in the simplified processing result, and use the matting result as the image segmentation result.

[0051] In practice, the image segmentation result may be output in the form of multiple layers; or, the image segmentation result may be output in the form of an index map.

[0052] Among them, outputting the image segmentation result in the form of multiple layers, for example, may mean that since the streamlined processing result includes multiple masks, based on each mask, the original image is segmented to obtain a sub-image, and each sub-image is output as a layer.

[0053] Outputting the image segmentation result in the form of an index map, for example, may mean that, since the streamlined processing result includes multiple masks, based on each mask, a sub-image can be obtained by segmenting the original image, all the sub-images are merged into one layer, and an index map corresponding to this layer is created, and the Alpha channel or a specific color channel of the pixels in each sub-image in the layer is set in the index map to store index values ​​with the help of the Alpha channel or the specific color channel, so that the index values ​​of pixels in different sub-images are different, and the index values ​​of pixels in the same sub-image are the same.

[0054] Figure 3 and Figure 4 Based on Figure 2 Given the original image, we obtain the first masks of the two entities. Figure 5 A schematic diagram of an index map obtained by merging two first masks into one layer.

[0055] In the above technical solution, by setting up based on the original image, multiple first masks and confidence values ​​of the first masks are obtained, and the first masks correspond to the entity; the confidence value of the first mask is used to reflect the credibility of the existence of the entity in the area indicated by the first mask; based on the overlapping relationship between different first masks and the confidence value of the first mask, the multiple first masks are simplified to obtain a simplified processing result; based on the simplified processing result, the original image is segmented to obtain and output the image segmentation result; its essence is to provide a segmentation method, which is used not only to segment the main entity in the image, but also to segment the main entity and non-main entity of the image, so that the user can freely select the area in the image according to their own needs.

[0056] In addition, the above technical solution first obtains the mask corresponding to the entity in the original image, and then evaluates and removes the first mask with lower value by streamlining the processing steps, retains the first mask with higher value, and performs the cutout under the guidance of the first mask with higher value, which can improve the overall value of the final output image segmentation result.

[0057] In the above technical solution, there are many specific implementation methods of S130, which are not limited in this application. Figure 6 , the specific implementation method of S130 includes:

[0058] S131 . Based on the confidence values ​​of the first masks, simplify the plurality of first masks to obtain an intermediate result.

[0059] The confidence value of the first mask can directly reflect the value of the first mask. This is because the confidence value of the first mask means the degree of belief of the entity segmentation model that an entity does exist in the area indicated by the first mask. In some scenarios, if the confidence value of the first mask is low, it means that the probability that the entity segmentation model "believes" that an entity does exist in the area indicated by the first mask is low, and the probability that the first mask does not correspond to any entity is high, so the value of the first mask is low. In this case, optionally, the implementation method of this step may include: determining a first target mask among multiple first masks; the confidence value of the first target mask is greater than or equal to the confidence threshold; and using the first target mask as an intermediate result.

[0060] The intermediate result may be, for example, a mask set, which includes all first masks whose confidence values ​​are greater than or equal to the confidence threshold. The essence of this step is to screen the first masks according to their confidence values.

[0061] Optionally, in another embodiment, this step may further include: based on the confidence value of the first mask, the area of ​​the first mask and the area of ​​the original image, simplifying the multiple first masks to obtain an intermediate result.

[0062] Exemplarily, based on the confidence value of the first mask, the area of ​​the first mask, and the area of ​​the original image, multiple first masks are simplified to obtain an intermediate result, which may include: determining a first target mask among multiple first masks; the confidence value of the first target mask is greater than or equal to a confidence threshold, and the ratio of the area of ​​the first target mask indication area to the area of ​​the original image is greater than or equal to a first set threshold; and using the first target mask as the intermediate result.

[0063] The first set threshold is a preset reference value used to measure whether the area indicated by the first mask is small. Limiting the first target mask as an intermediate result means that no matter whether the confidence is greater than or equal to the confidence threshold, the first mask that satisfies the condition that "the ratio of the area of ​​the indicated area to the area of ​​the original image is less than the first set threshold" will be deleted. That is, the first mask with a small indicated area will be deleted.

[0064] In practice, if the area indicated by the first mask is small, it means that it is not convenient for the user to select the area indicated by the first mask, and it also means that the probability of the user editing the area indicated by the first mask is low. Such first masks are of low value, so the first masks with small indicated areas are discarded here.

[0065] In another exemplary embodiment, based on the confidence value of the first mask, the area of ​​the first mask and the area of ​​the original image, multiple first masks are simplified to obtain an intermediate result, which may include: determining a first target mask among the multiple first masks; the confidence value of the first target mask is greater than or equal to the confidence threshold, and the ratio of the area of ​​the area indicated by the first target mask to the area of ​​the original image is greater than or equal to a first set threshold and less than or equal to a second set threshold; the second set threshold is greater than the first set threshold; and taking the first target mask as the intermediate result.

[0066] The first set threshold is a preset reference value used to measure whether the area indicated by the first mask is small. The second set threshold is a preset reference value used to measure whether the area indicated by the first mask is large. In this example, the first target mask is used as an intermediate result, which means that no matter whether the confidence is greater than or equal to the confidence threshold, the first mask that does not meet the condition that "the ratio of the area of ​​the indicated area to the area of ​​the original image is greater than or equal to the first set threshold, and less than or equal to the second set threshold" will be deleted. That is, the first mask with a smaller indicated area and the first mask with a larger indicated area are deleted.

[0067] In practice, if the area indicated by the first mask is small, it means that it is not convenient for the user to select the area indicated by the first mask, and it also often means that the user is less likely to edit the area indicated by the first mask. Such first masks are of low value, so the first masks with smaller indicated areas are discarded here.

[0068] In the scenario of merging the first masks based on the overlapping relationship between different first masks and the confidence value of the first masks, if the area of ​​the first masks involved in the merging is large, in order to avoid merging a mask with an indication area that is too large, or to avoid the situation where a mask with a larger area "swallows" a mask with a smaller area, the first mask with a larger area can be removed in advance by setting a second threshold.

[0069] S132: based on the overlapping relationship between different first masks, simplify the intermediate result to obtain a simplified result.

[0070] There are many methods for implementing this step, and this application does not limit this. Exemplarily, the implementation method of this step includes: determining the reference mask and the candidate mask in the intermediate result; the area indicated by the reference mask and the candidate mask includes a common area; based on the area of ​​the overlapping area of ​​the reference mask and the candidate mask, judging whether to use the candidate mask as a simplification object; if the judgment result is to use the candidate mask as a simplification object, based on the simplification object, the intermediate result is simplified to obtain a simplification result.

[0071] The common area can be, for example, a specific area, which is an area commonly included by two or more masks with overlapping relationships. The present application does not limit which area the common area specifically refers to. Since the intermediate result can be understood as a set of first masks after preliminary screening, "determining the reference mask and candidate masks in the intermediate result" includes two meanings: on the one hand, identifying which first masks in the intermediate result include the same area (i.e., the common area); on the other hand, determining the reference mask and candidate masks in the first masks that include the same area. Therefore, optionally, determining the reference mask and candidate masks in the intermediate result may include: determining a second mask set in the intermediate result, the second mask set including at least two second masks; the areas indicated by each second mask include the common area; and determining the reference mask and candidate masks in the second mask set.

[0072] In practice, one or more second mask groups may be determined in the intermediate result. If the common area included in the areas indicated by the second masks in the same second mask group is taken as the common area corresponding to the second mask group, different second mask groups correspond to different common areas.

[0073] The reference mask may be, for example, a mask selected as a benchmark in the second mask group. In some scenarios, only one second mask may be selected in the second mask group as a reference mask. After the reference mask is selected, all second masks in the second mask group except the reference mask are candidate masks. The reference mask may be used as a benchmark to measure the value of the candidate masks, and then determine which candidate masks need to be used as simplified objects. The simplified objects may be, for example, second masks that are screened out from the candidate masks and have a lower value and need to be deleted.

[0074] There are many specific implementation methods for "determining a reference mask and a candidate mask in the second mask group", and this application does not limit this. Exemplarily, "determining a reference mask and a candidate mask in the second mask group" may include: determining the second mask with the largest confidence value as the reference mask, and taking the remaining second masks as candidate masks; or determining the second mask with the largest indication area as the reference mask, and taking the remaining second masks as candidate masks.

[0075] There are many specific implementation methods for "simplifying the intermediate results based on the simplified objects to obtain the simplified processing results", and the present application does not limit this. Exemplarily, the specific implementation method of "simplifying the intermediate results based on the simplified objects to obtain the simplified processing results" may include: removing the simplified objects from the intermediate results to obtain the simplified processing results; or merging the simplified objects with the reference mask to obtain a third mask; removing the simplified objects and the reference mask from the intermediate results, adding the third mask to the intermediate results to obtain the simplified processing results.

[0076] Optionally, in practice, based on the overlapping relationship between different first masks, the intermediate result is streamlined to obtain a streamlined result, which may include two rounds of streamlined processing. In the first round of streamlined processing, based on the overlapping relationship between different first masks, the intermediate result is streamlined for the first time to obtain a first streamlined result. In the second round of streamlined processing, based on the overlapping relationship between different first masks, the first streamlined result is streamlined for the second time to obtain a second streamlined result. Subsequently, based on the streamlined result, an image segmentation result is obtained and output, including: based on the second streamlined result, an image segmentation result is obtained and output.

[0077] Furthermore, the first round of simplification process may include: determining a second mask set in the intermediate result, the second mask set including at least two second masks; the areas indicated by each second mask include a common area; determining the second mask with the largest confidence value as the reference mask, and taking the remaining second masks as candidate masks; based on the area of ​​the overlapping area between the reference mask and the candidate mask, determining whether to use the candidate mask as a simplification object; if the judgment result is to use the candidate mask as a simplification object, removing the simplification object from the intermediate result to obtain a simplification result.

[0078] The area of ​​the overlapped region between the reference mask and the candidate mask may be, for example, the area of ​​the intersection of the reference mask indication region and the candidate mask indication region, that is, the area of ​​the common region included in the reference mask indication region and the candidate mask.

[0079] Wherein, judging whether to use the candidate mask as a simplification object based on the area of ​​the overlapped region between the reference mask and the candidate mask, for example, may include: calculating a first ratio of each candidate mask, the first ratio being the ratio of the area of ​​the intersection of the overlapped region between the reference mask and the candidate mask to the area of ​​the union of the reference mask and the candidate mask; and using the candidate mask whose first ratio is greater than or equal to a first ratio threshold as a simplification object. The first ratio threshold is pre-set and is used as a basis for measuring whether a candidate mask is used as a simplification object. If the first ratio of a candidate mask is greater than or equal to the first ratio threshold, it means that the overlapped region area between the reference mask and the candidate mask is large, and therefore the candidate mask whose first ratio is greater than or equal to the first ratio threshold is subsequently deleted.

[0080] The second round of simplification process may, for example, include: determining a sixth mask set in the first simplification result, the sixth mask set including at least two sixth masks; the areas indicated by each sixth mask include a common area; determining the sixth mask with the largest indicated area as a reference mask, and taking the remaining sixth masks as candidate masks; judging whether to use the candidate mask as a simplification object based on the area of ​​overlap between the reference mask and the candidate mask; if the judgment result is to use the candidate mask as a simplification object, merging the simplification object with the reference mask to obtain a third mask; removing the simplification object and the reference mask from the first simplification result, adding the third mask to the first simplification result, and obtaining a second simplification result.

[0081] Among them, based on the area of ​​the overlapping area of ​​the reference mask and the candidate mask, judging whether to use the candidate mask as a simplified object may include, for example: calculating the second ratio of each candidate mask, the second ratio being the ratio of the area of ​​the intersection of the overlapping area of ​​the reference mask and the candidate mask to the area of ​​the area indicated by the candidate mask; and using the candidate mask whose second ratio is greater than or equal to the second ratio threshold as a simplified object. The second ratio threshold is pre-set and is used as a basis for measuring whether a candidate mask is used as a simplified object. If the second ratio of a candidate mask is greater than or equal to the second ratio threshold, it means that, within the allowable error range, the area indicated by the reference mask can be regarded as including most of the area indicated by the candidate mask. Therefore, the simplified object is subsequently merged with the reference mask.

[0082] In practice, merging the simplified object with the reference mask will increase the area of ​​the mask. In addition, the merger may also cause masks that originally do not have an overlapping relationship to have an overlapping relationship. Based on this, the second round of simplification processing can also be set to include: repeatedly executing the target processing step until the termination condition is reached; and taking the target simplification processing result after the last update as the second simplification processing result. Among them, the target processing step includes: determining the sixth mask set in the target simplification processing result, the sixth mask set includes at least two sixth masks; the areas indicated by each sixth mask include a common area; determining the sixth mask with the largest indicated area as the reference mask, and taking the remaining sixth masks as candidate masks; judging whether to use the candidate mask as a simplified object based on the area of ​​the overlapped area of ​​the reference mask and the candidate mask; if the judgment result is to use the candidate mask as a simplified object, merging the simplified object with the reference mask to obtain a third mask; updating the target simplification processing result, including removing the simplified object and the reference mask from the target simplification processing result, and adding the third mask to the target simplification processing result. The target simplification processing result includes all currently retained masks. When the target processing step is executed for the first time, the first reduction processing result is used as the target reduction processing result.

[0083] Figure 7 A schematic diagram of a simplified processing process is given below. Figure 7 , a simplification process under an embodiment is described in detail. Assume that based on the original image, a total of 10 first masks are obtained, namely, first mask 1 to first mask 10. The process of simplification of multiple first masks includes two stages. In the first stage, it is performed based on the confidence value, the area of ​​the first mask indication area and the area of ​​the original image, and in the second stage, it is performed based on the overlapping relationship. The second stage is divided into two rounds.

[0084] Specifically, see Figure 7 In the first stage, since the confidence value of the first mask 2 is less than the confidence threshold, the first mask 2 is deleted. Since the ratio of the area indicated by the first mask 5 to the area of ​​the original image is less than the first set threshold, the first mask 5 is deleted. Since the ratio of the area indicated by the first mask 9 to the area of ​​the original image is greater than the second set threshold, the first mask 9 is deleted. After the first stage of simplification, the first masks 1, 3, 4, 6, 7 and 8 are retained.

[0085] In the first round of simplification in the first stage, if the first masks 1, 3, 6, and 8 include common areas. The first mask with the largest confidence value among the first masks 1, 3, 6, and 8 is used as the reference mask, and it is assumed that the reference mask is the first mask 3. The first masks 1, 6, and 8 are candidate masks. Through further judgment, it is found that the first ratio of the first mask 8 is greater than the first ratio threshold, and the first mask 8 is determined to be the simplification object, and the first mask 8 is deleted. The first ratio of the first masks 1 and 6 is less than the first ratio threshold, and the first masks 1 and 6 are retained. After the second round of simplification, the first masks 1, 3, 4, 6, and 7 are retained.

[0086] In the second round of simplification in the first stage, the first mask with the largest area of ​​the indicated area is determined as the reference mask among all the currently retained first masks. If the area indicated by the first mask 1 is the largest, the first mask 1 is used as the reference mask, and the remaining first masks (i.e., first masks 3, 4, 6, and 7) are used as candidate masks, and the relationship between the second ratio of each candidate mask and the second ratio threshold is determined one by one. Assuming that the first mask 1 is used as the reference mask, the second ratio of the first mask 6 is greater than the second ratio threshold, and the first mask 6 is used as the simplification object. Subsequently, the first mask 1 and the first mask 6 are merged to obtain the third mask, and the first mask 1 and the first mask 6 are eliminated, and the third mask is retained. The third mask can also be considered as the result of updating the first mask 1. The step of determining the first mask with the largest area of ​​the indicated area from all the currently retained masks as the reference mask is performed again until the termination condition is reached.

[0087] The termination condition may, for example, be that the number of executions of the step "determining the first mask with the largest area of ​​the indicated area from all currently retained masks as the reference mask" reaches a set number threshold, or that the step "determining the first mask with the largest area of ​​the indicated area from all currently retained masks as the reference mask" is executed a preset number of times in succession without finding the first mask that can be used as the simplification object.

[0088] The above technical solution simplifies multiple first masks by setting the confidence value based on the first mask to obtain an intermediate result; based on the overlapping relationship between different first masks, the intermediate result is simplified to obtain a simplified result. Its essence is to provide a multi-level and multi-angle simplification method. It can effectively remove the first masks with lower value, thereby improving the overall value of the final output image segmentation result.

[0089] On the basis of the above technical solution, optionally, the entity includes multiple components; the method may also include: based on the original image, obtaining multiple fourth masks, the fourth masks corresponding to the components; S140 includes: based on the fourth mask, segmenting the area indicated by the mask in the streamlined processing result to obtain a fifth mask; based on the fifth mask, segmenting the original image to obtain and output the image segmentation result.

[0090] In some scenarios, an entity can be a composite object, such as a person or a car, and "parts" can refer to the components of these composite objects.

[0091] Based on the original image, a plurality of fourth masks are obtained. For example, the original image may be segmented based on the component segmentation model to obtain the plurality of fourth masks.

[0092] It should be noted that both the component segmentation model and the entity segmentation model belong to image segmentation models, which are used to segment the original image, but the dimensions of the segmentation are different. The entity segmentation model is used to segment the original image into entities. The partial segmentation model is used to segment the original image into components, which can be regarded as a further analysis of the entity. In some embodiments, the entity as a whole can be analyzed as the analysis object, such as the entity is a human body, and the component segmentation model is a human body analysis model, which can analyze the human body into a hat, gloves, glasses worn by a person, a top, pants, socks worn by a person, a person's hair, trunk skin, left leg, right leg, left hand, right hand, sleeves, etc. In other embodiments, the part of the entity can be analyzed as the analysis object, such as the entity is a human body, and the component segmentation model is a face analysis model, which can analyze the face into skin, left eyebrow, right eyebrow, left eye, right eye, nose, lips, and hair.

[0093] In practice, when using multiple different component segmentation models to process the original image, the fourth masks obtained may be repeated or overlapped. For example, when processing the same entity in the same original image, the fourth mask corresponding to the hair will be obtained using the face analysis model, and the fourth mask corresponding to the hair can also be obtained using the human body analysis model. This is the case where the fourth mask is repeated, and in this case, one of them needs to be removed, that is, one of the fourth masks corresponding to the hair is removed.

[0094] The fourth mask corresponding to the face can also be obtained by using the human body analysis model. The fourth mask corresponding to the left eyebrow can be obtained by using the face analysis model. The fourth mask corresponding to the face overlaps with the fourth mask corresponding to the left eyebrow. This is the case where the fourth masks overlap. In this case, the fourth mask corresponding to the face obtained based on the human body analysis model can be eliminated.

[0095] Subsequently, the fourth mask is used as a guide to perform more detailed segmentation on the area indicated by the mask in the simplified processing result. For example, if the simplified processing result includes Figure 3 The first mask and Figure 4 The fourth mask is obtained by using the face analysis model and the human body analysis model, which indicates the positions of hair, left eye, right eye, mouth, facial skin, neck, top, sleeves, pants, and arms. Figure 3 The first mask and Figure 4 The first mask in is used for segmentation, and the segmentation results are drawn in the same layer. The results are as follows Figure 8 As shown. Figure 8 In , each connected domain indicates the location of a component.

[0096] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0097] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0098] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0099] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0100] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and models involved are not necessarily required by the present invention.

[0101] Fig. 9 Schematic diagram of the structure of an image segmentation device in an embodiment of the present disclosure. The image segmentation device provided in the embodiment of the present disclosure can be configured in a client or in a server. Fig. 9 , the image segmentation device specifically comprises:

[0102] An acquisition model 410 is used to acquire an original image; the original image includes a plurality of entities;

[0103] A segmentation model 420, for obtaining a plurality of first masks and confidence values ​​of the first masks based on the original image, wherein the first masks correspond to the entity; the confidence values ​​of the first masks are used to reflect the credibility of the existence of the entity in the area indicated by the first mask;

[0104] A simplified model 430, configured to perform a simplified processing on the plurality of first masks based on the overlapping relationship between different first masks and the confidence values ​​of the first masks to obtain a simplified processing result;

[0105] The result output model 440 is used to segment the original image based on the simplified processing result to obtain an image segmentation result.

[0106] Furthermore, the simplified model 430 is used to:

[0107] Based on the confidence value of the first mask, simplify the multiple first masks to obtain an intermediate result;

[0108] Based on the overlapping relationship between different first masks, the intermediate result is streamlined to obtain a streamlined result.

[0109] Furthermore, the simplified model 430 is used to:

[0110] Determine a first target mask among the multiple first masks; the confidence value of the first target mask is greater than or equal to a confidence threshold;

[0111] The first target mask is used as an intermediate result.

[0112] Furthermore, the simplified model 430 is used to:

[0113] Determining a reference mask and a candidate mask in the intermediate result; the areas indicated by the reference mask and the candidate mask include a common area;

[0114] Based on the overlapping area of ​​the reference mask and the candidate mask, determining whether to use the candidate mask as a simplification object;

[0115] If the judgment result is to use the candidate mask as a simplification object, the intermediate result is simplified based on the simplification object to obtain a simplified processing result.

[0116] Furthermore, the simplified model 430 is used to:

[0117] Determining a second mask set in the intermediate result, wherein the second mask set includes at least two second masks; the areas indicated by each of the second masks include a common area;

[0118] The second mask with the largest confidence value is determined as the reference mask, and the remaining second masks are used as candidate masks; or the second mask with the largest indication area is determined as the reference mask, and the remaining second masks are used as candidate masks.

[0119] Furthermore, the simplified model 430 is used to:

[0120] Eliminate the simplified object from the intermediate result to obtain a simplified processing result; or,

[0121] The simplified object is combined with the reference mask to obtain a third mask; the simplified object and the reference mask are removed from the intermediate result, and the third mask is added to the intermediate result to obtain a simplified processing result.

[0122] Furthermore, the entity includes a plurality of components; the device also includes:

[0123] A parsing module, configured to obtain a plurality of fourth masks based on the original image, wherein the fourth masks correspond to the components;

[0124] The resulting output model 440 is used to:

[0125] Based on the fourth mask, segmenting the area indicated by the mask in the simplified processing result to obtain a fifth mask;

[0126] Based on the fifth mask, the original image is segmented to obtain and output an image segmentation result.

[0127] Furthermore, the result output model 440 is used to:

[0128] Outputting the image segmentation result in the form of multiple layers; or,

[0129] The image segmentation result is output in the form of an index map.

[0130] The image segmentation device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the image segmentation method provided in the embodiment of the method of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.

[0131] Fig.10 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig.10 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0132] like Fig.10 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the image segmentation method of the embodiment described in the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0133] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although Fig.10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0134] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the image segmentation method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0135] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include an information signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0136] In some embodiments, the client and the server may communicate using any known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.

[0137] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0138] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0139] Acquire an original image; the original image includes multiple entities;

[0140] Based on the original image, a plurality of first masks and confidence values ​​of the first masks are obtained, wherein the first masks correspond to the entity; the confidence values ​​of the first masks are used to reflect the credibility of the existence of the entity in the area indicated by the first mask;

[0141] Based on the overlapping relationship between different first masks and the confidence values ​​of the first masks, the plurality of first masks are simplified to obtain a simplified processing result;

[0142] Based on the simplified processing result, the original image is segmented to obtain and output an image segmentation result.

[0143] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0144] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code 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 cases involving a remote computer, the remote computer may be connected to the user's computer through 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., through the Internet using an Internet service provider).

[0145] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a model, program segment or code, and the part of the model, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0146] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0147] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0148] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0149] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0150] one or more processors;

[0151] A memory for storing one or more programs;

[0152] When the one or more programs are executed by the one or more processors, the one or more processors implement any image segmentation method provided in the present disclosure.

[0153] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image segmentation method as described in any one of the methods provided by the present disclosure is implemented.

[0154] The embodiments of the present disclosure further provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the image segmentation method described above is implemented.

[0155] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0156] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image segmentation method, It is characterized in that include: Acquire an original image; the original image includes multiple entities; Based on the original image, a plurality of first masks and confidence values ​​of the first masks are obtained, wherein the first masks correspond to the entity; The confidence value of the first mask is used to reflect the credibility of the existence of an entity in the area indicated by the first mask; Based on the overlapping relationship between different first masks and the confidence values ​​of the first masks, the plurality of first masks are simplified to obtain a simplified processing result; Based on the simplified processing result, the original image is segmented to obtain and output an image segmentation result.

2. The method according to claim 1, It is characterized in that The simplifying process of the plurality of first masks based on the overlapping relationship between different first masks and the confidence values ​​of the first masks to obtain a simplified process result includes: Based on the confidence value of the first mask, simplify the multiple first masks to obtain an intermediate result; Based on the overlapping relationship between different first masks, the intermediate result is streamlined to obtain a streamlined result.

3. The method according to claim 2, It is characterized in that The step of simplifying the plurality of first masks based on the confidence value of the first mask to obtain an intermediate result includes: Determine a first target mask among the multiple first masks; the confidence value of the first target mask is greater than or equal to a confidence threshold; The first target mask is used as an intermediate result.

4. The method according to claim 2, It is characterized in that The streamlining of the intermediate result based on the overlapping relationship between different first masks to obtain a streamlining result includes: Determining a reference mask and a candidate mask in the intermediate result; the areas indicated by the reference mask and the candidate mask include a common area; Based on the overlapping area of ​​the reference mask and the candidate mask, determining whether to use the candidate mask as a simplification object; If the judgment result is to use the candidate mask as a simplification object, the intermediate result is simplified based on the simplification object to obtain a simplified processing result.

5. The method according to claim 4, It is characterized in that Determining a reference mask and a candidate mask in the intermediate result includes: Determining a second mask set in the intermediate result, wherein the second mask set includes at least two second masks; the areas indicated by each of the second masks include a common area; The second mask with the largest confidence value is determined as the reference mask, and the remaining second masks are used as candidate masks; or the second mask with the largest indication area is determined as the reference mask, and the remaining second masks are used as candidate masks.

6. The method according to claim 5, It is characterized in that The step of performing a simplification process on the intermediate result based on the simplification object to obtain a simplification result includes: Eliminate the simplified object from the intermediate result to obtain a simplified processing result; or, The simplified object is combined with the reference mask to obtain a third mask; the simplified object and the reference mask are removed from the intermediate result, and the third mask is added to the intermediate result to obtain a simplified processing result.

7. The method according to claim 1, It is characterized in that The entity includes a plurality of components; the method further includes: Based on the original image, a plurality of fourth masks are obtained, wherein the fourth masks correspond to the components; The step of segmenting the original image based on the simplified processing result to obtain and output an image segmentation result includes: Based on the fourth mask, segmenting the area indicated by the mask in the simplified processing result to obtain a fifth mask; Based on the fifth mask, the original image is segmented to obtain and output an image segmentation result.

8. The method according to claim 1, It is characterized in that The output image segmentation result includes: Outputting the image segmentation result in the form of multiple layers; or, The image segmentation result is output in the form of an index map.

9. An image segmentation device, It is characterized in that include: An acquisition model is used to acquire an original image; the original image includes a plurality of entities; A segmentation model, used to obtain a plurality of first masks and confidence values ​​of the first masks based on the original image, wherein the first masks correspond to the entity; The confidence value of the first mask is used to reflect the credibility of the existence of an entity in the area indicated by the first mask; A simplified model, used for performing a simplified processing on the plurality of first masks based on the overlapping relationship between different first masks and the confidence values ​​of the first masks to obtain a simplified processing result; The result output model is used to segment the original image based on the simplified processing result to obtain an image segmentation result.

10. An electronic device, It is characterized in that The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Segmentation method

    CN115908445A

  • Segmenting objects in digital images utilizing a multi-object segmentation model framework

    US20220237799A1