WO2022227192A1 - 图像分类方法、装置、电子设备及介质 - Google Patents

图像分类方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2022227192A1
WO2022227192A1 PCT/CN2021/097079 CN2021097079W WO2022227192A1 WO 2022227192 A1 WO2022227192 A1 WO 2022227192A1 CN 2021097079 W CN2021097079 W CN 2021097079W WO 2022227192 A1 WO2022227192 A1 WO 2022227192A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
images
model
processed
processed image
Prior art date
Application number
PCT/CN2021/097079
Other languages
English (en)
French (fr)
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 WO2022227192A1 publication Critical patent/WO2022227192A1/zh

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/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • 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

Definitions

  • the present application relates to the technical field of image processing, and in particular, to an image classification method, apparatus, electronic device, and computer-readable storage medium.
  • An image classification method provided by this application includes:
  • the processed images include unclassified images and classified images;
  • the pseudo-category label of the category-free annotated image is obtained by calculating the uncategorized label image by a preset semi-supervised learning method, wherein the pseudo-category label is used to label the category of the category-free annotated image;
  • the probability constraint parameter is updated by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories to obtain the probability graph model;
  • the probabilistic graphical model is trained by using the to-be-processed image and the class label of the to-be-processed image to obtain an image classification model;
  • the present application also provides an image classification device, the device comprising:
  • the image enhancement module is used to obtain the image to be processed from the image set, and enhance the image to be processed by the preset first data enhancement method and the preset second data enhancement method respectively, so as to obtain the first enhanced image and the second enhanced image , wherein the to-be-processed image includes an unclassified image and a class-annotated image;
  • a parameter building module for inputting the first enhanced image into a pre-built first image processing network to obtain a first processed image, and inputting the second enhanced image into a pre-built second image processing network to obtain a second processed image an image, using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
  • the label generation module is used to calculate the unclassified labeled image through a preset semi-supervised learning method to obtain the pseudo-classified label of the unclassified labeled image, wherein the pseudo-classified label is used to label the unclassified labeled image.
  • category
  • a loss function building module used for updating the probability constraint parameters through the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories, to obtain the probability graph model
  • a classification model training module configured to train the probabilistic graphical model by using the to-be-processed image and the class label of the to-be-processed image to obtain an image classification model
  • the image classification module is configured to acquire the images to be classified, input the images to be classified into the image classification model for classification, and obtain the class labels of the images to be classified.
  • the present application also provides an electronic device, the electronic device comprising:
  • the processor executes the computer program stored in the memory to realize the image classification method as described below:
  • the processed images include unclassified images and classified images;
  • the pseudo-category label of the category-free annotated image is obtained by calculating the uncategorized label image by a preset semi-supervised learning method, wherein the pseudo-category label is used to label the category of the category-free annotated image;
  • the probability constraint parameter is updated by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories to obtain the probability graph model;
  • the probabilistic graphical model is trained by using the to-be-processed image and the class label of the to-be-processed image to obtain an image classification model;
  • the present application also provides a computer-readable storage medium, including a storage data area and a storage program area, the storage data area stores created data, and the storage program area stores a computer program; wherein, the computer program is implemented as follows when executed by a processor The described image classification method:
  • the processed images include unclassified images and classified images;
  • the pseudo-category label of the category-free annotated image is obtained by calculating the uncategorized label image by a preset semi-supervised learning method, wherein the pseudo-category label is used to label the category of the category-free annotated image;
  • the probability constraint parameter is updated by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories to obtain the probability graph model;
  • the probabilistic graphical model is trained by using the to-be-processed image and the class label of the to-be-processed image to obtain an image classification model;
  • FIG. 1 is a schematic flowchart of an image classification method according to an embodiment of the present application.
  • FIG. 2 is a schematic block diagram of an image classification apparatus provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the internal structure of an electronic device for implementing an image classification method provided by an embodiment of the present application
  • the embodiment of the present application provides an image classification method.
  • the execution subject of the image classification method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server and a terminal.
  • the image classification method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
  • the image classification method includes:
  • the to-be-processed images include unclassified images and classified images.
  • the category-annotated image is an image that has been category-annotated
  • the category-unlabeled image is an image that has not undergone category annotation processing.
  • the category-labeled image is an image that has been manually labeled with categories (eg, by a BasicFinder tool) in advance
  • the category-free image is an original image without category-labeling processing.
  • the classified-annotated images have data annotations, and the unlabeled images do not have data annotations.
  • the form of data annotation may include, but is not limited to, annotated picture frame, 3D picture frame, text transcription, image dotting, and contour lines of target objects.
  • the unlabeled images and the classified images may be images in the medical field.
  • the unclassified images or the classified images are computer X-ray images CR, computed tomography CT, and nuclear magnetic resonance images. MR and other images.
  • the number of the labeled images without categories is greater than a first preset value
  • the number of labeled images with categories is less than a second preset value
  • the first preset value is greater than the second preset value
  • the first preset value is 10 times, 20 times, even 50 times, or 100 times the second preset value.
  • the first preset value is 5000 and the second preset value is 50.
  • one image may be randomly acquired, or multiple images may be randomly acquired continuously.
  • the first data enhancement method is a geometric transformation data enhancement method
  • the second data enhancement method is a color transformation data enhancement method
  • first data enhancement method and the second data enhancement method can make limited data generate value equivalent to more data without substantially increasing the data.
  • the geometric transformation data enhancement methods include methods such as flipping, random rotation, random cropping, deformation scaling, and the like.
  • the color transformation data enhancement method includes adding noise, blurring, color transformation, image filling, and the like.
  • both the first processed image and the second processed image are obtained by randomly acquiring images from the image set through the data enhancement method. Therefore, the first processed image and the second processed image are obtained by the data enhancement method. Images are relevant.
  • the method further includes:
  • the first processed image is the same as the second processed image, perform the operation of acquiring the image to be processed from the image set again;
  • the operation of constructing a probability constraint parameter of a probabilistic graphical model by using the first processed image and the second processed image is performed.
  • the first image processing network and the second image processing network are networks for processing images.
  • the first image processing network and the second image processing network may be one of a Lebet-5 network, an AlexNet network, a VGG16 network, and a ResNet-50 network, wherein when the first image processing network and the first image processing network are When the two image processing networks are both Lebet-5 networks, the first image processing network and the second image processing network are respectively used for image screening and classification.
  • the probability constraint parameters for constructing a probability graph model by using the first processed image and the second processed image include:
  • the first processed image and the second processed image are input into the original loss function, and the function parameters in the original loss function are updated to obtain probability constraint parameters.
  • the first processed image and the second processed image may be input into the original loss function, and the first processed image and the second processed image may be used as functions of the original loss function item to update the parameters of the original loss function to obtain the updated probability constraint parameters, and use the updated probability constraint parameters as the probability constraint parameters.
  • the generation of the pseudo-category label of the uncategorized image by the preset semi-supervised learning method includes:
  • the second supervised learning model is determined to be a training completed model
  • the obtaining the first supervised learning model includes:
  • the initial training set includes a first labeled sample set and a first unlabeled sample set;
  • the first supervised learning model is obtained by training an initial semi-supervised learning model through an initial training set, and the initial training set includes a first labeled sample set and a first unlabeled sample set,
  • the first labeled sample set includes labeled data: the first unlabeled sample set includes unlabeled data.
  • labeled data and unlabeled data are not limited to image data.
  • the data labels include classification labels of image data and classification labels of digital data, wherein image data can be divided into labeled image data and unlabeled image data, and digital data can be divided into symbol data and text data.
  • the initial semi-supervised learning model is any one of ⁇ -model, VAT, LPDSSL, TNAR, pseudo-label, and DCT.
  • the probability constraint parameter is updated by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories, and obtaining the probability graph model includes:
  • the formed vector updates the probability constraint parameters in the original loss function to obtain the probability graph model.
  • the method further includes:
  • the probabilistic graphical model is obtained according to the update loss function.
  • the loss function is a function that maps random time or the value of its related random variable to a non-negative real number to represent the risk or loss of the random event.
  • the update loss function uses for numerical estimation of the parameters of the probabilistic graphical model.
  • the update loss function is:
  • f L represents the vector composed of the labeled images with class
  • f U represents the vector composed of the labeled images without class
  • n U represents the number of labeled images without class
  • n L represents the number of labeled images with class Quantity
  • y represents the vector composed of the category labels of the first processed image and the second processed image
  • CE represents the cross entropy error function
  • MSE represents the mean square error function
  • is the coefficient function, used to rule the cross entropy Subnomial bias.
  • the probabilistic graphical model is a theory that uses a graph to represent the probability dependence of variables, and combines the knowledge of probability theory and graph theory to use a graph to represent the joint probability distribution of variables related to the model.
  • the probabilistic graphical model is trained by using the to-be-processed image and the category label of the to-be-processed image, and the obtained image classification model includes:
  • a class-unlabeled image set is constructed using the unclassified labeled images in the image set, and a class-labeled image set is constructed using the class-labeled images in the image set.
  • the labeling of the class-labeled image set trains the probabilistic graphical model including the update loss function to obtain an image classification model.
  • the image to be classified may be an image that has not undergone image processing, or the image to be classified may also be an image that has undergone image processing (such as color correction processing) but has not been labeled with categories.
  • the image to be classified may be a medical image.
  • the image to be classified is a lung CT image
  • the image classification model is used to classify the image for lesions, and it is determined whether the lung CT image contains a lesion.
  • pseudo-labels are generated for the unlabeled images through a semi-supervised learning method, and then the unclassified labeled images are used for image classification model training, which increases the amount of data when training the model. And the diversity of data, while further improving the utilization of data and the accuracy of image classification model training.
  • the image to be classified is input into the image classification model to obtain an accurate classification result, thereby achieving the purpose of improving the accuracy of image classification.
  • FIG. 2 it is a schematic block diagram of the image classification apparatus of the present application.
  • the image classification apparatus 100 described in this application can be installed in an electronic device.
  • the image classification apparatus may include an image enhancement module 101 , a parameter construction module 102 , an annotation generation module 103 , a loss function construction module 104 , a classification model training module 105 and an image classification module 106 .
  • the modules described in this application may also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can perform fixed functions, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the image enhancement module 101 is configured to obtain the to-be-processed image from an image set, and to enhance the to-be-processed image through a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second data enhancement method.
  • Enhanced images, wherein the to-be-processed images include images without category annotations and images with category annotations.
  • the category-annotated image is an image that has been category-annotated
  • the category-unlabeled image is an image that has not undergone category annotation processing.
  • the category-labeled image is an image that has been manually labeled with categories (eg, by a BasicFinder tool) in advance
  • the category-free image is an original image without category-labeling processing.
  • the classified-annotated images have data annotations, and the unlabeled images do not have data annotations.
  • the form of data annotation may include, but is not limited to, annotated picture frame, 3D picture frame, text transcription, image dotting, and contour lines of target objects.
  • the unlabeled images and the classified images may be images in the medical field.
  • the unclassified images or the classified images are computer X-ray images CR, computed tomography CT, and nuclear magnetic resonance images. MR and other images.
  • the number of the labeled images without categories is greater than a first preset value
  • the number of labeled images with categories is less than a second preset value
  • the first preset value is greater than the second preset value
  • the first preset value is 10 times, 20 times, even 50 times, or 100 times the second preset value.
  • the first preset value is 5000 and the second preset value is 50.
  • one image may be randomly acquired, or multiple images may be randomly acquired continuously.
  • the first data enhancement method is a geometric transformation data enhancement method
  • the second data enhancement method is a color transformation data enhancement method
  • first data enhancement method and the second data enhancement method can make limited data generate value equivalent to more data without substantially increasing the data.
  • the geometric transformation data enhancement methods include methods such as flipping, random rotation, random cropping, and deformation scaling.
  • the color transformation data enhancement method includes adding noise, blurring, color transformation, image filling, and the like.
  • both the first processed image and the second processed image are obtained by randomly acquiring images from the image set through the data enhancement method. Therefore, the first processed image and the second processed image are obtained by the data enhancement method. Images are relevant.
  • the parameter construction module 102 is configured to input the first enhanced image into a pre-built first image processing network to obtain a first processed image, and input the second enhanced image into a pre-built second image processing network to obtain The second processing image is used to construct the probability constraint parameter of the probability graph model by using the first processing image and the second processing image.
  • the method further includes:
  • the first processed image is the same as the second processed image, perform the operation of acquiring the image to be processed from the image set again;
  • the operation of constructing a probability constraint parameter of a probabilistic graphical model by using the first processed image and the second processed image is performed.
  • the first image processing network and the second image processing network are networks for processing images.
  • the first image processing network and the second image processing network may be one of a Lebet-5 network, an AlexNet network, a VGG16 network, and a ResNet-50 network, wherein when the first image processing network and the first image processing network are When the two image processing networks are both Lebet-5 networks, the first image processing network and the second image processing network are respectively used for image screening and classification.
  • the probability constraint parameters for constructing a probability graph model by using the first processed image and the second processed image include:
  • the first processed image and the second processed image are input into the original loss function, and the function parameters in the original loss function are updated to obtain probability constraint parameters.
  • the first processed image and the second processed image may be input into the original loss function, and the first processed image and the second processed image may be used as functions of the original loss function item to update the parameters of the original loss function to obtain the updated probability constraint parameters, and use the updated probability constraint parameters as the probability constraint parameters.
  • the label generation module 103 is configured to calculate the unclassified labeled image through a preset semi-supervised learning method to obtain the pseudo-classified label of the unclassified labeled image, wherein the pseudo-classified label is used to label the unclassified image. Annotate the category of the image.
  • the generation of the pseudo-category label of the uncategorized image by the preset semi-supervised learning method includes:
  • the second supervised learning model is determined to be a training completed model
  • the obtaining the first supervised learning model includes:
  • the initial training set includes a first labeled sample set and a first unlabeled sample set;
  • the first supervised learning model is obtained by training an initial semi-supervised learning model through an initial training set, and the initial training set includes a first labeled sample set and a first unlabeled sample set,
  • the first labeled sample set includes labeled data: the first unlabeled sample set includes unlabeled data.
  • labeled data and unlabeled data are not limited to image data.
  • the data labels include classification labels of image data and classification labels of digital data, wherein image data can be divided into labeled image data and unlabeled image data, and digital data can be divided into symbol data and text data.
  • the initial semi-supervised learning model is any one of ⁇ -model, VAT, LPDSSL, TNAR, pseudo-label, and DCT.
  • the loss function construction module 104 is configured to update the probability constraint parameter by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories to obtain the probability graph model.
  • the probability constraint parameter is updated by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories, and obtaining the probability graph model includes:
  • the formed vector updates the probability constraint parameters in the original loss function to obtain the probability graph model.
  • the method further includes:
  • the probabilistic graphical model is obtained according to the update loss function.
  • the loss function is a function that maps random time or the value of its related random variable to a non-negative real number to represent the risk or loss of the random event.
  • the update loss function uses for numerical estimation of the parameters of the probabilistic graphical model.
  • the update loss function is:
  • f L represents the vector composed of the labeled images with class
  • f U represents the vector composed of the labeled images without class
  • n U represents the number of labeled images without class
  • n L represents the number of labeled images with class Quantity
  • y represents the vector composed of the category labels of the first processed image and the second processed image
  • CE represents the cross entropy error function
  • MSE represents the mean square error function
  • is the coefficient function, used to rule the cross entropy Subnomial bias.
  • the probabilistic graphical model is a theory that uses a graph to represent the probability dependence of variables, and combines the knowledge of probability theory and graph theory to use a graph to represent the joint probability distribution of variables related to the model.
  • the classification model training module 105 is configured to train the probabilistic graphical model by using the to-be-processed image and the class label of the to-be-processed image to obtain an image classification model.
  • the described probabilistic graphical model is trained by using the image to be processed and the category label of the image to be processed, and the obtained image classification model includes:
  • a class-unlabeled image set is constructed using the unclassified labeled images in the image set, and a class-labeled image set is constructed using the class-labeled images in the image set.
  • the labeling of the class-labeled image set trains the probabilistic graphical model including the update loss function to obtain an image classification model.
  • the image classification module 106 is configured to acquire an image to be classified, input the image to be classified into the image classification model for classification, and obtain a class label of the image to be classified.
  • the image to be classified may be an image that has not undergone image processing, or the image to be classified may also be an image that has undergone image processing (such as color correction processing) but has not been labeled with categories.
  • the image to be classified may be a medical image.
  • the image to be classified is a lung CT image
  • the image classification model is used to classify the image for lesions, and it is determined whether the lung CT image contains a lesion.
  • pseudo-labels are generated for the unlabeled images through a semi-supervised learning method, and then the unclassified labeled images are used for image classification model training, which increases the amount of data when training the model. And the diversity of data, while further improving the utilization of data and the accuracy of image classification model training.
  • the image to be classified is input into the image classification model to obtain an accurate classification result, thereby achieving the purpose of improving the accuracy of image classification.
  • FIG. 3 it is a schematic structural diagram of an electronic device implementing the image classification method of the present application.
  • the electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an image classification program 12.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium may be volatile or non-volatile.
  • the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (eg, SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 . In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the electronic device 1.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as the code of the image classification program 12, etc., but also can be used to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits.
  • Central Processing Unit CPU
  • microprocessor digital processing chip
  • graphics processor and combination of various control chips, etc.
  • the processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing the program or module (for example, executing the program) stored in the memory 11. image classification program, etc.), and call data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (Extended industry standard architecture, EISA for short) bus or the like.
  • PCI peripheral component interconnect
  • EISA Extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the figure. components, or a combination of certain components, or a different arrangement of components.
  • the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • a network interface optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch panel, and the like.
  • the display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
  • the image classification program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs, and when running in the processor 10, it can realize:
  • the processed images include unclassified images and classified images;
  • the pseudo-category label of the category-free annotated image is obtained by calculating the uncategorized label image by a preset semi-supervised learning method, wherein the pseudo-category label is used to label the category of the category-free annotated image;
  • the probability constraint parameter is updated by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories to obtain the probability graph model;
  • the probabilistic graphical model is trained by using the to-be-processed image and the class label of the to-be-processed image to obtain an image classification model;
  • the pseudo-label is generated for the unlabeled image through the semi-supervised learning method, and then the unclassified image is used for image classification model training, which improves the data for training the model. At the same time, it can further improve the utilization of data and the accuracy of image classification model training.
  • the image classification model is obtained, the image to be classified is input into the image classification model to obtain an accurate classification result, thereby achieving the purpose of improving the accuracy of image classification.
  • the integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium.
  • the readable storage medium may be volatile or non-volatile.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-only memory) Only Memory).
  • the computer usable storage medium may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, and the like; using the created data, etc.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, 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 can be implemented in the form of hardware plus software function modules.
  • 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 essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Biophysics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Biology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种图像处理技术领域的图像分类方法,包括:从图像集中随机获取待处理图像,通过预设的两种数据增强方法和两种图像处理网络得到两个处理图像;利用所述两个处理图像构建概率图模型的概率约束参数,根据所述待处理图像以及所述待处理图像的类别标注对所述概率约束参数进行更新,得到所述概率图模型;对所述概率图模型进行训练,得到图像分类模型;获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。还提出一种图像分类装置、设备及存储介质。该方案还涉及区块链技术,所述图像集可存储于区块链节点中。该方案可以提高图像分类的准确性。

Description

图像分类方法、装置、电子设备及介质
本申请要求于2021年04月28日提交中国专利局、申请号为202110467270.3,发明名称为“图像分类方法、装置、电子设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,尤其涉及一种图像分类方法、装置、电子设备及计算机可读存储介质。
背景技术
随着人工智能技术的发展,图像分类领域也出现了很大的突破,即通过深度学习的方法进行图像分类。然而现有的图像分类技术都是建立在有着大规模有标注图像的前提下所进行的,然而大规模的有标注图像本身比较少,获取大规模的有标注图像所耗费的计算资源也十分多,并且有标注图像之间本身也存在着图像噪声问题,因此为了去噪又需要更多的有标注图像进行训练,从而更难以获得大规模的有标注图像。
发明人意识到,现有的图像分类方法中通过训练的模型进行图像分类,但在模型训练中缺乏有标注数据,可用于训练的数据较少,导致训练得到的模型准确度不高,从而影响图像分类结果的准确性。
发明内容
本申请提供的一种图像分类方法,包括:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
本申请还提供一种图像分类装置,所述装置包括:
图像增强模块,用于从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
参数构建模块,用于将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像,利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
标注生成模块,用于通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
损失函数构建模块,用于通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
分类模型训练模块,用于利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
图像分类模块,用于获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
本申请还提供一种电子设备,所述电子设备包括:
存储器,存储至少一个计算机程序;及
处理器,执行所述存储器中存储的计算机程序以实现如下所述的图像分类方法:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
本申请还提供一种计算机可读存储介质,包括存储数据区和存储程序区,存储数据区存储创建的数据,存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下所述的图像分类方法:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
附图说明
图1为本申请一实施例提供的一种图像分类方法的流程示意图;
图2为本申请一实施例提供的图像分类装置的模块示意图;
图3为本申请一实施例提供的实现图像分类方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供一种图像分类方法。所述图像分类方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述图像分类方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
参照图1所示,为本申请一实施例提供的一种图像分类方法的流程示意图。在本实施例中,所述图像分类方法包括:
S1、从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像。
本申请实施例中,所述有类别标注图像为已进行类别标注的图像,所述无类别标注图像为未进行类别标注处理的图像。如,有类别标注图像为预先通过人工的方式(如通过BasicFinder工具)对图像进行类别标注的图像,所述无类别标注图像即为未进行类别标注处理的原始图像。
具体的,所述有类别标注图像存在数据标注,所述无标注图像不存在数据标注。
具体的,数据标注的形式可以包括但不限于标注画框、3D画框、文本转录、图像打点、目标物体轮廓线。
本申请实施例中,无类别标注图像和有类别标注图像可以为医学领域的图像,例如,无类别标注图像或有类别标注图像为计算机X线摄影图像CR、计算机体层成像CT、核磁共振图像MR等图像。
进一步地,所述无类别标注图像的数量大于第一预设值,所述有类别标注图像的数量小于第二预设值,所述第一预设值大于所述第二预设值。
优选的,所述第一预设值为第二预设值的10倍、20倍、甚至是50倍,100倍,例如,第一预设值为5000,第二预设值为50。
本申请实施例中,可以随机获取一张图像,或者是连续地随机获取多张图像。
优选的,所述第一数据增强方法为几何变换类数据增强方法,所述第二数据增强方法为颜色变换类数据增强方法。
进一步地,所述第一数据增强方法和所述第二数据增强方法可以在不实质性增加数据的情况下,让有限的数据产生等价于更多数据的价值。
本申请实施例中,所述几何变换类数据增强方法包括翻转、随机旋转、随即裁剪、变形缩放等方法。所述颜色变换类数据增强方法包括添加噪声、模糊处理、颜色变换、图像填充等。
本申请实施例中,所述第一处理图像和所述第二处理图像都是由所述图像集中随机获取图像经过所述数据增强方法得到,因此所述第一处理图像和所述第二处理图像具有相关性。
S2、将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像。
本申请实施例中,所述得到第二处理图像之后,所述方法还包括:
判断所述第一处理图像与所述第二处理图像是否相同;
若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中获取待处理图像的操作;
若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。
本申请实施例中,所述第一图像处理网络和所述第二图像处理网络为用于对图像进行处理的网络。
进一步地,第一图像处理网络和第二图像处理网络可以为Lebet-5网络、AlexNet网络、VGG16网络、ResNet-50网络中的一种,其中,当所述第一图像处理网络和所述第二图像处理网络都为Lebet-5网络时,所述第一图像处理网络和所述第二图像处理网络分别用于图像的筛选和分类。
S3、利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数。
详细地,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数包括:
获取所述构建概率图模型地原始损失函数;
将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。
本申请实施例中,可以将所述第一处理图像和所述第二处理图像输入所述原始损失函数,将所述第一处理图像和所述第二处理图像作为所述原始损失函数的函数项对所述原始损失函数进行参数更新,得到更新后的概率约束参数,并将所述更新后的概率约束参数作为概率约束参数。
S4、通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别。
本申请实施例中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签包括:
获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;
利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;
利用所述预测概率从所述图像集中选取目标图像;
根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;
判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;
若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;
若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;
将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。
详细地,所述获取第一有监督学习模型,包括:
接收初始训练集,所述初始训练集包括第一有标签样本集和第一无标签样本集;
获取初始半监督学习模型,利用所述第一有标签样本集和所述第一无标签样本集对所述初始半监督学习模型进行训练得到第一有监督学习网络。
本申请实施例中,所述第一有监督学习模型是由初始半监督学习模型通过初始训练集进行训练得到的,所述初始训练集包括第一有标签样本集和第一无标签样本集,其中,第一有标签样本集包括有标签数据:所述第一无标签样本集包括无标签数据。其中,有标签数据和无标签数据并不仅限于图像数据。所述数据标签包括图像数据的分类标签、数字数 据的分类标签,其中,图像数据可以分为有标注图像数据和无标注图像数据,数字数据可以分为符号数据和文字数据。
详细地,所述初始半监督学习模型为Π-model、VAT、LPDSSL、TNAR、pseudo-label、DCT中的任意一种。
S5、通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型。
本申请实施例中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型包括:
获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;
基于所述图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;
获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。
详细地,所述得到所述概率图模型之前,还包括:
基于所述对所述概率约束参数进行更新,得到更新损失函数,
根据所述更新损失函数得到所述概率图模型。
具体地,所述损失函数为将随机时间或其有关随机变量地取值映射为非负实数,以表示该随机事件的风险或者损失的函数,在本申请实施例中,所述更新损失函数用于对所述概率图模型的参数进行数值估计。
本申请实施例中,所述更新损失函数为:
Figure PCTCN2021097079-appb-000001
其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数,用于规则该交叉熵子项式的偏向。
本申请实施例中,所述概率图模型是用图表示变量概率依赖关系的理论,结合概率论与图论的知识,利用图来表示与模型有关的变量的联合概率分布。
S6、利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型。
详细地,所述利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型包括:
利用所述图像集中的无类别标注图像构建无类别标注图像集,利用所述图像集中的有类别标注图像构建有类别标注图像集。
将所述无类别标注图像集通过所述第一数据增强网络,得到所述无类别标注图像集的第一处理图像集,将所述无类别标注图像集通过所述第二数据增强网络得到所述无类别标注图像集的第二处理图像集;
将所述有类别标注图像集通过所述第一数据增强网络,得到所述有类别标注图像集的第一处理图像集,将所述有类别标注图像集通过所述第二数据增强网络得到所述有类别标注图像集的第二处理图像集;
利用所述无类别标注图像集的第一处理图像集、第二处理图像集和所述有类别标注图 像集的第一处理图像集、第二处理图像集及所述无标注图像集的标注、有类别标注图像集的标注对包含更新损失函数的所述概率图模型进行训练,得到图像分类模型。
S7、获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
本申请实施例中,所述待分类图像可以为未经过图像处理的图像,或者,所述待分类图像也可以为以进行过图像处理(如色彩校正处理)但未经过类别标注的图像。
所述待分类图像可以为医学图像。
例如,所述待分类图像为的图像为肺部CT图像,利用所述图像分类模型进行图像进行病灶分类,判断所述肺部CT图像是否含有病灶。
本实施例中,在获取到无类别标注图像之后,为对无类别标注图像通过半监督学习法生成伪标签,进而将无类别标注图像用于图像分类模型训练,提高了训练模型时的数据量和数据的多样性,同时进一步提高数据的利用率和对图像分类模型训练的准确性。在得到图像分类模型之后,将待分类的图像输入该图像分类模型后得到准确的分类结果,实现了提高图像分类准确性的目的。
如图2所示,是本申请图像分类装置的模块示意图。
本申请所述图像分类装置100可以安装于电子设备中。根据实现的功能,所述图像分类装置可以包括图像增强模块101、参数构建模块102、标注生成模块103、损失函数构建模块104、分类模型训练模块105和图像分类模块106。本申请所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述图像增强模块101,用于从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像。
本申请实施例中,所述有类别标注图像为已进行类别标注的图像,所述无类别标注图像为未进行类别标注处理的图像。如,有类别标注图像为预先通过人工的方式(如通过BasicFinder工具)对图像进行类别标注的图像,所述无类别标注图像即为未进行类别标注处理的原始图像。
具体的,所述有类别标注图像存在数据标注,所述无标注图像不存在数据标注。
具体的,数据标注的形式可以包括但不限于标注画框、3D画框、文本转录、图像打点、目标物体轮廓线。
本申请实施例中,无类别标注图像和有类别标注图像可以为医学领域的图像,例如,无类别标注图像或有类别标注图像为计算机X线摄影图像CR、计算机体层成像CT、核磁共振图像MR等图像。
进一步地,所述无类别标注图像的数量大于第一预设值,所述有类别标注图像的数量小于第二预设值,所述第一预设值大于所述第二预设值。
优选的,所述第一预设值为第二预设值的10倍、20倍、甚至是50倍,100倍,例如,第一预设值为5000,第二预设值为50。
本申请实施例中,可以随机获取一张图像,或者是连续地随机获取多张图像。
优选的,所述第一数据增强方法为几何变换类数据增强方法,所述第二数据增强方法为颜色变换类数据增强方法。
进一步地,所述第一数据增强方法和所述第二数据增强方法可以在不实质性增加数据的情况下,让有限的数据产生等价于更多数据的价值。
本申请实施例中,所述几何变换类数据增强方法包括翻转、随机旋转、随即裁剪、变 形缩放等方法。所述颜色变换类数据增强方法包括添加噪声、模糊处理、颜色变换、图像填充等。
本申请实施例中,所述第一处理图像和所述第二处理图像都是由所述图像集中随机获取图像经过所述数据增强方法得到,因此所述第一处理图像和所述第二处理图像具有相关性。
所述参数构建模块102,用于将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像,利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数。
本申请实施例中,所述得到第二处理图像之后,所述方法还包括:
判断所述第一处理图像与所述第二处理图像是否相同;
若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中获取待处理图像的操作;
若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。
本申请实施例中,所述第一图像处理网络和所述第二图像处理网络为用于对图像进行处理的网络。
进一步地,第一图像处理网络和第二图像处理网络可以为Lebet-5网络、AlexNet网络、VGG16网络、ResNet-50网络中的一种,其中,当所述第一图像处理网络和所述第二图像处理网络都为Lebet-5网络时,所述第一图像处理网络和所述第二图像处理网络分别用于图像的筛选和分类。
详细地,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数包括:
获取所述构建概率图模型地原始损失函数;
将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。
本申请实施例中,可以将所述第一处理图像和所述第二处理图像输入所述原始损失函数,将所述第一处理图像和所述第二处理图像作为所述原始损失函数的函数项对所述原始损失函数进行参数更新,得到更新后的概率约束参数,并将所述更新后的概率约束参数作为概率约束参数。
所述标注生成模块103,用于通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别。
本申请实施例中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签包括:
获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;
利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;
利用所述预测概率从所述图像集中选取目标图像;
根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;
判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;
若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;
若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;
将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。
详细地,所述获取第一有监督学习模型,包括:
接收初始训练集,所述初始训练集包括第一有标签样本集和第一无标签样本集;
获取初始半监督学习模型,利用所述第一有标签样本集和所述第一无标签样本集对所述初始半监督学习模型进行训练得到第一有监督学习网络。
本申请实施例中,所述第一有监督学习模型是由初始半监督学习模型通过初始训练集进行训练得到的,所述初始训练集包括第一有标签样本集和第一无标签样本集,其中,第一有标签样本集包括有标签数据:所述第一无标签样本集包括无标签数据。其中,有标签数据和无标签数据并不仅限于图像数据。所述数据标签包括图像数据的分类标签、数字数据的分类标签,其中,图像数据可以分为有标注图像数据和无标注图像数据,数字数据可以分为符号数据和文字数据。
详细地,所述初始半监督学习模型为Π-model、VAT、LPDSSL、TNAR、pseudo-label、DCT中的任意一种。
所述损失函数构建模块104,用于通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型。
本申请实施例中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型包括:
获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;
基于所述图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;
获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。
详细地,所述得到所述概率图模型之前,还包括:
基于所述对所述概率约束参数进行更新,得到更新损失函数,
根据所述更新损失函数得到所述概率图模型。
具体地,所述损失函数为将随机时间或其有关随机变量地取值映射为非负实数,以表示该随机事件的风险或者损失的函数,在本申请实施例中,所述更新损失函数用于对所述概率图模型的参数进行数值估计。
本申请实施例中,所述更新损失函数为:
Figure PCTCN2021097079-appb-000002
其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数,用于规则该交叉熵子项式的偏向。
本申请实施例中,所述概率图模型是用图表示变量概率依赖关系的理论,结合概率论与图论的知识,利用图来表示与模型有关的变量的联合概率分布。
所述分类模型训练模块105,用于利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型。
详细地,所述利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进 行训练,得到图像分类模型包括:
利用所述图像集中的无类别标注图像构建无类别标注图像集,利用所述图像集中的有类别标注图像构建有类别标注图像集。
将所述无类别标注图像集通过所述第一数据增强网络,得到所述无类别标注图像集的第一处理图像集,将所述无类别标注图像集通过所述第二数据增强网络得到所述无类别标注图像集的第二处理图像集;
将所述有类别标注图像集通过所述第一数据增强网络,得到所述有类别标注图像集的第一处理图像集,将所述有类别标注图像集通过所述第二数据增强网络得到所述有类别标注图像集的第二处理图像集;
利用所述无类别标注图像集的第一处理图像集、第二处理图像集和所述有类别标注图像集的第一处理图像集、第二处理图像集及所述无标注图像集的标注、有类别标注图像集的标注对包含更新损失函数的所述概率图模型进行训练,得到图像分类模型。
所述图像分类模块106,用于获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
本申请实施例中,所述待分类图像可以为未经过图像处理的图像,或者,所述待分类图像也可以为以进行过图像处理(如色彩校正处理)但未经过类别标注的图像。
所述待分类图像可以为医学图像。
例如,所述待分类图像为的图像为肺部CT图像,利用所述图像分类模型进行图像进行病灶分类,判断所述肺部CT图像是否含有病灶。
本实施例中,在获取到无类别标注图像之后,为对无类别标注图像通过半监督学习法生成伪标签,进而将无类别标注图像用于图像分类模型训练,提高了训练模型时的数据量和数据的多样性,同时进一步提高数据的利用率和对图像分类模型训练的准确性。在得到图像分类模型之后,将待分类的图像输入该图像分类模型后得到准确的分类结果,实现了提高图像分类准确性的目的。
如图3所示,是本申请实现图像分类方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如图像分类程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质可以是易失性的,也可以是非易失性的。具体的,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如图像分类程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行图像分类程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的图像分类程序12是多个计算机程序的组合,在所述处理器10中运行时,可以实现:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
本申请实施例中,在获取到无类别标注图像之后,为对无类别标注图像通过半监督学习法生成伪标签,进而将无类别标注图像用于图像分类模型训练,提高了训练模型时的数据量和数据的多样性,同时进一步提高数据的利用率和对图像分类模型训练的准确性。在得到图像分类模型之后,将待分类的图像输入该图像分类模型后得到准确的分类结果,实现了提高图像分类准确性的目的。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为 独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述可读存储介质可以是易失性的,也可以是非易失性的。具体的,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图表记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。***权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种图像分类方法,其中,所述方法包括:
    从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
    将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;
    利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
    通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
    通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
    利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
    获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
  2. 如权利要求1所述的图像分类方法,其中,所述得到第二处理图像之后,所述方法还包括:
    判断所述第一处理图像与所述第二处理图像是否相同;
    若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中随机获取图像的操作;
    若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。
  3. 如权利要求1所述的图像分类方法,其中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签,包括:
    获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;
    利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;
    利用所述预测概率从所述图像集中选取目标图像;
    根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;
    判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;
    若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;
    若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;
    将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。
  4. 如权利要求3所述的图像分类方法,其中,所述获取第一有监督学习模型,包括:
    接收初始训练集,所述初始训练集包括第一有标签样本集和第一无标签样本集;
    获取初始半监督学习模型,利用所述第一有标签样本集和所述第一无标签样本集对所述初始半监督学习模型进行训练得到第一有监督学习网络。
  5. 如权利要求1所述的图像分类方法,其中,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数,包括:
    获取所述构建概率图模型地原始损失函数;
    将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。
  6. 如权利要求1所述的图像分类方法,其中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型,包括:
    获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;
    基于所述待处理图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;
    获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。
  7. 如权利要求1至3中任一项所述的图像分类方法,其中,所述得到所述概率图模型之前,所述方法还包括基于所述对所述概率约束参数进行更新,得到更新损失函数,所述更新损失函数为:
    Figure PCTCN2021097079-appb-100001
    其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数;
    根据所述更新损失函数得到所述概率图模型。
  8. 一种图像分类装置,其中,所述装置包括:
    图像增强模块,用于从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
    参数构建模块,用于将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像,利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
    标注生成模块,用于通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
    损失函数构建模块,用于通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
    分类模型训练模块,用于利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
    图像分类模块,用于获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
  9. 一种电子设备,其中,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的计算机程序指令,所述计算机程序指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下所述的图像分类方法:
    从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
    将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;
    利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
    通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
    通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
    利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
    获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
  10. 如权利要求9所述的电子设备,其中,所述得到第二处理图像之后,所述方法还包括:
    判断所述第一处理图像与所述第二处理图像是否相同;
    若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中随机获取图像的操作;
    若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。
  11. 如权利要求9所述的电子设备,其中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签,包括:
    获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;
    利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;
    利用所述预测概率从所述图像集中选取目标图像;
    根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;
    判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;
    若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;
    若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;
    将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。
  12. 如权利要求9所述的电子设备,其中,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数,包括:
    获取所述构建概率图模型地原始损失函数;
    将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。
  13. 如权利要求9所述的电子设备,其中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型,包括:
    获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第 二数量;
    基于所述待处理图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;
    获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。
  14. 如权利要求9至11中任一项所述的电子设备,其中,所述得到所述概率图模型之前,所述方法还包括基于所述对所述概率约束参数进行更新,得到更新损失函数,所述更新损失函数为:
    Figure PCTCN2021097079-appb-100002
    其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数;
    根据所述更新损失函数得到所述概率图模型。
  15. 一种计算机可读存储介质,包括存储数据区和存储程序区,存储数据区存储创建的数据,存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下所述的图像分类方法:
    从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;
    将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;
    利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;
    通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;
    通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型;
    利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;
    获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。
  16. 如权利要求15所述的计算机可读存储介质,其中,所述得到第二处理图像之后,所述方法还包括:
    判断所述第一处理图像与所述第二处理图像是否相同;
    若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中随机获取图像的操作;
    若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。
  17. 如权利要求15所述的计算机可读存储介质,其中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签,包括:
    获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;
    利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;
    利用所述预测概率从所述图像集中选取目标图像;
    根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;
    判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;
    若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;
    若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;
    将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。
  18. 如权利要求15所述的计算机可读存储介质,其中,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数,包括:
    获取所述构建概率图模型地原始损失函数;
    将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。
  19. 如权利要求15所述的计算机可读存储介质,其中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型,包括:
    获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;
    基于所述待处理图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;
    获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。
  20. 如权利要求15至17中任一项所述的计算机可读存储介质,其中,所述得到所述概率图模型之前,所述方法还包括基于所述对所述概率约束参数进行更新,得到更新损失函数,所述更新损失函数为:
    Figure PCTCN2021097079-appb-100003
    其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数;
    根据所述更新损失函数得到所述概率图模型。
PCT/CN2021/097079 2021-04-28 2021-05-30 图像分类方法、装置、电子设备及介质 WO2022227192A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110467270.3A CN112990374B (zh) 2021-04-28 2021-04-28 图像分类方法、装置、电子设备及介质
CN202110467270.3 2021-04-28

Publications (1)

Publication Number Publication Date
WO2022227192A1 true WO2022227192A1 (zh) 2022-11-03

Family

ID=76340550

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/097079 WO2022227192A1 (zh) 2021-04-28 2021-05-30 图像分类方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN112990374B (zh)
WO (1) WO2022227192A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115130531B (zh) * 2022-01-24 2023-05-05 北京中科睿鉴科技有限公司 图像生成模型网络结构溯源方法
CN115578797B (zh) * 2022-09-30 2023-08-29 北京百度网讯科技有限公司 模型训练方法、图像识别方法、装置及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108416370A (zh) * 2018-02-07 2018-08-17 深圳大学 基于半监督深度学习的图像分类方法、装置和存储介质
US20200250491A1 (en) * 2017-11-01 2020-08-06 Tencent Technology (Shenzhen) Company Limited Image classification method, computer device, and computer-readable storage medium
CN112115995A (zh) * 2020-09-11 2020-12-22 北京邮电大学 一种基于半监督学习的图像多标签分类方法
CN112580684A (zh) * 2020-11-17 2021-03-30 平安科技(深圳)有限公司 基于半监督学习的目标检测方法、装置及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104599275B (zh) * 2015-01-27 2018-06-12 浙江大学 基于概率图模型的非参数化的rgb-d场景理解方法
US10782691B2 (en) * 2018-08-10 2020-09-22 Buffalo Automation Group Inc. Deep learning and intelligent sensing system integration
CN109460735B (zh) * 2018-11-09 2021-02-02 中国科学院自动化研究所 基于图半监督学习的文档二值化处理方法、***、装置
KR20200075344A (ko) * 2018-12-18 2020-06-26 삼성전자주식회사 검출기, 객체 검출 방법, 학습기 및 도메인 변환을 위한 학습 방법
CN110866564B (zh) * 2019-11-22 2023-04-25 上海携程国际旅行社有限公司 多重半监督图像的季节分类方法、***、电子设备和介质
CN112465071A (zh) * 2020-12-18 2021-03-09 深圳赛安特技术服务有限公司 图像多标签分类方法、装置、电子设备及介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200250491A1 (en) * 2017-11-01 2020-08-06 Tencent Technology (Shenzhen) Company Limited Image classification method, computer device, and computer-readable storage medium
CN108416370A (zh) * 2018-02-07 2018-08-17 深圳大学 基于半监督深度学习的图像分类方法、装置和存储介质
CN112115995A (zh) * 2020-09-11 2020-12-22 北京邮电大学 一种基于半监督学习的图像多标签分类方法
CN112580684A (zh) * 2020-11-17 2021-03-30 平安科技(深圳)有限公司 基于半监督学习的目标检测方法、装置及存储介质

Also Published As

Publication number Publication date
CN112990374A (zh) 2021-06-18
CN112990374B (zh) 2023-09-15

Similar Documents

Publication Publication Date Title
CN112257774B (zh) 基于联邦学习的目标检测方法、装置、设备及存储介质
WO2021151345A1 (zh) 识别模型的参数获取方法、装置、电子设备及存储介质
WO2022116424A1 (zh) 交通流预测模型训练方法、装置、电子设备及存储介质
CN111783982B (zh) 攻击样本的获取方法、装置、设备及介质
WO2021218336A1 (zh) 用户信息判别方法、装置、设备及计算机可读存储介质
WO2022105179A1 (zh) 生物特征图像识别方法、装置、电子设备及可读存储介质
WO2022227192A1 (zh) 图像分类方法、装置、电子设备及介质
WO2022141858A1 (zh) 行人检测方法、装置、电子设备及存储介质
WO2021151338A1 (zh) 医学影像图片分析方法、装置、电子设备及可读存储介质
WO2021189827A1 (zh) 识别模糊图像的方法、装置、设备及计算机可读存储介质
WO2023029508A1 (zh) 基于用户画像的页面生成方法、装置、设备及介质
CN112380859A (zh) 舆情信息的推荐方法、装置、电子设备及计算机存储介质
WO2021238563A1 (zh) 基于配置算法的企业运行数据分析方法、装置、电子设备及介质
CN113327136B (zh) 归因分析方法、装置、电子设备及存储介质
WO2021208695A1 (zh) 目标物推荐方法、装置、电子设备及计算机可读存储介质
WO2023159755A1 (zh) 虚假新闻检测方法、装置、设备及存储介质
WO2022121172A1 (zh) 文本纠错方法、装置、电子设备及计算机可读存储介质
CN114840531B (zh) 基于血缘关系的数据模型重构方法、装置、设备及介质
WO2023137906A1 (zh) 文档标题生成方法、装置、设备及存储介质
CN113268665A (zh) 基于随机森林的信息推荐方法、装置、设备及存储介质
CN113157739B (zh) 跨模态检索方法、装置、电子设备及存储介质
WO2022227171A1 (zh) 关键信息提取方法、装置、电子设备及介质
CN113204698A (zh) 新闻主题词生成方法、装置、设备及介质
WO2022077914A1 (zh) 医学图片优化方法、装置、设备及计算机可读存储介质
WO2022227191A1 (zh) 非主动活体检测方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21938662

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE