CN111738316A - Image classification method and device for zero sample learning and electronic equipment - Google Patents

Image classification method and device for zero sample learning and electronic equipment Download PDF

Info

Publication number
CN111738316A
CN111738316A CN202010523205.3A CN202010523205A CN111738316A CN 111738316 A CN111738316 A CN 111738316A CN 202010523205 A CN202010523205 A CN 202010523205A CN 111738316 A CN111738316 A CN 111738316A
Authority
CN
China
Prior art keywords
image
classified
neural network
network model
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010523205.3A
Other languages
Chinese (zh)
Other versions
CN111738316B (en
Inventor
郭冠军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010523205.3A priority Critical patent/CN111738316B/en
Publication of CN111738316A publication Critical patent/CN111738316A/en
Application granted granted Critical
Publication of CN111738316B publication Critical patent/CN111738316B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • 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/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns

Abstract

The embodiment of the disclosure provides an image classification method, an image classification device and electronic equipment for zero sample learning, which belong to the technical field of data processing, and the method comprises the following steps: acquiring a plurality of original images with different contents and a transformed image corresponding to the original images, wherein the transformed image is obtained by performing similar change on the original images; performing feature training on a preset neural network model based on the original image and the transformed image so that the neural network model meets the requirement of feature calculation performance; acquiring a classified image designated by a target user at a client and a classified name of the classified image; and calculating whether the characteristic distance between the image to be classified and the classified image meets a preset characteristic distance value or not through the neural network model, and determining whether the image to be classified and the classified image have the same category and classification name or not. By the processing scheme, the efficiency of image classification and labeling can be improved.

Description

Image classification method and device for zero sample learning and electronic equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to an image classification method and apparatus for zero sample learning, and an electronic device.
Background
Image classification refers to an image processing method for distinguishing objects of different categories from each other based on different features each reflected in image information. It uses computer to make quantitative analysis of image, and classifies each picture element or region in the image into one of several categories to replace human visual interpretation.
Image classification is performed through a neural network, and rapid development is achieved. However, in the process of image classification through a neural network model, a large number of training samples are generally required, and for a mobile terminal device such as a smartphone, this classification method cannot be performed effectively because the mobile terminal device generally cannot provide system resources required for sample training. Thereby affecting the efficiency of image classification at the mobile end.
Disclosure of Invention
In view of the above, embodiments of the present disclosure provide an image classification method and apparatus for zero sample learning, and an electronic device, so as to at least partially solve the problems in the prior art.
In a first aspect, an embodiment of the present disclosure provides an image classification method for zero sample learning, including:
acquiring a plurality of original images with different contents and a transformed image corresponding to the original images, wherein the transformed image is obtained by performing similar change on the original images;
performing feature training on a preset neural network model based on the original image and the transformed image so that the neural network model meets the requirement of feature calculation performance;
acquiring a classified image designated by a target user at a client and a classified name of the classified image;
and calculating whether the characteristic distance between the image to be classified and the classified image meets a preset characteristic distance value or not through the neural network model, and determining whether the image to be classified and the classified image have the same category and classification name or not.
According to a specific implementation manner of the embodiment of the present disclosure, the acquiring a plurality of original images with different contents and a plurality of transformed images corresponding to the original images includes:
filling a plurality of original images in a plurality of preset classifications respectively to enable the number of the original images in different classifications to meet the requirement of balance;
taking a set of original images in a plurality of classifications which meet the requirement of the balance as an image set;
carrying out similarity judgment on the acquired original images in the image set;
and deleting the original pictures with the similarity smaller than a preset similarity value from the image set based on the judgment result.
According to a specific implementation manner of the embodiment of the present disclosure, the acquiring a plurality of original images with different contents and a plurality of transformed images corresponding to the original images includes:
performing at least one transformation operation of color change, image cutting, image rotation and color channel extraction on the original image;
and taking the original image after the transformation operation as a transformed image corresponding to the original image.
According to a specific implementation manner of the embodiment of the present disclosure, the performing feature training on a preset neural network model based on the original image and the transformed image to enable the neural network model to meet a feature computation performance requirement includes:
taking an original image and a transformed image corresponding to the original image as positive samples, taking original images with different contents as negative samples, and performing feature training on a preset neural network model so that the feature distance between the positive samples is smaller than a first feature distance, the feature distance between the negative samples is larger than a second feature distance, and the first feature distance is smaller than the second feature distance.
According to a specific implementation manner of the embodiment of the present disclosure, the performing feature training on a preset neural network model based on the original image and the transformed image to enable the neural network model to meet a feature computation performance requirement includes:
inputting the positive and negative samples into the neural network model;
judging whether the characteristic distance of the positive sample and the characteristic distance of the negative sample in the neural network model are smaller than the first characteristic distance and larger than the second characteristic distance at the same time;
and if so, stopping training the neural network model.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining of the classified image specified by the target user at the client and the classified name of the classified image includes:
acquiring selection operation of a target user at a client, wherein the selection operation is used for setting different types of classified images and classified names of the classified images;
determining the classified image and the classified name based on the selection operation.
According to a specific implementation manner of the embodiment of the present disclosure, the calculating, by the neural network model, whether a characteristic distance between an image to be classified and the classified image satisfies a preset characteristic distance value, and determining whether the image to be classified and the classified image have the same category and classification name includes:
calculating the characteristic distance between the image to be classified and the classified image by utilizing the neural network model;
judging whether the characteristic distance between the classified image and the image to be classified is smaller than a first threshold value or not;
if yes, setting the image to be classified to have the same category and classification name as the classified image.
According to a specific implementation manner of the embodiment of the present disclosure, the calculating, by the neural network model, whether a characteristic distance between an image to be classified and the classified image satisfies a preset characteristic distance value, and determining whether the image to be classified and the classified image have the same category and classification name includes:
and when the characteristic distance between the image to be classified and the classified image is larger than a second threshold value, prompting a user to set a category and a classification name for the image to be classified in a manual mode.
In a second aspect, an embodiment of the present disclosure provides an image classification apparatus for zero sample learning, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a plurality of original images with different contents and converted images corresponding to the original images, and the converted images are obtained by carrying out similar change on the original images;
the training module is used for carrying out feature training on a preset neural network model based on the original image and the transformed image so as to enable the neural network model to meet the requirement of feature calculation performance;
the second acquisition module is used for acquiring a classified image appointed by a target user at a client and a classified name of the classified image;
and the determining module is used for calculating whether the characteristic distance between the image to be classified and the classified image meets a preset characteristic distance value through the neural network model, and determining whether the image to be classified and the classified image have the same category and classification name.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of zero sample learning image classification of the first aspect or any implementation of the first aspect.
In a fourth aspect, the disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the image classification method of zero sample learning in the foregoing first aspect or any implementation manner of the first aspect.
In a fifth aspect, the present disclosure also provides a computer program product including a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions which, when executed by a computer, cause the computer to perform the image classification method of zero sample learning in the foregoing first aspect or any implementation manner of the first aspect.
The image classification scheme of zero sample learning in the embodiment of the disclosure includes acquiring a plurality of original images with different contents and a transformed image corresponding to the original images, wherein the transformed image is obtained by performing similar change on the original images; performing feature training on a preset neural network model based on the original image and the transformed image so that the neural network model meets the requirement of feature calculation performance; acquiring a classified image designated by a target user at a client and a classified name of the classified image; and calculating whether the characteristic distance between the image to be classified and the classified image meets a preset characteristic distance value or not through the neural network model, and determining whether the image to be classified and the classified image have the same category and classification name or not. By the processing scheme, image classification can be carried out without inputting classification samples, and the efficiency of image classification is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an image classification method for zero sample learning according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another zero sample learning image classification method provided in the embodiment of the present disclosure;
fig. 3 is a flowchart of another zero sample learning image classification method provided in the embodiments of the present disclosure;
fig. 4 is a flowchart of another zero sample learning image classification method provided in the embodiments of the present disclosure;
fig. 5 is a schematic structural diagram of an image classification apparatus for zero sample learning according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides an image classification method for zero sample learning. The image classification method of zero sample learning provided by the present embodiment may be executed by a computing device, which may be implemented as software, or implemented as a combination of software and hardware, and may be integrally provided in a server, a client, or the like.
Referring to fig. 1, the image classification method for zero sample learning in the embodiment of the present disclosure may include the following steps:
s101, obtaining a plurality of original images with different contents and a plurality of transformed images corresponding to the original images, wherein the transformed images are obtained by carrying out similar change on the original images.
Before classifying the image, a neural network model needs to be trained, image features are extracted through the neural network model, and before feature extraction, training data needs to be selected, and the neural network model can be trained through the training data, and can be any form of neural network module, such as a CNN convolutional neural network model.
The sum of all the training data forms an image set, each component in the image set is an original image, and in order to ensure the diversity of the image set, the original images in the image set can be set to be different.
For this reason, in the process of acquiring the training data, a plurality of classifications may be set for the image set, and the acquisition process of the image set is completed by filling data into the plurality of classifications. In the process of acquiring the data, whether the acquired data contains the classification label can be further judged, if the acquired data contains the element classification label, the existing classification label is not adopted, and thus the randomness of the original image can be ensured.
After the training data in the image set is obtained, the original image can be further subjected to change processing, and a transformed image corresponding to the original image can be obtained through the transformation processing. The original image may be subjected to feature transformation in various ways as long as the satisfied similarity between the transformed elements and the transformed elements is ensured.
Taking an original image of an image type as an example, the same image can be subjected to various color changes, random cutting, rotation and color channel extraction to obtain images with different characteristics of one image. Of course, other similar ways of setting up other types of original images are also possible
S102, performing feature training on a preset neural network model based on the original image and the transformed image so that the neural network model meets the requirement of feature calculation performance.
After the feature transformation is performed on the original image, the original image and the transformed image corresponding to the original image may be set as a positive sample pair, and a plurality of positive sample pairs are collected together to form a positive sample set. For original images with different contents, a negative sample set may be set. By the arrangement mode, the samples in the positive sample set can meet certain similarity, and the samples in the negative sample set meet certain difference.
The neural network model may be trained by inputting positive and negative examples into the neural network model. In the training process, corresponding training indexes can be set for the neural network model, and whether the trained neural network model meets requirements or not can be judged through the training indexes. As one way, a first feature distance and a second feature distance may be set, and the first feature distance and the second feature distance may be used to represent a degree of similarity between two objects, for example, the first feature distance and the second feature distance may be obtained by using an euclidean distance calculation.
The first characteristic distance may be a relatively small value, the second characteristic distance may be greater than the first characteristic distance, and the second characteristic distance may be a relatively large value. Through the setting mode, the preset neural network model can be subjected to feature training, so that the feature distance between the positive samples is smaller than the first feature distance, and the feature distance between the negative samples is larger than the second feature distance, and the requirement of the neural network model training is met.
S103, obtaining a classified image designated by a target user at a client and a classified name of the classified image.
After the training of the neural network model is completed, the classification images specified by the user of the client and the classification names specified by the user for the classification images can be further obtained. In this way, the classification intention of the user can be directly obtained without training samples. Thereby providing support for subsequent image classification.
S104, calculating whether the characteristic distance between the image to be classified and the classified image meets a preset characteristic distance value through the neural network model, and determining whether the image to be classified and the classified image have the same category and classification name.
When a new image to be classified is encountered, the characteristic distance between the image to be classified and the classified image designated by the user can be further calculated through the trained neural network model, when the characteristic distance value between the image to be classified and one or more classified images is smaller than a preset characteristic distance value, the image to be classified and the one or more classified images are determined to belong to the same category, and at the moment, the classification name of the classified image can be used as the classification name (category label) of the image to be classified.
Through the content of the embodiment, the images to be classified can be rapidly classified in a mode that the user specifies the classified images and the class names, and the efficiency of image classification is improved.
Referring to fig. 2, according to a specific implementation manner of the embodiment of the present disclosure, the acquiring a plurality of original images with different contents and a plurality of transformed images corresponding to the original images includes:
s201, filling a plurality of original images in a plurality of preset classifications respectively, so that the number of the original images in different classifications meets the requirement of balance.
The filling values of the original images with the preset number can be set in different classifications, and the number of the original images in different classifications can be ensured to meet the requirement of the balance by setting the filling values.
S202, a set of original images in a plurality of classifications meeting the requirement of the balance is used as an image set.
And S203, carrying out similarity judgment on the acquired original images in the image set.
Similarity judgment can be carried out on all the obtained original images by setting a similarity calculation method, and then the similarity value between any images is obtained.
And S204, based on the judgment result, deleting the original pictures with the similarity smaller than a preset similarity value from the image set.
For the pictures with higher similarity values, the diversity of the images in the image set can be influenced, for this reason, the images with the similarity smaller than the preset value can be further selected by setting the similarity values and comparing the similarity judgment result with the preset value to form a similarity image set, and finally, the original pictures in the similarity set are deleted from the image set.
Through the content in the above embodiment, the original image set satisfying the data difference can be obtained.
According to a specific implementation manner of the embodiment of the present disclosure, the acquiring a plurality of original images with different contents and a plurality of transformed images corresponding to the original images includes: performing at least one transformation operation of color change, image cutting, image rotation and color channel extraction on the original image; and taking the original image after the transformation operation as a transformed image corresponding to the original image.
According to a specific implementation manner of the embodiment of the present disclosure, the performing feature training on a preset neural network model based on the original image and the transformed image to enable the neural network model to meet a feature computation performance requirement includes: taking an original image and a transformed image corresponding to the original image as positive samples, taking original images with different contents as negative samples, and performing feature training on a preset neural network model so that the feature distance between the positive samples is smaller than a first feature distance, the feature distance between the negative samples is larger than a second feature distance, and the first feature distance is smaller than the second feature distance.
Referring to fig. 3, according to a specific implementation manner of the embodiment of the present disclosure, the performing feature training on a preset neural network model based on the original image and the transformed image to make the neural network model meet a feature computation performance requirement includes:
s301, inputting the positive sample and the negative sample into the neural network model.
S302, judging whether the characteristic distance of the positive sample and the characteristic distance of the negative sample in the neural network model are simultaneously smaller than the first characteristic distance and larger than the second characteristic distance.
Whether the positive/negative samples meet the performance index after the neural network model is trained can be judged by setting the first characteristic distance and the second characteristic distance. The first feature distance and the second feature distance may be set and calculated in a preset manner, for example, the first feature distance and the second feature distance may be calculated in a euclidean distance manner.
And S303, if so, stopping training the neural network model.
Through the real-time mode, the neural network model can be effectively set and trained on the basis of the first characteristic distance and the second characteristic distance.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining of the classified image specified by the target user at the client and the classified name of the classified image includes: acquiring selection operation of a target user at a client, wherein the selection operation is used for setting different types of classified images and classified names of the classified images; determining the classified image and the classified name based on the selection operation.
Referring to fig. 4, according to a specific implementation manner of the embodiment of the present disclosure, the calculating, by the neural network model, whether a feature distance between an image to be classified and the classified image satisfies a preset feature distance value, and determining whether the image to be classified and the classified image have the same category and classification name includes:
s401, calculating the characteristic distance between the image to be classified and the classified image by using the neural network model.
S402, judging whether the characteristic distance between the classified image and the image to be classified is smaller than a first threshold value.
The first threshold may be set according to actual needs so as to determine whether sufficient similarity is satisfied between the image to be classified and the classified image specified by the user based on the first threshold.
And S403, if yes, setting the image to be classified to have the same category and classification name as the classified image.
Through the content in the embodiment, the classified images can be classified and calculated directly based on the preset first threshold, and the image classification efficiency is improved.
According to a specific implementation manner of the embodiment of the present disclosure, the calculating, by the neural network model, whether a characteristic distance between an image to be classified and the classified image satisfies a preset characteristic distance value, and determining whether the image to be classified and the classified image have the same category and classification name includes: and when the characteristic distance between the image to be classified and the classified image is larger than a second threshold value, prompting a user to set a category and a classification name for the image to be classified in a manual mode.
Corresponding to the above method embodiment, referring to fig. 5, the embodiment of the present disclosure further provides an image classification apparatus 50 for zero sample learning, including:
a first obtaining module 501, configured to obtain a plurality of original images with different contents and a transformed image corresponding to the original images, where the transformed image is obtained by performing similar changes on the original images;
a training module 502, configured to perform feature training on a preset neural network model based on the original image and the transformed image, so that the neural network model meets a feature calculation performance requirement;
a second obtaining module 503, configured to obtain a classified image specified by a target user at a client and a classified name of the classified image;
a determining module 504, configured to calculate, through the neural network model, whether a feature distance between an image to be classified and the classified image satisfies a preset feature distance value, and determine whether the image to be classified and the classified image have the same category and classification name.
For parts not described in detail in this embodiment, reference is made to the contents described in the above method embodiments, which are not described again here.
Referring to fig. 6, an embodiment of the present disclosure also provides an electronic device 60, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of zero sample learning image classification in the above method embodiments.
The disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the image classification method of zero sample learning in the aforementioned method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the image classification method of zero sample learning in the aforementioned method embodiments.
Referring now to FIG. 6, a schematic diagram of an electronic device 60 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 60 are also stored. The processing device 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. While the figures illustrate an electronic device 60 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (11)

1. An image classification method for zero sample learning is characterized by comprising the following steps:
acquiring a plurality of original images with different contents and a transformed image corresponding to the original images, wherein the transformed image is obtained by performing similar change on the original images;
performing feature training on a preset neural network model based on the original image and the transformed image so that the neural network model meets the requirement of feature calculation performance;
acquiring a classified image designated by a target user at a client and a classified name of the classified image;
and calculating whether the characteristic distance between the image to be classified and the classified image meets a preset characteristic distance value or not through the neural network model, and determining whether the image to be classified and the classified image have the same category and classification name or not.
2. The method according to claim 1, wherein the obtaining a plurality of original images with different contents and transformed images corresponding to the original images comprises:
filling a plurality of original images in a plurality of preset classifications respectively to enable the number of the original images in different classifications to meet the requirement of balance;
taking a set of original images in a plurality of classifications which meet the requirement of the balance as an image set;
carrying out similarity judgment on the acquired original images in the image set;
and deleting the original pictures with the similarity smaller than a preset similarity value from the image set based on the judgment result.
3. The method according to claim 1, wherein the obtaining a plurality of original images with different contents and transformed images corresponding to the original images comprises:
performing at least one transformation operation of color change, image cutting, image rotation and color channel extraction on the original image;
and taking the original image after the transformation operation as a transformed image corresponding to the original image.
4. The method of claim 1, wherein the feature training of a preset neural network model based on the original image and the transformed image so that the neural network model meets feature computation performance requirements comprises:
taking an original image and a transformed image corresponding to the original image as positive samples, taking original images with different contents as negative samples, and performing feature training on a preset neural network model so that the feature distance between the positive samples is smaller than a first feature distance, the feature distance between the negative samples is larger than a second feature distance, and the first feature distance is smaller than the second feature distance.
5. The method of claim 4, wherein the feature training of a preset neural network model based on the original image and the transformed image so that the neural network model meets feature computation performance requirements comprises:
inputting the positive and negative samples into the neural network model;
judging whether the characteristic distance of the positive sample and the characteristic distance of the negative sample in the neural network model are smaller than the first characteristic distance and larger than the second characteristic distance at the same time;
and if so, stopping training the neural network model.
6. The method of claim 1, wherein the obtaining of the classified image specified by the target user at the client and the classified name of the classified image comprises:
acquiring selection operation of a target user at a client, wherein the selection operation is used for setting different types of classified images and classified names of the classified images;
determining the classified image and the classified name based on the selection operation.
7. The method according to claim 1, wherein the calculating, by the neural network model, whether a feature distance between the image to be classified and the classified image satisfies a preset feature distance value, and determining whether the image to be classified and the classified image have the same category and classification name comprises:
calculating the characteristic distance between the image to be classified and the classified image by utilizing the neural network model;
judging whether the characteristic distance between the classified image and the image to be classified is smaller than a first threshold value or not;
if yes, setting the image to be classified to have the same category and classification name as the classified image.
8. The method according to claim 1, wherein the calculating, by the neural network model, whether a feature distance between the image to be classified and the classified image satisfies a preset feature distance value, and determining whether the image to be classified and the classified image have the same category and classification name comprises:
and when the characteristic distance between the image to be classified and the classified image is larger than a second threshold value, prompting a user to set a category and a classification name for the image to be classified in a manual mode.
9. An image classification device for zero sample learning, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a plurality of original images with different contents and converted images corresponding to the original images, and the converted images are obtained by carrying out similar change on the original images;
the training module is used for carrying out feature training on a preset neural network model based on the original image and the transformed image so as to enable the neural network model to meet the requirement of feature calculation performance;
the second acquisition module is used for acquiring a classified image appointed by a target user at a client and a classified name of the classified image;
and the determining module is used for calculating whether the characteristic distance between the image to be classified and the classified image meets a preset characteristic distance value through the neural network model, and determining whether the image to be classified and the classified image have the same category and classification name.
10. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the zero sample learned image classification method of any of the preceding claims 1-8.
11. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the zero sample learned image classification method of any of the preceding claims 1-8.
CN202010523205.3A 2020-06-10 2020-06-10 Zero sample learning image classification method and device and electronic equipment Active CN111738316B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010523205.3A CN111738316B (en) 2020-06-10 2020-06-10 Zero sample learning image classification method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010523205.3A CN111738316B (en) 2020-06-10 2020-06-10 Zero sample learning image classification method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111738316A true CN111738316A (en) 2020-10-02
CN111738316B CN111738316B (en) 2024-02-02

Family

ID=72648671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010523205.3A Active CN111738316B (en) 2020-06-10 2020-06-10 Zero sample learning image classification method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111738316B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112766406A (en) * 2021-01-29 2021-05-07 北京达佳互联信息技术有限公司 Article image processing method and device, computer equipment and storage medium
CN112801857A (en) * 2020-11-30 2021-05-14 泰康保险集团股份有限公司 Image data processing method and device
CN114020974A (en) * 2022-01-04 2022-02-08 阿里巴巴达摩院(杭州)科技有限公司 Sample data determination and dialogue intention identification method, storage medium, and program product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180012107A1 (en) * 2015-12-11 2018-01-11 Tencent Technology (Shenzhen) Company Limited Image classification method, electronic device, and storage medium
CN110363224A (en) * 2019-06-19 2019-10-22 创新奇智(北京)科技有限公司 A kind of object classification method based on image, system and electronic equipment
CN110413812A (en) * 2019-08-06 2019-11-05 北京字节跳动网络技术有限公司 Training method, device, electronic equipment and the storage medium of neural network model
CN110458217A (en) * 2019-07-31 2019-11-15 腾讯医疗健康(深圳)有限公司 Image-recognizing method and device, eye fundus image recognition methods and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180012107A1 (en) * 2015-12-11 2018-01-11 Tencent Technology (Shenzhen) Company Limited Image classification method, electronic device, and storage medium
CN110363224A (en) * 2019-06-19 2019-10-22 创新奇智(北京)科技有限公司 A kind of object classification method based on image, system and electronic equipment
CN110458217A (en) * 2019-07-31 2019-11-15 腾讯医疗健康(深圳)有限公司 Image-recognizing method and device, eye fundus image recognition methods and electronic equipment
CN110413812A (en) * 2019-08-06 2019-11-05 北京字节跳动网络技术有限公司 Training method, device, electronic equipment and the storage medium of neural network model

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801857A (en) * 2020-11-30 2021-05-14 泰康保险集团股份有限公司 Image data processing method and device
CN112766406A (en) * 2021-01-29 2021-05-07 北京达佳互联信息技术有限公司 Article image processing method and device, computer equipment and storage medium
CN114020974A (en) * 2022-01-04 2022-02-08 阿里巴巴达摩院(杭州)科技有限公司 Sample data determination and dialogue intention identification method, storage medium, and program product
CN114020974B (en) * 2022-01-04 2022-06-21 阿里巴巴达摩院(杭州)科技有限公司 Sample data determination and dialogue intention identification method, storage medium, and program product

Also Published As

Publication number Publication date
CN111738316B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN111738316B (en) Zero sample learning image classification method and device and electronic equipment
CN110674349B (en) Video POI (Point of interest) identification method and device and electronic equipment
CN110278447B (en) Video pushing method and device based on continuous features and electronic equipment
CN112395188B (en) Test-oriented software project development method and device, electronic equipment and storage medium
CN109389365B (en) Multi-person collaborative document processing method and device and electronic equipment
CN111753114A (en) Image pre-labeling method and device and electronic equipment
CN111291071A (en) Data processing method and device and electronic equipment
CN111291715B (en) Vehicle type identification method based on multi-scale convolutional neural network, electronic device and storage medium
CN110826619A (en) File classification method and device of electronic files and electronic equipment
CN113033707B (en) Video classification method and device, readable medium and electronic equipment
CN113468247A (en) Fish species identification method and device and storage medium
CN110069997B (en) Scene classification method and device and electronic equipment
CN112492399B (en) Information display method and device and electronic equipment
CN110300329B (en) Video pushing method and device based on discrete features and electronic equipment
CN111832354A (en) Target object age identification method and device and electronic equipment
CN109977925B (en) Expression determination method and device and electronic equipment
CN111626990A (en) Target detection frame processing method and device and electronic equipment
CN110555861A (en) optical flow calculation method and device and electronic equipment
CN111738311A (en) Multitask-oriented feature extraction method and device and electronic equipment
CN110704679B (en) Video classification method and device and electronic equipment
CN113177176A (en) Feature construction method, content display method and related device
CN110390291B (en) Data processing method and device and electronic equipment
CN110674348B (en) Video classification method and device and electronic equipment
CN110263852B (en) Data processing method and device and electronic equipment
CN114613355B (en) Video processing method and device, readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant