Image processing method and device, medium and electronic equipment

By obtaining the instance segmentation results of the input image and the target instance segmentation layer, the image is significantly segmented and corrected, and the problems of inaccurate and incomplete significance segmentation results in the prior art are solved, achieving more accurate and complete significance Sexual segmentation result.

CN119477963APending Publication Date: 2025-02-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311008180.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing significance segmentation method has the problem of inaccurate and incomplete significance segmentation results.

Method used

By receiving the input image, obtaining the instance segmentation result, obtaining the target instance segmentation layer, using the significance segmentation model for significant segmentation, and using the target instance segmentation layer to correct the results.

Benefits of technology

Ensure the completeness and accuracy of significant segmentation results, and are corrected by using better-quality instance segmentation layers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477963A_ABST
    Figure CN119477963A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, a medium and electronic equipment, belongs to the technical field of computers, and can improve the integrity and accuracy of a saliency segmentation result. An image processing method includes: receiving an input image; obtaining an instance segmentation result of the input image; obtaining a target instance segmentation layer from the instance segmentation result; performing saliency segmentation on the input image by adopting a saliency segmentation model; and correcting a significance segmentation result by adopting the target instance segmentation layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Saliency segmentation is a computer vision task that aims to separate salient objects or regions in an image from the background. Saliency segmentation focuses more on identifying the most attractive and important regions and objects in an image. Existing saliency segmentation methods usually suffer from inaccurate and incomplete saliency segmentation results. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides an image processing method, comprising: receiving an input image; obtaining an instance segmentation result of the input image; obtaining a target instance segmentation layer from the instance segmentation result; performing saliency segmentation on the input image using a saliency segmentation model; and correcting the saliency segmentation result using the target instance segmentation layer.

[0005] In a second aspect, the present disclosure provides an image processing device, comprising: a receiving module for receiving an input image; a first acquisition module for acquiring an instance segmentation result of the input image; a second acquisition module for acquiring a target instance segmentation layer from the instance segmentation result; a saliency segmentation module for performing saliency segmentation on the input image using a saliency segmentation model; and a correction module for correcting the saliency segmentation result using the target instance segmentation layer.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of any one of the methods described in the first aspect of the present disclosure.

[0007] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in the first aspect of the present disclosure.

[0008] By adopting the above technical scheme, since it is possible to obtain the instance segmentation result of the input image, obtain the target instance segmentation layer from the instance segmentation result, perform saliency segmentation on the input image, and use the target instance segmentation layer to correct the saliency segmentation result, since the target instance segmentation layer used to correct the saliency segmentation result is an instance segmentation layer with better quality and more complete instance segmentation effect (that is, the segmentation instances in the target instance segmentation layer are more complete), the integrity and accuracy of the saliency segmentation result are ensured.

[0009] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0011] Figure 1 is a flowchart of an image processing method according to an embodiment of the present disclosure.

[0012] Figure 2 A flowchart of obtaining a target instance segmentation layer from an instance segmentation result according to an embodiment of the present disclosure is shown.

[0013] Figure 3 A flowchart is shown for correcting a saliency segmentation result using a target instance segmentation layer according to an embodiment of the present disclosure.

[0014] Figure 4 A flowchart of modifying a saliency segmentation model according to an embodiment of the present disclosure is shown.

[0015] Figure 5 A flowchart of calculating the target layer loss between a sample saliency segmentation result and a sample target instance segmentation layer according to an embodiment of the present disclosure is shown.

[0016] Figure 6 is a schematic block diagram of an image processing device according to an embodiment of the present disclosure.

[0017] Figure 7 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0019] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0020] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0024] 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.

[0025] 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.

[0026] 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.

[0027] 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.

[0028] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0029] Figure 1 FIG. 1 is a flowchart of an image processing method according to an embodiment of the present disclosure. Figure 1 As shown, the image processing method includes the following steps S11 to S15.

[0030] In step S11 , an input image is received.

[0031] In step S12, an instance segmentation result of the input image is obtained.

[0032] Instance segmentation is a computer vision task that aims to separate individual instances in an image.

[0033] A pre-trained instance segmentation model can be used to perform instance segmentation on the input image, and then the instance segmentation result of the input image can be obtained from the output result of the instance segmentation model.

[0034] If the trained segmentation model has both instance segmentation capabilities and saliency segmentation capabilities, then the segmentation model can also be used to perform instance segmentation on the input image to obtain the instance segmentation result of the input image.

[0035] In step S13, a target instance segmentation layer is obtained from the instance segmentation result.

[0036] The target instance segmentation layer refers to the instance segmentation layer where instance segmentation is complete.

[0037] Figure 2 A flow chart of obtaining a target instance segmentation layer from an instance segmentation result according to an embodiment of the present disclosure is shown. The flow chart includes steps S131 to S132.

[0038] like Figure 2As shown, first in step S131, the significance value of each instance segmentation layer in the instance segmentation result is calculated. In some embodiments, the probability value of each pixel point in each instance segmentation layer being predicted as significant can be calculated, and then, based on the probability value, the entropy value of each instance segmentation layer is determined as the significance value.

[0039] For example, the instance segmentation result includes N instance segmentation layers. For the first instance segmentation layer, the probability value p(x) of each pixel in the first instance segmentation layer being predicted as significant is calculated. The probability value p(x) is between 0 and 1. Then, based on the probability value, the entropy value of whether the first instance segmentation layer is significant is determined. As the significance value of the first instance segmentation layer, the entropy value can be expressed as: -∑ x p(x)logp(x). Similarly, the saliency values ​​of other instance segmentation layers in the N instance segmentation layers can be obtained by using the same method as the method for calculating the saliency value of the first instance segmentation layer.

[0040] Then, in step S132, the instance segmentation layer whose significance value is less than the first preset significance value is obtained from the instance segmentation result as the target instance segmentation layer. In the field of information technology, entropy generally refers to the uncertainty of information, which is used to describe the uncertainty or amount of information of a random variable. That is to say, for the instance segmentation layer in the present disclosure, the larger the entropy value, the more uncertain the instance segmentation layer is. Therefore, the instance segmentation layer whose entropy value (that is, significance value) is less than the first preset significance value will be screened out from the instance segmentation result.

[0041] In step S14, a saliency segmentation model is used to perform saliency segmentation on the input image.

[0042] In step S15, the target instance segmentation layer is used to correct the saliency segmentation result.

[0043] Figure 3 A flow chart of modifying a saliency segmentation result using a target instance segmentation layer according to an embodiment of the present disclosure is shown. The flow includes steps S151 to S155.

[0044] like Figure 3 As shown, first in step S151, the overlapping area between the target instance segmentation layer and the saliency segmentation result is determined.

[0045] Then, in step S152, the area ratio of the overlapping area to the target instance segmentation layer is determined. For example, if there are a total of N target instance segmentation layers, then for the first target instance segmentation layer, the overlapping area of ​​the first target instance segmentation layer and the saliency segmentation result is determined, and the area ratio of the overlapping area to the first target instance segmentation layer is determined. Similarly, the area ratios corresponding to other target instance segmentation layers in the N target instance segmentation layers are calculated using the same method as the area ratio calculation method for the first target instance segmentation layer.

[0046] Then, in step S153, it is determined whether the area ratio is greater than a preset threshold.

[0047] Then, in step S154, if the area ratio is greater than a preset threshold, the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result are set as positive samples.

[0048] In step S155, if the area ratio is less than the preset threshold, the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result are set as negative samples.

[0049] For example, if there are N target instance segmentation layers in total, if the area ratio corresponding to the first target instance segmentation layer is greater than the preset threshold, the pixel points corresponding to the first target instance segmentation layer in the saliency segmentation result are set as positive samples, and if the area ratio corresponding to the second target instance segmentation layer is less than the preset threshold, the pixel points corresponding to the second target instance segmentation layer in the saliency segmentation result are set as negative samples. And so on, the correction of the entire saliency segmentation result is completed.

[0050] By adopting the above technical scheme, since it is possible to obtain the instance segmentation result of the input image, obtain the target instance segmentation layer from the instance segmentation result, perform saliency segmentation on the input image, and use the target instance segmentation layer to correct the saliency segmentation result, since the target instance segmentation layer used to correct the saliency segmentation result is an instance segmentation layer with better quality and more complete instance segmentation effect (that is, the segmentation instances in the target instance segmentation layer are more complete), the integrity and accuracy of the saliency segmentation result are ensured.

[0051] Figure 4 This is a flow chart of modifying a saliency segmentation model according to an embodiment of the present disclosure. The modification method can modify large models and small models. The large model can be a large model on the server side, a model used as a teacher model in model distillation, etc. The small model can be a small model on the mobile side, a model used as a student model in model distillation, etc.

[0052] like Figure 4 As shown, the method for modifying the saliency segmentation model may include the following steps S41 to S45.

[0053] In step S41, the instance segmentation result of the training sample is obtained as the sample instance segmentation result.

[0054] A pre-trained instance segmentation model may be used to perform instance segmentation on the training samples, and then the instance segmentation results of the training samples may be obtained from the output results of the instance segmentation model.

[0055] If the segmentation model has both instance segmentation capabilities and saliency segmentation capabilities, then the segmentation model can also be used to perform instance segmentation on the training samples to obtain instance segmentation results of the training samples.

[0056] In step S42, a sample target instance segmentation layer is obtained from the sample instance segmentation result.

[0057] The sample target instance segmentation layer refers to the instance segmentation layer in which the instance segmentation is complete in the sample instance segmentation result.

[0058] In some embodiments, obtaining a sample target instance segmentation layer from the sample instance segmentation result can be achieved in the following manner: first, calculating the significance value of each sample instance segmentation layer in the sample instance segmentation result, and then obtaining a sample instance segmentation layer whose significance value is less than a second preset significance value from the sample instance segmentation result as the sample target instance segmentation layer.

[0059] In some embodiments, the calculating of the significance value of each sample instance segmentation layer in the sample instance segmentation result includes: calculating the probability value of each pixel point in each sample instance segmentation layer being predicted as significant; and determining the entropy value of each sample instance segmentation layer based on the probability value as the significance value of the sample instance segmentation layer. The calculation method of the entropy value has been described in detail in the previous text and will not be repeated here.

[0060] In step S43, the saliency segmentation model is used to perform saliency segmentation on the training sample to obtain a sample saliency segmentation result.

[0061] In step S44, the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer is calculated.

[0062] Figure 5 A flow chart of calculating the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer according to an embodiment of the present disclosure is shown. The flow includes steps S441 to S443.

[0063] like Figure 5 As shown, first, in step S441, the overlapping area between the sample target instance segmentation layer and the sample saliency segmentation result is determined as the sample overlapping area.

[0064] Then, in step S442, the area ratio of the sample overlap region to the sample target instance segmentation layer is determined as the sample area ratio. The specific implementation method of determining the area ratio has been described in detail above and will not be repeated here.

[0065] Then, in step S443, based on the sample area ratio, the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer is calculated.

[0066] In some embodiments, the target layer loss between the sample significant segmentation result and the sample target instance segmentation layer is calculated based on the sample area ratio, including: calculating the local layer loss between the sample significant segmentation result and the sample target instance segmentation layer based on the sample area ratio corresponding to each sample target instance segmentation layer; calculating the sum of the local layer losses corresponding to all the sample target instance segmentation layers as the target layer loss. The local layer loss reflects the degree of loss of the area corresponding to a single sample target instance segmentation layer in the sample significant segmentation result compared to the single sample target instance segmentation layer, ensuring that the sample significant segmentation result is equal to its mean on the single sample target instance segmentation layer, that is, making the sample significant segmentation result consistent on the single sample target instance segmentation layer without damage. The target layer loss reflects the overall degree of loss of the sample significant segmentation result compared to all sample target instance segmentation layers.

[0067] For example, there are N sample target instance segmentation layers. First, based on the first sample target instance segmentation layer I 1 The corresponding sample area ratio M 1 , calculate the sample saliency segmentation result M* and the first sample target instance segmentation layer I 1 The local layer loss L 1 , for example, the local layer loss L 1 It can be calculated as follows: L 1 =|(M * -I 1 *M 1 )|. In a similar way, the local layer loss of the sample saliency segmentation result M* and other sample target instance segmentation layers is calculated. Then, the sum of all local layer losses is calculated as the target layer loss. For example, assuming that the first sample target instance segmentation layer I 1The corresponding local layer loss is L 1 , the second sample target instance segmentation layer I 2 The corresponding local layer loss is L 2 ,…,Nth sample target instance segmentation layer I N The corresponding local layer loss is L N , then the target layer loss is L 1 +L 2 +…+L N .

[0068] In step S45, the saliency segmentation model is modified based on the target layer loss.

[0069] By adopting the above technical solution, since the sample instance segmentation result of the training sample can be obtained, the sample target instance segmentation layer is obtained from the sample instance segmentation result, and the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer is used to correct the saliency segmentation model. Since the sample target instance segmentation layer used to correct the saliency segmentation model is an instance segmentation layer with good quality and relatively complete instance segmentation effect (that is, the instances in the sample target instance segmentation layer are relatively complete), the integrity and accuracy of the saliency segmentation result output by the corrected saliency segmentation model are ensured. In addition, the correction method of the saliency segmentation model according to the embodiment of the present disclosure does not require pre-saliency segmentation annotation, which avoids the problem of model training and evaluation difficulties and unreliable evaluation results caused by inconsistent saliency segmentation annotations.

[0070] In some embodiments, the encoder of the saliency segmentation model is a hybrid encoder based on VIT and a convolutional neural network; the decoder of the saliency segmentation model is a decoder with deformable capabilities. This saliency segmentation model can be a large model, such as a large server-side model, a model used as a teacher model in model distillation, etc.

[0071] By adopting a hybrid encoder structure, we can achieve a balance between efficiency and effect. VIT takes a long time but has a strong ability to model long distances, while convolutional neural networks take a short time but can only model image correlation in a local space. By cross-using the two, both time consumption and effect meet business needs.

[0072] By adopting a decoder with deformable capabilities, it can adapt to the size of the object. When the object is large, it can automatically expand, and when the object is small, it can automatically shrink.

[0073] In addition, if the segmentation model has both instance segmentation and saliency segmentation capabilities, then when modifying such a segmentation model, N queries can be added to the decoder, and the final segmentation model will generate N segmentation results. Since the saliency segmentation capability will only generate two segmentation results, but the instance segmentation capability will generate more instance segmentation layers and the number of instance segmentation layers generated is uncertain, 2 queries out of the N queries can be assigned to the saliency segmentation task, and the other N-2 queries can be assigned to the instance segmentation task, so that the segmentation model can have both saliency segmentation and instance segmentation capabilities.

[0074] In some embodiments, the encoder of the saliency segmentation model may be an encoder using depthwise separable convolution; the decoder of the saliency segmentation model may be a decoder using depthwise separable convolution, and each layer of the decoder is connected to the corresponding layer of the encoder. Such a saliency segmentation model may be a small model, such as a small mobile model, a model used as a student model in model distillation, etc.

[0075] By using depth-wise separable convolution, the computational complexity and parameter size of the saliency segmentation model can be reduced.

[0076] By connecting each layer of the decoder to the corresponding layer of the encoder, the high-level features in the encoder are fused with the low-level features in the decoder through skip connections. This can help the decoder recover detailed information and reduce the impact of information loss.

[0077] In addition, if this small saliency segmentation model is a student model, then, in addition to the correction method described above, it can also be trained in combination with the model distillation method. For example, the saliency segmentation results predicted by the teacher model can be used as labels to calculate the cross entropy loss between the saliency segmentation results of the teacher model and the saliency segmentation results of the student model, and the student model can be trained based on the cross entropy loss. Since the soft label (that is, the probability distribution) of the teacher model is used as the target, the knowledge and information in the complex teacher model can be passed to the student model, so that the student model can learn more fine-grained information, thereby improving the generalization performance of the model, and can achieve the improvement of the student model performance and the reduction of the model size.

[0078] In addition, when training the student model, the model distillation method can be used to train the student model first, and then the target layer loss described above can be used to further correct the student model. In this way, the integrity and accuracy of the saliency segmentation results output by the trained student model can be improved.

[0079] Figure 6 FIG. 1 is a schematic block diagram of an image processing device according to an embodiment of the present disclosure. Figure 6 As shown, the image processing device includes: a receiving module 61, used to receive an input image; a first acquisition module 62, used to obtain an instance segmentation result of the input image; a second acquisition module 63, used to obtain a target instance segmentation layer from the instance segmentation result; a saliency segmentation module 64, used to perform saliency segmentation on the input image using a saliency segmentation model; and a correction module 65, used to correct the saliency segmentation result using the target instance segmentation layer.

[0080] By adopting the above technical scheme, since it is possible to obtain the instance segmentation result of the input image, obtain the target instance segmentation layer from the instance segmentation result, perform saliency segmentation on the input image, and use the target instance segmentation layer to correct the saliency segmentation result, since the target instance segmentation layer used to correct the saliency segmentation result is an instance segmentation layer with better quality and more complete instance segmentation effect (that is, the segmentation instances in the target instance segmentation layer are more complete), the integrity and accuracy of the saliency segmentation result are ensured.

[0081] Optionally, the second acquisition module 63 obtains a target instance segmentation layer from the instance segmentation result, including: calculating a significance value of each instance segmentation layer in the instance segmentation result; obtaining an instance segmentation layer whose significance value is less than a first preset significance value from the instance segmentation result as the target instance segmentation layer.

[0082] Optionally, the second acquisition module 63 calculates the significance value of each instance segmentation layer in the instance segmentation result, including: calculating the probability value of each pixel point in each of the instance segmentation layers being predicted to be significant; based on the probability value, determining the entropy value of each of the instance segmentation layers as the significance value.

[0083] Optionally, the correction module 65 uses the target instance segmentation layer to correct the saliency segmentation result, including: determining the overlapping area between the target instance segmentation layer and the saliency segmentation result; determining the area ratio of the overlapping area to the target instance segmentation layer; if the area ratio is greater than a preset threshold, setting the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result as positive samples; if the area ratio is less than the preset threshold, setting the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result as negative samples.

[0084] Optionally, the image processing device also includes a model correction module, which is used to correct the saliency segmentation model in the following manner: obtaining an instance segmentation result of a training sample as a sample instance segmentation result; obtaining a sample target instance segmentation layer from the sample instance segmentation result; using the saliency segmentation model to perform saliency segmentation on the training sample to obtain a sample saliency segmentation result; calculating a target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer; and correcting the saliency segmentation model based on the target layer loss.

[0085] Optionally, the model correction module obtains a sample target instance segmentation layer from the sample instance segmentation result, including: calculating the significance value of each sample instance segmentation layer in the sample instance segmentation result; obtaining a sample instance segmentation layer whose significance value is less than a second preset significance value from the sample instance segmentation result as the sample target instance segmentation layer.

[0086] Optionally, the model correction module calculates the significance value of each sample instance segmentation layer in the sample instance segmentation result, including: calculating the probability value of each pixel point in each of the sample instance segmentation layers being predicted to be significant; based on the probability value, determining the entropy value of each of the sample instance segmentation layers as the significance value of the sample instance segmentation layer.

[0087] Optionally, the model correction module calculates the target layer loss between the sample significant segmentation result and the sample target instance segmentation layer, including: determining the overlapping area between the sample target instance segmentation layer and the sample significant segmentation result as the sample overlapping area; determining the area ratio of the sample overlapping area to the sample target instance segmentation layer as the sample area ratio; based on the sample area ratio, calculating the target layer loss between the sample significant segmentation result and the sample target instance segmentation layer.

[0088] Optionally, the model correction module calculates the target layer loss between the sample significance segmentation result and the sample target instance segmentation layer based on the sample area ratio, including: calculating the local layer loss between the sample significance segmentation result and the sample target instance segmentation layer based on the sample area ratio corresponding to each of the sample target instance segmentation layers; calculating the sum of the local layer losses corresponding to all the sample target instance segmentation layers as the target layer loss.

[0089] The specific implementation manner of the operations performed by each module of the image processing device according to the embodiment of the present disclosure has been described in detail in the relevant method and will not be repeated here.

[0090] An embodiment of the present disclosure further provides a computer-readable medium having a computer program stored thereon, which implements the steps of any method described in the present disclosure when the program is executed by a processing device.

[0091] An embodiment of the present disclosure further provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any method described in the present disclosure.

[0092] Reference below Figure 7 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device 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), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 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.

[0093] like Figure 7 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0094] Typically, the following devices may be connected to the I / O interface 605: an input device 606 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 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 600 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.

[0095] 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 program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0096] 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 a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, 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.

[0097] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data 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 currently known or future developed network.

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

[0099] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives an input image; obtains an instance segmentation result of the input image; obtains a target instance segmentation layer from the instance segmentation result; performs saliency segmentation on the input image using a saliency segmentation model; and corrects the saliency segmentation result using the target instance segmentation layer.

[0100] 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., via the Internet using an Internet service provider).

[0101] 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 module, a program segment or a part of a code, and the module, the program segment or a part of the 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 a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0102] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first acquisition module may also be described as a "module for obtaining the instance segmentation result of the input image".

[0103] 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.

[0104] 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.

[0105] According to one or more embodiments of the present disclosure, Example 1 provides an image processing method, including: receiving an input image; obtaining an instance segmentation result of the input image; obtaining a target instance segmentation layer from the instance segmentation result; performing significant segmentation on the input image using a significant segmentation model; and correcting the significant segmentation result using the target instance segmentation layer.

[0106] According to one or more embodiments of the present disclosure, Example 2 provides the image processing method of Example 1, wherein obtaining a target instance segmentation layer from the instance segmentation result includes: calculating a significance value of each instance segmentation layer in the instance segmentation result; obtaining an instance segmentation layer from the instance segmentation result whose significance value is less than a first preset significance value as the target instance segmentation layer.

[0107] According to one or more embodiments of the present disclosure, Example 3 provides the image processing method of Example 2, wherein the calculation of the significance value of each instance segmentation layer in the instance segmentation result includes: calculating the probability value of each pixel point in each of the instance segmentation layers being predicted to be significant; based on the probability value, determining the entropy value of each of the instance segmentation layers as the significance value.

[0108] According to one or more embodiments of the present disclosure, Example 4 provides the image processing method of Example 1, wherein the use of the target instance segmentation layer to correct the saliency segmentation result includes: determining the overlapping area between the target instance segmentation layer and the saliency segmentation result; determining the area ratio of the overlapping area to the target instance segmentation layer; if the area ratio is greater than a preset threshold, setting the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result as positive samples, and if the area ratio is less than the preset threshold, setting the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result as negative samples.

[0109] According to one or more embodiments of the present disclosure, Example 5 provides an image processing method of Example 1, wherein the saliency segmentation model is modified in the following manner: obtaining an instance segmentation result of a training sample as a sample instance segmentation result; obtaining a sample target instance segmentation layer from the sample instance segmentation result; performing saliency segmentation on the training sample using the saliency segmentation model to obtain a sample saliency segmentation result; calculating a target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer; and modifying the saliency segmentation model based on the target layer loss.

[0110] According to one or more embodiments of the present disclosure, Example 6 provides the image processing method of Example 5, wherein obtaining a sample target instance segmentation layer from the sample instance segmentation result includes: calculating a significance value of each sample instance segmentation layer in the sample instance segmentation result; obtaining a sample instance segmentation layer whose significance value is less than a second preset significance value from the sample instance segmentation result as the sample target instance segmentation layer.

[0111] According to one or more embodiments of the present disclosure, Example 7 provides the image processing method of Example 6, wherein the calculating of the significance value of each sample instance segmentation layer in the sample instance segmentation result includes: calculating the probability value of each pixel point in each of the sample instance segmentation layers being predicted to be significant; based on the probability value, determining the entropy value of each of the sample instance segmentation layers as the significance value of the sample instance segmentation layer.

[0112] According to one or more embodiments of the present disclosure, Example 8 provides the image processing method of Example 5, wherein the calculation of the target layer loss between the sample significance segmentation result and the sample target instance segmentation layer includes: determining the overlapping area between the sample target instance segmentation layer and the sample significance segmentation result as the sample overlapping area; determining the area ratio of the sample overlapping area to the sample target instance segmentation layer as the sample area ratio; and calculating the target layer loss between the sample significance segmentation result and the sample target instance segmentation layer based on the sample area ratio.

[0113] According to one or more embodiments of the present disclosure, Example 9 provides the image processing method of Example 8, wherein the target layer loss between the sample significance segmentation result and the sample target instance segmentation layer is calculated based on the sample area ratio, including: calculating the local layer loss between the sample significance segmentation result and the sample target instance segmentation layer based on the sample area ratio corresponding to each of the sample target instance segmentation layers; calculating the sum of the local layer losses corresponding to all the sample target instance segmentation layers as the target layer loss.

[0114] According to one or more embodiments of the present disclosure, Example 10 provides an image processing device, comprising: a receiving module for receiving an input image; a first acquisition module for acquiring an instance segmentation result of the input image; a second acquisition module for acquiring a target instance segmentation layer from the instance segmentation result; a saliency segmentation module for performing saliency segmentation on the input image using a saliency segmentation model; and a correction module for correcting the saliency segmentation result using the target instance segmentation layer.

[0115] According to one or more embodiments of the present disclosure, Example 11 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-9 when executed by a processing device.

[0116] According to one or more embodiments of the present disclosure, Example 12 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-9.

[0117] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0118] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0119] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. An image processing method, characterized in that: include: receiving an input image; Obtaining an instance segmentation result of the input image; Obtaining a target instance segmentation layer from the instance segmentation result; Performing saliency segmentation on the input image using a saliency segmentation model; The target instance segmentation layer is used to correct the saliency segmentation result.

2. The image processing method according to claim 1, characterized in that: The obtaining a target instance segmentation layer from the instance segmentation result includes: Calculating a saliency value of each instance segmentation layer in the instance segmentation result; An instance segmentation layer whose significance value is less than a first preset significance value is obtained from the instance segmentation result as the target instance segmentation layer.

3. The image processing method according to claim 2, characterized in that: The calculating the saliency value of each instance segmentation layer in the instance segmentation result comprises: Calculating the probability value of each pixel point in each of the instance segmentation layers being predicted as significant; Based on the probability value, an entropy value of each of the instance segmentation layers is determined as the significance value.

4. The image processing method according to claim 1, characterized in that: The step of using the target instance segmentation layer to correct the saliency segmentation result includes: Determining an overlapping area between the target instance segmentation layer and the saliency segmentation result; Determining an area ratio of the overlapping region to the target instance segmentation layer; If the area ratio is greater than a preset threshold, the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result are set as positive samples; if the area ratio is less than the preset threshold, the pixel points corresponding to the target instance segmentation layer in the saliency segmentation result are set as negative samples.

5. The image processing method according to claim 1, characterized in that: The saliency segmentation model is modified in the following way: Obtaining instance segmentation results of the training samples as sample instance segmentation results; Obtaining a sample target instance segmentation layer from the sample instance segmentation result; Using the saliency segmentation model to perform saliency segmentation on the training sample to obtain a sample saliency segmentation result; Calculating the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer; The saliency segmentation model is modified based on the target layer loss.

6. The image processing method according to claim 5, characterized in that: The obtaining of a sample target instance segmentation layer from the sample instance segmentation result includes: Calculating the significance value of each sample instance segmentation layer in the sample instance segmentation result; A sample instance segmentation layer whose significance value is less than a second preset significance value is obtained from the sample instance segmentation result as the sample target instance segmentation layer.

7. The image processing method according to claim 6, characterized in that: The calculating the saliency value of each sample instance segmentation layer in the sample instance segmentation result comprises: Calculating the probability value of each pixel point in each of the sample instance segmentation layers being predicted as significant; Based on the probability value, the entropy value of each of the sample instance segmentation layers is determined as the significance value of the sample instance segmentation layer.

8. The image processing method according to claim 5, characterized in that: The calculating the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer includes: Determine an overlapping area between the sample target instance segmentation layer and the sample saliency segmentation result as a sample overlapping area; Determine an area ratio of the sample overlapping area to the sample target instance segmentation layer as a sample area ratio; Based on the sample area ratio, the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer is calculated.

9. The image processing method according to claim 8, characterized in that: The step of calculating the target layer loss between the sample saliency segmentation result and the sample target instance segmentation layer based on the sample area ratio includes: Based on the sample area ratio corresponding to each of the sample target instance segmentation layers, calculating the sample saliency segmentation result and the local layer loss of the sample target instance segmentation layer; The sum of the local layer losses corresponding to all the sample target instance segmentation layers is calculated as the target layer loss.

10. An image processing device, characterized in that: include: A receiving module, used for receiving an input image; A first acquisition module, used to acquire an instance segmentation result of the input image; A second acquisition module, used for acquiring a target instance segmentation layer from the instance segmentation result; A saliency segmentation module, used for performing saliency segmentation on the input image using a saliency segmentation model; The correction module is used to correct the saliency segmentation result by using the target instance segmentation layer.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 9 are implemented.

12. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 9.