Image segmentation labeling method and device, model training method and device, and storage medium
By acquiring touch trajectories and calculating attention weights, the problem of insufficient interactivity in existing image segmentation annotation is solved, achieving efficient and accurate image segmentation annotation and model training.
Patent Information
- Application Number
- CN202011046531.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-29
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2040-09-29
AI Technical Summary
Existing image segmentation and annotation methods lack interactivity, resulting in low annotation efficiency and high costs, requiring professional training.
Touch points and touch counts are obtained using touch trajectories, attention weights are calculated, and a mask image is generated by smearing the labeled image with a finger, and the attention weights are introduced into the model training.
It improves the efficiency and accuracy of image segmentation annotation, reduces annotation costs, simplifies the annotation process, and is suitable for weakly supervised learning scenarios.
Smart Images

Figure CN112181270B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image annotation technology, and in particular to an image segmentation and annotation method, a model training method, an apparatus, and a storage medium. Background Technology
[0002] With the explosive growth of deep learning methods, an increasing number of computer vision tasks have achieved excellent results using deep learning, thereby driving the implementation of applications such as face recognition, autonomous driving, scene understanding, and object detection. Image segmentation tasks, including semantic segmentation, instance segmentation, and panoptic segmentation, are fundamental tasks in computer vision. Image segmentation involves separating different categories of objects in an image at the pixel level. Many advanced functions require low-level image segmentation implementation, followed by further processing of the segmentation results. Currently, image segmentation methods applied to deep learning involve several stages: data acquisition, data labeling, training a deep learning model using the labeled data, and applying the trained deep learning model to segment other images. Data labeling is the most costly part, hence major AI companies have launched their own image segmentation labeling tools. However, these tools often lack interactivity, increasing the cost of training labelers.
[0003] Existing manual labeling methods all use mice and computers to label, which requires professional training for labelers and has low labeling efficiency. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0005] Therefore, this invention proposes an image segmentation and annotation method that improves the efficiency of image segmentation and annotation.
[0006] An image segmentation and annotation method according to a first aspect of the present invention includes:
[0007] Obtain the touch trajectory;
[0008] Based on the touch trajectory, obtain the touch point and the number of touches corresponding to the touch point;
[0009] Calculate the attention weight of the touch point based on the number of touches;
[0010] The image is labeled based on the touch point and the attention weight.
[0011] An image segmentation and annotation method according to an embodiment of the present invention has at least the following beneficial effects: the method reads the touch trajectory, counts the number of touches at each touch point, calculates the attention weight of the touch point based on the number of touches, and adds the attention weight information of the annotation points to the final image annotation. By using touch input and attention weights, the efficiency of image segmentation and annotation is improved.
[0012] According to some embodiments of the present invention, before the step of calculating the attention weight of the touch point based on the number of touches, the method further includes:
[0013] Edge optimization is performed on the touch trajectory.
[0014] According to some embodiments of the present invention, the touch trajectory includes touch color, and the touch color corresponds to the category of the labeled object.
[0015] According to some embodiments of the present invention, the image segmentation and annotation method further includes:
[0016] A mask is generated based on the touch trajectory;
[0017] The mask is combined with the image to generate a mask image.
[0018] According to some embodiments of the present invention, the transparency of the mask is inversely proportional to the attention weight.
[0019] According to some embodiments of the present invention, calculating the attention weight of the touch point based on the number of touches includes:
[0020] Obtain the maximum number of touches, where the maximum number of touches is the maximum value of the number of touches corresponding to all the touch points;
[0021] The attention weight is calculated based on the number of touches and the maximum number of touches.
[0022] A model training method according to a second aspect of the present invention includes:
[0023] The labeled image is obtained using the image segmentation and annotation method described above;
[0024] Calculate the cross-entropy loss of the labeled regions based on the attention weights of the labeled regions in the labeled image;
[0025] The model is trained using gradient descent based on the cross-entropy loss.
[0026] According to an embodiment of the present invention, a model training method has at least the following beneficial effects: introducing attention weights into the calculation of model cross-entropy loss provides additional attention information and improves the training effect of the model.
[0027] An image segmentation and annotation apparatus according to a third aspect embodiment of the present invention includes:
[0028] The acquisition module is used to acquire touch trajectories;
[0029] The touch module is used to obtain the touch point and the number of touches corresponding to the touch point based on the touch trajectory;
[0030] The weighting module is used to calculate the attention weight of the touch point based on the number of touches;
[0031] The annotation module is used to annotate the image based on the touch point and the attention weight.
[0032] An image segmentation and annotation apparatus according to an embodiment of the present invention has at least the following beneficial effects: by reading touch trajectories and counting the number of touches at each touch point, the attention weight of each touch point is calculated based on the number of touches, and the attention weight information of the annotation points is added to the final image annotation. Through touch input and attention weights, the efficiency of image segmentation and annotation is improved.
[0033] An image segmentation and annotation apparatus according to a fourth aspect of the present invention includes:
[0034] At least one processor, and,
[0035] A memory communicatively connected to the at least one processor; wherein,
[0036] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the image segmentation and annotation method.
[0037] An image segmentation and annotation apparatus according to an embodiment of the present invention has at least the following beneficial effects: by reading touch trajectories and counting the number of touches at each touch point, the attention weight of each touch point is calculated based on the number of touches, and the attention weight information of the annotation points is added to the final image annotation. Through touch input and attention weights, the efficiency of image segmentation and annotation is improved.
[0038] According to a fifth aspect of the present invention, a computer-readable storage medium stores computer-executable instructions for causing a computer to perform the image segmentation and annotation method.
[0039] A computer-readable storage medium according to an embodiment of the present invention has at least the following beneficial effects: by reading touch trajectories and counting the number of touches at each touch point, the attention weight of each touch point is calculated based on the number of touches, and the attention weight information of the annotation points is added to the final image annotation. Through touch input and attention weights, the efficiency of image segmentation annotation is improved.
[0040] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0041] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0042] Figure 1 This is a first flowchart of an image segmentation and annotation method according to an embodiment of the present invention;
[0043] Figure 2 This is a second flowchart of an image segmentation and annotation method according to an embodiment of the present invention. Detailed Implementation
[0044] An embodiment of the present invention provides an image segmentation and annotation method, referring to... Figure 1 ,include:
[0045] S100, Obtain touch trajectory;
[0046] S200: Based on the touch trajectory, obtain the touch point and the number of touches corresponding to the touch point;
[0047] S300: Calculate the attention weight of the touch point based on the number of touches;
[0048] S400, Label the image according to the touch point and the attention weight.
[0049] Specifically, this embodiment provides a precise, intelligent image segmentation annotation system applicable to weakly supervised learning. It is primarily used in computer vision for annotating mask labels in image segmentation tasks. Its advantages include applicability to weakly supervised learning scenarios, high accuracy, strong human-computer interaction, and ease of operation. By abandoning the traditional method of annotation on a computer using a mouse, a tablet computer is used instead: First, the user sets the image input and output directories in the software; then, the annotation categories and corresponding colors are set in the software; the software automatically loads the images to be annotated according to the order of the input directories; the user selects an appropriate annotation size; the user uses their finger to select different categories and apply annotations to the images, with the applied area becoming the mask label; after annotation, the mask labels are automatically saved.
[0050] Weakly supervised image segmentation provides a more intuitive and highly interactive annotation method. Annotations can be made directly using a finger on the terminal, reflecting the principles of human-computer interaction and allowing annotators to complete tasks without specialized training. Because of its simplicity, weakly supervised annotation improves annotation speed compared to fully supervised, fine-grained annotation. Areas repeatedly covered by multiple annotations are recorded with attention weights, providing new supervisory information through these attention areas.
[0051] The annotation process is divided into two stages: the setup stage and the annotation stage.
[0052] During the setup phase, the first step is to configure the dataset folder. This folder provides the input and output directories. It automatically reads images from the input directory and outputs annotations to the output directory, ensuring the automation of the annotation process. A standard Java file stream library is used to load all filenames within the folder, and a hash table is used to store these filenames in memory. This hash table is then exported to an external file to record the completed annotations.
[0053] By pairing label categories with colors, users can intuitively represent different categories of objects in an image using color. This example provides 60 commonly used colors in dataset labeling for users to choose from and integrates all color tones from the Java standard library, constructing a color palette for custom color adjustments. This example also provides labeling color schemes for current mainstream image segmentation datasets such as Pascal VOC and CityScape, which can help users quickly build labeling systems. Simultaneously, a hash table is used to store the pairings, and the hash table is exported to an external file to record the color and category pairing settings.
[0054] During the main interface phase, users continuously complete annotation work, and the program automatically loads dataset images. After annotation is completed, users can click to load the next image. The entire annotation process is a closed loop to meet the needs of continuous and large-scale data annotation work.
[0055] During the annotation phase, an image of any type is first loaded and converted to bitmap format, then drawn on a predefined canvas. Next, Android's touch event feedback mechanism is used to capture the user's touch trajectory, and a mask is overlaid on the canvas for drawing. The drawing result is then returned directly to the user as color.
[0056] The annotation interface provides a motion toolbar where you can select the touch trajectory size and touch category / color. The toolbar uses a linear layout below the canvas for easy and direct use. Different settings can be configured before touching the object to be annotated, based on its characteristics.
[0057] Using your finger to apply annotations replaces the finer details of using a mouse. Simply use your hand to apply the annotations as close to the object as possible. Because using a tablet for direct finger annotation offers excellent interactivity, multiple annotations can be made within the same timeframe, resulting in a larger annotation area and additional attentional information, leading to more pixel-level annotations within the object.
[0058] Users perform image segmentation and annotation by smearing, generating touch trajectories during the process. These trajectories allow for the recording of touch points and the number of touches. The number of touches infers the user's attention to each touch point during annotation, allowing for the calculation of attention weights, which are then stored as annotation information in the annotated image. Compared to traditional edge annotation methods, smearing annotation offers greater interactivity, requiring only direct finger smearing, aligning better with human-computer interaction principles and thus improving annotation speed. Furthermore, recording repeatedly smeared areas provides additional attention information, thereby enhancing the accuracy of smearing annotation.
[0059] The touch trajectory is the screen touch trajectory generated by the user drawing and marking an image. By obtaining the touch trajectory, the user's drawing and marking information can be obtained; the touch point is the pixel on the touch trajectory, and the touch count is the number of times the touch trajectory passes through the touch point.
[0060] Attention weights are used to measure the importance of labeled regions in an image. The higher the attention weight, the more important the labeled region is, meaning the more important the touch point corresponding to the labeled region is.
[0061] By adding attention to the labeled image to follow that information, it is equivalent to containing the labeling information of several ordinary labeled images in a single smeared labeled image, thus improving the labeling accuracy of smeared annotations.
[0062] In some specific embodiments of the present invention, before the step of calculating the attention weight of the touch point based on the number of touches, the method further includes:
[0063] Edge optimization is performed on the touch trajectory.
[0064] Specifically, edge optimization of touch trajectories can improve the accuracy of labeled images. Edge optimization can be achieved using opening or closing operations, or by using the PhotoEditor library to optimize touch trajectories on the canvas.
[0065] The opening operation involves erosion followed by dilation, which can smooth the boundaries of larger objects without significantly changing their area. The closing operation involves dilation followed by erosion, which can eliminate small holes.
[0066] The PhotoEditor library is a photo editor library that uses edge optimization functions to optimize touch trajectories.
[0067] In some specific embodiments of the present invention, the touch trajectory includes touch color, and the touch color corresponds to the category of the labeled object.
[0068] Specifically, different touch colors are used to match different object categories, allowing a single image to contain annotations for multiple object categories.
[0069] Touch color is the same as label color; different label colors are used to label different objects.
[0070] In addition to touch color, the touch trajectory also includes trajectory width. By adjusting the trajectory width, coarser or finer annotations can be made.
[0071] In some specific embodiments of the present invention, the image segmentation and annotation method further includes:
[0072] A mask is generated based on the touch trajectory;
[0073] The mask is combined with the image to generate a mask image.
[0074] Specifically, the touch trajectory is visualized, allowing for real-time display of annotations. A mask is overlaid on the image to highlight the annotated areas. By combining the mask and the image, a mask image is obtained, which serves as the annotated image for display. The mask provides weakly supervised pixel annotations.
[0075] The received touch events trigger canvas editing events, allowing for real-time modification of the mask's transparency and providing real-time feedback to the user. Different levels of overlap are stored separately in folders based on attention weights.
[0076] In some specific embodiments of the present invention, the transparency of the mask is inversely proportional to the attention weight.
[0077] Specifically, using the mask's transparency to indicate the number of times the labeled area has been painted provides a more intuitive representation of the labeled image. Since the number of times the mask has been painted is directly proportional to the attention weight, and the mask's transparency is inversely proportional to the attention weight, lower mask transparency indicates more times the labeled area has been painted, and higher mask transparency indicates fewer times the labeled area has been painted.
[0078] Ten levels of transparency can be set, with an initial transparency of 50%. Each time a pixel is repeatedly painted, the transparency of the mask will decrease by 5%, thus providing an intuitive attentional effect.
[0079] In some specific embodiments of the present invention, calculating the attention weight of the touch point based on the number of touches includes:
[0080] Obtain the maximum number of touches, where the maximum number of touches is the maximum value of the number of touches corresponding to all the touch points;
[0081] The attention weight is calculated based on the number of touches and the maximum number of touches.
[0082] Specifically, the attention weight is calculated by dividing the number of touches by the maximum number of touches. The formula for calculating the attention weight is as follows:
[0083] Attention weight = Number of touches * 10 / Maximum number of touches
[0084] By assigning higher weights to areas with greater overlap, the training of the neural network can be positively guided, while reducing the weights of less overlapping areas can mitigate the negative impact of mislabeling on the neural network.
[0085] Embodiments of the present invention also provide a model training method, comprising:
[0086] The labeled image is obtained using the image segmentation and annotation method described above;
[0087] Calculate the cross-entropy loss of the labeled regions based on the attention weights of the labeled regions in the labeled image;
[0088] The model is trained using gradient descent based on the cross-entropy loss.
[0089] Specifically, after obtaining the labeled images with attention weights, they need to be applied to model training, referring to... Figure 2 The multi-task loss function is calculated and backpropagated to the neural network, which is then trained using stochastic gradient descent. The resulting annotations are suitable for weakly supervised image segmentation learning. Quick and simple annotations are used to assign labels to some pixels, and the training process is enhanced using dense conditional random fields and attention information. In traditional fully supervised image segmentation training methods, each pixel in the training image has a corresponding category label. Each pixel produces an output after passing through the neural network, and the cross-entropy of each pixel in the entire image is compared. The average cross-entropy loss of each pixel in the entire image is used as the final loss function. This embodiment only performs supervised training on the areas with smeared annotations and introduces attention weights to weight the annotation information of different attention regions. It is generally believed that areas repeatedly smeared by the annotator are more helpful for classification, while areas with only a few smears may be mislabeled.
[0090] Neural network training can be performed using a multi-task approach. The deeplabV3+ network architecture from the field of image segmentation is chosen. First, the training image is used to predict the output through the neural network. The output is the confidence score of each pixel belonging to different categories. Then, the cross-entropy loss is calculated with the smeared annotations; the cross-entropy loss is not calculated for unlabeled regions.
[0091] The formula for calculating the multi-task loss function is:
[0092] Total loss =CE loss ×M+λ×CRF loss
[0093] Among them, CE loss It is the similarity tensor obtained by performing cross-entropy calculations between the pixels of the entire image in the training dataset and the pixels in the labeled dataset. M is the attention weight, and CE is the similarity tensor. loss ×M is a weighted average of the different predictions in the image. Another loss function for multi-task analysis is CRF. ioss Dense Conditional Random Fields are used to impose unsupervised constraints on the training images and output predictions. These constraints cause neighboring pixels in the image to tend to be predicted as the same category, which is used to make fine-grained divisions of the segmentation boundaries. λ is the balance coefficient in multi-task learning.
[0094] The specific formula for the multi-task loss function is as follows:
[0095]
[0096] Where i is the index of a pixel in the image, y i y′ is the prediction confidence of pixel i, and y′ is a vector of length equal to the number of classes. i It is its transpose vector; l i ω is the label of pixel i, which is a one-hot code vector with a length equal to the number of categories; i λ is the attention weight, a constant between 0 and 1; λ is the balance coefficient in multi-task learning; w is the relaxation function of the dense conditional random field.
[0097] Embodiments of the present invention also provide an image segmentation and annotation apparatus, comprising:
[0098] The acquisition module is used to acquire touch trajectories;
[0099] The touch module is used to obtain the touch point and the number of touches corresponding to the touch point based on the touch trajectory;
[0100] The weighting module is used to calculate the attention weight of the touch point based on the number of touches;
[0101] The annotation module is used to annotate the image based on the touch point and the attention weight.
[0102] Specifically, the content in the method embodiments is applicable to the device embodiments. The functions implemented in the device embodiments are the same as those in the method embodiments described above, and the beneficial effects achieved are also the same as those achieved in the method embodiments described above.
[0103] The layers, modules, units, and / or platforms included in the apparatus can be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium. The method can be implemented using standard programming techniques—including implementation in a computer program on a non-transitory computer-readable storage medium configured to allow the computer to operate in a specific and predefined manner—according to the methods and figures described in the specific embodiments. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if desired, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. Furthermore, for this purpose, the program can run on a programmed application-specific integrated circuit (ASIC).
[0104] Furthermore, the data processing flows executed by the layers, modules, units, and / or platforms included in the device may be executed in any suitable order, unless otherwise indicated herein or otherwise clearly contradicted by the context. The data processing flows executed by the layers, modules, units, and / or platforms included in the system of this embodiment of the invention may be executed under the control of one or more computer systems configured with executable instructions, and may be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. A computer program includes multiple instructions executable by one or more processors.
[0105] Embodiments of the present invention also provide an image segmentation and annotation apparatus, comprising:
[0106] At least one processor, and,
[0107] A memory communicatively connected to the at least one processor; wherein,
[0108] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the image segmentation and annotation method.
[0109] Specifically, the content of the above method embodiments is applicable to the present device embodiments. The functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0110] Embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the image segmentation and annotation method described above.
[0111] Specifically, the storage medium stores processor-executable instructions, which, when executed by the processor, are used to perform the steps of an interactive information processing method as described in any of the above-described method embodiments. The storage medium may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. Therefore, the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0112] The storage medium can be operatively connected to any suitable type of computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or those communicating with charged particle tools or other imaging devices. The data processing flows executed by the layers, modules, units, and / or platforms included in the system of this invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., so that it can be read by a programmable computer. When the storage medium or device is read by a computer, it can be used to configure and operate the computer to perform the processes described herein. Furthermore, the machine-readable code, or portions thereof, can be transmitted via wired or wireless networks. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media comprises instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. When programmed according to the methods and techniques described in this invention, the invention also includes the computer itself.
[0113] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0114] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0115] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0116] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. An image segmentation and annotation method, characterized in that, include: Obtain the touch trajectory; Based on the touch trajectory, obtain the touch point and the number of touches corresponding to the touch point; Calculate the attention weight of the touch point based on the number of touches; The image is labeled according to the touch point and the attention weight; The image segmentation and annotation method further includes: A mask is generated based on the touch trajectory; The mask is combined with the image to generate a mask image. The number of times the marked area has been painted is indicated by the transparency of the mask. The number of times the area has been painted is directly proportional to the attention weight, while the transparency of the mask is inversely proportional to the attention weight. Therefore, the lower the transparency of the mask, the more times the marked area has been painted, and the higher the attention weight.
2. The image segmentation and annotation method according to claim 1, characterized in that, Before the step of calculating the attention weight of the touch point based on the number of touches, the method further includes: Edge optimization is performed on the touch trajectory.
3. The image segmentation and annotation method according to claim 1, characterized in that, The touch trajectory includes touch color, and the touch color corresponds to the category of the labeled object.
4. The image segmentation and annotation method according to claim 1, characterized in that, The step of calculating the attention weight of the touch point based on the number of touches includes: Obtain the maximum number of touches, where the maximum number of touches is the maximum value of the number of touches corresponding to all the touch points; The attention weight is calculated based on the number of touches and the maximum number of touches.
5. A model training method, characterized in that, include: Annotated images are obtained using the image segmentation and annotation method as described in any one of claims 1 to 4; Calculate the cross-entropy loss of the labeled regions based on the attention weights of the labeled regions in the labeled image; The model is trained using gradient descent based on the cross-entropy loss.
6. An image segmentation and annotation device, characterized in that, include: The acquisition module is used to acquire touch trajectories; The touch module is used to obtain the touch point and the number of touches corresponding to the touch point based on the touch trajectory; The weighting module is used to calculate the attention weight of the touch point based on the number of touches; The annotation module is used to annotate the image based on the touch points and the attention weights; The image segmentation and annotation device further includes: A mask generation module is used to generate a mask based on the touch trajectory; The mask image generation module is used to synthesize the mask with the image to generate a mask image. The number of times the marked area is painted is indicated by the transparency of the mask. The number of times the area is painted is directly proportional to the attention weight, and the transparency of the mask is inversely proportional to the attention weight. Therefore, the lower the transparency of the mask, the more times the marked area is painted, and the higher the attention weight.
7. An image segmentation and annotation device, characterized in that, include: At least one processor, and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the image segmentation and annotation method as described in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the image segmentation and annotation method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Image enhancement method achieved by intelligently increasing field depth
CN103593834A
Method and device for manually smearing sundries, electronic equipment and storage medium
CN111710018A
Method for displaying area extraction result and image processing apparatus
US20150138225A1
Image fusion method and system based on manual smearing
CN104732475A
Terminal
CN104765601A