WO2022227192A1 - Image classification method and apparatus, and electronic device and medium - Google Patents

Image classification method and apparatus, and electronic device and medium 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
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 WO2022227192A1 publication Critical patent/WO2022227192A1/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/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)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An image classification method in the technical field of image processing, the method comprising: randomly acquiring, from an image set, an image to be processed, and obtaining two processed images by means of two preset data enhancement methods and two preset image processing networks; constructing a probability constraint parameter of a probability graph model by using the two processed images, and updating the probability constraint parameter according to the image to be processed and a category mark of the image to be processed, so as to obtain the probability graph model; training the probability graph model to obtain an image classification model; and acquiring an image to be classified, and inputting, into the image classification model, the image to be classified and classifying same, so as to obtain a category label of the image to be classified. Further provided are an image classification apparatus, and a device and a storage medium. The solution further relates to blockchain technology, and the image set can be stored in a blockchain node. By means of the solution, the accuracy of image classification can be improved.

Description

图像分类方法、装置、电子设备及介质Image classification method, device, electronic device and medium
本申请要求于2021年04月28日提交中国专利局、申请号为202110467270.3,发明名称为“图像分类方法、装置、电子设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on April 28, 2021 with the application number 202110467270.3 and the title of the invention is "image classification method, device, electronic device and medium", the entire contents of which are incorporated by reference in in this application.
技术领域technical field
本申请涉及图像处理技术领域,尤其涉及一种图像分类方法、装置、电子设备及计算机可读存储介质。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.
背景技术Background technique
随着人工智能技术的发展,图像分类领域也出现了很大的突破,即通过深度学习的方法进行图像分类。然而现有的图像分类技术都是建立在有着大规模有标注图像的前提下所进行的,然而大规模的有标注图像本身比较少,获取大规模的有标注图像所耗费的计算资源也十分多,并且有标注图像之间本身也存在着图像噪声问题,因此为了去噪又需要更多的有标注图像进行训练,从而更难以获得大规模的有标注图像。With the development of artificial intelligence technology, there has also been a great breakthrough in the field of image classification, that is, image classification through deep learning methods. However, the existing image classification technologies are based on the premise of having large-scale annotated images. However, the large-scale annotated images themselves are relatively few, and the computational resources consumed to obtain large-scale annotated images are also very large. , and there is also an image noise problem between the labeled images, so in order to denoise, more labeled images are needed for training, making it more difficult to obtain large-scale labeled images.
发明人意识到,现有的图像分类方法中通过训练的模型进行图像分类,但在模型训练中缺乏有标注数据,可用于训练的数据较少,导致训练得到的模型准确度不高,从而影响图像分类结果的准确性。The inventor realized that in the existing image classification method, the image classification is performed by the trained model, but there is a lack of labeled data in the model training, and there is less data available for training, resulting in the low accuracy of the model obtained by training, thus affecting the accuracy of the model. The accuracy of image classification results.
发明内容SUMMARY OF THE INVENTION
本申请提供的一种图像分类方法,包括:An image classification method provided by this application includes:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;Acquire an image to be processed from an image set, and enhance the image to be processed by a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second enhanced image, wherein the to-be-processed image is The processed images include unclassified images and classified images;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;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;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;Using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;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;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。Obtaining an image to be classified, inputting the image to be classified into the image classification model for classification, and obtaining a class label of the image to be classified.
本申请还提供一种图像分类装置,所述装置包括: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:
存储器,存储至少一个计算机程序;及a memory that stores at least one computer program; and
处理器,执行所述存储器中存储的计算机程序以实现如下所述的图像分类方法:The processor executes the computer program stored in the memory to realize the image classification method as described below:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;Acquire an image to be processed from an image set, and enhance the image to be processed by a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second enhanced image, wherein the to-be-processed image is The processed images include unclassified images and classified images;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;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;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;Using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;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;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。Obtaining an image to be classified, inputting the image to be classified into the image classification model for classification, and obtaining a class label of the image to be classified.
本申请还提供一种计算机可读存储介质,包括存储数据区和存储程序区,存储数据区存储创建的数据,存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下所述的图像分类方法: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:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;Acquire an image to be processed from an image set, and enhance the image to be processed by a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second enhanced image, wherein the to-be-processed image is The processed images include unclassified images and classified images;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;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;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;Using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;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;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。Obtaining an image to be classified, inputting the image to be classified into the image classification model for classification, and obtaining a class label of the image to be classified.
附图说明Description of drawings
图1为本申请一实施例提供的一种图像分类方法的流程示意图;1 is a schematic flowchart of an image classification method according to an embodiment of the present application;
图2为本申请一实施例提供的图像分类装置的模块示意图;FIG. 2 is a schematic block diagram of an image classification apparatus provided by an embodiment of the present application;
图3为本申请一实施例提供的实现图像分类方法的电子设备的内部结构示意图;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 realization, functional characteristics and advantages of the purpose of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit 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. In other words, 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.
参照图1所示,为本申请一实施例提供的一种图像分类方法的流程示意图。在本实施例中,所述图像分类方法包括:Referring to FIG. 1 , it is a schematic flowchart of an image classification method according to an embodiment of the present application. In this embodiment, the image classification method includes:
S1、从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像。S1. Acquire an image to be processed from an image set, and enhance the image to be processed by using a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second enhanced image, wherein the The to-be-processed images include unclassified images and classified images.
本申请实施例中,所述有类别标注图像为已进行类别标注的图像,所述无类别标注图像为未进行类别标注处理的图像。如,有类别标注图像为预先通过人工的方式(如通过BasicFinder工具)对图像进行类别标注的图像,所述无类别标注图像即为未进行类别标注处理的原始图像。In the embodiment of the present application, the category-annotated image is an image that has been category-annotated, and the category-unlabeled image is an image that has not undergone category annotation processing. For example, the category-labeled image is an image that has been manually labeled with categories (eg, by a BasicFinder tool) in advance, and the category-free image is an original image without category-labeling processing.
具体的,所述有类别标注图像存在数据标注,所述无标注图像不存在数据标注。Specifically, the classified-annotated images have data annotations, and the unlabeled images do not have data annotations.
具体的,数据标注的形式可以包括但不限于标注画框、3D画框、文本转录、图像打点、目标物体轮廓线。Specifically, 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.
本申请实施例中,无类别标注图像和有类别标注图像可以为医学领域的图像,例如,无类别标注图像或有类别标注图像为计算机X线摄影图像CR、计算机体层成像CT、核磁共振图像MR等图像。In the embodiment of the present application, the unlabeled images and the classified images may be images in the medical field. For example, 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.
进一步地,所述无类别标注图像的数量大于第一预设值,所述有类别标注图像的数量小于第二预设值,所述第一预设值大于所述第二预设值。Further, 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, and the first preset value is greater than the second preset value.
优选的,所述第一预设值为第二预设值的10倍、20倍、甚至是50倍,100倍,例如,第一预设值为5000,第二预设值为50。Preferably, the first preset value is 10 times, 20 times, even 50 times, or 100 times the second preset value. For example, the first preset value is 5000 and the second preset value is 50.
本申请实施例中,可以随机获取一张图像,或者是连续地随机获取多张图像。In this embodiment of the present application, one image may be randomly acquired, or multiple images may be randomly acquired continuously.
优选的,所述第一数据增强方法为几何变换类数据增强方法,所述第二数据增强方法为颜色变换类数据增强方法。Preferably, the first data enhancement method is a geometric transformation data enhancement method, and the second data enhancement method is a color transformation data enhancement method.
进一步地,所述第一数据增强方法和所述第二数据增强方法可以在不实质性增加数据的情况下,让有限的数据产生等价于更多数据的价值。Further, the 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.
本申请实施例中,所述几何变换类数据增强方法包括翻转、随机旋转、随即裁剪、变形缩放等方法。所述颜色变换类数据增强方法包括添加噪声、模糊处理、颜色变换、图像填充等。In the embodiments of the present application, 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.
本申请实施例中,所述第一处理图像和所述第二处理图像都是由所述图像集中随机获取图像经过所述数据增强方法得到,因此所述第一处理图像和所述第二处理图像具有相关性。In this embodiment of the present application, 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.
S2、将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像。S2. 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 a second processed image.
本申请实施例中,所述得到第二处理图像之后,所述方法还包括:In the embodiment of the present application, after obtaining the second processed image, the method further includes:
判断所述第一处理图像与所述第二处理图像是否相同;determining whether the first processed image is the same as the second processed image;
若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中获取待处理图像的操作;If 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;
若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。If the first processed image is different from the second processed image, 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.
本申请实施例中,所述第一图像处理网络和所述第二图像处理网络为用于对图像进行处理的网络。In the embodiment of the present application, the first image processing network and the second image processing network are networks for processing images.
进一步地,第一图像处理网络和第二图像处理网络可以为Lebet-5网络、AlexNet网络、VGG16网络、ResNet-50网络中的一种,其中,当所述第一图像处理网络和所述第二图像处理网络都为Lebet-5网络时,所述第一图像处理网络和所述第二图像处理网络分别用于图像的筛选和分类。Further, 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.
S3、利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数。S3. Use the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model.
详细地,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数包括:In detail, the probability constraint parameters for constructing a probability graph model by using the first processed image and the second processed image include:
获取所述构建概率图模型地原始损失函数;obtaining the original loss function for constructing the probabilistic graph model;
将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。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.
本申请实施例中,可以将所述第一处理图像和所述第二处理图像输入所述原始损失函数,将所述第一处理图像和所述第二处理图像作为所述原始损失函数的函数项对所述原始损失函数进行参数更新,得到更新后的概率约束参数,并将所述更新后的概率约束参数作为概率约束参数。In this embodiment of the present application, 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.
S4、通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别。S4. Calculate a pseudo-category label of the category-free annotated image through a preset semi-supervised learning method, wherein the pseudo-category label is used to mark the category of the category-free annotated image.
本申请实施例中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签包括:In the embodiment of the present application, the generation of the pseudo-category label of the uncategorized image by the preset semi-supervised learning method includes:
获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;obtaining a first supervised learning model, and training the first supervised learning model by using the classified image to obtain a first training supervised model;
利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;Using the first training supervision model to predict the unclassified labeled image to obtain the predicted probability of the unclassified labeled image;
利用所述预测概率从所述图像集中选取目标图像;using the predicted probability to select a target image from the image set;
根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;Using the labeled image to train the first supervised learning model according to the target image to obtain a second supervised learning model;
判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;Judging whether the second supervised learning model is the same as the first supervised learning model;
若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;If not equal, use the second supervised learning model to replace the first supervised learning model, and perform the operation of training the first supervised learning model through the labeled images again;
若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;If they are equal, it is determined that the training is completed, and the second supervised learning model is determined to be a training completed model;
将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。Inputting the uncategorized image into the training completed model to obtain a pseudo-category label of the uncategorized image.
详细地,所述获取第一有监督学习模型,包括:In detail, the obtaining the first supervised learning model includes:
接收初始训练集,所述初始训练集包括第一有标签样本集和第一无标签样本集;receiving an initial training set, the initial training set includes a first labeled sample set and a first unlabeled sample set;
获取初始半监督学习模型,利用所述第一有标签样本集和所述第一无标签样本集对所述初始半监督学习模型进行训练得到第一有监督学习网络。Obtain an initial semi-supervised learning model, and use the first labeled sample set and the first unlabeled sample set to train the initial semi-supervised learning model to obtain a first supervised learning network.
本申请实施例中,所述第一有监督学习模型是由初始半监督学习模型通过初始训练集进行训练得到的,所述初始训练集包括第一有标签样本集和第一无标签样本集,其中,第一有标签样本集包括有标签数据:所述第一无标签样本集包括无标签数据。其中,有标签数据和无标签数据并不仅限于图像数据。所述数据标签包括图像数据的分类标签、数字数 据的分类标签,其中,图像数据可以分为有标注图像数据和无标注图像数据,数字数据可以分为符号数据和文字数据。In the embodiment of the present application, 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. Among them, 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.
详细地,所述初始半监督学习模型为Π-model、VAT、LPDSSL、TNAR、pseudo-label、DCT中的任意一种。Specifically, the initial semi-supervised learning model is any one of Π-model, VAT, LPDSSL, TNAR, pseudo-label, and DCT.
S5、通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型。S5. 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.
本申请实施例中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型包括:In the embodiment of the present application, 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:
获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;obtaining the first quantity of the unclassified annotated images and the second quantity of the classified annotated images in the to-be-processed image;
基于所述图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;Based on the category annotation of the image, a vector composed of category-annotated images and a vector composed of non-category-annotated images are obtained;
获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。Obtain the original loss function of the probabilistic graphical model and use the first number of the unclassified annotated images, the second number of the classified annotated images, the vector composed of the classified classified images, and the unclassified annotated images The formed vector updates the probability constraint parameters in the original loss function to obtain the probability graph model.
详细地,所述得到所述概率图模型之前,还包括:In detail, before obtaining the probabilistic graphical model, the method further includes:
基于所述对所述概率约束参数进行更新,得到更新损失函数,Based on the update of the probability constraint parameter, an update loss function is obtained,
根据所述更新损失函数得到所述概率图模型。The probabilistic graphical model is obtained according to the update loss function.
具体地,所述损失函数为将随机时间或其有关随机变量地取值映射为非负实数,以表示该随机事件的风险或者损失的函数,在本申请实施例中,所述更新损失函数用于对所述概率图模型的参数进行数值估计。Specifically, 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. In the embodiment of the present application, the update loss function uses for numerical estimation of the parameters of the probabilistic graphical model.
本申请实施例中,所述更新损失函数为:In the embodiment of the present application, the update loss function is:
Figure PCTCN2021097079-appb-000001
Figure PCTCN2021097079-appb-000001
其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数,用于规则该交叉熵子项式的偏向。 Among them, 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.
本申请实施例中,所述概率图模型是用图表示变量概率依赖关系的理论,结合概率论与图论的知识,利用图来表示与模型有关的变量的联合概率分布。In the embodiments of the present application, 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.
S6、利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型。S6. 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.
详细地,所述利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型包括:Specifically, 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.
将所述无类别标注图像集通过所述第一数据增强网络,得到所述无类别标注图像集的第一处理图像集,将所述无类别标注图像集通过所述第二数据增强网络得到所述无类别标注图像集的第二处理图像集;Passing the unclassified annotated image set through the first data augmentation network to obtain a first processed image set of the unclassified annotated image set, and passing the unclassified annotated image set through the second data augmentation network to obtain the first processed image set. a second processed image set of the class-free annotated image set;
将所述有类别标注图像集通过所述第一数据增强网络,得到所述有类别标注图像集的第一处理图像集,将所述有类别标注图像集通过所述第二数据增强网络得到所述有类别标注图像集的第二处理图像集;Passing the class-labeled image set through the first data augmentation network to obtain a first processed image set of the class-labeled image set, and passing the class-labeled image set through the second data augmentation network to obtain the first processed image set. a second processed image set describing the class-labeled image set;
利用所述无类别标注图像集的第一处理图像集、第二处理图像集和所述有类别标注图 像集的第一处理图像集、第二处理图像集及所述无标注图像集的标注、有类别标注图像集的标注对包含更新损失函数的所述概率图模型进行训练,得到图像分类模型。Annotation, The labeling of the class-labeled image set trains the probabilistic graphical model including the update loss function to obtain an image classification model.
S7、获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。S7. 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.
本申请实施例中,所述待分类图像可以为未经过图像处理的图像,或者,所述待分类图像也可以为以进行过图像处理(如色彩校正处理)但未经过类别标注的图像。In this embodiment of the present application, 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.
例如,所述待分类图像为的图像为肺部CT图像,利用所述图像分类模型进行图像进行病灶分类,判断所述肺部CT图像是否含有病灶。For example, the image to be classified is a lung CT image, and the image classification model is used to classify the image for lesions, and it is determined whether the lung CT image contains a lesion.
本实施例中,在获取到无类别标注图像之后,为对无类别标注图像通过半监督学习法生成伪标签,进而将无类别标注图像用于图像分类模型训练,提高了训练模型时的数据量和数据的多样性,同时进一步提高数据的利用率和对图像分类模型训练的准确性。在得到图像分类模型之后,将待分类的图像输入该图像分类模型后得到准确的分类结果,实现了提高图像分类准确性的目的。In this embodiment, after the unlabeled images are acquired, 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. After 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.
如图2所示,是本申请图像分类装置的模块示意图。As shown in FIG. 2 , it is a schematic block diagram of the image classification apparatus of the present application.
本申请所述图像分类装置100可以安装于电子设备中。根据实现的功能,所述图像分类装置可以包括图像增强模块101、参数构建模块102、标注生成模块103、损失函数构建模块104、分类模型训练模块105和图像分类模块106。本申请所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。The image classification apparatus 100 described in this application can be installed in an electronic device. According to the implemented functions, 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.
在本实施例中,关于各模块/单元的功能如下:In this embodiment, the functions of each module/unit are as follows:
所述图像增强模块101,用于从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像。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. 2. Enhanced images, wherein the to-be-processed images include images without category annotations and images with category annotations.
本申请实施例中,所述有类别标注图像为已进行类别标注的图像,所述无类别标注图像为未进行类别标注处理的图像。如,有类别标注图像为预先通过人工的方式(如通过BasicFinder工具)对图像进行类别标注的图像,所述无类别标注图像即为未进行类别标注处理的原始图像。In the embodiment of the present application, the category-annotated image is an image that has been category-annotated, and the category-unlabeled image is an image that has not undergone category annotation processing. For example, the category-labeled image is an image that has been manually labeled with categories (eg, by a BasicFinder tool) in advance, and the category-free image is an original image without category-labeling processing.
具体的,所述有类别标注图像存在数据标注,所述无标注图像不存在数据标注。Specifically, the classified-annotated images have data annotations, and the unlabeled images do not have data annotations.
具体的,数据标注的形式可以包括但不限于标注画框、3D画框、文本转录、图像打点、目标物体轮廓线。Specifically, 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.
本申请实施例中,无类别标注图像和有类别标注图像可以为医学领域的图像,例如,无类别标注图像或有类别标注图像为计算机X线摄影图像CR、计算机体层成像CT、核磁共振图像MR等图像。In the embodiment of the present application, the unlabeled images and the classified images may be images in the medical field. For example, 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.
进一步地,所述无类别标注图像的数量大于第一预设值,所述有类别标注图像的数量小于第二预设值,所述第一预设值大于所述第二预设值。Further, 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, and the first preset value is greater than the second preset value.
优选的,所述第一预设值为第二预设值的10倍、20倍、甚至是50倍,100倍,例如,第一预设值为5000,第二预设值为50。Preferably, the first preset value is 10 times, 20 times, even 50 times, or 100 times the second preset value. For example, the first preset value is 5000 and the second preset value is 50.
本申请实施例中,可以随机获取一张图像,或者是连续地随机获取多张图像。In this embodiment of the present application, one image may be randomly acquired, or multiple images may be randomly acquired continuously.
优选的,所述第一数据增强方法为几何变换类数据增强方法,所述第二数据增强方法为颜色变换类数据增强方法。Preferably, the first data enhancement method is a geometric transformation data enhancement method, and the second data enhancement method is a color transformation data enhancement method.
进一步地,所述第一数据增强方法和所述第二数据增强方法可以在不实质性增加数据的情况下,让有限的数据产生等价于更多数据的价值。Further, the 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.
本申请实施例中,所述几何变换类数据增强方法包括翻转、随机旋转、随即裁剪、变 形缩放等方法。所述颜色变换类数据增强方法包括添加噪声、模糊处理、颜色变换、图像填充等。In the embodiments of the present application, 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.
本申请实施例中,所述第一处理图像和所述第二处理图像都是由所述图像集中随机获取图像经过所述数据增强方法得到,因此所述第一处理图像和所述第二处理图像具有相关性。In this embodiment of the present application, 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.
所述参数构建模块102,用于将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像,利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数。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.
本申请实施例中,所述得到第二处理图像之后,所述方法还包括:In the embodiment of the present application, after obtaining the second processed image, the method further includes:
判断所述第一处理图像与所述第二处理图像是否相同;determining whether the first processed image is the same as the second processed image;
若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中获取待处理图像的操作;If 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;
若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。If the first processed image is different from the second processed image, 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.
本申请实施例中,所述第一图像处理网络和所述第二图像处理网络为用于对图像进行处理的网络。In the embodiment of the present application, the first image processing network and the second image processing network are networks for processing images.
进一步地,第一图像处理网络和第二图像处理网络可以为Lebet-5网络、AlexNet网络、VGG16网络、ResNet-50网络中的一种,其中,当所述第一图像处理网络和所述第二图像处理网络都为Lebet-5网络时,所述第一图像处理网络和所述第二图像处理网络分别用于图像的筛选和分类。Further, 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.
详细地,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数包括:In detail, the probability constraint parameters for constructing a probability graph model by using the first processed image and the second processed image include:
获取所述构建概率图模型地原始损失函数;obtaining the original loss function for constructing the probabilistic graph model;
将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。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.
本申请实施例中,可以将所述第一处理图像和所述第二处理图像输入所述原始损失函数,将所述第一处理图像和所述第二处理图像作为所述原始损失函数的函数项对所述原始损失函数进行参数更新,得到更新后的概率约束参数,并将所述更新后的概率约束参数作为概率约束参数。In this embodiment of the present application, 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.
所述标注生成模块103,用于通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别。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.
本申请实施例中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签包括:In the embodiment of the present application, the generation of the pseudo-category label of the uncategorized image by the preset semi-supervised learning method includes:
获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;obtaining a first supervised learning model, and training the first supervised learning model by using the classified image to obtain a first training supervised model;
利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;Using the first training supervision model to predict the unclassified labeled image to obtain the predicted probability of the unclassified labeled image;
利用所述预测概率从所述图像集中选取目标图像;using the predicted probability to select a target image from the image set;
根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;Using the labeled image to train the first supervised learning model according to the target image to obtain a second supervised learning model;
判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;Judging whether the second supervised learning model is the same as the first supervised learning model;
若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;If not equal, use the second supervised learning model to replace the first supervised learning model, and perform the operation of training the first supervised learning model through the labeled images again;
若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;If they are equal, it is determined that the training is completed, and the second supervised learning model is determined to be a training completed model;
将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。Inputting the uncategorized image into the training completed model to obtain a pseudo-category label of the uncategorized image.
详细地,所述获取第一有监督学习模型,包括:In detail, the obtaining the first supervised learning model includes:
接收初始训练集,所述初始训练集包括第一有标签样本集和第一无标签样本集;receiving an initial training set, the initial training set includes a first labeled sample set and a first unlabeled sample set;
获取初始半监督学习模型,利用所述第一有标签样本集和所述第一无标签样本集对所述初始半监督学习模型进行训练得到第一有监督学习网络。Obtain an initial semi-supervised learning model, and use the first labeled sample set and the first unlabeled sample set to train the initial semi-supervised learning model to obtain a first supervised learning network.
本申请实施例中,所述第一有监督学习模型是由初始半监督学习模型通过初始训练集进行训练得到的,所述初始训练集包括第一有标签样本集和第一无标签样本集,其中,第一有标签样本集包括有标签数据:所述第一无标签样本集包括无标签数据。其中,有标签数据和无标签数据并不仅限于图像数据。所述数据标签包括图像数据的分类标签、数字数据的分类标签,其中,图像数据可以分为有标注图像数据和无标注图像数据,数字数据可以分为符号数据和文字数据。In the embodiment of the present application, 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. Among them, 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.
详细地,所述初始半监督学习模型为Π-model、VAT、LPDSSL、TNAR、pseudo-label、DCT中的任意一种。Specifically, the initial semi-supervised learning model is any one of Π-model, VAT, LPDSSL, TNAR, pseudo-label, and DCT.
所述损失函数构建模块104,用于通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型。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.
本申请实施例中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型包括:In the embodiment of the present application, 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:
获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;obtaining the first quantity of the unclassified annotated images and the second quantity of the classified annotated images in the to-be-processed image;
基于所述图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;Based on the category annotation of the image, a vector composed of category-annotated images and a vector composed of non-category-annotated images are obtained;
获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。Obtain the original loss function of the probabilistic graphical model and use the first number of the unclassified annotated images, the second number of the classified annotated images, the vector composed of the classified classified images, and the unclassified annotated images The formed vector updates the probability constraint parameters in the original loss function to obtain the probability graph model.
详细地,所述得到所述概率图模型之前,还包括:In detail, before obtaining the probabilistic graphical model, the method further includes:
基于所述对所述概率约束参数进行更新,得到更新损失函数,Based on the update of the probability constraint parameter, an update loss function is obtained,
根据所述更新损失函数得到所述概率图模型。The probabilistic graphical model is obtained according to the update loss function.
具体地,所述损失函数为将随机时间或其有关随机变量地取值映射为非负实数,以表示该随机事件的风险或者损失的函数,在本申请实施例中,所述更新损失函数用于对所述概率图模型的参数进行数值估计。Specifically, 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. In the embodiment of the present application, the update loss function uses for numerical estimation of the parameters of the probabilistic graphical model.
本申请实施例中,所述更新损失函数为:In the embodiment of the present application, the update loss function is:
Figure PCTCN2021097079-appb-000002
Figure PCTCN2021097079-appb-000002
其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数,用于规则该交叉熵子项式的偏向。 Among them, 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.
本申请实施例中,所述概率图模型是用图表示变量概率依赖关系的理论,结合概率论与图论的知识,利用图来表示与模型有关的变量的联合概率分布。In the embodiments of the present application, 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.
所述分类模型训练模块105,用于利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型。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.
详细地,所述利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进 行训练,得到图像分类模型包括:In detail, 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.
将所述无类别标注图像集通过所述第一数据增强网络,得到所述无类别标注图像集的第一处理图像集,将所述无类别标注图像集通过所述第二数据增强网络得到所述无类别标注图像集的第二处理图像集;Passing the unclassified annotated image set through the first data augmentation network to obtain a first processed image set of the unclassified annotated image set, and passing the unclassified annotated image set through the second data augmentation network to obtain the first processed image set. a second processed image set of the class-free annotated image set;
将所述有类别标注图像集通过所述第一数据增强网络,得到所述有类别标注图像集的第一处理图像集,将所述有类别标注图像集通过所述第二数据增强网络得到所述有类别标注图像集的第二处理图像集;Passing the class-labeled image set through the first data augmentation network to obtain a first processed image set of the class-labeled image set, and passing the class-labeled image set through the second data augmentation network to obtain the first processed image set. a second processed image set describing the class-labeled image set;
利用所述无类别标注图像集的第一处理图像集、第二处理图像集和所述有类别标注图像集的第一处理图像集、第二处理图像集及所述无标注图像集的标注、有类别标注图像集的标注对包含更新损失函数的所述概率图模型进行训练,得到图像分类模型。Annotation, The labeling of the class-labeled image set trains the probabilistic graphical model including the update loss function to obtain an image classification model.
所述图像分类模块106,用于获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。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.
本申请实施例中,所述待分类图像可以为未经过图像处理的图像,或者,所述待分类图像也可以为以进行过图像处理(如色彩校正处理)但未经过类别标注的图像。In this embodiment of the present application, 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.
例如,所述待分类图像为的图像为肺部CT图像,利用所述图像分类模型进行图像进行病灶分类,判断所述肺部CT图像是否含有病灶。For example, the image to be classified is a lung CT image, and the image classification model is used to classify the image for lesions, and it is determined whether the lung CT image contains a lesion.
本实施例中,在获取到无类别标注图像之后,为对无类别标注图像通过半监督学习法生成伪标签,进而将无类别标注图像用于图像分类模型训练,提高了训练模型时的数据量和数据的多样性,同时进一步提高数据的利用率和对图像分类模型训练的准确性。在得到图像分类模型之后,将待分类的图像输入该图像分类模型后得到准确的分类结果,实现了提高图像分类准确性的目的。In this embodiment, after the unlabeled images are acquired, 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. After 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.
如图3所示,是本申请实现图像分类方法的电子设备的结构示意图。As shown in FIG. 3 , it is a schematic structural diagram of an electronic device implementing the image classification method of the present application.
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如图像分类程序12。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.
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质可以是易失性的,也可以是非易失性的。具体的,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如图像分类程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium may be volatile or non-volatile. Specifically, 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. , SD) card, flash memory card (Flash Card), etc. Further, 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.
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行图像分类程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。In some embodiments, 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.
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。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. 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.
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。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.
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, 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.
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。Further, 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.
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, 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. Optionally, in some embodiments, 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.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are only used for illustration, and are not limited by this structure in the scope of the patent application.
所述电子设备1中的所述存储器11存储的图像分类程序12是多个计算机程序的组合,在所述处理器10中运行时,可以实现: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:
从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;Acquire an image to be processed from an image set, and enhance the image to be processed by a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second enhanced image, wherein the to-be-processed image is The processed images include unclassified images and classified images;
将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;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;
利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;Using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;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;
获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。Obtaining an image to be classified, inputting the image to be classified into the image classification model for classification, and obtaining a class label of the image to be classified.
本申请实施例中,在获取到无类别标注图像之后,为对无类别标注图像通过半监督学习法生成伪标签,进而将无类别标注图像用于图像分类模型训练,提高了训练模型时的数据量和数据的多样性,同时进一步提高数据的利用率和对图像分类模型训练的准确性。在得到图像分类模型之后,将待分类的图像输入该图像分类模型后得到准确的分类结果,实现了提高图像分类准确性的目的。In the embodiment of the present application, after the unlabeled image is obtained, 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. After 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.
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为 独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述可读存储介质可以是易失性的,也可以是非易失性的。具体的,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the integrated modules/units of the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. The readable storage medium may be volatile or non-volatile. Specifically, 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).
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。Further, 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.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus, apparatus and method may be implemented in other manners. For example, the apparatus 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 manners in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The 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.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, 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.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。It will be apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application.
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图表记视为限制所涉及的权利要求。Accordingly, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the application is to be defined by the appended claims rather than the foregoing description, which is therefore intended to fall within the scope of the claims. All changes within the meaning and scope of the equivalents of , are included in this application. Any accompanying reference signs in the claims should not be construed as limiting the involved claims.
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(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, 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.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。Furthermore, it is clear that the word "comprising" does not exclude other units or steps and the singular does not exclude the plural. Several units or means recited in the system claims can also be realized by one unit or means by means of software or hardware. Second-class terms are used to denote names and do not denote any particular order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limitations. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present application.

Claims (20)

  1. 一种图像分类方法,其中,所述方法包括:An image classification method, wherein the method comprises:
    从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;Acquire an image to be processed from an image set, and enhance the image to be processed by a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second enhanced image, wherein the to-be-processed image is The processed images include unclassified images and classified images;
    将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;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;
    利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;Using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
    通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;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;
    获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。Obtaining an image to be classified, inputting the image to be classified into the image classification model for classification, and obtaining a class label of the image to be classified.
  2. 如权利要求1所述的图像分类方法,其中,所述得到第二处理图像之后,所述方法还包括:The image classification method according to claim 1, wherein after obtaining the second processed image, the method further comprises:
    判断所述第一处理图像与所述第二处理图像是否相同;determining whether the first processed image is the same as the second processed image;
    若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中随机获取图像的操作;If the first processed image is the same as the second processed image, perform the operation of randomly acquiring images from the image set again;
    若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。If the first processed image is different from the second processed image, 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.
  3. 如权利要求1所述的图像分类方法,其中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签,包括:The image classification method according to claim 1, wherein generating the pseudo-category label of the uncategorized image by a preset semi-supervised learning method comprises:
    获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;obtaining a first supervised learning model, and training the first supervised learning model by using the classified image to obtain a first training supervised model;
    利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;Using the first training supervision model to predict the unclassified labeled image to obtain the predicted probability of the unclassified labeled image;
    利用所述预测概率从所述图像集中选取目标图像;using the predicted probability to select a target image from the image set;
    根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;Using the labeled image to train the first supervised learning model according to the target image to obtain a second supervised learning model;
    判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;Judging whether the second supervised learning model is the same as the first supervised learning model;
    若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;If not equal, use the second supervised learning model to replace the first supervised learning model, and perform the operation of training the first supervised learning model through the labeled images again;
    若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;If they are equal, it is determined that the training is completed, and the second supervised learning model is determined to be a training completed model;
    将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。Inputting the uncategorized image into the training completed model to obtain a pseudo-category label of the uncategorized image.
  4. 如权利要求3所述的图像分类方法,其中,所述获取第一有监督学习模型,包括:The image classification method according to claim 3, wherein said obtaining the first supervised learning model comprises:
    接收初始训练集,所述初始训练集包括第一有标签样本集和第一无标签样本集;receiving an initial training set, the initial training set includes a first labeled sample set and a first unlabeled sample set;
    获取初始半监督学习模型,利用所述第一有标签样本集和所述第一无标签样本集对所述初始半监督学习模型进行训练得到第一有监督学习网络。Obtain an initial semi-supervised learning model, and use the first labeled sample set and the first unlabeled sample set to train the initial semi-supervised learning model to obtain a first supervised learning network.
  5. 如权利要求1所述的图像分类方法,其中,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数,包括:The image classification method as claimed in claim 1, wherein, described using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model, comprising:
    获取所述构建概率图模型地原始损失函数;obtaining the original loss function for constructing the probabilistic graph model;
    将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。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.
  6. 如权利要求1所述的图像分类方法,其中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型,包括:The image classification method according to claim 1 , wherein the probability map is obtained by updating the probability constraint parameters by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories. models, including:
    获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;obtaining the first quantity of the unclassified annotated images and the second quantity of the classified annotated images in the to-be-processed image;
    基于所述待处理图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;Based on the category annotation of the to-be-processed image, a vector consisting of an image with category annotation and a vector consisting of an image without category annotation are obtained;
    获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。Obtain the original loss function of the probabilistic graphical model and use the first number of the unclassified annotated images, the second number of the classified annotated images, the vector composed of the classified classified images, and the unclassified annotated images The formed vector updates the probability constraint parameters in the original loss function to obtain the probability graph model.
  7. 如权利要求1至3中任一项所述的图像分类方法,其中,所述得到所述概率图模型之前,所述方法还包括基于所述对所述概率约束参数进行更新,得到更新损失函数,所述更新损失函数为:The image classification method according to any one of claims 1 to 3, wherein, before the obtaining the probability graphical model, the method further comprises obtaining an update loss function based on the updating the probability constraint parameter , the update loss function is:
    Figure PCTCN2021097079-appb-100001
    Figure PCTCN2021097079-appb-100001
    其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数; Among them, 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 a 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, and λ is the coefficient function;
    根据所述更新损失函数得到所述概率图模型。The probabilistic graphical model is obtained according to the update loss function.
  8. 一种图像分类装置,其中,所述装置包括:An image classification device, wherein the device comprises:
    图像增强模块,用于从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;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.
  9. 一种电子设备,其中,所述电子设备包括:An electronic device, wherein the electronic device comprises:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的计算机程序指令,所述计算机程序指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下所述的图像分类方法:The memory stores computer program instructions executable by the at least one processor, the computer program instructions being executed by the at least one processor to enable the at least one processor to perform the image classification method described below :
    从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;Acquire an image to be processed from an image set, and enhance the image to be processed by a preset first data enhancement method and a preset second data enhancement method, respectively, to obtain a first enhanced image and a second enhanced image, wherein the to-be-processed image is The processed images include unclassified images and classified images;
    将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;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;
    利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;Using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
    通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;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;
    获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。Obtaining an image to be classified, inputting the image to be classified into the image classification model for classification, and obtaining a class label of the image to be classified.
  10. 如权利要求9所述的电子设备,其中,所述得到第二处理图像之后,所述方法还包括:The electronic device according to claim 9, wherein after obtaining the second processed image, the method further comprises:
    判断所述第一处理图像与所述第二处理图像是否相同;determining whether the first processed image is the same as the second processed image;
    若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中随机获取图像的操作;If the first processed image is the same as the second processed image, perform the operation of randomly acquiring images from the image set again;
    若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。If the first processed image is different from the second processed image, 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.
  11. 如权利要求9所述的电子设备,其中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签,包括:The electronic device according to claim 9, wherein generating the pseudo-category label of the uncategorized image by a preset semi-supervised learning method comprises:
    获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;obtaining a first supervised learning model, and training the first supervised learning model by using the classified image to obtain a first training supervised model;
    利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;Using the first training supervision model to predict the unclassified labeled image to obtain the predicted probability of the unclassified labeled image;
    利用所述预测概率从所述图像集中选取目标图像;using the predicted probability to select a target image from the image set;
    根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;Using the labeled image to train the first supervised learning model according to the target image to obtain a second supervised learning model;
    判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;Judging whether the second supervised learning model is the same as the first supervised learning model;
    若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;If not equal, use the second supervised learning model to replace the first supervised learning model, and perform the operation of training the first supervised learning model through the labeled images again;
    若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;If they are equal, it is determined that the training is completed, and the second supervised learning model is determined to be a training completed model;
    将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。Inputting the uncategorized image into the training completed model to obtain a pseudo-category label of the uncategorized image.
  12. 如权利要求9所述的电子设备,其中,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数,包括:The electronic device as claimed in claim 9, wherein, the probability constraint parameter of constructing a probability graph model by using the first processed image and the second processed image comprises:
    获取所述构建概率图模型地原始损失函数;obtaining the original loss function for constructing the probabilistic graph model;
    将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。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.
  13. 如权利要求9所述的电子设备,其中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型,包括:The electronic device according to claim 9, wherein the probabilistic graphical model is obtained by updating the probability constraint parameters by using the labeled images with categories, the labeled images without categories, and the pseudo-category labels of the labeled images without categories. ,include:
    获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第 二数量;obtaining the first quantity of the unclassified annotated images and the second quantity of the classified images in the to-be-processed image;
    基于所述待处理图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;Based on the category annotation of the to-be-processed image, a vector consisting of an image with category annotation and a vector consisting of an image without category annotation are obtained;
    获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。Obtain the original loss function of the probabilistic graphical model and use the first number of the unclassified annotated images, the second number of the classified annotated images, the vector composed of the classified classified images, and the unclassified annotated images The formed vector updates the probability constraint parameters in the original loss function to obtain the probability graph model.
  14. 如权利要求9至11中任一项所述的电子设备,其中,所述得到所述概率图模型之前,所述方法还包括基于所述对所述概率约束参数进行更新,得到更新损失函数,所述更新损失函数为:The electronic device according to any one of claims 9 to 11, wherein, before the obtaining the probability graphical model, the method further comprises obtaining an update loss function based on the updating the probability constraint parameter, The update loss function is:
    Figure PCTCN2021097079-appb-100002
    Figure PCTCN2021097079-appb-100002
    其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数; Among them, 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 a 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, and λ is the coefficient function;
    根据所述更新损失函数得到所述概率图模型。The probabilistic graphical model is obtained according to the update loss function.
  15. 一种计算机可读存储介质,包括存储数据区和存储程序区,存储数据区存储创建的数据,存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下所述的图像分类方法:A computer-readable storage medium, comprising 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, when the computer program is executed by a processor, an image as described below is realized Classification:
    从图像集中获取待处理图像,分别通过预设的第一数据增强方法和预设的第二数据增强方法增强所述待处理图像,得到第一增强图像和第二增强图像,其中,所述待处理图像包括无类别标注图像和有类别标注图像;Acquire an image to be processed from an image set, and enhance the image to be processed by a preset first data enhancement method and a preset second data enhancement method respectively, to obtain a first enhanced image and a second enhanced image, wherein the to-be-processed image is The processed images include unclassified images and classified images;
    将所述第一增强图像输入预构建的第一图像处理网络,得到第一处理图像,将所述第二增强图像输入预构建的第二图像处理网络,得到第二处理图像;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;
    利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数;Using the first processed image and the second processed image to construct a probability constraint parameter of a probabilistic graphical model;
    通过预设的半监督学习法对所述无类别标注图像进行计算得到所述无类别标注图像的伪类别标签,其中,伪类别标签用于标注所述无类别标注图像的类别;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 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;
    利用所述待处理图像和所述待处理图像的类别标注对所述概率图模型进行训练,得到图像分类模型;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;
    获取待分类图像,将所述待分类图像输入至所述图像分类模型进行分类,得到所述待分类图像的类别标签。Obtaining an image to be classified, inputting the image to be classified into the image classification model for classification, and obtaining a class label of the image to be classified.
  16. 如权利要求15所述的计算机可读存储介质,其中,所述得到第二处理图像之后,所述方法还包括:The computer-readable storage medium of claim 15, wherein after the obtaining the second processed image, the method further comprises:
    判断所述第一处理图像与所述第二处理图像是否相同;determining whether the first processed image is the same as the second processed image;
    若所述第一处理图像与所述第二处理图像相同,再次执行从所述图像集中随机获取图像的操作;If the first processed image is the same as the second processed image, perform the operation of randomly acquiring images from the image set again;
    若所述第一处理图像与所述第二处理图像不相同,执行所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数的操作。If the first processed image is different from the second processed image, 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.
  17. 如权利要求15所述的计算机可读存储介质,其中,所述通过预设的半监督学习法生成所述无类别标注图像的伪类别标签,包括:The computer-readable storage medium of claim 15, wherein the generating the pseudo-category label of the uncategorized image by a preset semi-supervised learning method comprises:
    获取第一有监督学习模型,通过所述有类别标注图像训练所述第一有监督学习模型,得到第一训练监督模型;obtaining a first supervised learning model, and training the first supervised learning model by using the classified image to obtain a first training supervised model;
    利用所述第一训练监督模型对所述无类别标注图像进行预测,得到对所述无类别标注图像的预测概率;Using the first training supervision model to predict the unclassified labeled image to obtain the predicted probability of the unclassified labeled image;
    利用所述预测概率从所述图像集中选取目标图像;using the predicted probability to select a target image from the image set;
    根据所述目标图像利用有标注图像训练所述第一有监督学习模型,得到第二有监督学习模型;Using the labeled image to train the first supervised learning model according to the target image to obtain a second supervised learning model;
    判断所述第二有监督学习模型是否与所述第一有监督学习模型相同;Judging whether the second supervised learning model is the same as the first supervised learning model;
    若不相等,利用所述第二有监督学习模型替换所述第一有监督学习模型,再次执行通过所述有标注图像训练所述第一有监督学习模型的操作;If not equal, use the second supervised learning model to replace the first supervised learning model, and perform the operation of training the first supervised learning model through the labeled images again;
    若相等,确定训练完成,且确定所述第二有监督学习模型为训练完成模型;If they are equal, it is determined that the training is completed, and the second supervised learning model is determined to be a training completed model;
    将所述无类别标注图像输入所述训练完成模型,得到所述无类别标注图像的伪类别标签。Inputting the uncategorized image into the training completed model to obtain a pseudo-category label of the uncategorized image.
  18. 如权利要求15所述的计算机可读存储介质,其中,所述利用所述第一处理图像和所述第二处理图像构建概率图模型的概率约束参数,包括:The computer-readable storage medium of claim 15, wherein the probability constraint parameters for constructing a probabilistic graphical model using the first processed image and the second processed image comprise:
    获取所述构建概率图模型地原始损失函数;obtaining the original loss function for constructing the probabilistic graph model;
    将所述第一处理图像和所述第二处理图像输入所述原始损失函数,对所述原始损失函数中的函数参数进行更新,得到概率约束参数。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.
  19. 如权利要求15所述的计算机可读存储介质,其中,所述通过有类别标注图像、无类别标注图像和所述无类别标注图像的伪类别标签对所述概率约束参数进行更新,得到所述概率图模型,包括:The computer-readable storage medium according to claim 15, wherein the probability constraint parameter is updated by using a class-labeled image, a class-free label image, and a pseudo-class label of the class-free label image to obtain the Probabilistic graphical models, including:
    获取所述待处理图像中所述无类别标注图像的第一数量和所述有类别标注图像的第二数量;obtaining the first quantity of the unclassified annotated images and the second quantity of the classified annotated images in the to-be-processed image;
    基于所述待处理图像的类别标注得到有类别标注图像组成的向量、无类别标注图像组成的向量;Based on the category annotation of the to-be-processed image, a vector consisting of an image with category annotation and a vector consisting of an image without category annotation are obtained;
    获取所述概率图模型的原始损失函数并利用所述无类别标注图像的第一数量、所述有类别标注图像的第二数量、所述有类别标注图像组成的向量及所述无类别标注图像组成的向量更新所述原始损失函数中的概率约束参数,得到所述概率图模型。Obtain the original loss function of the probabilistic graphical model and use the first number of the unclassified annotated images, the second number of the classified classified images, the vector of the classified classified images, and the unclassified labeled images The formed vector updates the probability constraint parameters in the original loss function to obtain the probability graph model.
  20. 如权利要求15至17中任一项所述的计算机可读存储介质,其中,所述得到所述概率图模型之前,所述方法还包括基于所述对所述概率约束参数进行更新,得到更新损失函数,所述更新损失函数为:The computer-readable storage medium according to any one of claims 15 to 17, wherein, before the obtaining the probabilistic graphical model, the method further comprises, based on the updating the probability constraint parameter, obtaining an updated Loss function, the update loss function is:
    Figure PCTCN2021097079-appb-100003
    Figure PCTCN2021097079-appb-100003
    其中,f L表示所述有类别标注图像组成的向量,f U表示所述无类别标注图像组成的向量,n U表示所述无类别标注图像的数量,n L表示所述有类别标注图像的数量,y表示由所述第一处理图像和所述第二处理图像的类别标注组成的向量,CE表示交叉熵误差函数,MSE表示均方误差函数,λ为系数函数; Among them, 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 a 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, and λ is the coefficient function;
    根据所述更新损失函数得到所述概率图模型。The probabilistic graphical model is obtained according to the update loss function.
PCT/CN2021/097079 2021-04-28 2021-05-30 Image classification method and apparatus, and electronic device and medium WO2022227192A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110467270.3 2021-04-28
CN202110467270.3A CN112990374B (en) 2021-04-28 2021-04-28 Image classification method, device, electronic equipment and medium

Publications (1)

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

Family

ID=76340550

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/097079 WO2022227192A1 (en) 2021-04-28 2021-05-30 Image classification method and apparatus, and electronic device and medium

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118297945A (en) * 2024-06-05 2024-07-05 江西师范大学 Defect detection method and system based on position constraint residual error and sliding window aggregation

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114373097B (en) * 2021-12-15 2024-09-27 厦门市美亚柏科信息股份有限公司 Semi-supervision-based image classification method, terminal equipment and storage medium
CN115130531B (en) * 2022-01-24 2023-05-05 北京中科睿鉴科技有限公司 Network structure tracing method of image generation model
CN115578797B (en) * 2022-09-30 2023-08-29 北京百度网讯科技有限公司 Model training method, image recognition device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108416370A (en) * 2018-02-07 2018-08-17 深圳大学 Image classification method, device based on semi-supervised deep learning and storage medium
US20200250491A1 (en) * 2017-11-01 2020-08-06 Tencent Technology (Shenzhen) Company Limited Image classification method, computer device, and computer-readable storage medium
CN112115995A (en) * 2020-09-11 2020-12-22 北京邮电大学 Image multi-label classification method based on semi-supervised learning
CN112580684A (en) * 2020-11-17 2021-03-30 平安科技(深圳)有限公司 Target detection method and device based on semi-supervised learning and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104599275B (en) * 2015-01-27 2018-06-12 浙江大学 The RGB-D scene understanding methods of imparametrization based on probability graph model
US10782691B2 (en) * 2018-08-10 2020-09-22 Buffalo Automation Group Inc. Deep learning and intelligent sensing system integration
CN109460735B (en) * 2018-11-09 2021-02-02 中国科学院自动化研究所 Document binarization processing method, system and device based on graph semi-supervised learning
KR20200075344A (en) * 2018-12-18 2020-06-26 삼성전자주식회사 Detector, method of object detection, learning apparatus, and learning method for domain transformation
CN110866564B (en) * 2019-11-22 2023-04-25 上海携程国际旅行社有限公司 Season classification method, system, electronic device and medium for multiple semi-supervised images
CN112465071A (en) * 2020-12-18 2021-03-09 深圳赛安特技术服务有限公司 Image multi-label classification method and device, electronic equipment and medium

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 (en) * 2018-02-07 2018-08-17 深圳大学 Image classification method, device based on semi-supervised deep learning and storage medium
CN112115995A (en) * 2020-09-11 2020-12-22 北京邮电大学 Image multi-label classification method based on semi-supervised learning
CN112580684A (en) * 2020-11-17 2021-03-30 平安科技(深圳)有限公司 Target detection method and device based on semi-supervised learning and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118297945A (en) * 2024-06-05 2024-07-05 江西师范大学 Defect detection method and system based on position constraint residual error and sliding window aggregation

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2022227192A1 (en) Image classification method and apparatus, and electronic device and medium
CN112257774B (en) Target detection method, device, equipment and storage medium based on federal learning
WO2021151345A1 (en) Method and apparatus for parameter acquisition for recognition model, electronic device, and storage medium
WO2021218336A1 (en) User information discrimination method and apparatus, and device and computer readable storage medium
WO2022105179A1 (en) Biological feature image recognition method and apparatus, and electronic device and readable storage medium
CN111783982B (en) Method, device, equipment and medium for acquiring attack sample
CN112137591B (en) Target object position detection method, device, equipment and medium based on video stream
WO2021189827A1 (en) Method and apparatus for recognizing blurred image, and device and computer-readable storage medium
WO2021151338A1 (en) Medical imagery analysis method, apparatus, electronic device and readable storage medium
WO2023029508A1 (en) User portrait-based page generation method and apparatus, device, and medium
CN113157739B (en) Cross-modal retrieval method and device, electronic equipment and storage medium
CN113298159B (en) Target detection method, target detection device, electronic equipment and storage medium
CN112380859A (en) Public opinion information recommendation method and device, electronic equipment and computer storage medium
CN113327136B (en) Attribution analysis method, attribution analysis device, electronic equipment and storage medium
WO2023159755A1 (en) Fake news detection method and apparatus, device, and storage medium
WO2023137906A1 (en) Document title generation method and apparatus, device and storage medium
WO2021238563A1 (en) Enterprise operation data analysis method and apparatus based on configuration algorithm, and electronic device and medium
WO2021208695A1 (en) Method and apparatus for target item recommendation, electronic device, and computer readable storage medium
WO2022121172A1 (en) Text error correction method and apparatus, electronic device, and computer readable storage medium
CN114840531B (en) Data model reconstruction method, device, equipment and medium based on blood edge relation
CN113268665A (en) Information recommendation method, device and equipment based on random forest and storage medium
WO2022227171A1 (en) Method and apparatus for extracting key information, electronic device, and medium
CN113204698A (en) News subject term generation method, device, equipment and medium
CN114417998B (en) Data feature mapping method, device, equipment and storage medium
WO2022077914A1 (en) Medical image optimization method and apparatus, device, computer readable storage medium

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

122 Ep: pct application non-entry in european phase

Ref document number: 21938662

Country of ref document: EP

Kind code of ref document: A1