CN116385459B - Image segmentation method and device - Google Patents
Image segmentation method and device Download PDFInfo
- Publication number
- CN116385459B CN116385459B CN202310242125.4A CN202310242125A CN116385459B CN 116385459 B CN116385459 B CN 116385459B CN 202310242125 A CN202310242125 A CN 202310242125A CN 116385459 B CN116385459 B CN 116385459B
- Authority
- CN
- China
- Prior art keywords
- image
- segmentation
- segmented
- target
- point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003709 image segmentation Methods 0.000 title claims abstract description 202
- 238000000034 method Methods 0.000 title claims abstract description 87
- 230000011218 segmentation Effects 0.000 claims abstract description 197
- 230000003993 interaction Effects 0.000 abstract description 30
- 238000012545 processing Methods 0.000 description 15
- 238000004590 computer program Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 239000011159 matrix material Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000002708 enhancing effect Effects 0.000 description 2
- 230000001965 increasing effect Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/70—Labelling scene content, e.g. deriving syntactic or semantic representations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20092—Interactive image processing based on input by user
- G06T2207/20104—Interactive definition of region of interest [ROI]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the specification provides an image segmentation method and device, wherein the image segmentation method comprises the following steps: displaying an image to be segmented; receiving an image segmentation request generated by a user aiming at an object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type; determining a target area in the image to be segmented according to the object identifier; and dividing the target object in the image to be divided based on the target area to obtain an image division result. The method enriches the object identification form, enriches the segmentation form of the image to be segmented, and avoids the problems that the interaction frequency between a user and terminal equipment is excessive and the interaction efficiency is affected due to the same segmentation mode under different object segmentation types.
Description
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to an image segmentation method.
Background
With the continuous development of image processing technology, the demands of users for image processing efficiency are also increasing.
At present, the interactive segmentation can be applied to an application scene generated by image annotation and image materials; the current ways of interactively segmenting an image include: when the image is divided for the first time, a plurality of points, frames or the image is painted on the image by a user to generate a division mark, and then the image is divided based on the division mark.
However, the current dotting segmentation mode is generally limited to a single type target, so that when the segmentation requirement in a real scene is met, a plurality of points need to be drawn, and the interaction efficiency is affected; in addition, the current segmentation method is generally suitable for segmenting a single object, and in the case of simultaneously segmenting a plurality of objects or segmenting part of the objects, more interactions between a user and the front end are needed to complete, so that the number of interactions is increased, the interaction efficiency is affected, and the segmentation efficiency of images is further affected.
Disclosure of Invention
In view of this, the present embodiment provides an image segmentation method. One or more embodiments of the present specification relate to an image segmentation apparatus, a computing device, a computer-readable storage medium, and a computer program that solve the technical drawbacks of the prior art.
According to a first aspect of embodiments of the present specification, there is provided an image segmentation method, including:
displaying an image to be segmented;
receiving an image segmentation request generated by a user aiming at an object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type;
Determining a target area in the image to be segmented according to the object identifier;
and dividing the target object in the image to be divided based on the target area to obtain an image division result.
According to a second aspect of embodiments of the present specification, there is provided an image segmentation apparatus comprising:
a display module configured to display an image to be segmented;
the receiving module is configured to receive an image segmentation request generated by a user aiming at an object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type;
the determining module is configured to determine a target area in the image to be segmented according to the object identification;
and the segmentation module is configured to segment the target object in the image to be segmented based on the target area, and obtain an image segmentation result.
According to a third aspect of embodiments of the present specification, there is provided another image segmentation method, comprising:
receiving an image segmentation instruction aiming at an image to be segmented, which is sent by a user terminal;
determining an object identification of the image to be segmented according to the image segmentation instruction, and determining a target area in the image to be segmented based on the object identification;
Dividing a target object in the image to be divided based on the target area to obtain an image division result;
and returning the image segmentation result to the user side.
According to a fourth aspect of embodiments of the present specification, there is provided another image segmentation apparatus comprising:
the receiving module is configured to receive an image segmentation instruction for an image to be segmented, which is sent by a user side;
the determining module is configured to determine an object identifier of the image to be segmented according to the image segmentation instruction, and determine a target area in the image to be segmented based on the object identifier;
the segmentation module is configured to segment a target object in the image to be segmented based on the target area, and an image segmentation result is obtained;
and the return module is configured to return the image segmentation result to the user side.
According to a fifth aspect of embodiments of the present specification, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions that, when executed by the processor, perform the steps of the image segmentation method described above.
According to a sixth aspect of embodiments of the present specification, there is provided a computer readable storage medium storing computer executable instructions which, when executed by a processor, implement the steps of the above-described image segmentation method.
According to a seventh aspect of the embodiments of the present specification, there is provided a computer program, wherein the computer program, when executed in a computer, causes the computer to perform the steps of the above-described image segmentation method.
One embodiment of the present specification enables displaying an image to be segmented; receiving an image segmentation request generated by a user aiming at an object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type; determining a target area in the image to be segmented according to the object identifier; and dividing the target object in the image to be divided based on the target area to obtain an image division result.
According to the image segmentation method, an image segmentation request generated based on the object segmentation type of the image to be segmented is received, and the image segmentation request contains the object identification corresponding to the object segmentation type, so that the interaction form of a user in image segmentation is enriched, namely, different object identifications can be set for different object segmentation types; determining a target area in the image to be segmented based on the object identification, so that the determination mode of the target area is enriched; and dividing the target object in the graph to be processed based on the target area, thereby realizing the accuracy of image division. The method enriches the object identification form, enriches the segmentation form of the image to be segmented, and avoids the problems that the interaction frequency between a user and terminal equipment is excessive and the interaction efficiency is affected due to the same segmentation mode under different object segmentation types.
Drawings
Fig. 1a is a schematic view of a scene of an image segmentation method according to an embodiment of the present disclosure;
FIG. 1b is a schematic view of another image segmentation method according to one embodiment of the present disclosure;
FIG. 2 is a flow chart of an image segmentation method provided in one embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a feature enhancement method provided by one embodiment of the present disclosure;
FIG. 4 is a flow chart of another image segmentation method provided by one embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating a process of an image segmentation method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural view of an image segmentation apparatus according to an embodiment of the present disclosure;
FIG. 7 is a block diagram of a computing device provided in one embodiment of the present description.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
First, terms related to one or more embodiments of the present specification will be explained.
CCR: click-Contextual Representations, a point context feature module, a module for feature enhancement by calculating similarity.
Feature enhancement: the image processing method can make the original unclear image clear or emphasize some concerned features, inhibit the non-concerned features, improve the image quality, enrich the information quantity and strengthen the image interpretation and recognition effects.
Image segmentation: image segmentation is a technique and process of dividing an image into several specific regions with unique properties and presenting objects of interest. It is a key step from image processing to image analysis.
In the present specification, an image dividing method is provided, and the present specification relates to an image dividing apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Referring to fig. 1a and fig. 1b, fig. 1a shows a schematic view of a scene of an image segmentation method according to an embodiment of the present disclosure, which specifically includes:
displaying the image to be segmented by a terminal device; a user can make a point or draw a boundary box on an image to be segmented through a terminal interface; the terminal interface displays prompt information for interactive segmentation operation to the user, when a single object in the image is segmented, a mode of dotting on the image can be adopted, and when a plurality of objects or local objects in the image are segmented, a mode of drawing a boundary box on the image can be adopted.
Specifically, as shown in fig. 1a, if a user needs to segment a single object in an image to be segmented, a point a can be marked on a person object in the image to be segmented based on a terminal device, that is, an object identifier is added to the image to be segmented; scaling the image to be segmented carrying the object identification to a target size, namely the image size which can be processed by the image processing model; inputting the zoomed image to be segmented into an image processing model; the image processing model generates an initial positive point image, a negative point image and a historical segmentation result based on the image to be segmented, wherein the initial positive point image, the negative point image and the historical segmentation result in the primary segmentation are matrices composed of 0; determining a target area, namely an image circular area, on an initial positive point image based on the point a and a preset distance, and modifying 0 element in the circular area into 1 element, so as to obtain a positive point image; generating a 6-channel image based on the positive point image, the negative point image, the historical segmentation result and the image to be segmented; inputting the 6-channel image into a segmentation module, extracting the features in the 6-channel image by a segmentation network, enhancing the features based on the CCR module, and segmenting the image to be segmented based on the enhanced features to obtain an image segmentation result.
As shown in fig. 1b, fig. 1b shows a schematic view of a scene of another image segmentation method according to an embodiment of the present disclosure, where a user needs to segment a part of a person object in an image to be segmented, and then a bounding box may be drawn on the image to be segmented based on a terminal device, that is, an object identifier is added to the image to be segmented; performing outward expansion on the boundary frame based on a preset outward expansion proportion to obtain a supervision frame; dividing the image to be divided according to the supervision frame to obtain a sub-image containing the target object; scaling the sub-image to a target size and inputting the sub-image to an image processing model; generating a positive point image and an initial negative point image corresponding to the sub-image by the image processing model; modifying 0 element outside the boundary box in the initial negative point image into 1 element according to the boundary box to obtain a negative point image; obtaining a 6-channel image based on the positive point image, the negative point image, the sub-image and the historical segmentation result; inputting the 6-channel image into a segmentation module, extracting the features in the 6-channel image by a segmentation network, enhancing the features based on the CCR module, and segmenting the image to be segmented based on the enhanced features to obtain an image segmentation result.
According to the image segmentation method, an image segmentation request generated based on the object segmentation type of the image to be segmented is received, and the image segmentation request contains the object identification corresponding to the object segmentation type, so that the interaction form of a user in image segmentation is enriched, namely, different object identifications can be set for different object segmentation types; determining a target area in the image to be segmented based on the object identification, so that the determination mode of the target area is enriched; and dividing the target object in the graph to be processed based on the target area, thereby realizing the accuracy of image division. The method enriches the object identification form, enriches the segmentation form of the image to be segmented, and avoids the problems that the interaction frequency between a user and terminal equipment is excessive and the interaction efficiency is affected due to the same segmentation mode under different object segmentation types.
Referring to fig. 2, fig. 2 shows a flowchart of an image segmentation method according to an embodiment of the present disclosure, which is applied to a terminal device, and specifically includes the following steps.
Step 202: and displaying the image to be segmented.
The image to be segmented refers to an image that can be displayed in a terminal device, specifically, the image to be segmented is an image with a segmentation requirement, that is, an object in the image to be segmented needs to be segmented, for example, the image to be segmented may be a person image, a landscape image, etc., and the segmentation requirement is to segment the object such as a person, a tree, a river, etc. in the image.
In practical application, the terminal device may be a device for displaying an image to be segmented, and the user may add an object identifier to the image to be segmented based on the device, including, but not limited to, a notebook computer, a tablet computer, a desktop computer, a mobile phone, and other devices.
Specifically, the terminal device displays the image to be segmented based on an image display request, where the image display request may be generated based on a user requirement, generated based on other device instructions, and the like, and the specification is not limited specifically.
The image to be segmented is displayed, so that a user can see the image to be segmented, and a subsequent user can conveniently set the mark to be segmented on the image to be segmented.
Step 204: and receiving an image segmentation request generated by a user aiming at the object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type.
The object division request refers to a request for dividing an object included in an image to be divided, for example, dividing a target person in a person image, a river in a mountain-water image, or the like. The object segmentation types include a single segmentation type, a local segmentation type, and a population segmentation type. The single segmentation type refers to a segmentation type for segmenting a single subject object in an image, for example, a person, a car and a background exist in the image to be segmented, and if only the person in the image or only the car in the image is segmented, the single segmentation type is included; the partial division type refers to a type in which a part of an object is divided in an image, for example, in an image to be divided including a vehicle, only a wheel portion is divided; the group division type refers to a division type in which two or more objects in an image are divided, for example, a type in which a person and a vehicle are simultaneously divided when the image to be divided contains the person and the vehicle belongs to the group division type.
The image segmentation request contains object identifiers corresponding to the object segmentation types, i.e. different object segmentation types can correspond to different object identifiers.
Specifically, the method for receiving the image segmentation request generated by the user for the object segmentation type of the image to be segmented may include:
and receiving an image segmentation request generated by a user aiming at a single segmentation type of the image to be segmented, wherein the image segmentation request carries an object point identifier corresponding to the single segmentation type.
The object point identification refers to an identification point arranged on an object of an image to be segmented; according to the image segmentation method, a user draws the object point identifier on the object to be segmented of the image to be segmented through the terminal equipment, and then the subsequent image segmentation operation can be completed based on the object point identifier, namely, a plurality of object point identifiers are not required to be printed when the image to be segmented is segmented for the first time, so that the interaction times of the user and the terminal equipment are reduced.
Specifically, after the terminal device acquires the image segmentation request, the terminal device analyzes the image segmentation request and determines the object identifier contained in the image segmentation request; generating an image segmentation request based on an image segmentation type corresponding to the image segmentation requirement of a user and an object identifier corresponding to the image segmentation type; under the condition that the segmentation requirement of the user is that a single object is segmented, determining that the segmentation type corresponding to the user is a single segmentation type; and generating an image segmentation request based on the object point identifier corresponding to the single segmentation type, namely the object point identifier set by the user based on the target object.
In one embodiment of the present disclosure, a user views a character image to be segmented on a terminal device; drawing object point identifiers on the character images to be segmented based on the object identifier drawing tool arranged on the terminal equipment; an image segmentation request is generated based on the object point identification.
Specifically, in the case that the object segmentation type is opposite to the group segmentation type and the local segmentation type, the method for receiving the image segmentation request generated by the user for the object segmentation type of the image to be segmented may include:
and receiving an image segmentation request generated by a user aiming at the local segmentation type or the group segmentation type of the image to be segmented, wherein the image segmentation request carries an object frame identifier corresponding to the local segmentation type or the group segmentation type.
The object frame identification is an identification frame arranged on a target object in the image to be segmented; the user can carry out frame selection on two or more objects to be segmented or frame selection on parts of the objects through the terminal, namely, the subsequent image segmentation operation can be carried out based on the object frame identifiers, namely, a plurality of object point identifiers are not required to be marked when the image to be segmented is segmented for the first time, so that the interaction times of the user and the terminal equipment are reduced.
Specifically, under the condition that the segmentation requirement of the user is that the segmentation object is local or the segmentation group object, determining the segmentation type corresponding to the user as the group segmentation type or the local segmentation type; and generating an image segmentation request based on the object frame identifications corresponding to the group segmentation type or the local segmentation type, namely generating the image segmentation request based on the object frame identifications set by a plurality of objects or the object local.
In one embodiment of the present disclosure, a user views a character image to be segmented on a terminal device; selecting a plurality of persons to be segmented on the image of the persons to be segmented based on an object identification drawing tool arranged on the terminal equipment; an image segmentation request is generated based on the object box identification.
By receiving the image segmentation request carrying the object identifier, the image segmentation in the image to be segmented can be conveniently realized based on the object identifier in the image segmentation request, the interaction times are reduced, and the segmentation efficiency is improved.
Step 206: and determining a target area in the image to be segmented according to the object identification.
The target area refers to an area containing the object to be segmented, which is determined in the image to be segmented based on the object identification.
In practical application, the object identifier includes an object point identifier and an object frame identifier, and the ways of determining the target area by the object point identifier and the object frame identifier are different.
Specifically, the method for determining the target area in the image to be segmented according to the object identifier may include:
determining a preset distance threshold under the condition that the object mark is an object point mark;
and determining a target area in the image to be segmented according to the position information of the object identifier in the image to be segmented and a preset distance threshold.
The preset distance threshold value refers to the maximum value of the distance between the preset object point mark and each point in the image to be segmented; if the distance between the object point mark and a certain point in the image to be segmented is greater than or equal to a preset distance threshold value, the point is not in the target area; after the object point identifier and the preset distance threshold are determined, the object point identifier can be used as a circle center, the preset distance threshold is used as a radius, and the target area is determined to be a circular area.
In a specific embodiment of the present disclosure, an object point identifier carried in an image segmentation request is determined, and a preset distance threshold 5 is determined; and determining a circular target area by taking the object point mark as a center and a preset distance threshold 5 as a radius.
By determining the target area based on the object point identification, when the image to be segmented is segmented for the first time, a user does not need to draw a plurality of points at the same time, so that the interaction times are reduced; by determining the target area, the object in the image to be segmented is conveniently segmented based on the target area, and the guidance of segmentation of the image based on the point is realized.
Specifically, the method for determining the target area in the image to be segmented according to the object identifier may include:
determining a preset expansion threshold under the condition that the object identifier is an object frame identifier;
generating a target frame identifier based on the preset expansion threshold and the object frame identifier;
and determining a target area in the image to be segmented according to the target frame mark.
The preset expansion ratio refers to a ratio of expanding a preset object frame, for example, one third, one fourth, etc. of the mark of the current object frame is expanded; in practical application, the sub-images which are segmented subsequently by the user are determined on the image to be segmented directly based on the object frame identification, but in the method of the specification, in order to improve the segmentation accuracy, the object frame identification is subjected to outward expansion to obtain the object frame identification; the target area is determined in the image to be segmented based on the target frame mark, so that the features can be added in the features for image segmentation, the distinction degree between the object and the background can be conveniently highlighted, and the subsequent segmentation accuracy is further improved.
In a specific embodiment of the present disclosure, it is determined that the image segmentation request carries an object frame identifier, and a preset expansion ratio is determined to be one fourth; performing outward expansion according to the object frame identification to obtain a target frame identification; and determining a target area in the image to be segmented based on the target frame identification.
The target area is determined based on the object frame identification, so that multiple dotting of a user on segmentation of multiple objects or local objects is not needed, and the interaction times of the user and terminal equipment are reduced; by determining the target area for subsequent image segmentation based on the target area, frame-based guidance of image segmentation is achieved.
Step 208: and dividing the target object in the image to be divided based on the target area to obtain an image division result.
The image segmentation result is a result obtained by segmenting a target object in an image to be segmented based on a target area; the image segmentation result can be used in scenes such as image editing, image material generation, image annotation and the like.
In practical application, the target area generated based on the object point identifier is different from the target area generated based on the object frame identifier, and further, the mode of dividing the target object based on the target area is also different, specifically as follows:
in the case that the target region is generated based on the object point identifier, the method for segmenting the target object in the image to be segmented based on the target region may include:
determining image size information and a historical segmentation result of the image to be segmented;
Creating an initial positive point image and a negative point image consistent with the image size information;
adjusting elements of a target area in the initial positive point image to obtain a positive point image;
and dividing a target object in a target to-be-divided image generated based on the positive point image, the negative point image, the to-be-divided image and the historical dividing result.
Wherein, the image size information refers to the height information and the width information of the image; the history segmentation result is a result obtained when the target object is segmented by the image to be segmented last time, in practical application, because the segmentation result can deviate from the requirement of the user, the user can segment the target object for multiple times, each segmentation can obtain a corresponding image segmentation result, and if the history segmentation result does not exist in the first segmentation, an image which is consistent with the image size information and only contains 0 element can be generated as the history segmentation result; the initial positive dot image and the negative dot image refer to images generated based on the image size information, and elements contained in the initial positive dot image and the negative dot image are 0 elements; and determining a target area on the initial positive point diagram, and modifying 0 element in the target area into 1 element to obtain a positive point image.
If the first image segmentation is not in accordance with the requirement, the user can be prompted to continuously sign positive point identifiers or negative point identifiers for further segmentation of the images, wherein the positive point identifiers correspond to positive point images, and the negative point identifiers correspond to negative point images.
The target image to be segmented is an image which is obtained by combining the positive point image, the negative point image, the image to be segmented and the historical segmentation result and comprises 6 image channels; specifically, the image to be segmented occupies 3 image channels, and the positive point image, the negative point image and the history segmentation result occupy one image channel respectively, so that the channels are combined to obtain a 6-channel image.
In the case that the target region is generated based on the object frame identifier, the method for segmenting the target object in the image to be segmented based on the target region may include:
determining image size information and historical segmentation results of the image to be segmented;
creating a positive point image and an initial negative point image consistent with the image size information threshold;
adjusting elements outside the target area in the initial negative point image to obtain a negative point image;
and dividing a target object in a target to-be-divided image generated based on the positive point image, the negative point image, the to-be-divided image and the historical dividing result.
Wherein, the image size information refers to the height information and the width information of the image; the history segmentation result is a result obtained when the target object is segmented by the image to be segmented last time, in practical application, because the segmentation result can deviate from the requirement of the user, the user can segment the target object for multiple times, each segmentation can obtain a corresponding image segmentation result, and if the history segmentation result does not exist in the first segmentation, an image which is consistent with the image size information and only contains 0 element can be generated as the history segmentation result; the initial negative point image and the positive point image refer to images generated based on the image size information, and elements contained in the initial positive point image and the negative point image are 0 elements; and determining a target area on the initial negative point diagram, and modifying 0 elements outside the target area into 1 elements to obtain a negative point image.
If the first image segmentation is not in accordance with the requirement, the user can be prompted to continuously sign positive point identifiers or negative point identifiers for further segmentation of the images, wherein the positive point identifiers correspond to positive point images, and the negative point identifiers correspond to negative point images.
The target image to be segmented is an image which is obtained by combining the positive point image, the negative point image, the image to be segmented and the historical segmentation result and comprises 6 image channels; specifically, the image to be segmented occupies 3 image channels, and the positive point image, the negative point image and the historical segmentation result occupy one image channel respectively, so that the channels are combined to obtain a 6-channel image.
And adjusting the initial positive point image or the initial negative point image based on the target area, and further generating a target to-be-segmented image for segmentation based on the positive point image and the negative point image so as to carry out object segmentation based on the target to-be-segmented image.
In practical application, in order to improve the accuracy of image segmentation, feature enhancement can be performed on the features of the target image to be segmented.
Specifically, the method for segmenting the target object in the target to-be-segmented image generated based on the positive point image, the negative point image, the to-be-segmented image and the historical segmentation result may include:
extracting image characteristic information of the target image to be segmented;
determining marked features and unmarked features in the target image to be segmented, wherein the marked features are determined based on object identifiers;
calculating the similarity value of the marked features and each unmarked feature, and carrying out feature enhancement on each unmarked feature based on each similarity value to obtain a target feature;
the method comprises the steps of segmenting a target object in a target to-be-segmented image containing marked features and target features.
The image characteristic information refers to characteristic data corresponding to the target image to be segmented; the marked features refer to features obtained by marking the features of the image to be segmented based on the object identification; the unlabeled feature refers to an element not involved in the object identification, for example, when a point s is marked on the hand of the person image, the point s on the image to be segmented is a marked feature, and the features of the rest of unlabeled areas are unlabeled features; drawing an object frame identifier on the head of the person image, wherein the image characteristics between the object frame identifier and the target frame identifier generated based on the object frame identifier are marked characteristics; the similarity value of the marked features and each unmarked feature is calculated, so that the difference between the rest features and the actual object features is convenient to determine, if the difference is large, namely the similarity is small, the rest features can be marked as negative points, and if the difference is small, namely the similarity is large, the rest features can be marked as positive points; and labeling the target image to be segmented through the similarity value, so as to obtain the target characteristics with enhanced characteristics.
The feature enhancement mode of the present specification will be further described with reference to fig. 3. Specifically, extracting image characteristic information in a target image to be segmented based on a segmentation network, and inputting the image characteristic information into a CCR module, namely a characteristic enhancement module; the feature enhancement module performs feature enhancement on the image features by calculating the similarity between any position in the feature image and the marked region, so that marking information is transmitted to other uncertain positions; referring to fig. 3, fig. 3 is a schematic diagram of a feature enhancement method according to an embodiment of the present disclosure, where X represents a depth feature of a picture output by a segmentation network, F N Representing negative area characteristics, F P The positive region characteristics are represented by a number of features,indicating matrix multiplication, and the element corresponding to multiplication. S is S N And S is P Respectively represent X and F N F (F) P Similarity matrix calculated by matrix multiplication, Y N And Y P Represented by F N F (F) P New features are obtained by summing the sums, respectively.Finally, the new feature and the original feature are weighted and added according to the rough segmentation result to obtain the final enhanced feature Y E 。
The image features are enhanced so as to carry out image segmentation processing based on the image containing the sharp features, thereby improving the accuracy of image segmentation.
Further, after the image segmentation result is obtained, if the image segmentation result does not meet the user requirement, the user can further segment the target object in the image to be segmented by continuing to set the object point identification mode on the image to be segmented.
Specifically, the method further includes, after obtaining an image segmentation result, segmenting the target object in the image to be segmented based on the target region:
determining a positive point object identifier or a negative point object identifier in a re-segmentation request under the condition that the re-segmentation request aiming at an image segmentation result is received;
and re-segmenting the target object in the image to be segmented based on the positive point object identification or the negative point object identification and the image segmentation result to obtain an image segmentation result.
The re-segmentation request refers to the segmentation processing of the segmented image to be segmented, which is performed on the target object and obtains the corresponding image segmentation result; the positive point object identification refers to an identification set on an object to be segmented by a user, and the positive point object identification is not overlapped with a historical object point identification corresponding to the object to be segmented; the negative point object identification refers to an identification which is set outside the object to be segmented by a user.
Generating a new target to-be-segmented image through the positive point object identifier, the negative point object identifier, the image segmentation result and the to-be-segmented image which are input by a user in the current segmentation, and segmenting the target object of the new target to-be-segmented image to obtain the image segmentation result of the current segmentation.
Further, the method for re-segmenting the target object in the image to be segmented based on the positive point object identifier or the negative point object identifier and the image segmentation result to obtain the image segmentation result may include:
adjusting an initial positive point image corresponding to the image to be segmented based on the positive point object identification, or adjusting an initial negative point image corresponding to the image to be segmented based on the negative point object identification, so as to obtain a target positive point image or a target negative point image;
generating a target image to be segmented according to the target positive point image or the target negative point image, the image to be segmented and the image segmentation result;
and dividing the target object in the target image to be divided.
Specifically, when a user segments an image to be segmented for the first time, only one object point identifier or one object frame identifier can be input, and if the image segmentation result obtained for the first time does not accord with the expectation, the user can mark a positive point object identifier on a target object on the image to be segmented or mark a negative point object identifier on a non-target object area; adjusting 0 element at a corresponding position on the initial positive point image to 1 element based on the positive point object identification to obtain a target positive point image; and adjusting 1 element at a corresponding position on the initial negative point image to 0 element based on the negative point object identification to obtain the target negative point image.
Further, generating a target image to be segmented based on the target positive point image or the target negative point image, the image to be segmented and an image segmentation result; carrying out feature enhancement on unlabeled features corresponding to the target image to be segmented to obtain target features; and re-segmenting the target object based on the target to-be-segmented image containing the target feature and the marked feature to obtain the current image segmentation result.
One embodiment of the present specification enables displaying an image to be segmented; receiving an image segmentation request generated by a user aiming at an object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type; determining a target area in the image to be segmented according to the object identifier; and dividing the target object in the image to be divided based on the target area to obtain an image division result.
According to the image segmentation method, an image segmentation request generated based on the object segmentation type of the image to be segmented is received, and the image segmentation request contains the object identification corresponding to the object segmentation type, so that the interaction form of a user in image segmentation is enriched, namely, different object identifications can be set for different object segmentation types; determining a target area in the image to be segmented based on the object identification, so that the determination mode of the target area is enriched; and dividing the target object in the graph to be processed based on the target area, thereby realizing the accuracy of image division. The method enriches the object identification form, enriches the segmentation form of the image to be segmented, and avoids the problems that the interaction frequency between a user and terminal equipment is excessive and the interaction efficiency is affected due to the same segmentation mode under different object segmentation types.
Referring to fig. 4, fig. 4 shows a flowchart of another image segmentation method provided according to an embodiment of the present disclosure, which is applied to a cloud device, and specifically includes the following steps:
step 402: and receiving an image segmentation instruction aiming at the image to be segmented, which is sent by the user terminal.
Specifically, the user side is a terminal device operable by a user; the method comprises the steps that a user generates an image segmentation instruction through interaction with a user side, wherein the image segmentation instruction is generated based on an object segmentation type of an image to be segmented by the user, and the image segmentation instruction contains an object identifier corresponding to the object segmentation type. The image segmentation instruction is sent to the cloud device, and the cloud device receives the image segmentation instruction so that the cloud device can segment the image to be segmented based on the image segmentation instruction.
Step 404: and determining an object identification of the image to be segmented according to the image segmentation instruction, and determining a target area in the image to be segmented based on the object identification.
Specifically, after receiving an image segmentation request, the cloud device determines an object identifier of an image to be segmented based on the image segmentation request, and determines a target area in the image to be segmented based on the object identifier; if the object mark is the object point mark, determining a target area based on the object point mark and a preset distance threshold; if the object identifier is the object frame identifier, generating a target frame identifier based on the object frame representation and a preset expansion ratio, and determining a target area based on the target frame identifier.
Step 406: and dividing the target object in the image to be divided based on the target area to obtain an image division result.
Specifically, the positive point image or the negative point image corresponding to the image to be segmented is adjusted according to the target area; further, generating a 6-channel image based on the positive point image, the negative point image, the image to be segmented, and the historical segmentation result; and inputting the 6-channel image into a segmentation module to obtain an image segmentation result.
Step 408: and returning the image segmentation result to the user side.
Specifically, after the image to be segmented is segmented based on the image segmentation instruction, the image segmentation result obtained by segmentation is returned to the user side and displayed on the front end interface of the user side, so that a user can send out a re-segmentation request or complete a corresponding image processing task based on the image segmentation result.
One embodiment of the present specification enables displaying an image to be segmented; receiving an image segmentation request generated by a user aiming at an object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type; determining a target area in the image to be segmented according to the object identifier; and dividing the target object in the image to be divided based on the target area to obtain an image division result.
According to the image segmentation method, an image segmentation request generated based on the object segmentation type of the image to be segmented is received, and the image segmentation request contains the object identification corresponding to the object segmentation type, so that the interaction form of a user in image segmentation is enriched, namely, different object identifications can be set for different object segmentation types; determining a target area in the image to be segmented based on the object identification, so that the determination mode of the target area is enriched; and dividing the target object in the graph to be processed based on the target area, thereby realizing the accuracy of image division. The method enriches the object identification form, enriches the segmentation form of the image to be segmented, and avoids the problems that the interaction frequency between a user and terminal equipment is excessive and the interaction efficiency is affected due to the same segmentation mode under different object segmentation types.
The image segmentation method provided in the present specification will be further described with reference to fig. 5 by taking an application of the image segmentation method to an image D as an example. Fig. 5 is a schematic diagram illustrating a processing procedure of an image segmentation method according to an embodiment of the present disclosure, which specifically includes:
as shown in fig. 5, a person object and a vehicle object are contained in the image D; the requirement of the user 1 is to divide the car object and the person object in the image D at the same time; determining that the object segmentation type of the user 1 is a group segmentation type, and generating an image segmentation request based on the object frame identification drawn on the image D by the user; determining an object frame identifier based on the image segmentation request, and performing outward expansion on the image frame identifier to obtain a target frame identifier; cutting the image D based on the target frame mark, and scaling to a target size to obtain a sub-image; generating a corresponding positive point image and a corresponding negative point image based on the sub-images by the image processing model, and acquiring a historical segmentation result; generating a 6-channel image based on the positive point image, the negative point image, the sub-image and the historical segmentation result; and inputting the 6-channel image into a segmentation module consisting of a segmentation network and CCR, and obtaining depth features and a rough segmentation result. And then the depth characteristics and the rough segmentation result are input into a finishing network together, and the finishing network further processes the image segmentation result to obtain a finer segmentation result.
The requirement of the user 2 is to divide the vehicle object in the image D; determining that the object segmentation type corresponding to the user 2 is a single segmentation type, and generating an image segmentation request based on the object point identifier drawn on the vehicle object by the user; generating an initial negative point image and a positive point image based on the image D, and adjusting the initial negative point image based on the object point mark to obtain a negative point image; generating a 6-channel image according to the positive point image, the negative point image, the sub-image and the historical segmentation result; and inputting the 6-channel image into a segmentation module consisting of a segmentation network and CCR, and obtaining depth features and a rough segmentation result. And then the depth characteristics and the rough segmentation result are input into a finishing network together, and the finishing network further processes the image segmentation result to obtain a finer segmentation result.
According to the image segmentation method, an image segmentation request generated based on the object segmentation type of the image to be segmented is received, and the image segmentation request contains the object identification corresponding to the object segmentation type, so that the interaction form of a user in image segmentation is enriched, namely, different object identifications can be set for different object segmentation types; determining a target area in the image to be segmented based on the object identification, so that the determination mode of the target area is enriched; and dividing the target object in the graph to be processed based on the target area, thereby realizing the accuracy of image division. The method enriches the object identification form, enriches the segmentation form of the image to be segmented, and avoids the problems that the interaction frequency between a user and terminal equipment is excessive and the interaction efficiency is affected due to the same segmentation mode under different object segmentation types.
Corresponding to the above method embodiments, the present disclosure further provides an image segmentation apparatus embodiment, and fig. 6 shows a schematic structural diagram of an image segmentation apparatus according to one embodiment of the present disclosure. As shown in fig. 6, the apparatus includes:
a display module 602 configured to display an image to be segmented;
a receiving module 604, configured to receive an image segmentation request generated by a user for an object segmentation type of the image to be segmented, where the image segmentation request carries an object identifier corresponding to the object segmentation type;
a determining module 606 configured to determine a target region in the image to be segmented according to the object identification;
a segmentation module 608 is configured to segment the target object in the image to be segmented based on the target region, and obtain an image segmentation result.
Optionally, the object segmentation types include a single segmentation type, a local segmentation type, and a population segmentation type.
Optionally, the receiving module 604 is further configured to:
and receiving an image segmentation request generated by a user aiming at a single segmentation type of the image to be segmented, wherein the image segmentation request carries an object point identifier corresponding to the single segmentation type.
Optionally, the determining module 606 is further configured to:
determining a preset distance threshold under the condition that the object mark is an object point mark;
and determining a target area in the image to be segmented according to the position information of the object identifier in the image to be segmented and a preset distance threshold.
Optionally, the segmentation module 608 is further configured to:
determining image size information and a historical segmentation result of the image to be segmented;
creating an initial positive point image and a negative point image consistent with the image size information;
adjusting elements of a target area in the initial positive point image to obtain a positive point image;
and dividing a target object in a target to-be-divided image generated based on the positive point image, the negative point image, the to-be-divided image and the historical dividing result.
Optionally, the receiving module 604 is further configured to:
and receiving an image segmentation request generated by a user aiming at the local segmentation type or the group segmentation type of the image to be segmented, wherein the image segmentation request carries an object frame identifier corresponding to the local segmentation type or the group segmentation type.
Optionally, the determining module 606 is further configured to:
determining a preset expansion threshold under the condition that the object identifier is an object frame identifier;
generating a target frame identifier based on the preset expansion threshold and the object frame identifier;
and determining a target area in the image to be segmented according to the target frame mark.
Optionally, the segmentation module 608 is further configured to:
determining image size information and historical segmentation results of the image to be segmented;
creating a positive point image and an initial negative point image consistent with the image size information threshold;
adjusting elements outside the target area in the initial negative point image to obtain a negative point image;
and dividing a target object in a target to-be-divided image generated based on the positive point image, the negative point image, the to-be-divided image and the historical dividing result.
Optionally, the segmentation module 608 is further configured to:
extracting image characteristic information of the target image to be segmented;
determining marked features and unmarked features in the target image to be segmented, wherein the marked features are determined based on object identifiers;
calculating the similarity value of the marked features and each unmarked feature, and carrying out feature enhancement on each unmarked feature based on each similarity value to obtain a target feature;
The method comprises the steps of segmenting a target object in a target to-be-segmented image containing marked features and target features.
Optionally, the apparatus further comprises a segmentation sub-module configured to:
determining a positive point object identifier or a negative point object identifier in a re-segmentation request under the condition that the re-segmentation request aiming at an image segmentation result is received;
and re-segmenting the target object in the image to be segmented based on the positive point object identification or the negative point object identification and the image segmentation result to obtain an image segmentation result.
Optionally, the segmentation submodule is further configured to:
adjusting an initial positive point image corresponding to the image to be segmented based on the positive point object identification, or adjusting an initial negative point image corresponding to the image to be segmented based on the negative point object identification, so as to obtain a target positive point image or a target negative point image;
generating a target image to be segmented according to the target positive point image or the target negative point image, the image to be segmented and the image segmentation result;
and dividing the target object in the target image to be divided.
The image segmentation device receives an image segmentation request generated based on the object segmentation type of an image to be segmented, wherein the image segmentation request contains object identifiers corresponding to the object segmentation type, so that interaction forms of users in image segmentation are enriched, namely different object identifiers can be set for different object segmentation types; determining a target area in the image to be segmented based on the object identification, so that the determination mode of the target area is enriched; and dividing the target object in the graph to be processed based on the target area, thereby realizing the accuracy of image division. The method enriches the object identification form, enriches the segmentation form of the image to be segmented, and avoids the problems that the interaction frequency between a user and terminal equipment is excessive and the interaction efficiency is affected due to the same segmentation mode under different object segmentation types.
The above is a schematic solution of an image segmentation apparatus of the present embodiment. It should be noted that, the technical solution of the image segmentation apparatus and the technical solution of the image segmentation method belong to the same concept, and details of the technical solution of the image segmentation apparatus, which are not described in detail, can be referred to the description of the technical solution of the image segmentation method.
Fig. 7 illustrates a block diagram of a computing device 700 provided in accordance with one embodiment of the present description. The components of computing device 700 include, but are not limited to, memory 710 and processor 720. Processor 720 is coupled to memory 710 via bus 730, and database 750 is used to store data.
Computing device 700 also includes access device 740, access device 740 enabling computing device 700 to communicate via one or more networks 760. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 740 may include one or more of any type of network interface, wired or wireless (e.g., a Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 700, as well as other components not shown in FIG. 7, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device illustrated in FIG. 7 is for exemplary purposes only and is not intended to limit the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 700 may be any type of stationary or mobile computing device including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 700 may also be a mobile or stationary server.
Wherein the processor 720 is configured to execute computer-executable instructions that, when executed by the processor, perform the steps of the image segmentation method described above. The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the image segmentation method belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the image segmentation method.
An embodiment of the present disclosure also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the image segmentation method described above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the image segmentation method belong to the same concept, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the image segmentation method.
An embodiment of the present specification also provides a computer program, wherein the computer program, when executed in a computer, causes the computer to perform the steps of the image segmentation method described above.
The above is an exemplary version of a computer program of the present embodiment. It should be noted that, the technical solution of the computer program and the technical solution of the image segmentation method belong to the same conception, and details of the technical solution of the computer program, which are not described in detail, can be referred to the description of the technical solution of the image segmentation method.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that, the information and data such as the image, the model, the sample set and the like in the embodiment of the method are all information and data authorized by the user or fully authorized by each party, and the collection, the use and the processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and are provided with corresponding operation entries for the user to select authorization or rejection.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the embodiments are not limited by the order of actions described, as some steps may be performed in other order or simultaneously according to the embodiments of the present disclosure. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the embodiments described in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the teaching of the embodiments. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the invention. This specification is to be limited only by the claims and the full scope and equivalents thereof.
Claims (12)
1. An image segmentation method applied to a terminal device comprises the following steps:
displaying an image to be segmented;
receiving an image segmentation request generated by a user aiming at an object segmentation type of the image to be segmented, wherein the image segmentation request carries an object identifier corresponding to the object segmentation type, and the object identifier comprises an object point identifier and an object frame identifier;
determining a target area in the image to be segmented according to the object identifier;
obtaining an image segmentation result by segmenting a target object in the image to be segmented based on the target region, wherein the segmenting the target object in the image to be segmented based on the target region comprises:
determining image size information and a historical segmentation result of the image to be segmented;
determining a positive point image and a negative point image which are consistent with the image size information, wherein an initial positive point image and a negative point image which are consistent with the image size information are created under the condition that the object mark is an object point mark, elements of a target area in the initial positive point image are adjusted to obtain the positive point image, and a positive point image and an initial negative point image which are consistent with the image size information are created under the condition that the object mark is an object frame mark, and elements except the target area in the initial negative point image are adjusted to obtain the negative point image;
And dividing a target object in a target to-be-divided image generated based on the positive point image, the negative point image, the to-be-divided image and the historical dividing result.
2. The method of claim 1, the object segmentation types comprising a single segmentation type, a local segmentation type, and a population segmentation type.
3. The method of claim 2, receiving an image segmentation request generated by a user for an object segmentation type of the image to be segmented, comprising:
and receiving an image segmentation request generated by a user aiming at a single segmentation type of the image to be segmented, wherein the image segmentation request carries an object point identifier corresponding to the single segmentation type.
4. A method according to claim 3, wherein determining a target region in the image to be segmented from the object identification comprises:
determining a preset distance threshold under the condition that the object mark is an object point mark;
and determining a target area in the image to be segmented according to the position information of the object identifier in the image to be segmented and a preset distance threshold.
5. The method of claim 2, receiving an image segmentation request generated by a user for an object segmentation type of the image to be segmented, comprising:
And receiving an image segmentation request generated by a user aiming at the local segmentation type or the group segmentation type of the image to be segmented, wherein the image segmentation request carries an object frame identifier corresponding to the local segmentation type or the group segmentation type.
6. The method of claim 4, determining a target region in the image to be segmented from the object identification, comprising:
determining a preset expansion threshold under the condition that the object identifier is an object frame identifier;
generating a target frame identifier based on the preset expansion threshold and the object frame identifier;
and determining a target area in the image to be segmented according to the target frame mark.
7. The method of claim 1, segmenting a target object in a target to-be-segmented image generated based on the positive point image, the negative point image, the to-be-segmented image, and the historical segmentation result, comprising:
extracting image characteristic information of the target image to be segmented;
determining marked features and unmarked features in the target image to be segmented, wherein the marked features are determined based on object identifiers;
calculating the similarity value of the marked features and each unmarked feature, and carrying out feature enhancement on each unmarked feature based on each similarity value to obtain a target feature;
The method comprises the steps of segmenting a target object in a target to-be-segmented image containing marked features and target features.
8. The method of claim 1, further comprising, after obtaining an image segmentation result, segmenting a target object in the image to be segmented based on the target region:
determining a positive point object identifier or a negative point object identifier in a re-segmentation request under the condition that the re-segmentation request aiming at an image segmentation result is received;
and re-segmenting the target object in the image to be segmented based on the positive point object identification or the negative point object identification and the image segmentation result to obtain an image segmentation result.
9. The method of claim 8, further segmenting the target object in the image to be segmented based on the positive or negative object identification and the image segmentation result, to obtain an image segmentation result, comprising:
adjusting an initial positive point image corresponding to the image to be segmented based on the positive point object identification, or adjusting an initial negative point image corresponding to the image to be segmented based on the negative point object identification, so as to obtain a target positive point image or a target negative point image;
Generating a target image to be segmented according to the target positive point image or the target negative point image, the image to be segmented and the image segmentation result;
and dividing the target object in the target image to be divided.
10. An image segmentation method applied to cloud equipment comprises the following steps:
receiving an image segmentation instruction aiming at an image to be segmented, which is sent by a user terminal;
determining an object identifier of the image to be segmented according to the image segmentation instruction, and determining a target area in the image to be segmented based on the object identifier, wherein the object identifier comprises an object point identifier and an object frame identifier;
obtaining an image segmentation result by segmenting a target object in the image to be segmented based on the target region, wherein the segmenting the target object in the image to be segmented based on the target region comprises:
determining image size information and a historical segmentation result of the image to be segmented;
determining a positive point image and a negative point image which are consistent with the image size information, wherein an initial positive point image and a negative point image which are consistent with the image size information are created under the condition that the object mark is an object point mark, elements of a target area in the initial positive point image are adjusted to obtain the positive point image, and a positive point image and an initial negative point image which are consistent with the image size information are created under the condition that the object mark is an object frame mark, and elements except the target area in the initial negative point image are adjusted to obtain the negative point image;
Dividing a target object in a target to-be-divided image generated based on the positive point image, the negative point image, the to-be-divided image and the historical dividing result;
and returning the image segmentation result to the user side.
11. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, which when executed by the processor, implement the steps of the image segmentation method of any one of claims 1 to 10.
12. A computer readable storage medium storing computer executable instructions which when executed by a processor implement the steps of the image segmentation method of any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310242125.4A CN116385459B (en) | 2023-03-08 | 2023-03-08 | Image segmentation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310242125.4A CN116385459B (en) | 2023-03-08 | 2023-03-08 | Image segmentation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116385459A CN116385459A (en) | 2023-07-04 |
CN116385459B true CN116385459B (en) | 2024-01-09 |
Family
ID=86962511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310242125.4A Active CN116385459B (en) | 2023-03-08 | 2023-03-08 | Image segmentation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116385459B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101000690A (en) * | 2005-10-17 | 2007-07-18 | 美国西门子医疗解决公司 | Method for improving image consistency, signal, computer readable medium and system |
CN107452003A (en) * | 2017-06-30 | 2017-12-08 | 大圣科技股份有限公司 | A kind of method and device of the image segmentation containing depth information |
CN108875769A (en) * | 2018-01-23 | 2018-11-23 | 北京迈格威科技有限公司 | Data mask method, device and system and storage medium |
CN110276344A (en) * | 2019-06-04 | 2019-09-24 | 腾讯科技(深圳)有限公司 | A kind of method of image segmentation, the method for image recognition and relevant apparatus |
CN110555855A (en) * | 2019-09-06 | 2019-12-10 | 聚好看科技股份有限公司 | GrabCont algorithm-based image segmentation method and display device |
CN112950647A (en) * | 2019-12-10 | 2021-06-11 | 杭州海康威视数字技术股份有限公司 | Image segmentation method, device, equipment and storage medium |
CN113361530A (en) * | 2020-03-06 | 2021-09-07 | 上海交通大学 | Image semantic accurate segmentation and optimization method using interaction means |
CN113407083A (en) * | 2021-06-24 | 2021-09-17 | 上海商汤科技开发有限公司 | Data labeling method and device, electronic equipment and storage medium |
CN113554661A (en) * | 2020-04-03 | 2021-10-26 | 奥多比公司 | Integrated interactive image segmentation |
CN113837194A (en) * | 2021-09-23 | 2021-12-24 | 北京百度网讯科技有限公司 | Image processing method, image processing apparatus, electronic device, and storage medium |
CN114092484A (en) * | 2020-08-06 | 2022-02-25 | 阿里巴巴集团控股有限公司 | Interactive image segmentation method, system, device and storage medium |
CN114494298A (en) * | 2022-01-28 | 2022-05-13 | 北京字跳网络技术有限公司 | Object segmentation method, device, equipment and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10192129B2 (en) * | 2015-11-18 | 2019-01-29 | Adobe Systems Incorporated | Utilizing interactive deep learning to select objects in digital visual media |
US11676279B2 (en) * | 2020-12-18 | 2023-06-13 | Adobe Inc. | Utilizing a segmentation neural network to process initial object segmentations and object user indicators within a digital image to generate improved object segmentations |
-
2023
- 2023-03-08 CN CN202310242125.4A patent/CN116385459B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101000690A (en) * | 2005-10-17 | 2007-07-18 | 美国西门子医疗解决公司 | Method for improving image consistency, signal, computer readable medium and system |
CN107452003A (en) * | 2017-06-30 | 2017-12-08 | 大圣科技股份有限公司 | A kind of method and device of the image segmentation containing depth information |
CN108875769A (en) * | 2018-01-23 | 2018-11-23 | 北京迈格威科技有限公司 | Data mask method, device and system and storage medium |
CN110276344A (en) * | 2019-06-04 | 2019-09-24 | 腾讯科技(深圳)有限公司 | A kind of method of image segmentation, the method for image recognition and relevant apparatus |
CN110555855A (en) * | 2019-09-06 | 2019-12-10 | 聚好看科技股份有限公司 | GrabCont algorithm-based image segmentation method and display device |
CN112950647A (en) * | 2019-12-10 | 2021-06-11 | 杭州海康威视数字技术股份有限公司 | Image segmentation method, device, equipment and storage medium |
CN113361530A (en) * | 2020-03-06 | 2021-09-07 | 上海交通大学 | Image semantic accurate segmentation and optimization method using interaction means |
CN113554661A (en) * | 2020-04-03 | 2021-10-26 | 奥多比公司 | Integrated interactive image segmentation |
CN114092484A (en) * | 2020-08-06 | 2022-02-25 | 阿里巴巴集团控股有限公司 | Interactive image segmentation method, system, device and storage medium |
CN113407083A (en) * | 2021-06-24 | 2021-09-17 | 上海商汤科技开发有限公司 | Data labeling method and device, electronic equipment and storage medium |
WO2022267279A1 (en) * | 2021-06-24 | 2022-12-29 | 上海商汤科技开发有限公司 | Data annotation method and apparatus, and electronic device and storage medium |
CN113837194A (en) * | 2021-09-23 | 2021-12-24 | 北京百度网讯科技有限公司 | Image processing method, image processing apparatus, electronic device, and storage medium |
CN114494298A (en) * | 2022-01-28 | 2022-05-13 | 北京字跳网络技术有限公司 | Object segmentation method, device, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
Reviving Iterative Training with Mask Cuidance for Interactive Segmentation;Konstantin Sofiiuk 等;《arXiv:2102.06583v1》;第1-15页 * |
Also Published As
Publication number | Publication date |
---|---|
CN116385459A (en) | 2023-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110659582A (en) | Image conversion model training method, heterogeneous face recognition method, device and equipment | |
CN112070658A (en) | Chinese character font style migration method based on deep learning | |
CN112584062B (en) | Background audio construction method and device | |
CN110097616B (en) | Combined drawing method and device, terminal equipment and readable storage medium | |
CN105493078A (en) | Color sketch image searching | |
CN110674826B (en) | Character recognition method based on quantum entanglement | |
CN115812221A (en) | Image generation and coloring method and device | |
CN105701489A (en) | Novel digital extraction and identification method and system thereof | |
CN110795925A (en) | Image-text typesetting method based on artificial intelligence, image-text typesetting device and electronic equipment | |
CN108513176A (en) | A kind of socialization video subject extraction system and method based on topic model | |
CN113411550B (en) | Video coloring method, device, equipment and storage medium | |
CN114972847A (en) | Image processing method and device | |
US20220375223A1 (en) | Information generation method and apparatus | |
CN116797868A (en) | Text image generation method and diffusion generation model training method | |
CN116385459B (en) | Image segmentation method and device | |
CN111695323B (en) | Information processing method and device and electronic equipment | |
CN115376137A (en) | Optical character recognition processing and text recognition model training method and device | |
CN113780370A (en) | Visual question answering method, device, equipment and storage medium | |
CN113627124A (en) | Processing method and device for font migration model and electronic equipment | |
JP2016045744A (en) | Image processor, image processing method, and program | |
CN114860980B (en) | Image retrieval method based on matching of sketch local features and global features | |
CN114005114A (en) | Identification method and device and segmentation model training method and device | |
CN118279780A (en) | Image processing method and device | |
CN113744367A (en) | System and method for editing portrait hairstyle in two-dimensional image | |
CN114254142A (en) | Skin generation method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |