WO2023029348A1 - Image instance labeling method based on artificial intelligence, and related device - Google Patents

Image instance labeling method based on artificial intelligence, and related device Download PDF

Info

Publication number
WO2023029348A1
WO2023029348A1 PCT/CN2022/071328 CN2022071328W WO2023029348A1 WO 2023029348 A1 WO2023029348 A1 WO 2023029348A1 CN 2022071328 W CN2022071328 W CN 2022071328W WO 2023029348 A1 WO2023029348 A1 WO 2023029348A1
Authority
WO
WIPO (PCT)
Prior art keywords
instance
label
score
detection frame
image
Prior art date
Application number
PCT/CN2022/071328
Other languages
French (fr)
Chinese (zh)
Inventor
王俊
高鹏
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023029348A1 publication Critical patent/WO2023029348A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS

Definitions

  • the present application relates to the technical field of artificial intelligence, in particular to an artificial intelligence-based image instance labeling method, device, electronic equipment, and storage medium.
  • the training data set is a data set with rich label information, and collecting and labeling such a training data set usually requires a huge human cost.
  • image instance segmentation has a higher degree of difficulty, and a large amount of labeled training data is required to truly realize the instance segmentation function.
  • the number of available labeled samples is often insufficient relative to the training scale, or the cost of obtaining samples is too high.
  • annotators with relevant professional knowledge such as doctors
  • the annotation cost of annotators is too high, or the image annotation or judgment cycle is too long, these problems may cause the instance segmentation model to fail. Unable to train effectively.
  • an artificial intelligence-based image instance annotation method which can reduce the number of instances in manually annotated images and improve the accuracy of instances in images annotated by models.
  • the first aspect of the present application provides an artificial intelligence-based image instance labeling method, the method comprising:
  • An instance label of the target image is obtained based on the first label and the second label.
  • the second aspect of the present application provides an artificial intelligence-based image instance labeling device, the device comprising:
  • An instance recognition module used to call a preset instance segmentation model to identify the amount of information of each instance in the target image
  • An instance acquiring module configured to acquire a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, except for the first instance in the target image
  • the instance of is the second instance
  • a first labeling module configured to manually label the first label of the first instance in the target image
  • a second labeling module configured to pseudo-label the second label of the second instance in the target image based on a semi-supervised learning method
  • a label determining module configured to obtain an instance label of the target image based on the first label and the second label.
  • a third aspect of the present application provides an electronic device, the electronic device includes a processor, and the processor is configured to implement the artificial intelligence-based image instance labeling method when executing a computer program stored in a memory.
  • An instance label of the target image is obtained based on the first label and the second label.
  • the fourth aspect of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the artificial intelligence-based image instance labeling method is implemented:
  • An instance label of the target image is obtained based on the first label and the second label.
  • the artificial intelligence-based image instance labeling method, device, electronic equipment, and storage medium described in this application identify the amount of information of each instance in the target image by calling the preset instance segmentation model, so as to extract the information from the target image Obtain the first information amount higher than the preset information amount threshold, the first instance corresponding to the first information amount, and the second instance other than the first instance, and then manually mark the first label of the first instance, and the manually marked instance
  • the accuracy of the label is high. Since the second instance has low information content, it is easy to be recognized and labeled by the model.
  • the second label of the second instance is pseudo-labeled based on the semi-supervised learning method, and the labeling efficiency is high.
  • the application can be applied in the field of digital medical treatment, and the examples in medical images are marked. This application only needs to manually label a small number of instances in a target image, instead of labeling all instances in the entire target image, so as to obtain instance labels with high accuracy while reducing the workload of instance labeling.
  • FIG. 1 is a flow chart of an artificial intelligence-based image instance labeling method provided in Embodiment 1 of the present application.
  • FIG. 2 is a schematic diagram of a target image and two corresponding perturbed images provided by an embodiment of the present application.
  • Fig. 3 is a schematic diagram of a first instance of a target image provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a second example of the target image provided by the embodiment of the present application.
  • FIG. 5 is a structural diagram of an artificial intelligence-based image instance tagging device provided in Embodiment 2 of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided in Embodiment 3 of the present application.
  • the artificial intelligence-based image instance tagging method provided in the embodiment of the present application is executed by electronic equipment, and accordingly, the artificial intelligence-based image instance tagging apparatus runs in the electronic device.
  • instances in an image may be marked based on artificial intelligence technology.
  • artificial intelligence is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
  • Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • FIG. 1 is a flow chart of an artificial intelligence-based image instance labeling method provided in Embodiment 1 of the present application.
  • the artificial intelligence-based image instance labeling method specifically includes the following steps. According to different requirements, the order of the steps in the flow chart can be changed, and some can be omitted.
  • S11 call the preset instance segmentation model to identify the amount of information of each instance in the target image.
  • the preset instance segmentation model may be a pre-trained machine learning model, which is used to identify instances in the image, so as to obtain the amount of information of the instances.
  • Instances refer to target objects in target images, e.g., pedestrians, cars, bicycles, buildings, etc.
  • the target image refers to the image that needs to be labeled with instances.
  • a target image can contain multiple instances, for example, it can contain dozens of instances. Different types of instances have different recognition difficulties. Therefore, it is necessary to consider whether it is necessary to All instances in the target image are manually annotated. Although all instances in the target image can be manually labeled, the accuracy of manual labeling is higher, but the cost of manual labeling is relatively high, and the efficiency is low. In fact, the number of images completed by manual labeling is limited. of.
  • by identifying the amount of information of the instances in the target image it is determined which instances in the target image are to be marked manually and which entities are to be marked by the instance tagging model according to the amount of information.
  • the artificial intelligence-based image instance labeling method can be applied to a medical scene.
  • the target image is a medical image
  • the instances in the target image are multiple organs.
  • Medical images refer to internal tissues obtained non-invasively for medical treatment or medical research, such as images of the stomach, abdomen, heart, knees, brain, such as computed tomography (CT), magnetic resonance Imaging (Magnetic Resonance Imaging, MRI), ultrasound (ultrasonic, US), X-ray images, EEG, and optical photography images generated by medical instruments.
  • the calling the preset instance segmentation model to identify the amount of information of each instance in the target image includes:
  • the information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score.
  • image enhancement can be achieved through image transformation.
  • the purpose of image enhancement is to increase the amount of image data and enrich the diversity of images, thereby improving the generalization ability of the model.
  • image disturbance may be introduced in a transformation manner, for example, adding noise (Noise) to the image to introduce image disturbance.
  • Image noise is the signal that is disturbed by random signals during image acquisition or transmission, which hinders people's understanding and analysis of images. The introduction of noise increases the difficulty of model identification.
  • the top image in Figure 2 is the target image
  • the middle image is Gaussian noise added to the target image
  • the bottom image is the target image Added salt and pepper noise (pepper noise) on the basis of .
  • the image obtained by adding Gaussian noise on the target image is used as the first perturbed image
  • the image obtained by adding salt and pepper noise on the target image is used as the second perturbed image.
  • Input the image (for example, the target image, the first disturbance image, the second disturbance image) into the instance segmentation model, and the instance segmentation model can output the category label of the instance belonging to a certain category in the image, and use the detection frame to frame the instance in the image
  • the position of , and the instance contour mask of the instance can be trained on the basis of the Faster R-CNN model, and the specific training process will not be described in detail. Investigate the consistency of the model's prediction of the target in the sample. If the prediction result changes little before and after the transformation, it means that the target is easier to predict and has less information. If there is a large difference in the prediction result of the target before and after the transformation, then This local target is the target that the model is more likely to confuse, and it should be actively selected for priority labeling.
  • the class label, instance detection frame and instance contour mask After invoking the preset instance segmentation model to identify the class label, instance detection frame and instance contour mask of each instance in the target image, the first perturbed image and the second perturbed image, the class label, instance detection frame and The instance contour mask is calculated to obtain the class label score, the detection frame score and the contour mask score of the instance, so that the information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score, Further, the first instance and the second instance in the target image are determined according to the amount of information of the instances.
  • the calculating the category label score of each instance based on the first category label, the second category label and the third category label includes:
  • the mean value is used as the category label score of the corresponding instance.
  • the category label score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
  • the class probability predicted by the instance segmentation model is 0.9
  • the class probability predicted by the instance segmentation model is 0.9
  • the class predicted by the instance segmentation model is A probability of 0.89 indicates that the instance segmentation model has a high prediction consistency for this instance.
  • the class probability predicted by the instance segmentation model is 0.9, in the first perturbed image, the class probability predicted by the instance segmentation model is 0.4, and in the second perturbed image, the class predicted by the instance segmentation model is A probability of 0.7 indicates that the prediction consistency of the instance segmentation model for this instance is low.
  • the calculating the detection frame score of each instance based on the detection frame of the first instance, the detection frame of the second instance, and the detection frame of the third instance includes:
  • the corresponding detection frame score of the instance is calculated based on the first intersection and union ratio and the second intersection and union ratio according to a preset first calculation model.
  • the detection box score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
  • intersection-over-union ratio represents the degree of overlap between two instance detection frames.
  • the smaller the intersection and union ratio IOU the smaller the overlapping area and the smaller the overlapping degree between the two instance detection frames.
  • the greater the IOU the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the higher the prediction consistency.
  • the smaller the IOU the less similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the lower the prediction consistency.
  • instance L2 is an instance with high information content.
  • the calculating the contour mask score of each instance based on the contour mask of the first instance, the contour mask of the second instance and the contour mask of the third instance includes:
  • a contour mask score corresponding to the instance is calculated based on the first Jaccard distance and the second Jaccard distance according to a preset second calculation model.
  • the instance contour mask is similar to the instance detection box, and is also used to evaluate whether the prediction of the instance segmentation model for the perturbed first and second perturbed images is consistent with the prediction of the target image.
  • Jaccard distance is used to describe the dissimilarity between two contour masks.
  • the larger the Jaccard distance the less overlapping area and lower similarity between two contour masks.
  • the smaller the Jaccard distance the more overlapping areas and higher similarity between two contour masks.
  • the larger the Jaccard distance the less similar the prediction of the instance segmentation model is to the target image and the disturbance image corresponding to the Jaccard distance, that is, the lower the prediction consistency.
  • the smaller the Jaccard distance the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the Jaccard distance, that is, the higher the prediction consistency.
  • the calculation of the information amount of the corresponding instance according to the category label score and the corresponding detection frame score and the contour mask score includes:
  • the final score is determined as the informativeness of the instance.
  • the average of the class label score, detection box score, and contour mask of each instance can also be calculated as the final score of the instance.
  • the final score is used to indicate whether the prediction of the instance segmentation model on the first disturbed image and the second disturbed image is consistent with the prediction on the target image.
  • the lower the final score it indicates that the prediction of the instance segmentation model on the first perturbed image and the second perturbed image is inconsistent with the prediction on the target image.
  • the performance of the first disturbed image and the second disturbed image is more unstable.
  • the higher the final score it indicates that the prediction of the instance segmentation model for the first perturbed image and the second perturbed image is consistent with the prediction of the target image, which means that even after the target image is perturbed, the target image and the perturbed image obtained by the instance segmentation model are The performance of the first perturbed image and the second perturbed image is still very stable.
  • the preset information volume threshold is a preset critical value used to indicate the level of information volume.
  • the instance is regarded as the first instance, and when the information volume of a certain instance is lower than the preset information volume threshold, the instance is regarded as the second instance.
  • the first instance refers to a set of multiple instances with an information amount higher than a preset information amount threshold, such as the area enclosed by an ellipse in the target image as shown in FIG. 3 .
  • the second instance refers to a collection of multiple instances whose information volume is lower than the preset information volume threshold, such as the area framed by an irregular figure in the target image as shown in FIG. 4 .
  • the first instance and the second instance completely constitute the set of instances in the image. That is, a certain instance in the target image is either the first instance or the second instance.
  • the prediction consistency of the instance segmentation model for the target image and the first disturbance image and the second disturbance image is low, so it should be done manually Annotation of instances, such as multiple pedestrians with obvious occlusion.
  • the first instance in the target image can be identified, and the first instance can be manually annotated by an expert with rich annotation experience, thereby improving the accuracy rate of the annotation of the first instance.
  • the instance segmentation of the medical image needs to identify multiple instance individuals in the image, and accurately outline multiple lesion areas for intelligent auxiliary diagnosis. Therefore, the instance labeling difficulty index of the medical image Higher, by manually labeling these high-information (difficult to label) instances, the accuracy will be greatly improved.
  • the second instance is an instance in the target image that is lower than the preset information threshold, the prediction consistency of the instance segmentation model for the target image and the first disturbed image and the second disturbed image is relatively high, so the difficulty of labeling is small. Pseudo-annotation of instances by supervised learning can improve the efficiency of labeling target images.
  • the semi-supervised learning method refers to the instance labeling model obtained through the joint training of the labeled sample set and the unlabeled sample set, and instance labeling of the new unlabeled image through the instance labeling model.
  • the instance label output by the instance labeling model is compared with In terms of instance labels that are artificially labeled, they are called pseudo-labels.
  • the instances in the target image are divided into the first instance and the second instance.
  • the instance label of the first instance is the first label
  • the instance label of the second instance is the second label. Therefore, after obtaining the first label and the second label, the target Labels for all instances in the image have been obtained.
  • the method also includes:
  • the annotated image marked with the instance label may refer to an image used to train the instance label model.
  • the target images marked with the instance labels can be added to the real instance labels.
  • Annotated images are used as a training set, so that the instance labeling model is updated based on the training set.
  • the test set includes test images and the real instance labels of each test image, and the test images in the test set are input into the updated instance labeling model, and the test instance labels of the test images are predicted by the updated instance labeling model.
  • the test instance label is the same as the corresponding real instance label, it indicates that the updated instance annotation model is successfully tested on the test image.
  • the test instance label is not the same as the corresponding real instance label, it indicates that the updated instance labeling model fails to test the test image. Calculate the ratio of the number of successful tests to the number of test images in the test set, and use the ratio as the test accuracy of the instance tagging model, and end the training of the instance tagging model when the test accuracy meets a preset accuracy threshold.
  • the number of images with instance labels is greatly increased by using the target images with instance labels, and the instance labeling model can be updated and trained, thereby improving the performance of the instance labeling model.
  • This application marks a small number of instances in the image instead of all instances. For example, instances with occlusion in some areas in the target image are instances with high information content.
  • instances with occlusion in some areas in the target image are instances with high information content.
  • the other instances of other instances have low information content, no manual labeling is required, and the cost of manual labeling is saved. Since the instances with low information content are easier to identify, semi-supervised learning and labeling can improve the accuracy of instance labeling.
  • the labeling efficiency of the instance is improved.
  • This application only needs to manually label a small number of instances in a target image, instead of labeling all instances in the entire target image, so as to obtain instance labels with high accuracy while reducing the workload of instance labeling.
  • This application is suitable for images with complex layouts and mutual occlusion in different areas. Applying this application to the field of intelligent auxiliary recognition of medical images can simultaneously perform region delineation and quantitative evaluation of different target locations and key organ instances, especially for image regions that may be occluded from each other, this application can perform instance segmentation more effectively.
  • FIG. 5 is a structural diagram of an artificial intelligence-based image instance tagging device provided in Embodiment 2 of the present application.
  • the artificial intelligence-based image instance labeling device 50 may include a plurality of functional modules composed of computer program segments.
  • the computer program of each program segment in the image instance tagging device 50 based on artificial intelligence can be stored in the memory of the electronic device, and executed by at least one processor to execute (see Figure 1 for details) based on artificial intelligence.
  • a feature for image instance annotation may include a plurality of functional modules composed of computer program segments.
  • the artificial intelligence-based image instance tagging device 50 can be divided into multiple functional modules according to the functions it performs.
  • the functional modules may include: an instance identification module 501 , an instance acquisition module 502 , a first labeling module 503 , a second labeling module 504 , a label determination module 505 and a model training module 506 .
  • the module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
  • the instance identification module 501 is configured to call a preset instance segmentation model to identify the amount of information of each instance in the target image.
  • the preset instance segmentation model may be a pre-trained machine learning model, which is used to identify instances in the image, so as to obtain the amount of information of the instances.
  • Instances refer to target objects in target images, e.g., pedestrians, cars, bicycles, buildings, etc.
  • the target image refers to the image that needs to be labeled with instances.
  • a target image can contain multiple instances, for example, it can contain dozens of instances. Different types of instances have different recognition difficulties. Therefore, it is necessary to consider whether it is necessary to All instances in the target image are manually annotated. Although all instances in the target image can be manually labeled, the accuracy of manual labeling is higher, but the cost of manual labeling is relatively high, and the efficiency is low. In fact, the number of images completed by manual labeling is limited. of.
  • by identifying the amount of information of the instances in the target image it is determined which instances in the target image are to be marked manually and which entities are to be marked by the instance tagging model according to the amount of information.
  • the artificial intelligence-based image instance labeling method can be applied to a medical scene.
  • the target image is a medical image
  • the instances in the target image are multiple organs.
  • Medical images refer to internal tissues obtained non-invasively for medical treatment or medical research, such as images of the stomach, abdomen, heart, knees, brain, such as computed tomography (CT), magnetic resonance Imaging (Magnetic Resonance Imaging, MRI), ultrasound (ultrasonic, US), X-ray images, EEG, and optical photography images generated by medical instruments.
  • the instance identification module 501 calls a preset instance segmentation model to identify the amount of information of each instance in the target image, including:
  • the information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score.
  • image enhancement can be achieved through image transformation.
  • the purpose of image enhancement is to increase the amount of image data and enrich the diversity of images, thereby improving the generalization ability of the model.
  • image disturbance may be introduced in a transformation manner, for example, adding noise (Noise) to the image to introduce image disturbance.
  • Image noise is the signal that is disturbed by random signals during image acquisition or transmission, which hinders people's understanding and analysis of images. The introduction of noise increases the difficulty of model identification.
  • the top image in Figure 2 is the target image
  • the middle image is Gaussian noise added to the target image
  • the bottom image is the target image Added salt and pepper noise (pepper noise) on the basis of .
  • the image obtained by adding Gaussian noise on the target image is used as the first perturbed image
  • the image obtained by adding salt and pepper noise on the target image is used as the second perturbed image.
  • Input the image (for example, the target image, the first disturbance image, the second disturbance image) into the instance segmentation model, and the instance segmentation model can output the category label of the instance belonging to a certain category in the image, and use the detection frame to frame the instance in the image
  • the position of , and the instance contour mask of the instance can be trained on the basis of the Faster R-CNN model, and the specific training process will not be described in detail. Investigate the consistency of the model's prediction of the target in the sample. If the prediction result changes little before and after the transformation, it means that the target is easier to predict and has less information. If there is a large difference in the prediction result of the target before and after the transformation, then This local target is the target that the model is more likely to confuse, and it should be actively selected for priority labeling.
  • the class label, instance detection frame and instance contour mask After invoking the preset instance segmentation model to identify the class label, instance detection frame and instance contour mask of each instance in the target image, the first perturbed image and the second perturbed image, the class label, instance detection frame and The instance contour mask is calculated to obtain the class label score, the detection frame score and the contour mask score of the instance, so that the information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score, Further, the first instance and the second instance in the target image are determined according to the amount of information of the instances.
  • the calculating the category label score of each instance based on the first category label, the second category label and the third category label includes:
  • the mean value is used as the category label score of the corresponding instance.
  • the category label score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
  • the class probability predicted by the instance segmentation model is 0.9
  • the class probability predicted by the instance segmentation model is 0.9
  • the class predicted by the instance segmentation model is A probability of 0.89 indicates that the instance segmentation model has a high prediction consistency for this instance.
  • the class probability predicted by the instance segmentation model is 0.9, in the first perturbed image, the class probability predicted by the instance segmentation model is 0.4, and in the second perturbed image, the class predicted by the instance segmentation model is A probability of 0.7 indicates that the prediction consistency of the instance segmentation model for this instance is low.
  • the calculating the detection frame score of each instance based on the detection frame of the first instance, the detection frame of the second instance, and the detection frame of the third instance includes:
  • the corresponding detection frame score of the instance is calculated based on the first intersection and union ratio and the second intersection and union ratio according to a preset first calculation model.
  • the detection box score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
  • intersection-over-union ratio represents the degree of overlap between two instance detection frames.
  • the smaller the intersection and union ratio IOU the smaller the overlapping area and the smaller the overlapping degree between the two instance detection frames.
  • the greater the IOU the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the higher the prediction consistency.
  • the smaller the IOU the less similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the lower the prediction consistency.
  • instance L2 is an instance with high information content.
  • the calculating the contour mask score of each instance based on the contour mask of the first instance, the contour mask of the second instance and the contour mask of the third instance includes:
  • a contour mask score corresponding to the instance is calculated based on the first Jaccard distance and the second Jaccard distance according to a preset second calculation model.
  • the instance contour mask is similar to the instance detection box, and is also used to evaluate whether the prediction of the instance segmentation model for the perturbed first and second perturbed images is consistent with the prediction of the target image.
  • Jaccard distance is used to describe the dissimilarity between two contour masks.
  • the larger the Jaccard distance the less overlapping area and lower similarity between two contour masks.
  • the smaller the Jaccard distance the more overlapping areas and higher similarity between two contour masks.
  • the larger the Jaccard distance the less similar the prediction of the instance segmentation model is to the target image and the disturbance image corresponding to the Jaccard distance, that is, the lower the prediction consistency.
  • the smaller the Jaccard distance the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the Jaccard distance, that is, the higher the prediction consistency.
  • the calculation of the information amount of the corresponding instance according to the category label score and the corresponding detection frame score and the contour mask score includes:
  • the final score is determined as the informativeness of the instance.
  • the average of the class label score, detection box score, and contour mask of each instance can also be calculated as the final score of the instance.
  • the final score is used to indicate whether the prediction of the instance segmentation model on the first disturbed image and the second disturbed image is consistent with the prediction on the target image.
  • the lower the final score it indicates that the prediction of the instance segmentation model on the first perturbed image and the second perturbed image is inconsistent with the prediction on the target image.
  • the performance of the first disturbed image and the second disturbed image is more unstable.
  • the higher the final score it indicates that the prediction of the instance segmentation model for the first perturbed image and the second perturbed image is consistent with the prediction of the target image, which means that even after the target image is perturbed, the target image and the perturbed image obtained by the instance segmentation model are The performance of the first perturbed image and the second perturbed image is still very stable.
  • the instance obtaining module 502 is configured to obtain a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, except for the first instance in the target image An instance other than one instance is a second instance.
  • the preset information volume threshold is a preset critical value used to indicate the level of information volume.
  • the instance is regarded as the first instance, and when the information volume of a certain instance is lower than the preset information volume threshold, the instance is regarded as the second instance.
  • the first instance refers to a set of multiple instances with an information amount higher than a preset information amount threshold, such as the area enclosed by an ellipse in the target image as shown in FIG. 3 .
  • the second instance refers to a collection of multiple instances whose information volume is lower than the preset information volume threshold, such as the area framed by an irregular figure in the target image as shown in FIG. 4 .
  • the first instance and the second instance completely constitute the set of instances in the image. That is, a certain instance in the target image is either the first instance or the second instance.
  • the first labeling module 503 is configured to manually label the first label of the first instance in the target image.
  • the prediction consistency of the instance segmentation model for the target image and the first disturbance image and the second disturbance image is low, so it should be done manually Annotation of instances, such as multiple pedestrians with obvious occlusion.
  • the first instance in the target image can be identified, and the first instance can be manually annotated by an expert with rich annotation experience, thereby improving the accuracy rate of the annotation of the first instance.
  • the instance segmentation of the medical image needs to identify multiple instance individuals in the image, and accurately outline multiple lesion areas for intelligent auxiliary diagnosis. Therefore, the instance labeling difficulty index of the medical image Higher, by manually labeling these high-information (difficult to label) instances, the accuracy will be greatly improved.
  • the second labeling module 504 is configured to pseudo-label the second label of the second instance in the target image based on a semi-supervised learning method.
  • the second instance is an instance in the target image that is lower than the preset information threshold, the prediction consistency of the instance segmentation model for the target image and the first disturbed image and the second disturbed image is relatively high, so the difficulty of labeling is small. Pseudo-annotation of instances by supervised learning can improve the efficiency of labeling target images.
  • the semi-supervised learning method refers to the instance labeling model obtained through the joint training of the labeled sample set and the unlabeled sample set, and instance labeling of the new unlabeled image through the instance labeling model.
  • the instance label output by the instance labeling model is compared with In terms of instance labels that are artificially labeled, they are called pseudo-labels.
  • the label determining module 505 is configured to obtain an instance label of the target image based on the first label and the second label.
  • the instances in the target image are divided into the first instance and the second instance.
  • the instance label of the first instance is the first label
  • the instance label of the second instance is the second label. Therefore, after obtaining the first label and the second label, the target Labels for all instances in the image have been obtained.
  • model training module 506 is configured to:
  • the annotated image marked with the instance label may refer to an image used to train the instance label model.
  • the target images marked with the instance labels can be added to the real instance labels.
  • Annotated images are used as a training set, so that the instance labeling model is updated based on the training set.
  • the test set includes test images and the real instance labels of each test image, and the test images in the test set are input into the updated instance labeling model, and the test instance labels of the test images are predicted by the updated instance labeling model.
  • the test instance label is the same as the corresponding real instance label, it indicates that the updated instance annotation model is successfully tested on the test image.
  • the test instance label is not the same as the corresponding real instance label, it indicates that the updated instance labeling model fails to test the test image. Calculate the ratio of the number of successful tests to the number of test images in the test set, and use the ratio as the test accuracy of the instance tagging model, and end the training of the instance tagging model when the test accuracy meets a preset accuracy threshold.
  • the number of images with instance labels is greatly increased by using the target images with instance labels, and the instance labeling model can be updated and trained, thereby improving the performance of the instance labeling model.
  • This application marks a small number of instances in the image instead of all instances. For example, instances with occlusion in some areas in the target image are instances with high information content.
  • instances with occlusion in some areas in the target image are instances with high information content.
  • the other instances of other instances have low information content, no manual labeling is required, and the cost of manual labeling is saved. Since the instances with low information content are easier to identify, semi-supervised learning and labeling can improve the accuracy of instance labeling.
  • the labeling efficiency of the instance is improved.
  • This application only needs to manually label a small number of instances in a target image, instead of labeling all instances in the entire target image, so as to obtain instance labels with high accuracy while reducing the workload of instance labeling.
  • This application is suitable for images with complex layouts and mutual occlusion in different areas. Applying this application to the field of intelligent auxiliary recognition of medical images can simultaneously perform region delineation and quantitative evaluation of different target locations and key organ instances, especially for image regions that may be occluded from each other, this application can perform instance segmentation more effectively.
  • This embodiment provides a computer-readable storage medium, on which a computer program is stored.
  • the steps in the above-mentioned embodiment of the method for tagging an image instance based on artificial intelligence are implemented, for example, 1 shows S11-S15:
  • modules 501-505 in FIG. 5 are realized, such as modules 501-505 in FIG. 5:
  • the instance recognition module 501 is used to call a preset instance segmentation model to identify the amount of information of each instance in the target image;
  • the instance obtaining module 502 is configured to obtain a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, except for the first instance in the target image an instance other than an instance is a second instance;
  • the first labeling module 503 is configured to manually label the first label of the first instance in the target image
  • the second labeling module 504 is configured to pseudo-label the second label of the second instance in the target image based on a semi-supervised learning method
  • the label determining module 505 is configured to obtain an instance label of the target image based on the first label and the second label.
  • the electronic device 6 includes a memory 61 , at least one processor 62 , at least one communication bus 63 and a transceiver 64 .
  • the structure of the electronic device shown in Figure 6 does not constitute a limitation of the embodiment of the present application, it can be a bus structure or a star structure, and the electronic device 6 can also include a ratio diagram more or less other hardware or software, or a different arrangement of components.
  • the electronic device 6 is a device that can automatically perform numerical calculation and/or information processing according to preset or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, Programmable gate arrays, digital processors and embedded devices, etc.
  • the electronic device 6 may also include a client device, which includes but is not limited to any electronic product that can interact with the client through a keyboard, mouse, remote control, touch pad or voice control device, for example, Personal computers, tablets, smartphones, digital cameras, etc.
  • the electronic device 6 is only an example, and other existing or future electronic products that can be adapted to this application should also be included in the scope of protection of this application, and are included here by reference .
  • a computer program is stored in the memory 61, and when the computer program is executed by the at least one processor 62, all or part of the steps in the above-mentioned method for tagging image instances based on artificial intelligence are implemented.
  • Described memory 61 comprises volatile and nonvolatile memory, such as Random Access Memory (Random Access Memory, RAM), Read-Only Memory (Read-Only Memory, ROM), Programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), one-time programmable read-only memory (One-time Programmable Read-Only Memory, OTPROM), electronic erasable rewritable only Read-only memory (Electrically-Erasable Programmable Read-Only Memory, EEPROM), read-only CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other optical disk storage, disk storage, tape storage, or can be used to
  • the computer-readable storage medium may be non-volatile or volatile. Further, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function, etc.; The data created using the node, etc.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with each other using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the at least one processor 62 is the control core (Control Unit) of the electronic device 6, and uses various interfaces and lines to connect the various components of the entire electronic device 6, by running or executing the The programs or modules in the memory 61 and call the data stored in the memory 61 to execute various functions of the electronic device 6 and process data.
  • the at least one processor 62 executes the computer program stored in the memory, it realizes all or part of the steps of the artificial intelligence-based image instance labeling method described in the embodiment of the present application; or realizes the artificial intelligence-based image instance labeling method. Label all or part of the functionality of the device.
  • the at least one processor 62 may be composed of an integrated circuit, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessor, digital processing chip, graphics processor and a combination of various control chips, etc.
  • CPU central processing unit
  • microprocessor microprocessor
  • digital processing chip graphics processor
  • graphics processor a combination of various control chips, etc.
  • the at least one communication bus 63 is configured to implement communication between the memory 61 and the at least one processor 62 and the like.
  • the electronic device 6 can also include a power supply (such as a battery) for supplying power to each component.
  • the power supply can be logically connected to the at least one processor 62 through a power management device, thereby realizing Manage functions such as charging, discharging, and power management.
  • the power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
  • the electronic device 6 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the above-mentioned integrated units implemented in the form of software function modules can be stored in a computer-readable storage medium.
  • the above-mentioned software function modules are stored in a storage medium, and include several instructions to make a computer device (which may be a personal computer, electronic device, or network device, etc.) or a processor (processor) execute the methods described in various embodiments of the present application part.
  • the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, and may be located in one place or distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software function modules.

Abstract

The present application relates to the technical field of artificial intelligence. Provided are an image instance labeling method based on artificial intelligence, and a related device. An information amount of each instance in a target image is identified by means of calling a preset instance segmentation model, so as to acquire, from the target image, a first information amount that is higher than a preset information amount threshold value, a first instance that corresponds to the first information amount, and a second instance other than the first instance; then, a first label of the first instance is manually labeled, such that the accuracy of a manually labeled instance label is high; since an information amount of the second instance is low, and the second instance is easily identified and labeled by a model, pseudo-labeling is performed on a second label of the second instance on the basis of a semi-supervised learning mode, such that the labeling efficiency is high; and an instance label of the target image is obtained on the basis of the first label and the second label. The present application can be applied to the field of digital medical treatment for labeling an instance in a medical image.

Description

基于人工智能的图像实例标注方法及相关设备Image instance labeling method and related equipment based on artificial intelligence
本申请要求于2021年08月30日提交中国专利局、申请号为202111005698.2,发明名称为“基于人工智能的图像实例标注方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111005698.2 filed on August 30, 2021, and the title of the invention is "artificial intelligence-based image instance labeling method and related equipment", the entire content of which is incorporated by reference in this application.
技术领域technical field
本申请涉及人工智能技术领域,具体涉及一种基于人工智能的图像实例标注方法、装置、电子设备及存储介质。The present application relates to the technical field of artificial intelligence, in particular to an artificial intelligence-based image instance labeling method, device, electronic equipment, and storage medium.
背景技术Background technique
随着深度学习的不断发展,计算机视觉取得了越来越大的成功,而这要归功于大型训练数据集的支持。训练数据集是带有丰富标注信息的数据集,收集并标注这样的训练数据集通常需要庞大的人力成本。With the continuous development of deep learning, computer vision has achieved more and more success, thanks to the support of large training data sets. The training data set is a data set with rich label information, and collecting and labeling such a training data set usually requires a huge human cost.
发明人意识到,与图像分类技术相比,图像实例分割难度系数更高,必须要大量具有标注的训练数据才能真正实现实例分割功能。但是,可获取的有标注样本数量相对于训练规模来说往往不足,或者获取样本的代价过高。在很多情况下,具备相关专业知识的标注人员(如医生)稀缺或难以抽出时间,或者标注人员的标注成本过高,再或者图像的标注或判断周期过长,这些问题都可能导致实例分割模型无法有效训练。The inventor realized that, compared with image classification technology, image instance segmentation has a higher degree of difficulty, and a large amount of labeled training data is required to truly realize the instance segmentation function. However, the number of available labeled samples is often insufficient relative to the training scale, or the cost of obtaining samples is too high. In many cases, annotators with relevant professional knowledge (such as doctors) are scarce or difficult to spare time, or the annotation cost of annotators is too high, or the image annotation or judgment cycle is too long, these problems may cause the instance segmentation model to fail. Unable to train effectively.
因此,如何能够得到大量的用于图像实例分割模型训练的样本成为了本领域技术人员的一个研究热点。Therefore, how to obtain a large number of samples for image instance segmentation model training has become a research hotspot for those skilled in the art.
发明内容Contents of the invention
鉴于以上内容,有必要提出一种基于人工智能的图像实例标注方法、装置、电子设备及存储介质,能够减少人工标注图像中实例的数量,并提高模型标注图像中实例的准确度。In view of the above, it is necessary to propose an artificial intelligence-based image instance annotation method, device, electronic equipment, and storage medium, which can reduce the number of instances in manually annotated images and improve the accuracy of instances in images annotated by models.
本申请的第一方面提供一种基于人工智能的图像实例标注方法,所述方法包括:The first aspect of the present application provides an artificial intelligence-based image instance labeling method, the method comprising:
调用预设实例分割模型识别目标图像中每个实例的信息量;Call the preset instance segmentation model to identify the amount of information of each instance in the target image;
从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;Obtaining a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where instances in the target image other than the first instance are second instances ;
通过人工标注所述目标图像中的所述第一实例的第一标签;manually annotating the first label of the first instance in the target image;
基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;Pseudo-labeling the second label of the second instance in the target image based on a semi-supervised learning manner;
基于所述第一标签和所述第二标签得到所述目标图像的实例标签。An instance label of the target image is obtained based on the first label and the second label.
本申请的第二方面提供一种基于人工智能的图像实例标注装置,所述装置包括:The second aspect of the present application provides an artificial intelligence-based image instance labeling device, the device comprising:
实例识别模块,用于调用预设实例分割模型识别目标图像中每个实例的信息量;An instance recognition module, used to call a preset instance segmentation model to identify the amount of information of each instance in the target image;
实例获取模块,用于从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;An instance acquiring module, configured to acquire a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, except for the first instance in the target image The instance of is the second instance;
第一标注模块,用于通过人工标注所述目标图像中的所述第一实例的第一标签;a first labeling module, configured to manually label the first label of the first instance in the target image;
第二标注模块,用于基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;A second labeling module, configured to pseudo-label the second label of the second instance in the target image based on a semi-supervised learning method;
标签确定模块,用于基于所述第一标签和所述第二标签得到所述目标图像的实例标签。A label determining module, configured to obtain an instance label of the target image based on the first label and the second label.
本申请的第三方面提供一种电子设备,所述电子设备包括处理器,所述处理器用于执行存储器中存储的计算机程序时实现所述基于人工智能的图像实例标注方法。A third aspect of the present application provides an electronic device, the electronic device includes a processor, and the processor is configured to implement the artificial intelligence-based image instance labeling method when executing a computer program stored in a memory.
调用预设实例分割模型识别目标图像中每个实例的信息量;Call the preset instance segmentation model to identify the amount of information of each instance in the target image;
从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;Obtaining a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where instances in the target image other than the first instance are second instances ;
通过人工标注所述目标图像中的所述第一实例的第一标签;manually annotating the first label of the first instance in the target image;
基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;Pseudo-labeling the second label of the second instance in the target image based on a semi-supervised learning manner;
基于所述第一标签和所述第二标签得到所述目标图像的实例标签。An instance label of the target image is obtained based on the first label and the second label.
本申请的第四方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现所述基于人工智能的图像实例标注方法:The fourth aspect of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the artificial intelligence-based image instance labeling method is implemented:
调用预设实例分割模型识别目标图像中每个实例的信息量;Call the preset instance segmentation model to identify the amount of information of each instance in the target image;
从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;Obtaining a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where instances in the target image other than the first instance are second instances ;
通过人工标注所述目标图像中的所述第一实例的第一标签;manually annotating the first label of the first instance in the target image;
基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;Pseudo-labeling the second label of the second instance in the target image based on a semi-supervised learning manner;
基于所述第一标签和所述第二标签得到所述目标图像的实例标签。An instance label of the target image is obtained based on the first label and the second label.
综上所述,本申请所述的基于人工智能的图像实例标注方法、装置、电子设备及存储介质,通过调用预设实例分割模型识别目标图像中每个实例的信息量,从而从目标图像中获取高于预设信息量阈值的第一信息量、第一信息量对应的第一实例及除第一实例外的第二实例,进而通过人工标注第一实例的第一标签,人工标注的实例标签的准确度高,由于第二实例的信息量低,容易被模型识别和标注,则基于半监督学习方式伪标注第二实例的第二标签,标注效率高,基于所述第一标签和所述第二标签得到目标图像的实例标签。本申请可以应用于数字医疗领域,对医学图像中的实例进行标注。本申请只需要人工标注一张目标图像中的少量实例,而不是对全整个目标图像中的实例都进行标注,在减小实例标注工作量的同时得到准确度较高的实例标签。To sum up, the artificial intelligence-based image instance labeling method, device, electronic equipment, and storage medium described in this application identify the amount of information of each instance in the target image by calling the preset instance segmentation model, so as to extract the information from the target image Obtain the first information amount higher than the preset information amount threshold, the first instance corresponding to the first information amount, and the second instance other than the first instance, and then manually mark the first label of the first instance, and the manually marked instance The accuracy of the label is high. Since the second instance has low information content, it is easy to be recognized and labeled by the model. The second label of the second instance is pseudo-labeled based on the semi-supervised learning method, and the labeling efficiency is high. Based on the first label and all The second label obtains the instance label of the target image. The application can be applied in the field of digital medical treatment, and the examples in medical images are marked. This application only needs to manually label a small number of instances in a target image, instead of labeling all instances in the entire target image, so as to obtain instance labels with high accuracy while reducing the workload of instance labeling.
附图说明Description of drawings
图1是本申请实施例一提供的基于人工智能的图像实例标注方法的流程图。FIG. 1 is a flow chart of an artificial intelligence-based image instance labeling method provided in Embodiment 1 of the present application.
图2是本申请实施例提供的目标图像及对应的两个扰动图像的示意图。FIG. 2 is a schematic diagram of a target image and two corresponding perturbed images provided by an embodiment of the present application.
图3是本申请实施例提供的目标图像中的第一实例的示意图。Fig. 3 is a schematic diagram of a first instance of a target image provided by an embodiment of the present application.
图4是本申请实施例提供的目标图像中的第二实例的示意图。Fig. 4 is a schematic diagram of a second example of the target image provided by the embodiment of the present application.
图5是本申请实施例二提供的基于人工智能的图像实例标注装置的结构图。FIG. 5 is a structural diagram of an artificial intelligence-based image instance tagging device provided in Embodiment 2 of the present application.
图6是本申请实施例三提供的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided in Embodiment 3 of the present application.
具体实施方式Detailed ways
为了能够更清楚地理解本申请的上述目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to more clearly understand the above objects, features and advantages of the present application, the present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述在一个可选的实施方式中实施例的目的,不是旨在于限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terminology used herein in the description of the application is only for the purpose of describing an example in an optional embodiment, and is not intended to limit the application.
本申请实施例提供的基于人工智能的图像实例标注方法由电子设备执行,相应地,基于人工智能的图像实例标注装置运行于电子设备中。The artificial intelligence-based image instance tagging method provided in the embodiment of the present application is executed by electronic equipment, and accordingly, the artificial intelligence-based image instance tagging apparatus runs in the electronic device.
本申请实施例可以基于人工智能技术对图像中的实例进行标注。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。In this embodiment of the present application, instances in an image may be marked based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
实施例一Embodiment one
图1是本申请实施例一提供的基于人工智能的图像实例标注方法的流程图。所述基于人工智能的图像实例标注方法具体包括以下步骤,根据不同的需求,该流程图中步骤的顺序可 以改变,某些可以省略。FIG. 1 is a flow chart of an artificial intelligence-based image instance labeling method provided in Embodiment 1 of the present application. The artificial intelligence-based image instance labeling method specifically includes the following steps. According to different requirements, the order of the steps in the flow chart can be changed, and some can be omitted.
S11,调用预设实例分割模型识别目标图像中每个实例的信息量。S11, call the preset instance segmentation model to identify the amount of information of each instance in the target image.
预设实例分割模型可以为预先训练得到的机器学习模型,用于对图像中的实例进行识别,从而获得实例的信息量。实例是指目标图像中的目标对象,例如,行人,汽车,自行车,建筑物等。The preset instance segmentation model may be a pre-trained machine learning model, which is used to identify instances in the image, so as to obtain the amount of information of the instances. Instances refer to target objects in target images, e.g., pedestrians, cars, bicycles, buildings, etc.
目标图像是指需要进行实例标注的图像,一张目标图像中可以包含多个实例,例如,可以包含几十个实例,不同类别的实例的识别难度各异,因此,需要考虑是否需要对这张目标图像中的所有实例均进行人工标注。虽然可以通过人工的方式对目标图像中的所有实例均进行人工标注,人工标注准确度更高,但是人工标注成本较大,且效率较低,事实上通过人工标注完成的图像的数量是受到限制的。本实施例通过识别目标图像中的实例的信息量,根据信息量确定目标图像中哪些实例进行人工标注,哪些实体通过实例标注模型进行标注。The target image refers to the image that needs to be labeled with instances. A target image can contain multiple instances, for example, it can contain dozens of instances. Different types of instances have different recognition difficulties. Therefore, it is necessary to consider whether it is necessary to All instances in the target image are manually annotated. Although all instances in the target image can be manually labeled, the accuracy of manual labeling is higher, but the cost of manual labeling is relatively high, and the efficiency is low. In fact, the number of images completed by manual labeling is limited. of. In this embodiment, by identifying the amount of information of the instances in the target image, it is determined which instances in the target image are to be marked manually and which entities are to be marked by the instance tagging model according to the amount of information.
在一些实施例中,基于人工智能的图像实例标注方法可以应用于医学场景中,当应用于医学场景时,所述目标图像则为医学图像,所述目标图像中的实例则为多个器官。医学图像是指为了医疗或医学研究,以非侵入方式取得的内部组织,例如,胃部、腹部、心脏、膝盖、脑部的影像,比如,电子计算机断层扫描(Computed Tomography,CT)、磁共振成像(Magnetic Resonance Imaging,MRI)、超声(ultrasonic,US)、X光图像、脑电图以及光学摄影等由医学仪器生成的图像。In some embodiments, the artificial intelligence-based image instance labeling method can be applied to a medical scene. When applied to a medical scene, the target image is a medical image, and the instances in the target image are multiple organs. Medical images refer to internal tissues obtained non-invasively for medical treatment or medical research, such as images of the stomach, abdomen, heart, knees, brain, such as computed tomography (CT), magnetic resonance Imaging (Magnetic Resonance Imaging, MRI), ultrasound (ultrasonic, US), X-ray images, EEG, and optical photography images generated by medical instruments.
在一个可选的实施方式中,所述调用预设实例分割模型识别目标图像中每个实例的信息量包括:In an optional implementation manner, the calling the preset instance segmentation model to identify the amount of information of each instance in the target image includes:
对所述目标图像进行第一扰动得到第一扰动图像,并对所述目标图像进行第二扰动得到第二扰动图像;performing a first perturbation on the target image to obtain a first perturbation image, and performing a second perturbation on the target image to obtain a second perturbation image;
调用所述预设实例分割模型识别所述目标图像中每个实例的第一类别标签、第一实例检测框及第一实例轮廓掩码;Invoking the preset instance segmentation model to identify a first category label, a first instance detection frame, and a first instance contour mask for each instance in the target image;
调用所述预设实例分割模型识别所述第一扰动图像中每个实例的第二类别标签、第二实例检测框及第二实例轮廓掩码;invoking the preset instance segmentation model to identify a second category label, a second instance detection frame, and a second instance contour mask for each instance in the first perturbed image;
调用所述预设实例分割模型识别所述第二扰动图像中每个实例的第三类别标签、第三实例检测框及第三实例轮廓掩码;invoking the preset instance segmentation model to identify a third category label, a third instance detection frame, and a third instance contour mask for each instance in the second perturbed image;
基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分;calculating a class label score for each instance based on the first class label, the second class label, and the third class label;
基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分;calculating a detection frame score for each instance based on the first instance detection frame, the second instance detection frame, and the third instance detection frame;
基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分;calculating a contour mask score for each instance based on the first instance contour mask, the second instance contour mask, and the third instance contour mask;
根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量。The information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score.
一般而言,通过图像变换可以实现图像增强,图像增强的目的是为了增加图像的数据量、丰富图像的多样性,从而提高模型的泛化能力。该可选的实施方式中,可以采用变换的方式引入图像扰动,例如,对图像添加噪声(Noise)来引入图像扰动。图像噪声是图像在获取或传输过程中受到随机信号干扰,妨碍人们对图像理解及分析的信号。噪声的引入给模型识别提高了难度。Generally speaking, image enhancement can be achieved through image transformation. The purpose of image enhancement is to increase the amount of image data and enrich the diversity of images, thereby improving the generalization ability of the model. In this optional implementation manner, image disturbance may be introduced in a transformation manner, for example, adding noise (Noise) to the image to introduce image disturbance. Image noise is the signal that is disturbed by random signals during image acquisition or transmission, which hinders people's understanding and analysis of images. The introduction of noise increases the difficulty of model identification.
如图2所示,图2中最上面的一张图像为目标图像,中间的一张图像为在目标图像的基础上添加了高斯噪声(gaussian noise),最下面的一张图像为在目标图像的基础上添加了椒盐噪声(pepper noise)。将在目标图像上添加高斯噪声得到的图像作为第一扰动图像,将在目标图像上添加椒盐噪声得到的图像作为第二扰动图像。As shown in Figure 2, the top image in Figure 2 is the target image, the middle image is Gaussian noise added to the target image, and the bottom image is the target image Added salt and pepper noise (pepper noise) on the basis of . The image obtained by adding Gaussian noise on the target image is used as the first perturbed image, and the image obtained by adding salt and pepper noise on the target image is used as the second perturbed image.
将图像(例如,目标图像,第一扰动图像,第二扰动图像)输入实例分割模型中,即可通过实例分割模型输出图像中实例属于某个类别的类别标签,并用检测框框出实例在图像中 的位置,及实例的实例轮廓掩码。本实施例的实例分割模型可在Faster R-CNN模型的基础上训练得到,具体训练过程不做详细阐述。考察模型对样本中的目标预测的一致性,如果变换前后预测结果变化较小,说明该目标较容易预测和信息量较少,如果变换前后,该目标的预测结果出现了较大的差异,则该局部目标是模型较容易混淆的目标,应该主动选择它来优先进行标注。Input the image (for example, the target image, the first disturbance image, the second disturbance image) into the instance segmentation model, and the instance segmentation model can output the category label of the instance belonging to a certain category in the image, and use the detection frame to frame the instance in the image The position of , and the instance contour mask of the instance. The instance segmentation model in this embodiment can be trained on the basis of the Faster R-CNN model, and the specific training process will not be described in detail. Investigate the consistency of the model's prediction of the target in the sample. If the prediction result changes little before and after the transformation, it means that the target is easier to predict and has less information. If there is a large difference in the prediction result of the target before and after the transformation, then This local target is the target that the model is more likely to confuse, and it should be actively selected for priority labeling.
在调用所述预设实例分割模型识别目标图像、第一扰动图像及第二扰动图像中每个实例的类别标签、实例检测框及实例轮廓掩码之后,即可根据类别标签、实例检测框及实例轮廓掩码计算得到实例的类别标签得分、检测框得分及轮廓掩码得分,从而根据类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算得到对应的实例的信息量,进而根据实例的信息量确定目标图像中的第一实例和第二实例。After invoking the preset instance segmentation model to identify the class label, instance detection frame and instance contour mask of each instance in the target image, the first perturbed image and the second perturbed image, the class label, instance detection frame and The instance contour mask is calculated to obtain the class label score, the detection frame score and the contour mask score of the instance, so that the information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score, Further, the first instance and the second instance in the target image are determined according to the amount of information of the instances.
在一个可选的实施方式中,所述基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分包括:In an optional implementation manner, the calculating the category label score of each instance based on the first category label, the second category label and the third category label includes:
获取所述第一类别标签对应的第一预测概率、所述第二类别标签的第二预测概率及所述第三类别标签的第三预测概率;Obtaining a first predicted probability corresponding to the first category label, a second predicted probability of the second category label, and a third predicted probability of the third category label;
计算所述第一预测概率及对应的所述第二预测概率、所述第三预测概率的概率均值;calculating the probability mean of the first predicted probability and the corresponding second predicted probability and the third predicted probability;
将所述均值作为对应的实例的类别标签得分。The mean value is used as the category label score of the corresponding instance.
类别标签得分用于评价实例分割模型对扰动后的第一扰动图像和第二扰动图像的预测是否与对目标图像的预测一致。The category label score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
对于某个实例,在目标图像中,实例分割模型预测的类别概率为0.9,在第一扰动图像中,实例分割模型预测的类别概率为0.9,在第二扰动图像中,实例分割模型预测的类别概率为0.89,则表明实例分割模型对于该实例的预测一致性较高。For an instance, in the target image, the class probability predicted by the instance segmentation model is 0.9, in the first perturbed image, the class probability predicted by the instance segmentation model is 0.9, and in the second perturbed image, the class predicted by the instance segmentation model is A probability of 0.89 indicates that the instance segmentation model has a high prediction consistency for this instance.
对于另一个实例,在目标图像中,实例分割模型预测的类别概率为0.9,在第一扰动图像中,实例分割模型预测的类别概率为0.4,在第二扰动图像中,实例分割模型预测的类别概率为0.7,则表明实例分割模型对于该实例的预测一致性较低。For another example, in the target image, the class probability predicted by the instance segmentation model is 0.9, in the first perturbed image, the class probability predicted by the instance segmentation model is 0.4, and in the second perturbed image, the class predicted by the instance segmentation model is A probability of 0.7 indicates that the prediction consistency of the instance segmentation model for this instance is low.
从类别标签得分的维度而言,实例的预测概率越小,概率均值越小,实例的类别标签得分越低,则实例的信息量越高,对模型来说,更混淆的局部实例,是更加困难和更应该学习的实例。对于高信息量的较难识别的实例,对扰动图像的预测中存在模型易混淆的低预测概率的实例,进行人工标注后加入模型训练,则模型以后对此类实例便有比较好的判断能力,进而提升模型的精度和泛化性。在一个可选的实施方式中,所述基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分包括:From the dimension of category label score, the smaller the predicted probability of an instance is, the smaller the probability mean is, and the lower the category label score of an instance is, the higher the information content of the instance is. For the model, the more confusing local instances are more Difficult and better examples to learn. For examples with high information content that are difficult to identify, and examples with low prediction probability that are easily confused by the model in the prediction of disturbed images, after manual labeling and adding model training, the model will have better judgment ability for such examples in the future , thereby improving the accuracy and generalization of the model. In an optional implementation manner, the calculating the detection frame score of each instance based on the detection frame of the first instance, the detection frame of the second instance, and the detection frame of the third instance includes:
计算所述第一实例检测框与对应的所述第二实例检测框的第一交并比;calculating a first intersection-over-union ratio between the first instance detection frame and the corresponding second instance detection frame;
计算所述第一实例检测框与对应的所述第三实例检测框的第二交并比;calculating a second intersection-over-union ratio between the first instance detection frame and the corresponding third instance detection frame;
根据预设第一计算模型基于所述第一交并比及所述第二交并比计算得到对应的所述实例的检测框得分。The corresponding detection frame score of the instance is calculated based on the first intersection and union ratio and the second intersection and union ratio according to a preset first calculation model.
检测框得分用于评价实例分割模型对扰动后的第一扰动图像和第二扰动图像的预测是否与对目标图像的预测一致。The detection box score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
交并比IOU表示了两个实例检测框的重叠度,交并比IOU越大,两个实例检测框之间的重叠区域越多、重叠度越大。交并比IOU越小,两个实例检测框之间的重叠区域越少、重叠度越小。该可选的实施例中,交并比IOU越大,则表明实例分割模型对目标图像与对应该交并比IOU的扰动图像的预测越相似,即预测一致性越高。交并比IOU越小,则表明实例分割模型对目标图像与对应该交并比IOU的扰动图像的预测越不相似,即预测一致性越低。The intersection-over-union ratio (IOU) represents the degree of overlap between two instance detection frames. The larger the intersection-over-union ratio (IOU), the more overlapping regions and the greater the degree of overlap between the two instance detection frames. The smaller the intersection and union ratio IOU, the smaller the overlapping area and the smaller the overlapping degree between the two instance detection frames. In this optional embodiment, the greater the IOU, the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the higher the prediction consistency. The smaller the IOU, the less similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the lower the prediction consistency.
交并比IOU的计算过程为现有技术,本申请不做详细阐述。The calculation process of the intersection-over-union ratio IOU is a prior art, and this application does not elaborate on it.
预设第二计算模型可以为:T2=(1-IOU1)*(1-IOU2),其中,T2表示实例的轮廓掩码得分,IOU1表示第一交并比,IOU2表示第二交并比。The preset second calculation model may be: T2=(1-IOU1)*(1-IOU2), where T2 represents the contour mask score of the instance, IOU1 represents the first intersection-over-union ratio, and IOU2 represents the second intersection-over-union ratio.
例如,假设实例L1,目标图像与第一扰动图像的第一交并比为0.9,目标图像与第二扰 动图像的第二交并比为0.9,则实例L1的检测框得分=(1-0.9)*(1-0.9)=0.01。可见,实例L1为低信息量的实例。For example, assuming instance L1, the first intersection ratio between the target image and the first disturbance image is 0.9, and the second intersection ratio between the target image and the second disturbance image is 0.9, then the detection frame score of instance L1 = (1-0.9 )*(1-0.9)=0.01. It can be seen that instance L1 is an instance with low information content.
又如,假设实例L2,目标图像与第一扰动图像的第一交并比为0.4,目标图像与第二扰动图像的第二交并比为0.3,则实例L1的检测框得分=(1-0.4)*(1-0.3)=0.42。可见,实例L2为高信息量的实例。As another example, assuming instance L2, the first intersection ratio between the target image and the first disturbance image is 0.4, and the second intersection ratio between the target image and the second disturbance image is 0.3, then the detection frame score of instance L1 = (1- 0.4)*(1-0.3)=0.42. It can be seen that instance L2 is an instance with high information content.
从交并比IOU的维度而言,实例的交并比IOU越大,实例的检测框得分越低,则实例的信息量越高,对模型来说,是更加困难和更应该学习的实例。对于高信息量的较难识别的实例,对扰动图像的预测中存在模型易混淆的低IOU的重叠检测框,即目标图像稍微做小幅变化之后,模型的预测的方差变大,比低信息量或者容易识别的实例的预测一致性更低,因此相较于容易识别的实例来说,高信息量的实例的标注价值更高。对高信息量的实例进行人工标注后加入模型训练,则模型以后对此类实例便有比较好的判断能力,进而提升模型的精度和泛化性。From the dimension of IOU, the larger the IOU of the instance, the lower the detection frame score of the instance, the higher the information content of the instance, and it is more difficult for the model and should be learned. For examples that are difficult to identify with high information content, there are overlapping detection frames with low IOU that are easily confused by the model in the prediction of the perturbed image. Or easily identifiable instances have lower predictive consistency, so highly informative instances are labeled more valuable than easily identifiable instances. After manual labeling of high-information instances and adding them to model training, the model will have a better ability to judge such instances in the future, thereby improving the accuracy and generalization of the model.
在一个可选的实施方式中,所述基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分包括:In an optional implementation manner, the calculating the contour mask score of each instance based on the contour mask of the first instance, the contour mask of the second instance and the contour mask of the third instance includes:
计算所述第一实例轮廓掩码与对应的所述第二实例轮廓掩码的第一Jaccard距离;calculating the first Jaccard distance between the first instance contour mask and the corresponding second instance contour mask;
计算所述第一实例轮廓掩码与对应的所述第三实例轮廓掩码的第二Jaccard距离;calculating a second Jaccard distance between the first instance contour mask and the corresponding third instance contour mask;
根据预设第二计算模型基于所述第一Jaccard距离及所述第二Jaccard距离计算得到对应的所述实例的轮廓掩码得分。A contour mask score corresponding to the instance is calculated based on the first Jaccard distance and the second Jaccard distance according to a preset second calculation model.
实例轮廓掩码类似于实例检测框,也是用于评价实例分割模型对扰动后的第一扰动图像和第二扰动图像的预测是否与对目标图像的预测一致。The instance contour mask is similar to the instance detection box, and is also used to evaluate whether the prediction of the instance segmentation model for the perturbed first and second perturbed images is consistent with the prediction of the target image.
Jaccard距离用于描述两个轮廓掩码之间的不相似度。Jaccard距离越大,两个轮廓掩码之间的重叠区域越少、相似度越低。Jaccard距离越小,两个轮廓掩码之间的重叠区域越多、相似度越高。该可选的实施例中,Jaccard距离越大,则表明实例分割模型对目标图像与对应该Jaccard距离的扰动图像的预测越不相似,即预测一致性越低。Jaccard距离越小,则表明实例分割模型对目标图像与该对应Jaccard距离的扰动图像的预测越相似,即预测一致性越高。Jaccard distance is used to describe the dissimilarity between two contour masks. The larger the Jaccard distance, the less overlapping area and lower similarity between two contour masks. The smaller the Jaccard distance, the more overlapping areas and higher similarity between two contour masks. In this optional embodiment, the larger the Jaccard distance, the less similar the prediction of the instance segmentation model is to the target image and the disturbance image corresponding to the Jaccard distance, that is, the lower the prediction consistency. The smaller the Jaccard distance, the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the Jaccard distance, that is, the higher the prediction consistency.
Jaccard距离的计算过程为现有技术,不再详细介绍。The calculation process of the Jaccard distance is a prior art and will not be described in detail.
预设第二计算模型可以为:T3=D1*D2,其中,T3表示实例的轮廓掩码得分,D1表示第一Jaccard距离,D2表示第二Jaccard距离。The preset second calculation model may be: T3=D1*D2, where T3 represents the contour mask score of the instance, D1 represents the first Jaccard distance, and D2 represents the second Jaccard distance.
在一个可选的实施方式中,所述根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量包括:In an optional implementation manner, the calculation of the information amount of the corresponding instance according to the category label score and the corresponding detection frame score and the contour mask score includes:
计算所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分的乘积,得到对应的实例的最终得分;Calculate the product of the category label score and the corresponding detection frame score and the contour mask score to obtain the final score of the corresponding instance;
将所述最终得分确定为所述实例的信息量。The final score is determined as the informativeness of the instance.
在得到目标图像中的每个实例的类别标签得分、检测框得分、轮廓掩码得分之后,将类别标签得分、检测框得分、轮廓掩码得分三者相乘,得到对应的实例的最终得分,作为实例的信息量。After obtaining the category label score, detection frame score, and contour mask score of each instance in the target image, multiply the category label score, detection frame score, and contour mask score to obtain the final score of the corresponding instance, The amount of information as an example.
在其他实施例中,还可以计算每个实例的类别标签得分、检测框得分、轮廓掩码的均值,作为实例的最终得分。或者,计算计算每个实例的类别标签得分、检测框得分、轮廓掩码的和值,作为实例的最终得分。本申请不做任何限制。In other embodiments, the average of the class label score, detection box score, and contour mask of each instance can also be calculated as the final score of the instance. Alternatively, compute the sum of the class label score, bounding box score, and contour mask for each instance as the final score for the instance. This application does not impose any restrictions.
最终得分用以表示实例分割模型对第一扰动图像及对第二扰动图像的预测与对目标图像的预测是否是一致的。最终得分越低,表明实例分割模型对第一扰动图像及对第二扰动图像的预测与对目标图像的预测不一致,说明对目标图像进行扰动后,通过实例分割模型对目标图像及扰动后得到的第一扰动图像及第二扰动图像的表现越不稳定。最终得分越高,表明实例分割模型对第一扰动图像及对第二扰动图像的预测与对目标图像的预测一致,说明即使对目标图像进行扰动后,通过实例分割模型对目标图像及扰动后得到的第一扰动图像及第二扰动图像的表现仍然是非常稳定的。The final score is used to indicate whether the prediction of the instance segmentation model on the first disturbed image and the second disturbed image is consistent with the prediction on the target image. The lower the final score, it indicates that the prediction of the instance segmentation model on the first perturbed image and the second perturbed image is inconsistent with the prediction on the target image. The performance of the first disturbed image and the second disturbed image is more unstable. The higher the final score, it indicates that the prediction of the instance segmentation model for the first perturbed image and the second perturbed image is consistent with the prediction of the target image, which means that even after the target image is perturbed, the target image and the perturbed image obtained by the instance segmentation model are The performance of the first perturbed image and the second perturbed image is still very stable.
S12,从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例。S12. Obtain a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where the instance in the target image other than the first instance is the first instance Two examples.
其中,预设信息量阈值为预先设置的用以表示信息量高低的临界值。Wherein, the preset information volume threshold is a preset critical value used to indicate the level of information volume.
最终得分越低,一致性就越低,则对应的实例的信息量越高;最终得分越高,一致性就越高,则对应的实例的信息量越低。当某个实例的信息量高于预设信息量阈值时,则将该实例作为第一实例,当某个实例的信息量低于预设信息量阈值时,则该将实例作为第二实例。The lower the final score, the lower the consistency, and the higher the information content of the corresponding instance; the higher the final score, the higher the consistency, and the lower the information content of the corresponding instance. When the information volume of a certain instance is higher than the preset information volume threshold, the instance is regarded as the first instance, and when the information volume of a certain instance is lower than the preset information volume threshold, the instance is regarded as the second instance.
应当理解的是,第一实例是指信息量高于预设信息量阈值的多个实例的集合,如图3所示目标图像中椭圆形框住的区域。第二实例是指信息量低于预设信息量阈值的多个实例的集合,如图4所示目标图像中不规则图形框住的区域。第一实例和第二实例完整的构成了图像中实例的集合。即,目标图像中的某个实例要么为第一实例,要么为第二实例。It should be understood that the first instance refers to a set of multiple instances with an information amount higher than a preset information amount threshold, such as the area enclosed by an ellipse in the target image as shown in FIG. 3 . The second instance refers to a collection of multiple instances whose information volume is lower than the preset information volume threshold, such as the area framed by an irregular figure in the target image as shown in FIG. 4 . The first instance and the second instance completely constitute the set of instances in the image. That is, a certain instance in the target image is either the first instance or the second instance.
S13,通过人工标注所述目标图像中的所述第一实例的第一标签。S13. Manually label the first label of the first instance in the target image.
由于第一实例是目标图像中高于预设信息量阈值的实例,实例分割模型对目标图像和对第一扰动图像及第二扰动图像的预测的一致性较低,因而更应该通过人工的方式进行实例的标注,比如遮挡明显的多个行人。Since the first instance is an instance higher than the preset information threshold in the target image, the prediction consistency of the instance segmentation model for the target image and the first disturbance image and the second disturbance image is low, so it should be done manually Annotation of instances, such as multiple pedestrians with obvious occlusion.
可以将目标图像中的第一实例标识出来,由标注经验丰富的专家对第一实例进行人工标注,从而提高对第一实例的标注准确率。The first instance in the target image can be identified, and the first instance can be manually annotated by an expert with rich annotation experience, thereby improving the accuracy rate of the annotation of the first instance.
尤其是对于目标图像为医学图像而言,医学图像的实例分割需要识别图像中的多个实例个体,并准确地勾画出多个病变区域,用于智能辅助诊断,因此医学图像的实例标注难度指数更高,通过将这些信息量高(标注难度大)的实例进行人工标注,准确度将会大大提升。Especially when the target image is a medical image, the instance segmentation of the medical image needs to identify multiple instance individuals in the image, and accurately outline multiple lesion areas for intelligent auxiliary diagnosis. Therefore, the instance labeling difficulty index of the medical image Higher, by manually labeling these high-information (difficult to label) instances, the accuracy will be greatly improved.
S14,基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签。S14. Pseudo-label the second label of the second instance in the target image based on a semi-supervised learning manner.
由于第二实例是目标图像中低于预设信息量阈值的实例,实例分割模型对目标图像和对第一扰动图像及第二扰动图像的预测的一致性较高,因而标注难度小,通过半监督学习方式进行实例的伪标注,能够提高对目标图像的标注效率。Since the second instance is an instance in the target image that is lower than the preset information threshold, the prediction consistency of the instance segmentation model for the target image and the first disturbed image and the second disturbed image is relatively high, so the difficulty of labeling is small. Pseudo-annotation of instances by supervised learning can improve the efficiency of labeling target images.
半监督学习方法是指通过已标注的样本集和未标注的样本集共同训练得到实例标注模型,通过实例标注模型对新的未标注的图像进行实例标注,实例标注模型输出的实例标签相较于人工标签的实例标签而言,称之为伪标签。The semi-supervised learning method refers to the instance labeling model obtained through the joint training of the labeled sample set and the unlabeled sample set, and instance labeling of the new unlabeled image through the instance labeling model. The instance label output by the instance labeling model is compared with In terms of instance labels that are artificially labeled, they are called pseudo-labels.
S15,基于所述第一标签和所述第二标签得到所述目标图像的实例标签。S15. Obtain an instance label of the target image based on the first label and the second label.
目标图像中的实例分为第一实例和第二实例,第一实例的实例标签为第一标签,第二实例的实例标签为第二标签,因而在得到第一标签和第二标签之后,目标图像中所有实例的标签已经得到。The instances in the target image are divided into the first instance and the second instance. The instance label of the first instance is the first label, and the instance label of the second instance is the second label. Therefore, after obtaining the first label and the second label, the target Labels for all instances in the image have been obtained.
在一个可选的实施方式中,所述方法还包括:In an optional embodiment, the method also includes:
将已标注有实例标签的标注图像与多个所述目标图像作为训练集;Using the labeled images marked with instance labels and multiple target images as a training set;
基于所述训练集训练所述实例标注模型;training the instance labeling model based on the training set;
基于测试集评估所述实例标注模型的精度,并在所述精度满足预设精度阈值时,结束所述实例标注模型的训练。Evaluate the accuracy of the instance tagging model based on the test set, and end the training of the instance tagging model when the accuracy meets a preset accuracy threshold.
其中,已标注有实例标签的标注图像可以是指用来训练实例标签模型的图像。Wherein, the annotated image marked with the instance label may refer to an image used to train the instance label model.
在使用本申请实施例所述的基于人工智能的图像实例标注方法对多个目标图像进行实例标注,得到实例标签后,即可将标注有实例标签的目标图像加入到已标注有真实实例标签的标注图像中,作为训练集,从而基于训练集对实例标注模型进行更新。After using the artificial intelligence-based image instance labeling method described in the embodiment of the present application to perform instance labeling on multiple target images, after obtaining the instance labels, the target images marked with the instance labels can be added to the real instance labels. Annotated images are used as a training set, so that the instance labeling model is updated based on the training set.
测试集中包括测试图像及每个测试图像的真实实例标签,将测试集中的测试图像输入更新后的实例标注模型中,通过更新后的实例标注模型预测测试图像的测试实例标签。当测试实例标签与对应的真实实例标签相同,则表明更新后的实例标注模型对测试图像测试成功。当测试实例标签与对应的真实实例标签不相同,则表明更新后的实例标注模型对测试图像测试失败。计算测试成功的数量与测试集中测试图像的数量的比值,比值作为实例标注模型的测试精度,并在所述测试精度满足预设精度阈值时,结束所述实例标注模型的训练。The test set includes test images and the real instance labels of each test image, and the test images in the test set are input into the updated instance labeling model, and the test instance labels of the test images are predicted by the updated instance labeling model. When the test instance label is the same as the corresponding real instance label, it indicates that the updated instance annotation model is successfully tested on the test image. When the test instance label is not the same as the corresponding real instance label, it indicates that the updated instance labeling model fails to test the test image. Calculate the ratio of the number of successful tests to the number of test images in the test set, and use the ratio as the test accuracy of the instance tagging model, and end the training of the instance tagging model when the test accuracy meets a preset accuracy threshold.
该可选的实施例中,利用已获得实例标签的目标图像,使具有实例标注的图像的数量得 到极大地增加,能够对实例标注模型进行更新训练,从而提升实例标注模型的性能。In this optional embodiment, the number of images with instance labels is greatly increased by using the target images with instance labels, and the instance labeling model can be updated and trained, thereby improving the performance of the instance labeling model.
本申请通过标注图像中的少量实例而非全部实例,例如,目标图像中部分区域有遮挡的实例为高信息量的实例,通过人工主动标注,人工标注的实例标签的准确度高,目标图像中的其他实例信息量较低,不用人工标注,节省人工标注的成本,由于低信息量的实例为较容易识别的实例,因而通过半监督学习标注,在保证了实例标注准确度的基础上,提升了实例的标注效率。本申请只需要人工标注一张目标图像中的少量实例,而不是对全整个目标图像中的实例都进行标注,在减小实例标注工作量的同时得到准确度较高的实例标签。This application marks a small number of instances in the image instead of all instances. For example, instances with occlusion in some areas in the target image are instances with high information content. Through manual active labeling, the accuracy of the artificially marked instance labels is high, and the target image has high accuracy. The other instances of other instances have low information content, no manual labeling is required, and the cost of manual labeling is saved. Since the instances with low information content are easier to identify, semi-supervised learning and labeling can improve the accuracy of instance labeling. The labeling efficiency of the instance is improved. This application only needs to manually label a small number of instances in a target image, instead of labeling all instances in the entire target image, so as to obtain instance labels with high accuracy while reducing the workload of instance labeling.
本申请适用于具有复杂布局,不同区域存在相互遮挡的图像中。将本申请应用于医疗影像智能辅助识别领域,可同时进行不同目标位置、关键器官实例的区域勾画及量化评估,尤其对于可能相互遮挡的图像区域,本申请能够更有效进行实例分割。This application is suitable for images with complex layouts and mutual occlusion in different areas. Applying this application to the field of intelligent auxiliary recognition of medical images can simultaneously perform region delineation and quantitative evaluation of different target locations and key organ instances, especially for image regions that may be occluded from each other, this application can perform instance segmentation more effectively.
实施例二Embodiment two
图5是本申请实施例二提供的基于人工智能的图像实例标注装置的结构图。FIG. 5 is a structural diagram of an artificial intelligence-based image instance tagging device provided in Embodiment 2 of the present application.
在一些实施例中,所述基于人工智能的图像实例标注装置50可以包括多个由计算机程序段所组成的功能模块。所述基于人工智能的图像实例标注装置50中的各个程序段的计算机程序可以存储于电子设备的存储器中,并由至少一个处理器所执行,以执行(详见图1描述)基于人工智能的图像实例标注的功能。In some embodiments, the artificial intelligence-based image instance labeling device 50 may include a plurality of functional modules composed of computer program segments. The computer program of each program segment in the image instance tagging device 50 based on artificial intelligence can be stored in the memory of the electronic device, and executed by at least one processor to execute (see Figure 1 for details) based on artificial intelligence. A feature for image instance annotation.
本实施例中,所述基于人工智能的图像实例标注装置50根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:实例识别模块501、实例获取模块502、第一标注模块503、第二标注模块504、标签确定模块505及模型训练模块506。本申请所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机程序段,其存储在存储器中。在本实施例中,关于各模块的功能将在后续的实施例中详述。In this embodiment, the artificial intelligence-based image instance tagging device 50 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an instance identification module 501 , an instance acquisition module 502 , a first labeling module 503 , a second labeling module 504 , a label determination module 505 and a model training module 506 . The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
所述实例识别模块501,用于调用预设实例分割模型识别目标图像中每个实例的信息量。The instance identification module 501 is configured to call a preset instance segmentation model to identify the amount of information of each instance in the target image.
预设实例分割模型可以为预先训练得到的机器学习模型,用于对图像中的实例进行识别,从而获得实例的信息量。实例是指目标图像中的目标对象,例如,行人,汽车,自行车,建筑物等。The preset instance segmentation model may be a pre-trained machine learning model, which is used to identify instances in the image, so as to obtain the amount of information of the instances. Instances refer to target objects in target images, e.g., pedestrians, cars, bicycles, buildings, etc.
目标图像是指需要进行实例标注的图像,一张目标图像中可以包含多个实例,例如,可以包含几十个实例,不同类别的实例的识别难度各异,因此,需要考虑是否需要对这张目标图像中的所有实例均进行人工标注。虽然可以通过人工的方式对目标图像中的所有实例均进行人工标注,人工标注准确度更高,但是人工标注成本较大,且效率较低,事实上通过人工标注完成的图像的数量是受到限制的。本实施例通过识别目标图像中的实例的信息量,根据信息量确定目标图像中哪些实例进行人工标注,哪些实体通过实例标注模型进行标注。The target image refers to the image that needs to be labeled with instances. A target image can contain multiple instances, for example, it can contain dozens of instances. Different types of instances have different recognition difficulties. Therefore, it is necessary to consider whether it is necessary to All instances in the target image are manually annotated. Although all instances in the target image can be manually labeled, the accuracy of manual labeling is higher, but the cost of manual labeling is relatively high, and the efficiency is low. In fact, the number of images completed by manual labeling is limited. of. In this embodiment, by identifying the amount of information of the instances in the target image, it is determined which instances in the target image are to be marked manually and which entities are to be marked by the instance tagging model according to the amount of information.
在一些实施例中,基于人工智能的图像实例标注方法可以应用于医学场景中,当应用于医学场景时,所述目标图像则为医学图像,所述目标图像中的实例则为多个器官。医学图像是指为了医疗或医学研究,以非侵入方式取得的内部组织,例如,胃部、腹部、心脏、膝盖、脑部的影像,比如,电子计算机断层扫描(Computed Tomography,CT)、磁共振成像(Magnetic Resonance Imaging,MRI)、超声(ultrasonic,US)、X光图像、脑电图以及光学摄影等由医学仪器生成的图像。In some embodiments, the artificial intelligence-based image instance labeling method can be applied to a medical scene. When applied to a medical scene, the target image is a medical image, and the instances in the target image are multiple organs. Medical images refer to internal tissues obtained non-invasively for medical treatment or medical research, such as images of the stomach, abdomen, heart, knees, brain, such as computed tomography (CT), magnetic resonance Imaging (Magnetic Resonance Imaging, MRI), ultrasound (ultrasonic, US), X-ray images, EEG, and optical photography images generated by medical instruments.
在一个可选的实施方式中,所述实例识别模块501调用预设实例分割模型识别目标图像中每个实例的信息量包括:In an optional implementation manner, the instance identification module 501 calls a preset instance segmentation model to identify the amount of information of each instance in the target image, including:
对所述目标图像进行第一扰动得到第一扰动图像,并对所述目标图像进行第二扰动得到第二扰动图像;performing a first perturbation on the target image to obtain a first perturbation image, and performing a second perturbation on the target image to obtain a second perturbation image;
调用所述预设实例分割模型识别所述目标图像中每个实例的第一类别标签、第一实例检测框及第一实例轮廓掩码;Invoking the preset instance segmentation model to identify a first category label, a first instance detection frame, and a first instance contour mask for each instance in the target image;
调用所述预设实例分割模型识别所述第一扰动图像中每个实例的第二类别标签、第二实例检测框及第二实例轮廓掩码;invoking the preset instance segmentation model to identify a second category label, a second instance detection frame, and a second instance contour mask for each instance in the first perturbed image;
调用所述预设实例分割模型识别所述第二扰动图像中每个实例的第三类别标签、第三实例检测框及第三实例轮廓掩码;invoking the preset instance segmentation model to identify a third category label, a third instance detection frame, and a third instance contour mask for each instance in the second perturbed image;
基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分;calculating a class label score for each instance based on the first class label, the second class label, and the third class label;
基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分;calculating a detection frame score for each instance based on the first instance detection frame, the second instance detection frame, and the third instance detection frame;
基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分;calculating a contour mask score for each instance based on the first instance contour mask, the second instance contour mask, and the third instance contour mask;
根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量。The information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score.
一般而言,通过图像变换可以实现图像增强,图像增强的目的是为了增加图像的数据量、丰富图像的多样性,从而提高模型的泛化能力。该可选的实施方式中,可以采用变换的方式引入图像扰动,例如,对图像添加噪声(Noise)来引入图像扰动。图像噪声是图像在获取或传输过程中受到随机信号干扰,妨碍人们对图像理解及分析的信号。噪声的引入给模型识别提高了难度。Generally speaking, image enhancement can be achieved through image transformation. The purpose of image enhancement is to increase the amount of image data and enrich the diversity of images, thereby improving the generalization ability of the model. In this optional implementation manner, image disturbance may be introduced in a transformation manner, for example, adding noise (Noise) to the image to introduce image disturbance. Image noise is the signal that is disturbed by random signals during image acquisition or transmission, which hinders people's understanding and analysis of images. The introduction of noise increases the difficulty of model identification.
如图2所示,图2中最上面的一张图像为目标图像,中间的一张图像为在目标图像的基础上添加了高斯噪声(gaussian noise),最下面的一张图像为在目标图像的基础上添加了椒盐噪声(pepper noise)。将在目标图像上添加高斯噪声得到的图像作为第一扰动图像,将在目标图像上添加椒盐噪声得到的图像作为第二扰动图像。As shown in Figure 2, the top image in Figure 2 is the target image, the middle image is Gaussian noise added to the target image, and the bottom image is the target image Added salt and pepper noise (pepper noise) on the basis of . The image obtained by adding Gaussian noise on the target image is used as the first perturbed image, and the image obtained by adding salt and pepper noise on the target image is used as the second perturbed image.
将图像(例如,目标图像,第一扰动图像,第二扰动图像)输入实例分割模型中,即可通过实例分割模型输出图像中实例属于某个类别的类别标签,并用检测框框出实例在图像中的位置,及实例的实例轮廓掩码。本实施例的实例分割模型可在Faster R-CNN模型的基础上训练得到,具体训练过程不做详细阐述。考察模型对样本中的目标预测的一致性,如果变换前后预测结果变化较小,说明该目标较容易预测和信息量较少,如果变换前后,该目标的预测结果出现了较大的差异,则该局部目标是模型较容易混淆的目标,应该主动选择它来优先进行标注。Input the image (for example, the target image, the first disturbance image, the second disturbance image) into the instance segmentation model, and the instance segmentation model can output the category label of the instance belonging to a certain category in the image, and use the detection frame to frame the instance in the image The position of , and the instance contour mask of the instance. The instance segmentation model in this embodiment can be trained on the basis of the Faster R-CNN model, and the specific training process will not be described in detail. Investigate the consistency of the model's prediction of the target in the sample. If the prediction result changes little before and after the transformation, it means that the target is easier to predict and has less information. If there is a large difference in the prediction result of the target before and after the transformation, then This local target is the target that the model is more likely to confuse, and it should be actively selected for priority labeling.
在调用所述预设实例分割模型识别目标图像、第一扰动图像及第二扰动图像中每个实例的类别标签、实例检测框及实例轮廓掩码之后,即可根据类别标签、实例检测框及实例轮廓掩码计算得到实例的类别标签得分、检测框得分及轮廓掩码得分,从而根据类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算得到对应的实例的信息量,进而根据实例的信息量确定目标图像中的第一实例和第二实例。After invoking the preset instance segmentation model to identify the class label, instance detection frame and instance contour mask of each instance in the target image, the first perturbed image and the second perturbed image, the class label, instance detection frame and The instance contour mask is calculated to obtain the class label score, the detection frame score and the contour mask score of the instance, so that the information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score, Further, the first instance and the second instance in the target image are determined according to the amount of information of the instances.
在一个可选的实施方式中,所述基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分包括:In an optional implementation manner, the calculating the category label score of each instance based on the first category label, the second category label and the third category label includes:
获取所述第一类别标签对应的第一预测概率、所述第二类别标签的第二预测概率及所述第三类别标签的第三预测概率;Obtaining a first predicted probability corresponding to the first category label, a second predicted probability of the second category label, and a third predicted probability of the third category label;
计算所述第一预测概率及对应的所述第二预测概率、所述第三预测概率的概率均值;calculating the probability mean of the first predicted probability and the corresponding second predicted probability and the third predicted probability;
将所述均值作为对应的实例的类别标签得分。The mean value is used as the category label score of the corresponding instance.
类别标签得分用于评价实例分割模型对扰动后的第一扰动图像和第二扰动图像的预测是否与对目标图像的预测一致。The category label score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
对于某个实例,在目标图像中,实例分割模型预测的类别概率为0.9,在第一扰动图像中,实例分割模型预测的类别概率为0.9,在第二扰动图像中,实例分割模型预测的类别概率为0.89,则表明实例分割模型对于该实例的预测一致性较高。For an instance, in the target image, the class probability predicted by the instance segmentation model is 0.9, in the first perturbed image, the class probability predicted by the instance segmentation model is 0.9, and in the second perturbed image, the class predicted by the instance segmentation model is A probability of 0.89 indicates that the instance segmentation model has a high prediction consistency for this instance.
对于另一个实例,在目标图像中,实例分割模型预测的类别概率为0.9,在第一扰动图像中,实例分割模型预测的类别概率为0.4,在第二扰动图像中,实例分割模型预测的类别概率为0.7,则表明实例分割模型对于该实例的预测一致性较低。For another example, in the target image, the class probability predicted by the instance segmentation model is 0.9, in the first perturbed image, the class probability predicted by the instance segmentation model is 0.4, and in the second perturbed image, the class predicted by the instance segmentation model is A probability of 0.7 indicates that the prediction consistency of the instance segmentation model for this instance is low.
从类别标签得分的维度而言,实例的预测概率越小,概率均值越小,实例的类别标签得 分越低,则实例的信息量越高,对模型来说,更混淆的局部实例,是更加困难和更应该学习的实例。对于高信息量的较难识别的实例,对扰动图像的预测中存在模型易混淆的低预测概率的实例,进行人工标注后加入模型训练,则模型以后对此类实例便有比较好的判断能力,进而提升模型的精度和泛化性。在一个可选的实施方式中,所述基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分包括:From the dimension of category label score, the smaller the predicted probability of an instance is, the smaller the probability mean is, and the lower the category label score of an instance is, the higher the information content of the instance is. For the model, the more confusing local instances are more Difficult and better examples to learn. For examples with high information content that are difficult to identify, and examples with low prediction probability that are easily confused by the model in the prediction of disturbed images, after manual labeling and adding model training, the model will have better judgment ability for such examples in the future , thereby improving the accuracy and generalization of the model. In an optional implementation manner, the calculating the detection frame score of each instance based on the detection frame of the first instance, the detection frame of the second instance, and the detection frame of the third instance includes:
计算所述第一实例检测框与对应的所述第二实例检测框的第一交并比;calculating a first intersection-over-union ratio between the first instance detection frame and the corresponding second instance detection frame;
计算所述第一实例检测框与对应的所述第三实例检测框的第二交并比;calculating a second intersection-over-union ratio between the first instance detection frame and the corresponding third instance detection frame;
根据预设第一计算模型基于所述第一交并比及所述第二交并比计算得到对应的所述实例的检测框得分。The corresponding detection frame score of the instance is calculated based on the first intersection and union ratio and the second intersection and union ratio according to a preset first calculation model.
检测框得分用于评价实例分割模型对扰动后的第一扰动图像和第二扰动图像的预测是否与对目标图像的预测一致。The detection box score is used to evaluate whether the prediction of the instance segmentation model on the perturbed first and second perturbed images is consistent with the prediction on the target image.
交并比IOU表示了两个实例检测框的重叠度,交并比IOU越大,两个实例检测框之间的重叠区域越多、重叠度越大。交并比IOU越小,两个实例检测框之间的重叠区域越少、重叠度越小。该可选的实施例中,交并比IOU越大,则表明实例分割模型对目标图像与对应该交并比IOU的扰动图像的预测越相似,即预测一致性越高。交并比IOU越小,则表明实例分割模型对目标图像与对应该交并比IOU的扰动图像的预测越不相似,即预测一致性越低。The intersection-over-union ratio (IOU) represents the degree of overlap between two instance detection frames. The larger the intersection-over-union ratio (IOU), the more overlapping regions and the greater the degree of overlap between the two instance detection frames. The smaller the intersection and union ratio IOU, the smaller the overlapping area and the smaller the overlapping degree between the two instance detection frames. In this optional embodiment, the greater the IOU, the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the higher the prediction consistency. The smaller the IOU, the less similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the IOU, that is, the lower the prediction consistency.
交并比IOU的计算过程为现有技术,本申请不做详细阐述。The calculation process of the intersection-over-union ratio IOU is a prior art, and this application does not elaborate on it.
预设第二计算模型可以为:T2=(1-IOU1)*(1-IOU2),其中,T2表示实例的轮廓掩码得分,IOU1表示第一交并比,IOU2表示第二交并比。The preset second calculation model may be: T2=(1-IOU1)*(1-IOU2), where T2 represents the contour mask score of the instance, IOU1 represents the first intersection-over-union ratio, and IOU2 represents the second intersection-over-union ratio.
例如,假设实例L1,目标图像与第一扰动图像的第一交并比为0.9,目标图像与第二扰动图像的第二交并比为0.9,则实例L1的检测框得分=(1-0.9)*(1-0.9)=0.01。可见,实例L1为低信息量的实例。For example, assuming instance L1, the first intersection ratio between the target image and the first disturbance image is 0.9, and the second intersection ratio between the target image and the second disturbance image is 0.9, then the detection frame score of instance L1 = (1-0.9 )*(1-0.9)=0.01. It can be seen that instance L1 is an instance with low information content.
又如,假设实例L2,目标图像与第一扰动图像的第一交并比为0.4,目标图像与第二扰动图像的第二交并比为0.3,则实例L1的检测框得分=(1-0.4)*(1-0.3)=0.42。可见,实例L2为高信息量的实例。As another example, assuming instance L2, the first intersection ratio between the target image and the first disturbance image is 0.4, and the second intersection ratio between the target image and the second disturbance image is 0.3, then the detection frame score of instance L1 = (1- 0.4)*(1-0.3)=0.42. It can be seen that instance L2 is an instance with high information content.
从交并比IOU的维度而言,实例的交并比IOU越大,实例的检测框得分越低,则实例的信息量越高,对模型来说,是更加困难和更应该学习的实例。对于高信息量的较难识别的实例,对扰动图像的预测中存在模型易混淆的低IOU的重叠检测框,即目标图像稍微做小幅变化之后,模型的预测的方差变大,比低信息量或者容易识别的实例的预测一致性更低,因此相较于容易识别的实例来说,高信息量的实例的标注价值更高。对高信息量的实例进行人工标注后加入模型训练,则模型以后对此类实例便有比较好的判断能力,进而提升模型的精度和泛化性。From the dimension of IOU, the larger the IOU of the instance, the lower the detection frame score of the instance, the higher the information content of the instance, and it is more difficult for the model and should be learned. For examples that are difficult to identify with high information content, there are overlapping detection frames with low IOU that are easily confused by the model in the prediction of the perturbed image. Or easily identifiable instances have lower predictive consistency, so highly informative instances are labeled more valuable than easily identifiable instances. After manual labeling of high-information instances and adding them to model training, the model will have a better ability to judge such instances in the future, thereby improving the accuracy and generalization of the model.
在一个可选的实施方式中,所述基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分包括:In an optional implementation manner, the calculating the contour mask score of each instance based on the contour mask of the first instance, the contour mask of the second instance and the contour mask of the third instance includes:
计算所述第一实例轮廓掩码与对应的所述第二实例轮廓掩码的第一Jaccard距离;calculating the first Jaccard distance between the first instance contour mask and the corresponding second instance contour mask;
计算所述第一实例轮廓掩码与对应的所述第三实例轮廓掩码的第二Jaccard距离;calculating a second Jaccard distance between the first instance contour mask and the corresponding third instance contour mask;
根据预设第二计算模型基于所述第一Jaccard距离及所述第二Jaccard距离计算得到对应的所述实例的轮廓掩码得分。A contour mask score corresponding to the instance is calculated based on the first Jaccard distance and the second Jaccard distance according to a preset second calculation model.
实例轮廓掩码类似于实例检测框,也是用于评价实例分割模型对扰动后的第一扰动图像和第二扰动图像的预测是否与对目标图像的预测一致。The instance contour mask is similar to the instance detection box, and is also used to evaluate whether the prediction of the instance segmentation model for the perturbed first and second perturbed images is consistent with the prediction of the target image.
Jaccard距离用于描述两个轮廓掩码之间的不相似度。Jaccard距离越大,两个轮廓掩码之间的重叠区域越少、相似度越低。Jaccard距离越小,两个轮廓掩码之间的重叠区域越多、相似度越高。该可选的实施例中,Jaccard距离越大,则表明实例分割模型对目标图像与对应该Jaccard距离的扰动图像的预测越不相似,即预测一致性越低。Jaccard距离越小,则表明实例分割模型对目标图像与该对应Jaccard距离的扰动图像的预测越相似,即预测一致性越高。Jaccard distance is used to describe the dissimilarity between two contour masks. The larger the Jaccard distance, the less overlapping area and lower similarity between two contour masks. The smaller the Jaccard distance, the more overlapping areas and higher similarity between two contour masks. In this optional embodiment, the larger the Jaccard distance, the less similar the prediction of the instance segmentation model is to the target image and the disturbance image corresponding to the Jaccard distance, that is, the lower the prediction consistency. The smaller the Jaccard distance, the more similar the prediction of the instance segmentation model is to the target image and the perturbed image corresponding to the Jaccard distance, that is, the higher the prediction consistency.
Jaccard距离的计算过程为现有技术,不再详细介绍。The calculation process of the Jaccard distance is a prior art and will not be described in detail.
预设第二计算模型可以为:T3=D1*D2,其中,T3表示实例的轮廓掩码得分,D1表示第一Jaccard距离,D2表示第二Jaccard距离。The preset second calculation model may be: T3=D1*D2, where T3 represents the contour mask score of the instance, D1 represents the first Jaccard distance, and D2 represents the second Jaccard distance.
在一个可选的实施方式中,所述根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量包括:In an optional implementation manner, the calculation of the information amount of the corresponding instance according to the category label score and the corresponding detection frame score and the contour mask score includes:
计算所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分的乘积,得到对应的实例的最终得分;Calculate the product of the category label score and the corresponding detection frame score and the contour mask score to obtain the final score of the corresponding instance;
将所述最终得分确定为所述实例的信息量。The final score is determined as the informativeness of the instance.
在得到目标图像中的每个实例的类别标签得分、检测框得分、轮廓掩码得分之后,将类别标签得分、检测框得分、轮廓掩码得分三者相乘,得到对应的实例的最终得分,作为实例的信息量。After obtaining the category label score, detection frame score, and contour mask score of each instance in the target image, multiply the category label score, detection frame score, and contour mask score to obtain the final score of the corresponding instance, The amount of information as an example.
在其他实施例中,还可以计算每个实例的类别标签得分、检测框得分、轮廓掩码的均值,作为实例的最终得分。或者,计算计算每个实例的类别标签得分、检测框得分、轮廓掩码的和值,作为实例的最终得分。本申请不做任何限制。In other embodiments, the average of the class label score, detection box score, and contour mask of each instance can also be calculated as the final score of the instance. Alternatively, compute the sum of the class label score, bounding box score, and contour mask for each instance as the final score for the instance. This application does not impose any limitations.
最终得分用以表示实例分割模型对第一扰动图像及对第二扰动图像的预测与对目标图像的预测是否是一致的。最终得分越低,表明实例分割模型对第一扰动图像及对第二扰动图像的预测与对目标图像的预测不一致,说明对目标图像进行扰动后,通过实例分割模型对目标图像及扰动后得到的第一扰动图像及第二扰动图像的表现越不稳定。最终得分越高,表明实例分割模型对第一扰动图像及对第二扰动图像的预测与对目标图像的预测一致,说明即使对目标图像进行扰动后,通过实例分割模型对目标图像及扰动后得到的第一扰动图像及第二扰动图像的表现仍然是非常稳定的。The final score is used to indicate whether the prediction of the instance segmentation model on the first disturbed image and the second disturbed image is consistent with the prediction on the target image. The lower the final score, it indicates that the prediction of the instance segmentation model on the first perturbed image and the second perturbed image is inconsistent with the prediction on the target image. The performance of the first disturbed image and the second disturbed image is more unstable. The higher the final score, it indicates that the prediction of the instance segmentation model for the first perturbed image and the second perturbed image is consistent with the prediction of the target image, which means that even after the target image is perturbed, the target image and the perturbed image obtained by the instance segmentation model are The performance of the first perturbed image and the second perturbed image is still very stable.
所述实例获取模块502,用于从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例。The instance obtaining module 502 is configured to obtain a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, except for the first instance in the target image An instance other than one instance is a second instance.
其中,预设信息量阈值为预先设置的用以表示信息量高低的临界值。Wherein, the preset information volume threshold is a preset critical value used to indicate the level of information volume.
最终得分越低,一致性就越低,则对应的实例的信息量越高;最终得分越高,一致性就越高,则对应的实例的信息量越低。当某个实例的信息量高于预设信息量阈值时,则将该实例作为第一实例,当某个实例的信息量低于预设信息量阈值时,则该将实例作为第二实例。The lower the final score, the lower the consistency, and the higher the information content of the corresponding instance; the higher the final score, the higher the consistency, and the lower the information content of the corresponding instance. When the information volume of a certain instance is higher than the preset information volume threshold, the instance is regarded as the first instance, and when the information volume of a certain instance is lower than the preset information volume threshold, the instance is regarded as the second instance.
应当理解的是,第一实例是指信息量高于预设信息量阈值的多个实例的集合,如图3所示目标图像中椭圆形框住的区域。第二实例是指信息量低于预设信息量阈值的多个实例的集合,如图4所示目标图像中不规则图形框住的区域。第一实例和第二实例完整的构成了图像中实例的集合。即,目标图像中的某个实例要么为第一实例,要么为第二实例。It should be understood that the first instance refers to a set of multiple instances with an information amount higher than a preset information amount threshold, such as the area enclosed by an ellipse in the target image as shown in FIG. 3 . The second instance refers to a collection of multiple instances whose information volume is lower than the preset information volume threshold, such as the area framed by an irregular figure in the target image as shown in FIG. 4 . The first instance and the second instance completely constitute the set of instances in the image. That is, a certain instance in the target image is either the first instance or the second instance.
所述第一标注模块503,用于通过人工标注所述目标图像中的所述第一实例的第一标签。The first labeling module 503 is configured to manually label the first label of the first instance in the target image.
由于第一实例是目标图像中高于预设信息量阈值的实例,实例分割模型对目标图像和对第一扰动图像及第二扰动图像的预测的一致性较低,因而更应该通过人工的方式进行实例的标注,比如遮挡明显的多个行人。Since the first instance is an instance higher than the preset information threshold in the target image, the prediction consistency of the instance segmentation model for the target image and the first disturbance image and the second disturbance image is low, so it should be done manually Annotation of instances, such as multiple pedestrians with obvious occlusion.
可以将目标图像中的第一实例标识出来,由标注经验丰富的专家对第一实例进行人工标注,从而提高对第一实例的标注准确率。The first instance in the target image can be identified, and the first instance can be manually annotated by an expert with rich annotation experience, thereby improving the accuracy rate of the annotation of the first instance.
尤其是对于目标图像为医学图像而言,医学图像的实例分割需要识别图像中的多个实例个体,并准确地勾画出多个病变区域,用于智能辅助诊断,因此医学图像的实例标注难度指数更高,通过将这些信息量高(标注难度大)的实例进行人工标注,准确度将会大大提升。Especially when the target image is a medical image, the instance segmentation of the medical image needs to identify multiple instance individuals in the image, and accurately outline multiple lesion areas for intelligent auxiliary diagnosis. Therefore, the instance labeling difficulty index of the medical image Higher, by manually labeling these high-information (difficult to label) instances, the accuracy will be greatly improved.
所述第二标注模块504,用于基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签。The second labeling module 504 is configured to pseudo-label the second label of the second instance in the target image based on a semi-supervised learning method.
由于第二实例是目标图像中低于预设信息量阈值的实例,实例分割模型对目标图像和对第一扰动图像及第二扰动图像的预测的一致性较高,因而标注难度小,通过半监督学习方式进行实例的伪标注,能够提高对目标图像的标注效率。Since the second instance is an instance in the target image that is lower than the preset information threshold, the prediction consistency of the instance segmentation model for the target image and the first disturbed image and the second disturbed image is relatively high, so the difficulty of labeling is small. Pseudo-annotation of instances by supervised learning can improve the efficiency of labeling target images.
半监督学习方法是指通过已标注的样本集和未标注的样本集共同训练得到实例标注模 型,通过实例标注模型对新的未标注的图像进行实例标注,实例标注模型输出的实例标签相较于人工标签的实例标签而言,称之为伪标签。The semi-supervised learning method refers to the instance labeling model obtained through the joint training of the labeled sample set and the unlabeled sample set, and instance labeling of the new unlabeled image through the instance labeling model. The instance label output by the instance labeling model is compared with In terms of instance labels that are artificially labeled, they are called pseudo-labels.
所述标签确定模块505,用于基于所述第一标签和所述第二标签得到所述目标图像的实例标签。The label determining module 505 is configured to obtain an instance label of the target image based on the first label and the second label.
目标图像中的实例分为第一实例和第二实例,第一实例的实例标签为第一标签,第二实例的实例标签为第二标签,因而在得到第一标签和第二标签之后,目标图像中所有实例的标签已经得到。The instances in the target image are divided into the first instance and the second instance. The instance label of the first instance is the first label, and the instance label of the second instance is the second label. Therefore, after obtaining the first label and the second label, the target Labels for all instances in the image have been obtained.
在一个可选的实施方式中,所述模型训练模块506,用于:In an optional implementation manner, the model training module 506 is configured to:
将已标注有实例标签的标注图像与多个所述目标图像作为训练集;Using the labeled images marked with instance labels and multiple target images as a training set;
基于所述训练集训练所述实例标注模型;training the instance labeling model based on the training set;
基于测试集评估所述实例标注模型的精度,并在所述精度满足预设精度阈值时,结束所述实例标注模型的训练。Evaluate the accuracy of the instance tagging model based on the test set, and end the training of the instance tagging model when the accuracy meets a preset accuracy threshold.
其中,已标注有实例标签的标注图像可以是指用来训练实例标签模型的图像。Wherein, the annotated image marked with the instance label may refer to an image used to train the instance label model.
在使用本申请实施例所述的基于人工智能的图像实例标注方法对多个目标图像进行实例标注,得到实例标签后,即可将标注有实例标签的目标图像加入到已标注有真实实例标签的标注图像中,作为训练集,从而基于训练集对实例标注模型进行更新。After using the artificial intelligence-based image instance labeling method described in the embodiment of the present application to perform instance labeling on multiple target images, after obtaining the instance labels, the target images marked with the instance labels can be added to the real instance labels. Annotated images are used as a training set, so that the instance labeling model is updated based on the training set.
测试集中包括测试图像及每个测试图像的真实实例标签,将测试集中的测试图像输入更新后的实例标注模型中,通过更新后的实例标注模型预测测试图像的测试实例标签。当测试实例标签与对应的真实实例标签相同,则表明更新后的实例标注模型对测试图像测试成功。当测试实例标签与对应的真实实例标签不相同,则表明更新后的实例标注模型对测试图像测试失败。计算测试成功的数量与测试集中测试图像的数量的比值,比值作为实例标注模型的测试精度,并在所述测试精度满足预设精度阈值时,结束所述实例标注模型的训练。The test set includes test images and the real instance labels of each test image, and the test images in the test set are input into the updated instance labeling model, and the test instance labels of the test images are predicted by the updated instance labeling model. When the test instance label is the same as the corresponding real instance label, it indicates that the updated instance annotation model is successfully tested on the test image. When the test instance label is not the same as the corresponding real instance label, it indicates that the updated instance labeling model fails to test the test image. Calculate the ratio of the number of successful tests to the number of test images in the test set, and use the ratio as the test accuracy of the instance tagging model, and end the training of the instance tagging model when the test accuracy meets a preset accuracy threshold.
该可选的实施例中,利用已获得实例标签的目标图像,使具有实例标注的图像的数量得到极大地增加,能够对实例标注模型进行更新训练,从而提升实例标注模型的性能。In this optional embodiment, the number of images with instance labels is greatly increased by using the target images with instance labels, and the instance labeling model can be updated and trained, thereby improving the performance of the instance labeling model.
本申请通过标注图像中的少量实例而非全部实例,例如,目标图像中部分区域有遮挡的实例为高信息量的实例,通过人工主动标注,人工标注的实例标签的准确度高,目标图像中的其他实例信息量较低,不用人工标注,节省人工标注的成本,由于低信息量的实例为较容易识别的实例,因而通过半监督学习标注,在保证了实例标注准确度的基础上,提升了实例的标注效率。本申请只需要人工标注一张目标图像中的少量实例,而不是对全整个目标图像中的实例都进行标注,在减小实例标注工作量的同时得到准确度较高的实例标签。This application marks a small number of instances in the image instead of all instances. For example, instances with occlusion in some areas in the target image are instances with high information content. Through manual active labeling, the accuracy of the artificially marked instance labels is high, and the target image has high accuracy. The other instances of other instances have low information content, no manual labeling is required, and the cost of manual labeling is saved. Since the instances with low information content are easier to identify, semi-supervised learning and labeling can improve the accuracy of instance labeling. The labeling efficiency of the instance is improved. This application only needs to manually label a small number of instances in a target image, instead of labeling all instances in the entire target image, so as to obtain instance labels with high accuracy while reducing the workload of instance labeling.
本申请适用于具有复杂布局,不同区域存在相互遮挡的图像中。将本申请应用于医疗影像智能辅助识别领域,可同时进行不同目标位置、关键器官实例的区域勾画及量化评估,尤其对于可能相互遮挡的图像区域,本申请能够更有效进行实例分割。This application is suitable for images with complex layouts and mutual occlusion in different areas. Applying this application to the field of intelligent auxiliary recognition of medical images can simultaneously perform region delineation and quantitative evaluation of different target locations and key organ instances, especially for image regions that may be occluded from each other, this application can perform instance segmentation more effectively.
实施例三Embodiment three
本实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述基于人工智能的图像实例标注方法实施例中的步骤,例如图1所示的S11-S15:This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned embodiment of the method for tagging an image instance based on artificial intelligence are implemented, for example, 1 shows S11-S15:
S11,调用预设实例分割模型识别目标图像中每个实例的信息量;S11, calling the preset instance segmentation model to identify the amount of information of each instance in the target image;
S12,从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;S12. Obtain a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where the instance in the target image other than the first instance is the first instance Two instances;
S13,通过人工标注所述目标图像中的所述第一实例的第一标签;S13. Manually annotating the first label of the first instance in the target image;
S14,基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;S14. Pseudo-labeling the second label of the second instance in the target image based on a semi-supervised learning manner;
S15,基于所述第一标签和所述第二标签得到所述目标图像的实例标签。S15. Obtain an instance label of the target image based on the first label and the second label.
或者,该计算机程序被处理器执行时实现上述装置实施例中各模块/单元的功能,例如图5中的模块501-505:Alternatively, when the computer program is executed by the processor, the functions of the modules/units in the above-mentioned device embodiments are realized, such as modules 501-505 in FIG. 5:
所述实例识别模块501,用于调用预设实例分割模型识别目标图像中每个实例的信息量;The instance recognition module 501 is used to call a preset instance segmentation model to identify the amount of information of each instance in the target image;
所述实例获取模块502,用于从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;The instance obtaining module 502 is configured to obtain a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, except for the first instance in the target image an instance other than an instance is a second instance;
所述第一标注模块503,用于通过人工标注所述目标图像中的所述第一实例的第一标签;The first labeling module 503 is configured to manually label the first label of the first instance in the target image;
所述第二标注模块504,用于基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;The second labeling module 504 is configured to pseudo-label the second label of the second instance in the target image based on a semi-supervised learning method;
所述标签确定模块505,用于基于所述第一标签和所述第二标签得到所述目标图像的实例标签。The label determining module 505 is configured to obtain an instance label of the target image based on the first label and the second label.
实施例四Embodiment Four
参阅图6所示,为本申请实施例三提供的电子设备的结构示意图。在本申请较佳实施例中,所述电子设备6包括存储器61、至少一个处理器62、至少一条通信总线63及收发器64。Referring to FIG. 6 , it is a schematic structural diagram of an electronic device provided by Embodiment 3 of the present application. In a preferred embodiment of the present application, the electronic device 6 includes a memory 61 , at least one processor 62 , at least one communication bus 63 and a transceiver 64 .
本领域技术人员应该了解,图6示出的电子设备的结构并不构成本申请实施例的限定,既可以是总线型结构,也可以是星形结构,所述电子设备6还可以包括比图示更多或更少的其他硬件或者软件,或者不同的部件布置。Those skilled in the art should understand that the structure of the electronic device shown in Figure 6 does not constitute a limitation of the embodiment of the present application, it can be a bus structure or a star structure, and the electronic device 6 can also include a ratio diagram more or less other hardware or software, or a different arrangement of components.
在一些实施例中,所述电子设备6是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路、可编程门阵列、数字处理器及嵌入式设备等。所述电子设备6还可包括客户设备,所述客户设备包括但不限于任何一种可与客户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、数码相机等。In some embodiments, the electronic device 6 is a device that can automatically perform numerical calculation and/or information processing according to preset or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, Programmable gate arrays, digital processors and embedded devices, etc. The electronic device 6 may also include a client device, which includes but is not limited to any electronic product that can interact with the client through a keyboard, mouse, remote control, touch pad or voice control device, for example, Personal computers, tablets, smartphones, digital cameras, etc.
需要说明的是,所述电子设备6仅为举例,其他现有的或今后可能出现的电子产品如可适应于本申请,也应包含在本申请的保护范围以内,并以引用方式包含于此。It should be noted that the electronic device 6 is only an example, and other existing or future electronic products that can be adapted to this application should also be included in the scope of protection of this application, and are included here by reference .
在一些实施例中,所述存储器61中存储有计算机程序,所述计算机程序被所述至少一个处理器62执行时实现如所述的基于人工智能的图像实例标注方法中的全部或者部分步骤。所述存储器61包括易失性和非易失性存储器,例如随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子擦除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的存储介质。所述计算机可读存储介质可以是非易失性,也可以是易失性的。进一步地,所述计算机可读存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。In some embodiments, a computer program is stored in the memory 61, and when the computer program is executed by the at least one processor 62, all or part of the steps in the above-mentioned method for tagging image instances based on artificial intelligence are implemented. Described memory 61 comprises volatile and nonvolatile memory, such as Random Access Memory (Random Access Memory, RAM), Read-Only Memory (Read-Only Memory, ROM), Programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), one-time programmable read-only memory (One-time Programmable Read-Only Memory, OTPROM), electronic erasable rewritable only Read-only memory (Electrically-Erasable Programmable Read-Only Memory, EEPROM), read-only CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other optical disk storage, disk storage, tape storage, or can be used to carry or store data computer readable storage medium. The computer-readable storage medium may be non-volatile or volatile. Further, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function, etc.; The data created using the node, etc.
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain (Blockchain), essentially a decentralized database, is a series of data blocks associated with each other using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify its Validity of information (anti-counterfeiting) and generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
在一些实施例中,所述至少一个处理器62是所述电子设备6的控制核心(Control Unit),利用各种接口和线路连接整个电子设备6的各个部件,通过运行或执行存储在所述存储器61内的程序或者模块,以及调用存储在所述存储器61内的数据,以执行电子设备6的各种功能和处理数据。例如,所述至少一个处理器62执行所述存储器中存储的计算机程序时实现本申 请实施例中所述的基于人工智能的图像实例标注方法的全部或者部分步骤;或者实现基于人工智能的图像实例标注装置的全部或者部分功能。所述至少一个处理器62可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。In some embodiments, the at least one processor 62 is the control core (Control Unit) of the electronic device 6, and uses various interfaces and lines to connect the various components of the entire electronic device 6, by running or executing the The programs or modules in the memory 61 and call the data stored in the memory 61 to execute various functions of the electronic device 6 and process data. For example, when the at least one processor 62 executes the computer program stored in the memory, it realizes all or part of the steps of the artificial intelligence-based image instance labeling method described in the embodiment of the present application; or realizes the artificial intelligence-based image instance labeling method. Label all or part of the functionality of the device. The at least one processor 62 may be composed of an integrated circuit, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessor, digital processing chip, graphics processor and a combination of various control chips, etc.
在一些实施例中,所述至少一条通信总线63被设置为实现所述存储器61以及所述至少一个处理器62等之间的连接通信。In some embodiments, the at least one communication bus 63 is configured to implement communication between the memory 61 and the at least one processor 62 and the like.
尽管未示出,所述电子设备6还可以包括给各个部件供电的电源(比如电池),优选的,电源可以通过电源管理装置与所述至少一个处理器62逻辑相连,从而通过电源管理装置实现管理充电、放电、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备6还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。Although not shown, the electronic device 6 can also include a power supply (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the at least one processor 62 through a power management device, thereby realizing Manage functions such as charging, discharging, and power management. The power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components. The electronic device 6 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
上述以软件功能模块的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,电子设备,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分。The above-mentioned integrated units implemented in the form of software function modules can be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium, and include several instructions to make a computer device (which may be a personal computer, electronic device, or network device, etc.) or a processor (processor) execute the methods described in various embodiments of the present application part.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,既可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, and may be located in one place or distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software function modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或,单数不排除复数。说明书中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be regarded as exemplary and not restrictive in all points of view, and the scope of the application is defined by the appended claims rather than the foregoing description, and it is intended that the scope of the present application be defined by the appended claims rather than by the foregoing description. All changes within the meaning and range of equivalents of the elements are embraced in this application. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is clear that the word "comprising" does not exclude other elements or the singular does not exclude the plural. A plurality of units or devices stated in the specification may also be realized by one unit or device through software or hardware. The words first, second, etc. are used to denote names and do not imply any particular order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application without limitation. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be Make modifications or equivalent replacements without departing from the spirit and scope of the technical solutions of the present application.

Claims (22)

  1. 一种基于人工智能的图像实例标注方法,其中,所述方法包括:A method for labeling image instances based on artificial intelligence, wherein the method includes:
    调用预设实例分割模型识别目标图像中每个实例的信息量;Call the preset instance segmentation model to identify the amount of information of each instance in the target image;
    从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;Obtaining a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where instances in the target image other than the first instance are second instances ;
    通过人工标注所述目标图像中的所述第一实例的第一标签;manually annotating the first label of the first instance in the target image;
    基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;Pseudo-labeling the second label of the second instance in the target image based on a semi-supervised learning manner;
    基于所述第一标签和所述第二标签得到所述目标图像的实例标签。An instance label of the target image is obtained based on the first label and the second label.
  2. 如权利要求1所述的基于人工智能的图像实例标注方法,其中,所述调用预设实例分割模型识别目标图像中每个实例的信息量包括:The method for labeling image instances based on artificial intelligence according to claim 1, wherein said calling a preset instance segmentation model to identify the amount of information of each instance in the target image comprises:
    对所述目标图像进行第一扰动得到第一扰动图像,并对所述目标图像进行第二扰动得到第二扰动图像;performing a first perturbation on the target image to obtain a first perturbation image, and performing a second perturbation on the target image to obtain a second perturbation image;
    调用所述预设实例分割模型识别所述目标图像中每个实例的第一类别标签、第一实例检测框及第一实例轮廓掩码;Invoking the preset instance segmentation model to identify a first category label, a first instance detection frame, and a first instance contour mask for each instance in the target image;
    调用所述预设实例分割模型识别所述第一扰动图像中每个实例的第二类别标签、第二实例检测框及第二实例轮廓掩码;invoking the preset instance segmentation model to identify a second category label, a second instance detection frame, and a second instance contour mask for each instance in the first perturbed image;
    调用所述预设实例分割模型识别所述第二扰动图像中每个实例的第三类别标签、第三实例检测框及第三实例轮廓掩码;invoking the preset instance segmentation model to identify a third category label, a third instance detection frame, and a third instance contour mask for each instance in the second perturbed image;
    基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分;calculating a class label score for each instance based on the first class label, the second class label, and the third class label;
    基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分;calculating a detection frame score for each instance based on the first instance detection frame, the second instance detection frame, and the third instance detection frame;
    基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分;calculating a contour mask score for each instance based on the first instance contour mask, the second instance contour mask, and the third instance contour mask;
    根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量。The information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score.
  3. 如权利要求2所述的基于人工智能的图像实例标注方法,其中,所述基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分包括:The method for labeling image instances based on artificial intelligence according to claim 2, wherein said calculating the category label score of each instance based on said first category label, said second category label and said third category label comprises :
    获取所述第一类别标签对应的第一预测概率、所述第二类别标签的第二预测概率及所述第三类别标签的第三预测概率;Obtaining a first predicted probability corresponding to the first category label, a second predicted probability of the second category label, and a third predicted probability of the third category label;
    计算所述第一预测概率及对应的所述第二预测概率、所述第三预测概率的概率均值;calculating the probability mean of the first predicted probability and the corresponding second predicted probability and the third predicted probability;
    将所述均值作为对应的实例的类别标签得分。The mean value is used as the category label score of the corresponding instance.
  4. 如权利要求2所述的基于人工智能的图像实例标注方法,其中,所述基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分包括:The method for labeling image instances based on artificial intelligence according to claim 2, wherein the calculation of the detection of each instance based on the first instance detection frame, the second instance detection frame and the third instance detection frame Box scores include:
    计算所述第一实例检测框与对应的所述第二实例检测框的第一交并比;calculating a first intersection-over-union ratio between the first instance detection frame and the corresponding second instance detection frame;
    计算所述第一实例检测框与对应的所述第三实例检测框的第二交并比;calculating a second intersection-over-union ratio between the first instance detection frame and the corresponding third instance detection frame;
    根据预设第一计算模型基于所述第一交并比及所述第二交并比计算得到对应的所述实例的检测框得分。The corresponding detection frame score of the instance is calculated based on the first intersection and union ratio and the second intersection and union ratio according to a preset first calculation model.
  5. 如权利要求2所述的基于人工智能的图像实例标注方法,其中,所述基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分包括:The method for labeling image instances based on artificial intelligence according to claim 2, wherein said calculation of each Contour mask scores for instances include:
    计算所述第一实例轮廓掩码与对应的所述第二实例轮廓掩码的第一Jaccard距离;calculating the first Jaccard distance between the first instance contour mask and the corresponding second instance contour mask;
    计算所述第一实例轮廓掩码与对应的所述第三实例轮廓掩码的第二Jaccard距离;calculating a second Jaccard distance between the first instance contour mask and the corresponding third instance contour mask;
    根据预设第二计算模型基于所述第一Jaccard距离及所述第二Jaccard距离计算得到对应的所述实例的轮廓掩码得分。A contour mask score corresponding to the instance is calculated based on the first Jaccard distance and the second Jaccard distance according to a preset second calculation model.
  6. 如权利要求2至5中任意一项所述的基于人工智能的图像实例标注方法,其中,所述 根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量包括:The artificial intelligence-based image instance labeling method according to any one of claims 2 to 5, wherein the calculation of the corresponding The amount of information for an instance includes:
    计算所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分的乘积,得到对应的实例的最终得分;Calculate the product of the category label score and the corresponding detection frame score and the contour mask score to obtain the final score of the corresponding instance;
    将所述最终得分确定为所述实例的信息量。The final score is determined as the informativeness of the instance.
  7. 如权利要求6所述的基于人工智能的图像实例标注方法,其中,所述方法还包括:The method for labeling image instances based on artificial intelligence as claimed in claim 6, wherein said method further comprises:
    将已标注有实例标签的标注图像与多个所述目标图像作为训练集;Using the labeled images marked with instance labels and multiple target images as a training set;
    基于所述训练集训练所述实例标注模型;training the instance labeling model based on the training set;
    基于测试集评估所述实例标注模型的精度,并在所述精度满足预设精度阈值时,结束所述实例标注模型的训练。Evaluate the accuracy of the instance tagging model based on the test set, and end the training of the instance tagging model when the accuracy meets a preset accuracy threshold.
  8. 一种基于人工智能的图像实例标注装置,其中,所述装置包括:A device for labeling image instances based on artificial intelligence, wherein the device includes:
    实例识别模块,用于调用预设实例分割模型识别目标图像中每个实例的信息量;An instance recognition module, used to call a preset instance segmentation model to identify the amount of information of each instance in the target image;
    实例获取模块,用于从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;An instance acquiring module, configured to acquire a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, except for the first instance in the target image The instance of is the second instance;
    第一标注模块,用于通过人工标注所述目标图像中的所述第一实例的第一标签;a first labeling module, configured to manually label the first label of the first instance in the target image;
    第二标注模块,用于基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;A second labeling module, configured to pseudo-label the second label of the second instance in the target image based on a semi-supervised learning method;
    标签确定模块,用于基于所述第一标签和所述第二标签得到所述目标图像的实例标签。A label determining module, configured to obtain an instance label of the target image based on the first label and the second label.
  9. 一种电子设备,其中,所述电子设备包括处理器和存储器,所述处理器用于执行存储器中存储的计算机可读指令以实现以下步骤:An electronic device, wherein the electronic device includes a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
    调用预设实例分割模型识别目标图像中每个实例的信息量;Call the preset instance segmentation model to identify the amount of information of each instance in the target image;
    从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;Obtaining a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where instances in the target image other than the first instance are second instances ;
    通过人工标注所述目标图像中的所述第一实例的第一标签;manually annotating the first label of the first instance in the target image;
    基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;Pseudo-labeling the second label of the second instance in the target image based on a semi-supervised learning manner;
    基于所述第一标签和所述第二标签得到所述目标图像的实例标签。An instance label of the target image is obtained based on the first label and the second label.
  10. 如权利要求9所述的电子设备,其中,所述处理器执行所述计算机可读指令以实现调用预设实例分割模型识别目标图像中每个实例的信息量时,具体包括:The electronic device according to claim 9, wherein, when the processor executes the computer-readable instructions to realize calling a preset instance segmentation model to identify the amount of information of each instance in the target image, it specifically includes:
    对所述目标图像进行第一扰动得到第一扰动图像,并对所述目标图像进行第二扰动得到第二扰动图像;performing a first perturbation on the target image to obtain a first perturbation image, and performing a second perturbation on the target image to obtain a second perturbation image;
    调用所述预设实例分割模型识别所述目标图像中每个实例的第一类别标签、第一实例检测框及第一实例轮廓掩码;Invoking the preset instance segmentation model to identify a first category label, a first instance detection frame, and a first instance contour mask for each instance in the target image;
    调用所述预设实例分割模型识别所述第一扰动图像中每个实例的第二类别标签、第二实例检测框及第二实例轮廓掩码;invoking the preset instance segmentation model to identify a second category label, a second instance detection frame, and a second instance contour mask for each instance in the first perturbed image;
    调用所述预设实例分割模型识别所述第二扰动图像中每个实例的第三类别标签、第三实例检测框及第三实例轮廓掩码;invoking the preset instance segmentation model to identify a third category label, a third instance detection frame, and a third instance contour mask for each instance in the second perturbed image;
    基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分;calculating a class label score for each instance based on the first class label, the second class label, and the third class label;
    基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分;calculating a detection frame score for each instance based on the first instance detection frame, the second instance detection frame, and the third instance detection frame;
    基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分;calculating a contour mask score for each instance based on the first instance contour mask, the second instance contour mask, and the third instance contour mask;
    根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量。The information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score.
  11. 如权利要求10所述的电子设备,其中,所述处理器执行所述计算机可读指令以实现基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得 分时,具体包括:The electronic device of claim 10, wherein the processor executes the computer-readable instructions to effectuate computing each instance based on the first class label, the second class label, and the third class label When the category label score of the , specifically includes:
    获取所述第一类别标签对应的第一预测概率、所述第二类别标签的第二预测概率及所述第三类别标签的第三预测概率;Obtaining a first predicted probability corresponding to the first category label, a second predicted probability of the second category label, and a third predicted probability of the third category label;
    计算所述第一预测概率及对应的所述第二预测概率、所述第三预测概率的概率均值;calculating the probability mean of the first predicted probability and the corresponding second predicted probability and the third predicted probability;
    将所述均值作为对应的实例的类别标签得分。The mean value is used as the category label score of the corresponding instance.
  12. 如权利要求10所述的电子设备,其中,所述处理器执行所述计算机可读指令以实现基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分时,具体包括:The electronic device according to claim 10, wherein the processor executes the computer-readable instructions to implement calculation based on the first instance detection frame, the second instance detection frame, and the third instance detection frame When scoring the detection frame of each instance, it specifically includes:
    计算所述第一实例检测框与对应的所述第二实例检测框的第一交并比;calculating a first intersection-over-union ratio between the first instance detection frame and the corresponding second instance detection frame;
    计算所述第一实例检测框与对应的所述第三实例检测框的第二交并比;calculating a second intersection-over-union ratio between the first instance detection frame and the corresponding third instance detection frame;
    根据预设第一计算模型基于所述第一交并比及所述第二交并比计算得到对应的所述实例的检测框得分。The corresponding detection frame score of the instance is calculated based on the first intersection and union ratio and the second intersection and union ratio according to a preset first calculation model.
  13. 如权利要求10所述的电子设备,其中,所述处理器执行所述计算机可读指令以实现基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分时,具体包括:The electronic device of claim 10, wherein the processor executes the computer-readable instructions to implement When the mask computes the contour mask score for each instance, it includes:
    计算所述第一实例轮廓掩码与对应的所述第二实例轮廓掩码的第一Jaccard距离;calculating the first Jaccard distance between the first instance contour mask and the corresponding second instance contour mask;
    计算所述第一实例轮廓掩码与对应的所述第三实例轮廓掩码的第二Jaccard距离;calculating a second Jaccard distance between the first instance contour mask and the corresponding third instance contour mask;
    根据预设第二计算模型基于所述第一Jaccard距离及所述第二Jaccard距离计算得到对应的所述实例的轮廓掩码得分。A contour mask score corresponding to the instance is calculated based on the first Jaccard distance and the second Jaccard distance according to a preset second calculation model.
  14. 如权利要求10至13中任意一项所述的电子设备,其中,所述处理器执行所述计算机可读指令以实现根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量时,具体包括:The electronic device according to any one of claims 10 to 13, wherein the processor executes the computer-readable instructions to realize the detection according to the class label score and the corresponding detection frame score, the contour mask When the code score calculates the information volume of the corresponding instance, it specifically includes:
    计算所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分的乘积,得到对应的实例的最终得分;Calculate the product of the category label score and the corresponding detection frame score and the contour mask score to obtain the final score of the corresponding instance;
    将所述最终得分确定为所述实例的信息量。The final score is determined as the informativeness of the instance.
  15. 如权利要求14所述的电子设备,其中,所述处理器执行所述计算机可读指令还用以实现以下步骤:The electronic device of claim 14, wherein the processor executes the computer readable instructions to further implement the following steps:
    将已标注有实例标签的标注图像与多个所述目标图像作为训练集;Using the labeled images marked with instance labels and multiple target images as a training set;
    基于所述训练集训练所述实例标注模型;training the instance labeling model based on the training set;
    基于测试集评估所述实例标注模型的精度,并在所述精度满足预设精度阈值时,结束所述实例标注模型的训练。Evaluate the accuracy of the instance tagging model based on the test set, and end the training of the instance tagging model when the accuracy meets a preset accuracy threshold.
  16. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其中,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, wherein the computer program implements the following steps when executed by a processor:
    调用预设实例分割模型识别目标图像中每个实例的信息量;Call the preset instance segmentation model to identify the amount of information of each instance in the target image;
    从所述目标图像中获取高于预设信息量阈值的第一信息量及所述第一信息量对应的第一实例,所述目标图像中除所述第一实例外的实例为第二实例;Obtaining a first information amount higher than a preset information amount threshold and a first instance corresponding to the first information amount from the target image, where instances in the target image other than the first instance are second instances ;
    通过人工标注所述目标图像中的所述第一实例的第一标签;manually annotating the first label of the first instance in the target image;
    基于半监督学习方式伪标注所述目标图像中的所述第二实例的第二标签;Pseudo-labeling the second label of the second instance in the target image based on a semi-supervised learning manner;
    基于所述第一标签和所述第二标签得到所述目标图像的实例标签。An instance label of the target image is obtained based on the first label and the second label.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述计算机可读指令被所述处理器执行以实现调用预设实例分割模型识别目标图像中每个实例的信息量时,具体包括:The computer-readable storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor to implement calling a preset instance segmentation model to identify the amount of information of each instance in the target image, it specifically includes:
    对所述目标图像进行第一扰动得到第一扰动图像,并对所述目标图像进行第二扰动得到第二扰动图像;performing a first perturbation on the target image to obtain a first perturbation image, and performing a second perturbation on the target image to obtain a second perturbation image;
    调用所述预设实例分割模型识别所述目标图像中每个实例的第一类别标签、第一实例检测框及第一实例轮廓掩码;Invoking the preset instance segmentation model to identify a first category label, a first instance detection frame, and a first instance contour mask for each instance in the target image;
    调用所述预设实例分割模型识别所述第一扰动图像中每个实例的第二类别标签、第二实 例检测框及第二实例轮廓掩码;Invoking the preset instance segmentation model to identify a second category label, a second instance detection frame, and a second instance contour mask for each instance in the first perturbed image;
    调用所述预设实例分割模型识别所述第二扰动图像中每个实例的第三类别标签、第三实例检测框及第三实例轮廓掩码;invoking the preset instance segmentation model to identify a third category label, a third instance detection frame, and a third instance contour mask for each instance in the second perturbed image;
    基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分;calculating a class label score for each instance based on the first class label, the second class label, and the third class label;
    基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分;calculating a detection frame score for each instance based on the first instance detection frame, the second instance detection frame, and the third instance detection frame;
    基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分;calculating a contour mask score for each instance based on the first instance contour mask, the second instance contour mask, and the third instance contour mask;
    根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量。The information amount of the corresponding instance is calculated according to the class label score and the corresponding detection frame score and the contour mask score.
  18. 如权利要求17所述的计算机可读存储介质,其中,所述计算机可读指令被所述处理器执行以实现基于所述第一类别标签、所述第二类别标签及所述第三类别标签计算每个实例的类别标签得分时,具体包括:The computer-readable storage medium of claim 17, wherein the computer-readable instructions are executed by the processor to implement When computing the class label score for each instance, specifically:
    获取所述第一类别标签对应的第一预测概率、所述第二类别标签的第二预测概率及所述第三类别标签的第三预测概率;Obtaining a first predicted probability corresponding to the first category label, a second predicted probability of the second category label, and a third predicted probability of the third category label;
    计算所述第一预测概率及对应的所述第二预测概率、所述第三预测概率的概率均值;calculating the probability mean of the first predicted probability and the corresponding second predicted probability and the third predicted probability;
    将所述均值作为对应的实例的类别标签得分。The mean value is used as the category label score of the corresponding instance.
  19. 如权利要求17所述的计算机可读存储介质,其中,所述计算机可读指令被所述处理器执行以实现基于所述第一实例检测框、所述第二实例检测框及所述第三实例检测框计算每个实例的检测框得分时,具体包括:The computer-readable storage medium of claim 17, wherein the computer-readable instructions are executed by the processor to implement a detection frame based on the first instance, the second instance detection frame, and the third instance detection frame. When the instance detection box calculates the detection box score of each instance, it specifically includes:
    计算所述第一实例检测框与对应的所述第二实例检测框的第一交并比;calculating a first intersection-over-union ratio between the first instance detection frame and the corresponding second instance detection frame;
    计算所述第一实例检测框与对应的所述第三实例检测框的第二交并比;calculating a second intersection-over-union ratio between the first instance detection frame and the corresponding third instance detection frame;
    根据预设第一计算模型基于所述第一交并比及所述第二交并比计算得到对应的所述实例的检测框得分。The corresponding detection frame score of the instance is calculated based on the first intersection and union ratio and the second intersection and union ratio according to a preset first calculation model.
  20. 如权利要求17所述的计算机可读存储介质,其中,所述计算机可读指令被所述处理器执行以实现基于所述第一实例轮廓掩码、所述第二实例轮廓掩码及所述第三实例轮廓掩码计算每个实例的轮廓掩码得分时,具体包括:The computer-readable storage medium of claim 17 , wherein the computer-readable instructions are executed by the processor to implement a method based on the first instance contour mask, the second instance contour mask, and the When the third instance contour mask calculates the contour mask score of each instance, it specifically includes:
    计算所述第一实例轮廓掩码与对应的所述第二实例轮廓掩码的第一Jaccard距离;calculating the first Jaccard distance between the first instance contour mask and the corresponding second instance contour mask;
    计算所述第一实例轮廓掩码与对应的所述第三实例轮廓掩码的第二Jaccard距离;calculating a second Jaccard distance between the first instance contour mask and the corresponding third instance contour mask;
    根据预设第二计算模型基于所述第一Jaccard距离及所述第二Jaccard距离计算得到对应的所述实例的轮廓掩码得分。A contour mask score corresponding to the instance is calculated based on the first Jaccard distance and the second Jaccard distance according to a preset second calculation model.
  21. 如权利要求17至20中任意一项所述的计算机可读存储介质,其中,所述计算机可读指令被所述处理器执行以实现根据所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分计算对应的实例的信息量时,具体包括:The computer-readable storage medium as claimed in any one of claims 17 to 20, wherein the computer-readable instructions are executed by the processor to realize according to the category label score and the corresponding detection frame score, When calculating the information content of the corresponding instance, the contour mask score specifically includes:
    计算所述类别标签得分及对应的所述检测框得分、所述轮廓掩码得分的乘积,得到对应的实例的最终得分;Calculate the product of the category label score and the corresponding detection frame score and the contour mask score to obtain the final score of the corresponding instance;
    将所述最终得分确定为所述实例的信息量。The final score is determined as the informativeness of the instance.
  22. 如权利要求21所述的计算机可读存储介质,其中,所述计算机可读指令被所述处理器执行还用以实现以下步骤:The computer-readable storage medium of claim 21, wherein the computer-readable instructions are executed by the processor to further implement the steps of:
    将已标注有实例标签的标注图像与多个所述目标图像作为训练集;Using the labeled images marked with instance labels and multiple target images as a training set;
    基于所述训练集训练所述实例标注模型;training the instance labeling model based on the training set;
    基于测试集评估所述实例标注模型的精度,并在所述精度满足预设精度阈值时,结束所述实例标注模型的训练。Evaluate the accuracy of the instance tagging model based on the test set, and end the training of the instance tagging model when the accuracy meets a preset accuracy threshold.
PCT/CN2022/071328 2021-08-30 2022-01-11 Image instance labeling method based on artificial intelligence, and related device WO2023029348A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111005698.2 2021-08-30
CN202111005698.2A CN113705687B (en) 2021-08-30 2021-08-30 Image instance labeling method based on artificial intelligence and related equipment

Publications (1)

Publication Number Publication Date
WO2023029348A1 true WO2023029348A1 (en) 2023-03-09

Family

ID=78656924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071328 WO2023029348A1 (en) 2021-08-30 2022-01-11 Image instance labeling method based on artificial intelligence, and related device

Country Status (2)

Country Link
CN (1) CN113705687B (en)
WO (1) WO2023029348A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705687B (en) * 2021-08-30 2023-03-24 平安科技(深圳)有限公司 Image instance labeling method based on artificial intelligence and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112163634A (en) * 2020-10-14 2021-01-01 平安科技(深圳)有限公司 Example segmentation model sample screening method and device, computer equipment and medium
US20210241034A1 (en) * 2020-01-31 2021-08-05 Element Al Inc. Method of and system for generating training images for instance segmentation machine learning algorithm
CN113239950A (en) * 2021-01-13 2021-08-10 深延科技(北京)有限公司 Labeling method, labeling device, electronic equipment and storage medium
CN113705687A (en) * 2021-08-30 2021-11-26 平安科技(深圳)有限公司 Image instance labeling method based on artificial intelligence and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210241034A1 (en) * 2020-01-31 2021-08-05 Element Al Inc. Method of and system for generating training images for instance segmentation machine learning algorithm
CN112163634A (en) * 2020-10-14 2021-01-01 平安科技(深圳)有限公司 Example segmentation model sample screening method and device, computer equipment and medium
CN113239950A (en) * 2021-01-13 2021-08-10 深延科技(北京)有限公司 Labeling method, labeling device, electronic equipment and storage medium
CN113705687A (en) * 2021-08-30 2021-11-26 平安科技(深圳)有限公司 Image instance labeling method based on artificial intelligence and related equipment

Also Published As

Publication number Publication date
CN113705687A (en) 2021-11-26
CN113705687B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
JP7143008B2 (en) Medical image detection method and device based on deep learning, electronic device and computer program
US10929420B2 (en) Structured report data from a medical text report
CN107292086A (en) Graphical analysis question and answer
CN108899064A (en) Electronic health record generation method, device, computer equipment and storage medium
CN110390674B (en) Image processing method, device, storage medium, equipment and system
CN112365980A (en) Brain tumor multi-target point auxiliary diagnosis and prospective treatment evolution visualization method and system
Beddiar et al. Automatic captioning for medical imaging (MIC): a rapid review of literature
Bano et al. AutoFB: Automating fetal biometry estimation from standard ultrasound planes
CN113656706A (en) Information pushing method and device based on multi-mode deep learning model
WO2023029348A1 (en) Image instance labeling method based on artificial intelligence, and related device
CN115719334A (en) Medical image evaluation method, device, equipment and medium based on artificial intelligence
CN111967539B (en) Recognition method and device for maxillofacial fracture based on CBCT database and terminal equipment
WO2022247007A1 (en) Medical image grading method and apparatus, electronic device, and readable storage medium
Kugener et al. Deep neural networks can accurately detect blood loss and hemorrhage control task success from video
Mason et al. Lung ultrasound segmentation and adaptation between COVID-19 and community-acquired pneumonia
CN111967540B (en) Maxillofacial fracture identification method and device based on CT database and terminal equipment
CN113436155B (en) Deep learning-based ultrasonic brachial plexus image recognition method
Wang et al. Accurate corresponding fiber tract segmentation via FiberGeoMap learner
CN117237351B (en) Ultrasonic image analysis method and related device
Guo et al. The Gap in the Thickness: Estimating Effectiveness of Pulmonary Nodule Detection in Thick-and Thin-Section CT Images with 3D Deep Neural Networks
CN113393445B (en) Breast cancer image determination method and system
CN111724893B (en) Medical image identification device and medical image identification method
Liu et al. Detection of fetal facial anatomy in standard ultrasonographic sections based on real‐time target detection network
WO2023179055A1 (en) Bias evaluation method and apparatus, medium, program product, and electronic device
CN115330733A (en) Disease intelligent identification method and system based on fine-grained domain knowledge