WO2020098121A1 - Method and device for training fast model, computer apparatus, and storage medium - Google Patents

Method and device for training fast model, computer apparatus, and storage medium Download PDF

Info

Publication number
WO2020098121A1
WO2020098121A1 PCT/CN2018/125592 CN2018125592W WO2020098121A1 WO 2020098121 A1 WO2020098121 A1 WO 2020098121A1 CN 2018125592 W CN2018125592 W CN 2018125592W WO 2020098121 A1 WO2020098121 A1 WO 2020098121A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
training
sample image
image
feature
Prior art date
Application number
PCT/CN2018/125592
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 WO2020098121A1 publication Critical patent/WO2020098121A1/en

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

Definitions

  • the embodiments of the present application relate to the field of model training, and in particular, to a rapid model training method, device, computer equipment, and storage medium.
  • Neural networks have broad and attractive prospects in the fields of system identification, pattern recognition, and intelligent control. Especially in intelligent control, people are particularly interested in the self-learning function of neural networks, and regard this important feature of neural networks as One of the key keys to solve the problem of controller adaptability in automatic control.
  • the training method is to collect a certain level of sample images.
  • the training samples required are often massive.
  • the training samples are manually calibrated, and then the sample images are input into the neural network model to obtain the classification results output by the neural network model. Compare the classification results with the artificial calibration. If they are inconsistent, correct the weights of the neural network model through the reverse algorithm to make the neural network model gradually converge. Due to the strong randomness of the output during model training, the training process is extremely long .
  • the inventor of the present application found in the research that in order to improve the accuracy of the neural network model in the prior art, it often takes a lot of sample images to spend a lot of time to train the neural network model to the convergence state, but does not have the above Under the condition of conditions, the neural network model is often unable to be trained, or the neural network model obtained by training has poor stability and low accuracy.
  • Embodiments of the present application provide a training method, device, computer equipment, and storage medium that can train a model to convergence with a small number of samples and a short time through an auxiliary training model.
  • a technical solution adopted by the embodiment created by the present application is: to provide a rapid model training method, including: acquiring a preset training sample image; inputting the training sample image into a preset assistant
  • the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors
  • the fast model is a neural network model to be trained
  • calculating the auxiliary training The feature distance between the feature vector of the training sample image extracted by the model and the feature vector of the training sample image extracted by the fast model; by back-propagating the feature distance, the weight parameter in the fast model is corrected.
  • embodiments of the present application also provide a rapid model training device, including: an acquisition module for acquiring a preset training sample image; a processing module for inputting the training sample image into a preset In the auxiliary training model and the initial fast model, the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast model is a neural network model to be trained; a calculation module, Used to calculate the feature distance between the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the fast model; the execution module is used to back-propagate the feature distance To correct the weight parameters in the fast model.
  • the embodiments of the present application further provide a computer device, including a memory and a processor, and the memory stores computer-readable instructions.
  • the computer-readable instructions are executed by the processor,
  • the processor executes the steps of the fast model training method described above.
  • the embodiments of the present application further provide a storage medium storing computer-readable instructions, which when executed by one or more processors cause the one or more processors to execute the above The steps of the rapid model training method are described.
  • the fast model By training the fast model, there is no need to mark the sample images participating in the training, which saves the time and effort required for the marking, and improves the training speed.
  • the method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
  • FIG. 1 is a schematic diagram of a basic process of a rapid model training method according to an embodiment of this application;
  • FIG. 2 is a schematic flowchart of determining whether to perform back propagation through a threshold according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of calculating a feature distance between two model extraction feature vectors according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of obtaining training sample images according to specific application scenarios according to an embodiment of the present application
  • FIG. 5 is a schematic flowchart of a training sample image acquired by a database inspection station according to an embodiment of the present application
  • FIG. 6 is a schematic flowchart of a method for generating a derived sample image according to an embodiment of this application
  • FIG. 7 is a schematic diagram of a basic structure of a training device for a rapid model according to an embodiment of the present application.
  • FIG. 8 is a block diagram of a basic structure of a computer device according to an embodiment of the present application.
  • terminal and terminal device used herein include both wireless signal receiver devices, which only have wireless signal receiver devices without transmitting capabilities, and also include hardware for receiving and transmitting hardware.
  • Such devices may include: cellular or other communication devices with single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Services), which can combine voice and data Processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet / Intranet access, web browsers, notepads, calendars and / or GPS (Global Positioning System (Global Positioning System) receiver; conventional laptop and / or palmtop computer or other device that has and / or includes a conventional radio frequency receiver and / or palmtop computer or other device.
  • GPS Global Positioning System
  • terminal and “terminal equipment” may be portable, transportable, installed in a vehicle (aeronautical, maritime, and / or terrestrial), or adapted and / or configured to operate locally, and / or In a distributed form, it operates at any other location on the earth and / or space.
  • the "terminal” and “terminal device” used herein may also be a communication terminal, an Internet terminal, a music / video playback terminal, for example, may be a PDA, MID (Mobile Internet Device), and / or have music / video playback
  • Functional mobile phones can also be smart TVs, set-top boxes and other devices.
  • FIG. 1 is a schematic diagram of a basic process of the fast model training method of this embodiment.
  • a fast model training method includes:
  • the number of training sample images corresponds to the specific requirements for the fast model. For example, the number of training sample images for application scenarios that require high generalization capabilities of the fast model More, otherwise, less.
  • the public image database For the acquisition of training sample images, the public image database, its own image database, or data crawling can be used to crawl from the Internet.
  • Fast model means that compared with the existing neural network model model, the number of free quantities (weights) that need to be determined through training is small, the model size is small, or only a small number of training sample images are needed to train to convergence Neural network model.
  • the fast model Due to its small size, the fast model has low requirements for computer processing power and a slightly single function. Therefore, it is often used in (not limited to) mobile smart terminals or environmental factors (the image to be processed changes more single). Application scenarios.
  • auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast
  • the model is the neural network model to be trained
  • an auxiliary training model in order to implement rapid model training, an auxiliary training model needs to be used for training.
  • the auxiliary training model participating in training is pre-trained to a convergence state, that is, a neural network model that can accurately classify training sample images.
  • the auxiliary training model can be a convolutional neural network model (CNN) that has been trained to a convergence state, but the auxiliary training model can also be: a deep neural network model (DNN), a recurrent neural network model (RNN), or the above Deformation model of three network models.
  • the fast model can also be any one of the above three models or a deformed model, but the fast model is smaller than the auxiliary training model.
  • the training direction of the fast model and the auxiliary training model must be the same, or the purpose of the fast model training is one of the functions of the auxiliary training model.
  • the purpose of fast model training is to recognize the face images of yellow people.
  • the function of the auxiliary training model should also be to recognize the face images, but compared to the fast model, the auxiliary training model has more powerful recognition. Capabilities, such as being able to recognize face images of all races, or not only the face images but also the user's age, gender, or face value represented by the face images.
  • the training sample images After acquiring the training sample images, after performing image processing on the training sample images (zooming or cutting the training sample images into pictures of fixed specifications), the training sample images are respectively input into the auxiliary training model and the fast model. So far, the auxiliary training model and the fast model separately extract the feature vectors of the training sample images.
  • the feature distance includes the Euclidean distance and / or cosine distance between the two feature vectors.
  • the calculation of the characteristic distance is performed through the loss function.
  • the loss function can not only calculate the Euclidean distance between the two model feature vectors, but also calculate the cosine distance between the two model feature vectors, and through the combination of Euclidean distance and cosine distance from Dimension, correct the weight of the fast model, accelerate the training of the fast model, and improve the accuracy of the fast model.
  • the feature vectors of the training sample images extracted by the auxiliary training model are accurate feature vectors, and during the training process, the feature vectors output by the fast model are less accurate. Calculating the distance between the two model feature vectors is actually calculating the distance between the feature vectors output by the fast model and the standard feature vectors.
  • steps S1100-S1200 are only a step in the rapid model training process. Due to the number of training sample images, the training of steps S1100-S1200 is continuously looped until The fast model is trained until it converges.
  • the above embodiment does not need to mark the sample images participating in the training when training the fast model, which saves the time and effort required for the marking, and improves the training speed.
  • the method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
  • the fast model training process does not need to be backpropagated every time. It is only necessary to perform backpropagation when the feature distance between the two models is greater than the set threshold. Please refer to FIG. 2, which is a schematic flowchart of determining whether to perform back propagation through a threshold in this embodiment.
  • a test threshold is set, that is, the first threshold.
  • the setting of the first threshold can be set according to the accuracy requirement for the fast model. That is, the higher the accuracy requirement for the fast model, the smaller the set value of the first threshold, and conversely, the lower the accuracy requirement for the fast model, the larger the set value of the first threshold.
  • the fast model By comparing and determining that the feature distance is greater than the first threshold, it is determined that the distance between the feature vector extracted by the fast model and the feature vector extracted by the auxiliary training model is large, which does not meet the needs of rapid model training, and the fast propagation needs to be adjusted by back propagation
  • the weight of the model so that when the training sample image is input again, the distance between the feature vector extracted by the fast model and the feature vector extracted by the auxiliary training model tends to become smaller.
  • steps S1100-S1200 and steps S1311-S1312 are performed cyclically. Also included after S1400
  • the auxiliary training model and the fast model are input again to the same training sample image, and the steps of S1200-S1400 are repeatedly performed until when the feature distance is determined to be less than or equal to the first by comparison
  • the training for the training sample image ends, and the training for other training sample images continues.
  • the training for the fast samples ends.
  • the feature distance includes the Euclidean distance and / or cosine distance
  • calculating the feature distance between the extracted feature vectors of the two models is to calculate the Euclidean distance and / or cosine distance between the feature vectors.
  • FIG. 3 is a schematic flowchart of calculating the feature distance between two model extraction feature vectors in this embodiment.
  • S1300 also includes:
  • S1321 Acquire a first feature vector of the training sample image extracted by the auxiliary training model and a second feature vector of the training sample image extracted by the rapid model;
  • the feature vector of the training sample image extracted by the auxiliary training model is the first feature vector
  • the feature vector of the training sample image extracted by the fast model is the second feature vector
  • the feature distance between the first feature vector and the second feature vector is calculated.
  • the feature distance includes the Euclidean distance and / or cosine distance between the two feature vectors.
  • the calculation of the characteristic distance is performed through the loss function.
  • the loss function can not only calculate the Euclidean distance between the two model feature vectors, but also calculate the cosine distance between the two model feature vectors, and through the combination of Euclidean distance and cosine distance from Dimension, correct the weight of the fast model, accelerate the training of the fast model, and improve the accuracy of the fast model.
  • FIG. 4 is a schematic flowchart of obtaining training sample images according to specific application scenarios in this embodiment.
  • S1011 Acquire image information of a target user or a target scene that needs to be identified, where the image information includes the image category of each identified image;
  • the fast model Before training the fast model, you first need to collect suitable materials, and in order to enhance the accuracy of the fast model in practical applications, you need to identify the specific users who use the fast model or the category pictures in a specific scene.
  • the user who uses the quick model is a senior pet lover. The user often uploads various pet pictures for species identification, and then collects the identification images uploaded by the user.
  • Each identified image corresponds to one piece of image information, and the image information includes the image type of each identified image.
  • the image type is the species name of the pet.
  • the user image is clustered and counted.
  • Clustering statistics is to classify the same type of image in the identified image into one type. Then, according to the number of recognized images in the same image type, the image type preferred for recognition in the user or application scene is determined. For example, the user uploads various animal images for identification, but because the user is an avid canine animal enthusiast, most of the uploaded identification images are images of the whole family. Therefore, the user who prefers to identify the images by statistical clustering
  • the type is canine image.
  • the identification images uploaded are all animal and plant images during the trip, and it is confirmed by statistics that the most recent images uploaded by the user are all animal and plant images of the African continent, then it is determined that the user is in Africa or African animals and plants are of great interest, and the image type of preference identification is determined to be African animals and plants images.
  • S1013 Collect training sample images of the training fast model according to the image type.
  • Training sample images can be crawled from the Internet using public image databases, own image databases, or through data crawling. For example, through the database of the African National Museum, obtain pictures of African animal and plant samples as training sample images, or use web crawlers to crawl pictures of pet dogs as training sample images.
  • the fast model does not need too high generalization ability, but the accuracy of image recognition for specific things is indeed very high. It is determined by identifying the application scenario or user preference. Collecting training sample images and training the fast model can make the fast model have higher accuracy in the targeted field and meet the needs of users.
  • the training sample images are all stored in the image database.
  • the training sample images need to be obtained through retrieval. Please refer to FIG. 5.
  • FIG. 5 is a schematic flowchart of a training sample image acquired by the database inspection in this embodiment.
  • the image type is used as a search condition to search in a preset image database.
  • all the images in the image database are set according to the image content when they are put into the library.
  • the image label includes the animal's class, order, family, genus and name. .
  • Retrieval under the condition that the image type is not retrieved can retrieve images with the same or similar image tags as the image type.
  • the image recalled by retrieval is confirmed as the training sample image corresponding to the fast model.
  • the sample image is image processed to generate a derivative derived from the original sample image Sample image.
  • FIG. 6 is a schematic flowchart of a method for generating a derived sample image according to this embodiment.
  • S1031 Perform image processing on the original sample image to generate a derived sample image derived from the original sample image;
  • the training sample image crawled through the database or through the web crawler technology is defined as the original sample image.
  • a new sample image generated by performing image processing on the original sample image is defined as a derived sample image.
  • the method for performing image processing on the original sample image includes (but is not limited to): combining the original sample image with one or more processing methods among image cropping, image rotation, or noise interference.
  • the feature vectors of the auxiliary training model to extract the original sample image and the derived sample image should be identical or similar. Therefore, it is necessary to further confirm whether the derived sample image after image processing is deformed to such an extent that the model cannot be recognized, and if so, the derived sample image cannot be used as a training sample.
  • the original sample image and the derived sample image are successively input into the auxiliary training model to extract the feature vector of the original sample image and the feature vector of the derived sample image.
  • the model for extracting feature vectors is not limited to the auxiliary training model.
  • the model for extracting feature vectors can also be a neural network model that has been trained to a convergence state and has the same training direction as the fast model.
  • the feature difference between the feature vector of the original sample image and the feature vector of the derived sample image is calculated.
  • the feature difference is calculated by a loss function, and the feature difference can be the Euclidean distance and / or cosine distance of the two feature vectors.
  • the calculated feature difference value is compared with a preset second threshold, wherein, in order to verify whether the distance between the two feature vectors meets the needs of model training, a test threshold is set, that is, the second threshold.
  • the setting of the second threshold can be set according to the interference requirement for the fast model. That is, the higher the anti-interference requirement for the fast model, the smaller the set value of the second threshold value, and conversely, the lower the anti-interference requirement for the fast model, the larger the set value of the second threshold value.
  • the feature difference is less than or equal to the preset second threshold, it indicates that the derived sample image meets the training requirements, confirm that the original sample image and the derived sample image are the training sample image; otherwise, it is confirmed that the derived sample image is not Training requirements are discarded.
  • the fast model can accurately extract the correct feature vector even when the classified images have interference, which improves the anti-interference and stability of the model.
  • the training sample image does not need to be calibrated during the training process of the fast model, by calculating the feature difference between the original sample image and the derived sample image, the fast model can accurately extract the feature vectors with interference images.
  • the embodiments of the present application also provide a rapid model training device.
  • FIG. 7 is a schematic diagram of the basic structure of the training device of the rapid model in this embodiment.
  • a rapid model training device includes: an acquisition module 2100, a processing module 2200, a calculation module 2300, and an execution module 2400.
  • the obtaining module 2100 is used to obtain a preset training sample image
  • the processing module 2200 is used to input the training sample image into a preset auxiliary training model and an initial rapid model, wherein the auxiliary training model is pre-trained to a converged state
  • a neural network model used to extract image feature vectors, the fast model is the neural network model to be trained
  • the calculation module 2300 is used to calculate the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the fast model Feature distance
  • the execution module 2400 is used to correct the weight parameters in the fast model by backpropagating the feature distance.
  • the training device of the fast model does not need to mark the sample images participating in the training when training the fast model, which saves the time and effort required for the marking, and improves the speed of training.
  • the method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
  • the rapid model training device further includes: a first comparison submodule and a first execution submodule.
  • the first comparison sub-module is used to compare the feature distance with a preset first threshold; the first execution sub-module is used to confirm back propagation of the feature distance when the feature distance is greater than the first threshold.
  • the rapid model training device further includes: a second execution submodule for repeatedly iteratively inputting the training sample images into the auxiliary training model and the rapid model, and when the feature distance is less than or equal to the first threshold, the training is confirmed The training of the sample image ends.
  • the feature distance includes the Euclidean distance and / or the cosine distance
  • the rapid model training device further includes: a first acquisition submodule and a second comparison submodule.
  • the first acquisition submodule is used to acquire the first feature vector of the training sample image extracted by the auxiliary training model and the second feature vector of the training sample image extracted by the fast model;
  • the second comparison submodule is used to compare the first feature The Euclidean distance and / or cosine distance of the vector and the second feature vector.
  • the rapid model training device further includes: a second acquisition submodule, a first processing submodule, and a third execution submodule.
  • the second acquisition submodule is used to acquire image information of the target user or the target scene that needs to be identified, wherein the image information includes the image category of each identified image
  • the first processing submodule is used to match the image category in the image information Recognize the images and perform clustering to obtain the image type that the target user or target scene prefers to identify
  • the third execution submodule is used to collect training sample images for training the fast model according to the image type.
  • the rapid model training device further includes: a second processing submodule and a first confirmation submodule.
  • the second processing sub-module is used for searching in a preset image database with the image type as the limiting condition;
  • the first confirmation sub-module is used for confirming the image recalled by the retrieval as the training sample image.
  • the rapid model training device further includes: a third processing submodule, a first extraction submodule, a first calculation submodule, and a fourth execution submodule.
  • the third processing sub-module is used to perform image processing on the original sample image to generate a derived sample image derived from the original sample image;
  • the first extraction sub-module is used to extract the feature vector of the original sample image and the feature vector of the derived sample image;
  • the first calculation submodule is used to calculate the feature difference between the feature vector of the original sample image and the feature vector of the derived sample image;
  • the fourth execution submodule is used to confirm when the feature difference is less than or equal to the preset second threshold
  • the original sample image and the derived sample image are training sample images.
  • FIG. 8 is a block diagram of the basic structure of the computer device of this embodiment.
  • the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus.
  • the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions.
  • the database may store a sequence of control information.
  • the processor may implement a A fast model training method.
  • the processor of the computer device is used to provide calculation and control capabilities, and support the operation of the entire computer device.
  • the memory of the computer device may store computer readable instructions. When the computer readable instructions are executed by the processor, the processor may cause the processor to execute a rapid model training method.
  • the network interface of the computer device is used to connect and communicate with the terminal.
  • FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
  • the processor is used to perform specific functions of the acquisition module 2100, the processing module 2200, the calculation module 2300, and the execution module 2400 in FIG. 7, and the memory stores program codes and various types of data required to execute the above modules.
  • the network interface is used for data transmission between user terminals or servers.
  • the memory in this embodiment stores the program codes and data required to execute all submodules in the face image key point detection device, and the server can call the server program codes and data to execute the functions of all submodules.
  • the computer equipment does not need to mark the sample images participating in the training when training the fast model, which saves the time and effort required for the marking and increases the training speed.
  • the method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
  • the present application also provides a storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the rapid model training method in any of the foregoing embodiments .
  • the computer program may be stored in a computer-readable storage medium. When executed, it may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

Embodiments of the present application disclose a method and device for training a fast model, a computer apparatus, and a storage medium. The method comprises: acquiring a pre-configured training sample image; inputting the training sample image into a pre-configured auxiliary training model and an initial fast model; calculating a feature distance between a feature vector of the training sample image extracted by the auxiliary training model and a feature vector of the training sample image extracted by the fast model; and performing back propagation on the feature distance to correct a weight parameter in the fast model. When the fast model is trained, a sample image involved in training does not need to be marked, thereby reducing the time and effort required for marking, and increasing training speed. A distance between a feature vector representing a sample image feature and output by the auxiliary model and a feature vector representing a sample image feature and output by the fast model is directly calculated, and back propagation is performed, thereby maximally shortening the training time.

Description

快速模型的训练方法、装置、计算机设备及存储介质Training method, device, computer equipment and storage medium of rapid model
本申请要求于2018年11月13日提交中国专利局、申请号为201811348231.6,发明名称为“快速模型的训练方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on November 13, 2018, with the application number 201811348231.6 and the invention titled "fast model training method, device, computer equipment and storage medium", all of which are approved by The reference is incorporated in this application.
技术领域Technical field
本申请实施例涉及模型训练领域,尤其是一种快速模型的训练方法、装置、计算机设备及存储介质。The embodiments of the present application relate to the field of model training, and in particular, to a rapid model training method, device, computer equipment, and storage medium.
背景技术Background technique
模拟人类实际神经网络的数学方法问世以来,人们已慢慢习惯了把这种人工神经网络直接称为神经网络。神经网络在系统辨识、模式识别、智能控制等领域有着广泛而吸引人的前景,特别在智能控制中,人们对神经网络的自学习功能尤其感兴趣,并且把神经网络这一重要特点看作是解决自动控制中控制器适应能力这个难题的关键钥匙之一。Since the advent of mathematical methods for simulating human actual neural networks, people have gradually become accustomed to calling this artificial neural network directly as a neural network. Neural networks have broad and attractive prospects in the fields of system identification, pattern recognition, and intelligent control. Especially in intelligent control, people are particularly interested in the self-learning function of neural networks, and regard this important feature of neural networks as One of the key keys to solve the problem of controller adaptability in automatic control.
现有技术中,为了使神经网络模型具有对某一类或者多个类型的图像具有准确分类的能力,需要对初始化的神经网络模型进行训练。其中,训练的方式为:收集一定量级的样本图像,为了使训练至收敛的神经网络模型的鲁棒性更好,需要的训练样本往往是海量的。训练时首先对训练样本进行人为标定,然后将样本图像输入到神经网络模型中,得到神经网络模型输出的分类结果。比对分类结果和人为标定是否一致,不一致时通过反向算法校正神经网络模型的权值,使神经网络模型逐渐的收敛,由于,模型训练时输出的随机性很强,因此,训练过程极为漫长。In the prior art, in order to make the neural network model have the ability to accurately classify a certain type or multiple types of images, it is necessary to train the initialized neural network model. Among them, the training method is to collect a certain level of sample images. In order to make the neural network model trained to convergence more robust, the training samples required are often massive. During training, the training samples are manually calibrated, and then the sample images are input into the neural network model to obtain the classification results output by the neural network model. Compare the classification results with the artificial calibration. If they are inconsistent, correct the weights of the neural network model through the reverse algorithm to make the neural network model gradually converge. Due to the strong randomness of the output during model training, the training process is extremely long .
本申请的发明人在研究中发现,现有技术中为提高神经网络模型的准确性,往往需要投入大量的样本图像花费大量的时间才能够将神经网络模型训练至收敛状态,而在不具有上述条件的环境下,神经网络模型往往无法进行训练,或者训练得到的神经网络模型稳定性差准确性较低。The inventor of the present application found in the research that in order to improve the accuracy of the neural network model in the prior art, it often takes a lot of sample images to spend a lot of time to train the neural network model to the convergence state, but does not have the above Under the condition of conditions, the neural network model is often unable to be trained, or the neural network model obtained by training has poor stability and low accuracy.
发明内容Summary of the invention
本申请实施例提供能够通过辅助训练模型在少量样本和较短时间能够将模型,训练至收敛的快速模型的训练方法、装置、计算机设备及存储介质。Embodiments of the present application provide a training method, device, computer equipment, and storage medium that can train a model to convergence with a small number of samples and a short time through an auxiliary training model.
为解决上述技术问题,本申请创造的实施例采用的一个技术方案是:提供一种快 速模型的训练方法,包括:获取预设的训练样本图像;将所述训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,所述辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,所述快速模型为待训练的神经网络模型;计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离;通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数。In order to solve the above technical problems, a technical solution adopted by the embodiment created by the present application is: to provide a rapid model training method, including: acquiring a preset training sample image; inputting the training sample image into a preset assistant In the training model and the initial fast model, the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast model is a neural network model to be trained; calculating the auxiliary training The feature distance between the feature vector of the training sample image extracted by the model and the feature vector of the training sample image extracted by the fast model; by back-propagating the feature distance, the weight parameter in the fast model is corrected.
为解决上述技术问题,本申请实施例还提供一种快速模型的训练装置,包括:获取模块,用于获取预设的训练样本图像;处理模块,用于将所述训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,所述辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,所述快速模型为待训练的神经网络模型;计算模块,用于计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离;执行模块,用于通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数。To solve the above technical problems, embodiments of the present application also provide a rapid model training device, including: an acquisition module for acquiring a preset training sample image; a processing module for inputting the training sample image into a preset In the auxiliary training model and the initial fast model, the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast model is a neural network model to be trained; a calculation module, Used to calculate the feature distance between the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the fast model; the execution module is used to back-propagate the feature distance To correct the weight parameters in the fast model.
为解决上述技术问题,本申请实施例还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述所述快速模型的训练方法的步骤。To solve the above technical problems, the embodiments of the present application further provide a computer device, including a memory and a processor, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, The processor executes the steps of the fast model training method described above.
为解决上述技术问题,本申请实施例还提供一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述所述快速模型的训练方法的步骤。To solve the above technical problems, the embodiments of the present application further provide a storage medium storing computer-readable instructions, which when executed by one or more processors cause the one or more processors to execute the above The steps of the rapid model training method are described.
通过在对快速模型进行训练时,无需对参与训练的样本图像进行标记,节约了标记所需要的时间和花费的精力,提高了训练的速度。同时,直接计算辅助模型输出的表征样本图像特征的特征向量,与快速模型输出的表征样本图像特征的特征向量之间的距离(欧式距离和/或余弦距离)并进行反向传播,采用这种方法将快速模型的训练转化为一种单纯的回归算法,能够最大限度的缩短训练时间,且能够保证训练完成时快速模型输出的准确率。By training the fast model, there is no need to mark the sample images participating in the training, which saves the time and effort required for the marking, and improves the training speed. At the same time, directly calculate the distance between the feature vector output from the auxiliary model that characterizes the sample image and the feature vector output from the fast model that characterizes the sample image (Euclidean distance and / or cosine distance) and perform back propagation. The method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
附图说明BRIEF DESCRIPTION
图1为本申请实施例快速模型的训练方法的基本流程示意图;FIG. 1 is a schematic diagram of a basic process of a rapid model training method according to an embodiment of this application;
图2为本申请实施例通过阈值确定是否进行反向传播的流程示意图;FIG. 2 is a schematic flowchart of determining whether to perform back propagation through a threshold according to an embodiment of the present application;
图3为本申请实施例计算两个模型提取特征向量之间的特征距离的一种流程示意图;FIG. 3 is a schematic flowchart of calculating a feature distance between two model extraction feature vectors according to an embodiment of the present application;
图4为本申请实施例根据具体应用场景获取训练样本图像的流程示意图;4 is a schematic flowchart of obtaining training sample images according to specific application scenarios according to an embodiment of the present application;
图5为本申请实施例数据库检所获取训练样本图像的一种流程示意图;5 is a schematic flowchart of a training sample image acquired by a database inspection station according to an embodiment of the present application;
图6为本申请实施例派生样本图像的生成方法流程示意图;6 is a schematic flowchart of a method for generating a derived sample image according to an embodiment of this application;
图7为本申请实施例快速模型的训练装置基本结构示意图;7 is a schematic diagram of a basic structure of a training device for a rapid model according to an embodiment of the present application;
图8为本申请实施例计算机设备基本结构框图。8 is a block diagram of a basic structure of a computer device according to an embodiment of the present application.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application.
在本申请的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如101、102等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。Some processes described in the specification and claims of this application and the above drawings include multiple operations in a specific order, but it should be clearly understood that these operations may not be in the order in which they appear in this document Execution or parallel execution. The sequence numbers of operations such as 101 and 102 are only used to distinguish different operations. The sequence number itself does not represent any execution sequence. In addition, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, nor limit "first" and "second". Are different types.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the protection scope of the present application.
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是 PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" and "terminal device" used herein include both wireless signal receiver devices, which only have wireless signal receiver devices without transmitting capabilities, and also include hardware for receiving and transmitting hardware. A device having a device capable of performing receiving and transmitting hardware for bidirectional communication on a bidirectional communication link. Such devices may include: cellular or other communication devices with single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Services), which can combine voice and data Processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet / Intranet access, web browsers, notepads, calendars and / or GPS (Global Positioning System (Global Positioning System) receiver; conventional laptop and / or palmtop computer or other device that has and / or includes a conventional radio frequency receiver and / or palmtop computer or other device. As used herein, "terminal" and "terminal equipment" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and / or terrestrial), or adapted and / or configured to operate locally, and / or In a distributed form, it operates at any other location on the earth and / or space. The "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playback terminal, for example, may be a PDA, MID (Mobile Internet Device), and / or have music / video playback Functional mobile phones can also be smart TVs, set-top boxes and other devices.
具体请参阅图1,图1为本实施例快速模型的训练方法的基本流程示意图。Please refer to FIG. 1 for details. FIG. 1 is a schematic diagram of a basic process of the fast model training method of this embodiment.
如图1所示,一种快速模型的训练方法,包括:As shown in Figure 1, a fast model training method includes:
S1100、获取预设的训练样本图像;S1100. Acquire a preset training sample image;
在对快速模型进行训练之前需要准备训练样本图像,训练样本图像的数量根据对快速模型的具体要求相对应,例如,对于快速模型泛化能力要求较高的应用场景要求的训练样本图像的数量越多,反之,则越少。Before training the fast model, you need to prepare training sample images. The number of training sample images corresponds to the specific requirements for the fast model. For example, the number of training sample images for application scenarios that require high generalization capabilities of the fast model More, otherwise, less.
对于训练样本图像的获取能够采用公共图像数据库、自有图像数据库或者通过数据爬取的方式从互联网中进行爬取。For the acquisition of training sample images, the public image database, its own image database, or data crawling can be used to crawl from the Internet.
快速模型是指与现有的神经网络模型模型相比,需要通过训练确定的自由量(权值)的数量较少的、模型规模较小或者仅仅需要少量的训练样本图像就能够训练至收敛的神经网络模型。Fast model means that compared with the existing neural network model model, the number of free quantities (weights) that need to be determined through training is small, the model size is small, or only a small number of training sample images are needed to train to convergence Neural network model.
快速模型由于其规模较小,对于计算机处理能力的要求较低,且实现的功能略微单一,因此,常使用于(不限于)移动智能终端或者环境因素(需要处理的图像变化较为单一)变化单一的应用场景中。Due to its small size, the fast model has low requirements for computer processing power and a slightly single function. Therefore, it is often used in (not limited to) mobile smart terminals or environmental factors (the image to be processed changes more single). Application scenarios.
S1200、将所述训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,所述辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,所述快速模型为待训练的神经网络模型;S1200. Input the training sample image into a preset auxiliary training model and an initial fast model, where the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast The model is the neural network model to be trained;
本实施方式中,为实现快速模型的训练,需要采用辅助训练模型进行训练。且本实施方式中参与训练的辅助训练模型被预先训练至收敛状态,即能够对训练样本图像做出准确分类的神经网络模型。本实施方式中,辅助训练模型能够为已经训练至收敛状态的卷积神经网络模型(CNN),但是辅助训练模型还能够是:深度神经网络模型(DNN)、循环神经网络模型(RNN)或者上述三种网络模型的变形模型。而快速模型也能够为上述三种模型中的任意一种或者变形模型,但是快速模型相比于辅助训练模型规模更小。In this embodiment, in order to implement rapid model training, an auxiliary training model needs to be used for training. In addition, in this embodiment, the auxiliary training model participating in training is pre-trained to a convergence state, that is, a neural network model that can accurately classify training sample images. In this embodiment, the auxiliary training model can be a convolutional neural network model (CNN) that has been trained to a convergence state, but the auxiliary training model can also be: a deep neural network model (DNN), a recurrent neural network model (RNN), or the above Deformation model of three network models. The fast model can also be any one of the above three models or a deformed model, but the fast model is smaller than the auxiliary training model.
需要指出的是快速模型与辅助训练模型的训练方向需一致,或快速模型训练实现的目的是辅助训练模型的功能当中的一种。例如,快速模型训练的目的在于,对黄种人的人脸图像进行识别,辅助训练模型的功能也应该为对人脸图像进行识别,但是相对于快速模型而言,辅助训练模型具有更强大的识别能力,如能够对全人种的人脸图像进行识别,或者不仅仅能够识别人脸图像还能够识别人脸图像表征的用户年龄、性别或者颜值等。It should be pointed out that the training direction of the fast model and the auxiliary training model must be the same, or the purpose of the fast model training is one of the functions of the auxiliary training model. For example, the purpose of fast model training is to recognize the face images of yellow people. The function of the auxiliary training model should also be to recognize the face images, but compared to the fast model, the auxiliary training model has more powerful recognition. Capabilities, such as being able to recognize face images of all races, or not only the face images but also the user's age, gender, or face value represented by the face images.
在获取到训练样本图像后,对训练样本图像进行图像处理(将训练样本图像缩放或者剪切成为固定规格的图片)后,将训练样本图像分别输入到辅助训练模型和快速模型中。至此,辅助训练模型和快速模型分别对训练样本图像的特征向量进行提取。After acquiring the training sample images, after performing image processing on the training sample images (zooming or cutting the training sample images into pictures of fixed specifications), the training sample images are respectively input into the auxiliary training model and the fast model. So far, the auxiliary training model and the fast model separately extract the feature vectors of the training sample images.
S1300、计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离;S1300. Calculate the feature distance between the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the rapid model;
分别获取辅助训练模型和快速模型提取的训练样本图像的特征向量。然后计算两个模型特征向量之间的特征距离。其中特征距离包括两个特征向量之间的欧氏距离和/或余弦距离。特征距离的计算是通过损失函数进行的。在一些实施方式中,损失函数既能够计算两个模型特征向量之间的欧氏距离,又能够计算计算两个模型特征向量之间的余弦距离,并且通过欧氏距离和余弦距离的结合从不同维度,对快速模型的权值进行校正,加速快速模型的训练,提高快速模型的准确度。Obtain the feature vectors of the training sample images extracted by the auxiliary training model and the fast model respectively. Then calculate the feature distance between the two model feature vectors. The feature distance includes the Euclidean distance and / or cosine distance between the two feature vectors. The calculation of the characteristic distance is performed through the loss function. In some embodiments, the loss function can not only calculate the Euclidean distance between the two model feature vectors, but also calculate the cosine distance between the two model feature vectors, and through the combination of Euclidean distance and cosine distance from Dimension, correct the weight of the fast model, accelerate the training of the fast model, and improve the accuracy of the fast model.
由于,辅助训练模型已经预先被训练至收敛状态了,因此,辅助训练模型提取的训练样本图像的特征向量为准确的特征向量,而训练过程中,快速模型输出的特征向量则准确性较低。计算两个模型特征向量之间的距离,其实就是计算快速模型输出的特征向量距标准特征向量之间的距离。Since the auxiliary training model has been trained to a converged state in advance, the feature vectors of the training sample images extracted by the auxiliary training model are accurate feature vectors, and during the training process, the feature vectors output by the fast model are less accurate. Calculating the distance between the two model feature vectors is actually calculating the distance between the feature vectors output by the fast model and the standard feature vectors.
S1400、通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数。S1400. Correct the weight parameters in the rapid model by backpropagating the feature distance.
在计算得到两个模型提取同一训练样本图像的特征向量的特征距离后,将该特征向量通过损失函数进行反向传播,以校正快速模型中的图像过滤器(卷积层)的权重,校正的结果为使快速模型的提取的特征向量向辅助训练模型提取的特征向量靠近。至此,对于快速模型训练的一个环节完成,需要指出的是,步骤S1100-S1200仅仅是快速模型训练过程中的一个步骤,由于训练样本图像的数量,步骤S1100-S1200的训练是不断循环的,直至快速模型被训练至收敛状态时为止。After calculating the feature distance of the feature vectors of the same training sample image extracted by the two models, the feature vector is back-propagated through the loss function to correct the weight of the image filter (convolutional layer) in the fast model. As a result, the extracted feature vectors of the fast model are brought closer to the extracted feature vectors of the auxiliary training model. So far, for the completion of a fast model training, it should be pointed out that steps S1100-S1200 are only a step in the rapid model training process. Due to the number of training sample images, the training of steps S1100-S1200 is continuously looped until The fast model is trained until it converges.
上述实施方式通过在对快速模型进行训练时,无需对参与训练的样本图像进行标记,节约了标记所需要的时间和花费的精力,提高了训练的速度。同时,直接计算辅助模型输出的表征样本图像特征的特征向量,与快速模型输出的表征样本图像特征的特征向量之间的距离(欧式距离和/或余弦距离)并进行反向传播,采用这种方法将快速模型的训练转化为一种单纯的回归算法,能够最大限度的缩短训练时间,且能够保证训练完成时快速模型输出的准确率。The above embodiment does not need to mark the sample images participating in the training when training the fast model, which saves the time and effort required for the marking, and improves the training speed. At the same time, directly calculate the distance between the feature vector output from the auxiliary model that characterizes the sample image and the feature vector output from the fast model that characterizes the sample image (Euclidean distance and / or cosine distance) and perform back propagation. The method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
在一些实施方式中,快速模型的训练过程并非每次都要进行反向传播的,当两个模型之间的特征距离大于设定的阈值时,才需要进行反向传播。请参阅图2,图2为本实施例通过阈值确定是否进行反向传播的流程示意图。In some embodiments, the fast model training process does not need to be backpropagated every time. It is only necessary to perform backpropagation when the feature distance between the two models is greater than the set threshold. Please refer to FIG. 2, which is a schematic flowchart of determining whether to perform back propagation through a threshold in this embodiment.
如图2所示,S1400之前还包括:As shown in Figure 2, before S1400, it also includes:
S1311、将所述特征距离与预设的第一阈值进行比对;S1311: Compare the feature distance with a preset first threshold;
为了验证两个模型提取的特征向量之间的距离是否满足模型训练的需求,设定一个检验阈值,即第一阈值。第一阈值的设定能够根据对快速模型的准确度要求加以设定。即对于快速模型准确度要求越高,则第一阈值的设定数值越小,反之,对于快速模型的准确度要求越低,则第一阈值的设定数值越大。In order to verify whether the distance between the feature vectors extracted by the two models meets the needs of model training, a test threshold is set, that is, the first threshold. The setting of the first threshold can be set according to the accuracy requirement for the fast model. That is, the higher the accuracy requirement for the fast model, the smaller the set value of the first threshold, and conversely, the lower the accuracy requirement for the fast model, the larger the set value of the first threshold.
S1312、当所述特征距离大于所述第一阈值时,确认对所述特征距离进行反向传播。S1312. When the feature distance is greater than the first threshold, confirm to backpropagate the feature distance.
通过比较确定特征距离大于第一阈值时,即确定快速模型提取的特征向量与辅助训练模型提取的特征向量之间的距离较大,不符合快速模型训练的需求,需要通过反向传播来调整快速模型的权值,以使再次输入该训练样本图像时,快速模型提取的特征向量与辅助训练模型提取的特征向量之间的距离趋向于变小。当通过比较确定特征距离小于等于第一阈值时,则证明快速模型对于当前输入的训练样本图像的图像理解能力达到了设定要求无需进行反向传播,而是采用下一张训练样本图像对快速模型进行训练。By comparing and determining that the feature distance is greater than the first threshold, it is determined that the distance between the feature vector extracted by the fast model and the feature vector extracted by the auxiliary training model is large, which does not meet the needs of rapid model training, and the fast propagation needs to be adjusted by back propagation The weight of the model, so that when the training sample image is input again, the distance between the feature vector extracted by the fast model and the feature vector extracted by the auxiliary training model tends to become smaller. When it is determined by comparison that the feature distance is less than or equal to the first threshold, it proves that the fast model's image understanding ability of the currently input training sample image meets the set requirements without back propagation, but the next training sample image is used to quickly The model is trained.
在本实施方式中,需要指出的是步骤S1100-S1200以及步骤S1311-S1312是循环进行的。S1400之后还包括In this embodiment, it should be noted that steps S1100-S1200 and steps S1311-S1312 are performed cyclically. Also included after S1400
S1411、反复迭代将所述训练样本图像输入到所述辅助训练模型和所述快速模型中,至所述特征距离小于等于所述第一阈值时,确认所述训练样本图像的训练结束。S1411: Iteratively and iteratively input the training sample image into the auxiliary training model and the rapid model, and when the feature distance is less than or equal to the first threshold, confirm that the training of the training sample image ends.
当通过比较确定特征距离大于第一阈值时,向同一张训练样本图像再次输入到的辅助训练模型和快速模型中,反复的执行S1200-S1400的步骤,直至当通过比较确定特征距离小于等于第一阈值时,对于该训练样本图像的训练结束,还其他训练样本图像继续进行训练。When it is determined by comparison that the feature distance is greater than the first threshold, the auxiliary training model and the fast model are input again to the same training sample image, and the steps of S1200-S1400 are repeatedly performed until when the feature distance is determined to be less than or equal to the first by comparison At the threshold, the training for the training sample image ends, and the training for other training sample images continues.
通过上述方法当快速模型提取的特征向量与辅助训练模型提取的特征向量之间的距离均小于第一阈值时,或者小于第一阈值的比例大于设定值,如99%或其他比率设定值时,对于快速样本的训练结束。When the distance between the feature vector extracted by the fast model and the feature vector extracted by the auxiliary training model is less than the first threshold, or the proportion less than the first threshold is greater than the set value, such as 99% or other ratio set value At this time, the training for the fast samples ends.
在一些实施方式中,特征距离包括欧氏距离和/或余弦距离,计算两个模型提取特征向量之间的特征距离,就是计算特征向量之间的欧氏距离和/或余弦距离。请参阅图3,图3为本实施例计算两个模型提取特征向量之间的特征距离的一种流程示意图。In some embodiments, the feature distance includes the Euclidean distance and / or cosine distance, and calculating the feature distance between the extracted feature vectors of the two models is to calculate the Euclidean distance and / or cosine distance between the feature vectors. Please refer to FIG. 3, which is a schematic flowchart of calculating the feature distance between two model extraction feature vectors in this embodiment.
如图3所述,S1300还包括:As shown in FIG. 3, S1300 also includes:
S1321、获取所述辅助训练模型提取的所述训练样本图像的第一特征向量和所述快速模型提取的所述训练样本图像的第二特征向量;S1321: Acquire a first feature vector of the training sample image extracted by the auxiliary training model and a second feature vector of the training sample image extracted by the rapid model;
分别获取辅助训练模型和快速模型提取的训练样本图像的特征向量。其中,辅助训练模型提取的训练样本图像的特征向量为第一特征向量,快速模型提取的训练样本 图像的特征向量为第二特征向量。Obtain the feature vectors of the training sample images extracted by the auxiliary training model and the fast model respectively. Among them, the feature vector of the training sample image extracted by the auxiliary training model is the first feature vector, and the feature vector of the training sample image extracted by the fast model is the second feature vector.
S1322、比对所述第一特征向量和所述第二特征向量的欧氏距离和/或余弦距离。S1322. Compare the Euclidean distance and / or the cosine distance of the first feature vector and the second feature vector.
计算第一特征向量和第二特征向量之间的特征距离。其中特征距离包括两个特征向量之间的欧氏距离和/或余弦距离。特征距离的计算是通过损失函数进行的。在一些实施方式中,损失函数既能够计算两个模型特征向量之间的欧氏距离,又能够计算计算两个模型特征向量之间的余弦距离,并且通过欧氏距离和余弦距离的结合从不同维度,对快速模型的权值进行校正,加速快速模型的训练,提高快速模型的准确度。The feature distance between the first feature vector and the second feature vector is calculated. The feature distance includes the Euclidean distance and / or cosine distance between the two feature vectors. The calculation of the characteristic distance is performed through the loss function. In some embodiments, the loss function can not only calculate the Euclidean distance between the two model feature vectors, but also calculate the cosine distance between the two model feature vectors, and through the combination of Euclidean distance and cosine distance from Dimension, correct the weight of the fast model, accelerate the training of the fast model, and improve the accuracy of the fast model.
在一些实施方式中,为了使提高快速模型在具体应用环境下的准确性,需要获取具有针对性的训练样本图像对快速模型进行训练。请参阅图4,图4为本实施例根据具体应用场景获取训练样本图像的流程示意图。In some embodiments, in order to improve the accuracy of the rapid model in a specific application environment, it is necessary to obtain targeted training sample images to train the rapid model. Please refer to FIG. 4, which is a schematic flowchart of obtaining training sample images according to specific application scenarios in this embodiment.
如图4所示,S1100之前还包括:As shown in Figure 4, before S1100, it also includes:
S1011、获取目标用户或者目标场景中需要辨识图像的图像信息,其中,所述图像信息包括各辨识图像的图像类别;S1011: Acquire image information of a target user or a target scene that needs to be identified, where the image information includes the image category of each identified image;
在对快速模型进行训练之前,首先需要收集合适的素材,而为了增强快速模型的在实际应用中的准确性,需要对使用快速模型的具体用户或者某个具体场景中的类别图片进行辨识。例如,使用快速模型的用户为资深的宠物爱好者,用户经常上传各种宠物图片进行物种辨识,则收集该用户上传的辨识图像。Before training the fast model, you first need to collect suitable materials, and in order to enhance the accuracy of the fast model in practical applications, you need to identify the specific users who use the fast model or the category pictures in a specific scene. For example, the user who uses the quick model is a senior pet lover. The user often uploads various pet pictures for species identification, and then collects the identification images uploaded by the user.
其中,每张辨识图像均对应有一个图像信息,图像信息中包括各个辨识图像的图像类别。例如,辨识图像为宠物照片时,图像类型为宠物的物种名称。Each identified image corresponds to one piece of image information, and the image information includes the image type of each identified image. For example, when the recognition image is a pet photo, the image type is the species name of the pet.
S1012、根据所述图像信息中的图像类别对辨识图像进行聚类,以获取所述目标用户或者目标场景偏好辨识的图像类型;S1012. Cluster the recognized images according to the image category in the image information to obtain the image type that the target user or target scene prefers to identify;
根据获取的各个辨识图像的图像类别,对用户图像进行聚类统计。聚类统计即将辨识图像中图像类型相同的一类聚集为一类。然后根据同一个图像类型中辨识图像的数量确定用户或者应用场景中偏好辨识的图像类型。例如,用户上传各种动物图像上传进行辨识,但是由于用户是狂热的犬科动物爱好者,因此,上传的辨识图像大多数为全科动物的图像,因此,通过统计聚类用户偏好辨识的图像类型为犬科类图像。又或者,用户为旅行家,上传的辨识图像均为旅行途中的动植物图像,通过统计确认用户最近上传的图像均为非洲大陆的动植物图像,则确定用户在一段时间内身处非洲或者对非洲动植物产生较大的兴趣,确定偏好辨识的图像类型为非洲动植物图像。According to the acquired image category of each recognition image, the user image is clustered and counted. Clustering statistics is to classify the same type of image in the identified image into one type. Then, according to the number of recognized images in the same image type, the image type preferred for recognition in the user or application scene is determined. For example, the user uploads various animal images for identification, but because the user is an avid canine animal enthusiast, most of the uploaded identification images are images of the whole family. Therefore, the user who prefers to identify the images by statistical clustering The type is canine image. Or, if the user is a traveler, the identification images uploaded are all animal and plant images during the trip, and it is confirmed by statistics that the most recent images uploaded by the user are all animal and plant images of the African continent, then it is determined that the user is in Africa or African animals and plants are of great interest, and the image type of preference identification is determined to be African animals and plants images.
S1013、根据所述图像类型收集训练快速模型的训练样本图像。S1013: Collect training sample images of the training fast model according to the image type.
通过图像类型收集训练快速模型的训练样本图像。训练样本图像的获取能够采用公共图像数据库、自有图像数据库或者通过数据爬取的方式从互联网中进行爬取。例 如,通过非洲国家博物馆的数据库,获取非洲动植物样本的图片作为训练样本图像,又或者通过网络爬虫爬取宠物犬的图片作为训练样本图像。Collect training sample images for training fast models by image type. Training sample images can be crawled from the Internet using public image databases, own image databases, or through data crawling. For example, through the database of the African National Museum, obtain pictures of African animal and plant samples as training sample images, or use web crawlers to crawl pictures of pet dogs as training sample images.
由于,在某种特殊的应用场景中使用时,要求快速模型无需太高的泛化能力,但是对于特定事物图像辨识准确度的要求确很高,通过识别该应用场景中或者用户偏好,来确定收集训练样本图像,对快速模型进行训练,能够使快速模型在针对的领域具有较高的准确性,很好的满足了用户的需求。Because when used in a special application scenario, the fast model does not need too high generalization ability, but the accuracy of image recognition for specific things is indeed very high. It is determined by identifying the application scenario or user preference. Collecting training sample images and training the fast model can make the fast model have higher accuracy in the targeted field and meet the needs of users.
在一些实施方式中,训练样本图像均存储在图像数据库中,需要对某个快速模型进行训练时,需要通过检索的方式获取需要的训练样本图像。请参阅图5,图5为本实施例数据库检所获取训练样本图像的一种流程示意图。In some embodiments, the training sample images are all stored in the image database. When a certain fast model needs to be trained, the training sample images need to be obtained through retrieval. Please refer to FIG. 5. FIG. 5 is a schematic flowchart of a training sample image acquired by the database inspection in this embodiment.
如图5所示,S1013之后包括:As shown in Figure 5, after S1013 includes:
S1021、以所述图像类型为限定条件在预设的图像数据库中进行检索;S1021: Retrieve in a preset image database using the image type as a limiting condition;
获取到用户或者应用场景中偏好的图像类型后,以该图像类型为检索条件在预设的图像数据库中进行检索。其中,图像数据库中的所有图像在入库时,均根据图像内容对图像进行标签的设置,例如,是图像为动物时,该图像的标签包括该动物的纲、目、科、属和名称等。After obtaining the image type preferred by the user or the application scene, the image type is used as a search condition to search in a preset image database. Among them, all the images in the image database are set according to the image content when they are put into the library. For example, when the image is an animal, the image label includes the animal's class, order, family, genus and name. .
以该图像类型未检索条件进行检索,能够检索到图像标签与该图像类型相同或者相似的图像。Retrieval under the condition that the image type is not retrieved can retrieve images with the same or similar image tags as the image type.
S1022、将检索召回的图像确认为所述训练样本图像。S1022: Confirm the retrieved image as the training sample image.
将通过检索召回的图像确认为对应快速模型的训练样本图像。The image recalled by retrieval is confirmed as the training sample image corresponding to the fast model.
在一些实施方式中,为弥补训练样本图像的不足,也为了增强快速模型的稳定性和抗干扰能力,在获取了原始样本图像后,对样本图像进行图像处理,生成派生于原始样本图像的派生样本图像。请参阅图6,图6为本实施例派生样本图像的生成方法流程示意图。In some embodiments, in order to make up for the shortcomings of the training sample image, and also to enhance the stability and anti-interference ability of the fast model, after acquiring the original sample image, the sample image is image processed to generate a derivative derived from the original sample image Sample image. Please refer to FIG. 6, which is a schematic flowchart of a method for generating a derived sample image according to this embodiment.
如图6所示,S1022之后还包括:As shown in FIG. 6, after S1022, it also includes:
S1031、对所述原始样本图像进行图像处理,生成派生于所述原始样本图像的派生样本图像;S1031: Perform image processing on the original sample image to generate a derived sample image derived from the original sample image;
通过数据库或者通过网络爬虫技术爬取的训练样本图像被定义为原始样本图像。对原始样本图像进行图像处理生成的新的样本图像被定义为派生样本图像。The training sample image crawled through the database or through the web crawler technology is defined as the original sample image. A new sample image generated by performing image processing on the original sample image is defined as a derived sample image.
本实施方式中,对原始样本图像进行图像处理的方法包括(不限于):对原始样本图像进行图像剪切、图像旋转、或者噪声干扰当中的一种或者多种处理方式进行组合。In this embodiment, the method for performing image processing on the original sample image includes (but is not limited to): combining the original sample image with one or more processing methods among image cropping, image rotation, or noise interference.
由于,原始样本图像与派生样本图像表达的实质内容完全相同,因此,辅助训练模型提取原始样本图像与派生样本图像的特征向量应当完全相同或者相似。因此,需 要进一步的确认图像处理后的派生样本图像,是否形变到模型无法辨识的程度,若是,则该派生样本图像不能作为训练样本。Since the actual content expressed by the original sample image and the derived sample image is completely the same, the feature vectors of the auxiliary training model to extract the original sample image and the derived sample image should be identical or similar. Therefore, it is necessary to further confirm whether the derived sample image after image processing is deformed to such an extent that the model cannot be recognized, and if so, the derived sample image cannot be used as a training sample.
S1032、提取所述原始样本图像的特征向量和所述派生样本图像的特征向量;S1032: Extract feature vectors of the original sample image and feature vectors of the derived sample image;
将原始样本图像和派生样本图像先后输入到辅助训练模型中,提取原始样本图像的特征向量和派生样本图像的特征向量。The original sample image and the derived sample image are successively input into the auxiliary training model to extract the feature vector of the original sample image and the feature vector of the derived sample image.
提取特征向量的模型不局限于辅助训练模型,在一些实施方式中,提取特征向量的模型还能够是已经训练至收敛状态,与快速模型具有相同的训练方向的神经网络模型。The model for extracting feature vectors is not limited to the auxiliary training model. In some embodiments, the model for extracting feature vectors can also be a neural network model that has been trained to a convergence state and has the same training direction as the fast model.
S1033、计算所述原始样本图像的特征向量和所述派生样本图像的特征向量之间的特征差值;S1033: Calculate the feature difference between the feature vector of the original sample image and the feature vector of the derived sample image;
计算得到原始样本图像的特征向量和派生样本图像的特征向量后,计算原始样本图像的特征向量和派生样本图像的特征向量之间的特征差值。其中特征差值计算通过损失函数计算,且特征差值能够是两个特征向量的欧氏距离和/或余弦距离。After calculating the feature vector of the original sample image and the feature vector of the derived sample image, the feature difference between the feature vector of the original sample image and the feature vector of the derived sample image is calculated. The feature difference is calculated by a loss function, and the feature difference can be the Euclidean distance and / or cosine distance of the two feature vectors.
S1034、当所述特征差值小于等于预设的第二阈值时,确认所述原始样本图像和派生样本图像为所述训练样本图像。S1034. When the feature difference value is less than or equal to a preset second threshold, confirm that the original sample image and the derived sample image are the training sample image.
将计算得到的特征差值与预设的第二阈值进行比对,其中,为了验证两个特征向量之间的距离是否满足模型训练的需求,设定一个检验阈值,即第二阈值。第二阈值的设定能够根据对快速模型的靠干扰要求加以设定。即对于快速模型抗干扰要求越高,则第二阈值的设定数值越小,反之,对于快速模型的抗干扰要求越低,则第二阈值的设定数值越大。The calculated feature difference value is compared with a preset second threshold, wherein, in order to verify whether the distance between the two feature vectors meets the needs of model training, a test threshold is set, that is, the second threshold. The setting of the second threshold can be set according to the interference requirement for the fast model. That is, the higher the anti-interference requirement for the fast model, the smaller the set value of the second threshold value, and conversely, the lower the anti-interference requirement for the fast model, the larger the set value of the second threshold value.
当特征差值小于等于预设的第二阈值时,则表明派生样本图像符合训练的要求,确认原始样本图像和派生样本图像为所述训练样本图像;否则,则确认该派生样本图像不否和训练要求被丢弃。When the feature difference is less than or equal to the preset second threshold, it indicates that the derived sample image meets the training requirements, confirm that the original sample image and the derived sample image are the training sample image; otherwise, it is confirmed that the derived sample image is not Training requirements are discarded.
由于,训练样本图像中的派生样本图像是由原始样本图像进行图像处理后得到的,其中包含的图像内容实质相同,且通过特征差值的验证,能够保证通过上述训练样本图像训练至收敛的快速模型,即使在分类的图像存在干扰的情况下也能够准确的提取出正确的特征向量,提高了模型的抗干扰性和稳定性。同时,由于快速模型的训练过程中,训练样本图像无需进行标定,因此,通过计算原始样本图像和派生样本图像之间的特征差值,能够保证快速模型能够准确的提取具有干扰图像的特征向量。Since the derived sample image in the training sample image is obtained from the original sample image after image processing, the content of the image contained therein is substantially the same, and through the verification of the feature difference, it can ensure that the training sample image is trained to convergence quickly The model can accurately extract the correct feature vector even when the classified images have interference, which improves the anti-interference and stability of the model. At the same time, because the training sample image does not need to be calibrated during the training process of the fast model, by calculating the feature difference between the original sample image and the derived sample image, the fast model can accurately extract the feature vectors with interference images.
为解决上述技术问题,本申请实施例还提供一种快速模型的训练装置。To solve the above technical problems, the embodiments of the present application also provide a rapid model training device.
具体请参阅图7,图7为本实施例快速模型的训练装置基本结构示意图。Please refer to FIG. 7 for details. FIG. 7 is a schematic diagram of the basic structure of the training device of the rapid model in this embodiment.
如图7所示,一种快速模型的训练装置,包括:获取模块2100、处理模块2200、 计算模块2300和执行模块2400。其中,获取模块2100用于获取预设的训练样本图像;处理模块2200用于将训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,快速模型为待训练的神经网络模型;计算模块2300用于计算辅助训练模型提取的训练样本图像的特征向量与快速模型提取的训练样本图像的特征向量之间的特征距离;执行模块2400用于通过对特征距离进行反向传播,以校正快速模型中的权重参数。As shown in FIG. 7, a rapid model training device includes: an acquisition module 2100, a processing module 2200, a calculation module 2300, and an execution module 2400. Among them, the obtaining module 2100 is used to obtain a preset training sample image; the processing module 2200 is used to input the training sample image into a preset auxiliary training model and an initial rapid model, wherein the auxiliary training model is pre-trained to a converged state A neural network model used to extract image feature vectors, the fast model is the neural network model to be trained; the calculation module 2300 is used to calculate the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the fast model Feature distance; the execution module 2400 is used to correct the weight parameters in the fast model by backpropagating the feature distance.
快速模型的训练装置通过在对快速模型进行训练时,无需对参与训练的样本图像进行标记,节约了标记所需要的时间和花费的精力,提高了训练的速度。同时,直接计算辅助模型输出的表征样本图像特征的特征向量,与快速模型输出的表征样本图像特征的特征向量之间的距离(欧式距离和/或余弦距离)并进行反向传播,采用这种方法将快速模型的训练转化为一种单纯的回归算法,能够最大限度的缩短训练时间,且能够保证训练完成时快速模型输出的准确率。The training device of the fast model does not need to mark the sample images participating in the training when training the fast model, which saves the time and effort required for the marking, and improves the speed of training. At the same time, directly calculate the distance between the feature vector output from the auxiliary model that characterizes the sample image and the feature vector output from the fast model that characterizes the sample image (Euclidean distance and / or cosine distance) and perform back propagation. The method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
在一些实施方式中,快速模型的训练装置还包括:第一比对子模块和第一执行子模块。其中,第一比对子模块用于将特征距离与预设的第一阈值进行比对;第一执行子模块用于当特征距离大于第一阈值时,确认对特征距离进行反向传播。In some embodiments, the rapid model training device further includes: a first comparison submodule and a first execution submodule. The first comparison sub-module is used to compare the feature distance with a preset first threshold; the first execution sub-module is used to confirm back propagation of the feature distance when the feature distance is greater than the first threshold.
在一些实施方式中,快速模型的训练装置还包括:第二执行子模块,用于反复迭代将训练样本图像输入到辅助训练模型和快速模型中,至特征距离小于等于第一阈值时,确认训练样本图像的训练结束。In some embodiments, the rapid model training device further includes: a second execution submodule for repeatedly iteratively inputting the training sample images into the auxiliary training model and the rapid model, and when the feature distance is less than or equal to the first threshold, the training is confirmed The training of the sample image ends.
在一些实施方式中,特征距离包括欧氏距离和/或余弦距离,快速模型的训练装置还包括:第一获取子模块和第二比对子模块。其中,第一获取子模块用于获取辅助训练模型提取的训练样本图像的第一特征向量和快速模型提取的训练样本图像的第二特征向量;第二比对子模块用于比对第一特征向量和第二特征向量的欧氏距离和/或余弦距离。In some embodiments, the feature distance includes the Euclidean distance and / or the cosine distance, and the rapid model training device further includes: a first acquisition submodule and a second comparison submodule. The first acquisition submodule is used to acquire the first feature vector of the training sample image extracted by the auxiliary training model and the second feature vector of the training sample image extracted by the fast model; the second comparison submodule is used to compare the first feature The Euclidean distance and / or cosine distance of the vector and the second feature vector.
在一些实施方式中,快速模型的训练装置还包括:第二获取子模块、第一处理子模块和第三执行子模块。其中,第二获取子模块用于获取目标用户或者目标场景中需要辨识图像的图像信息,其中,图像信息包括各辨识图像的图像类别;第一处理子模块用于根据图像信息中的图像类别对辨识图像进行聚类,以获取目标用户或者目标场景偏好辨识的图像类型;第三执行子模块用于根据图像类型收集训练快速模型的训练样本图像。In some embodiments, the rapid model training device further includes: a second acquisition submodule, a first processing submodule, and a third execution submodule. Among them, the second acquisition submodule is used to acquire image information of the target user or the target scene that needs to be identified, wherein the image information includes the image category of each identified image; the first processing submodule is used to match the image category in the image information Recognize the images and perform clustering to obtain the image type that the target user or target scene prefers to identify; the third execution submodule is used to collect training sample images for training the fast model according to the image type.
在一些实施方式中,快速模型的训练装置还包括:第二处理子模块和第一确认子模块。其中,第二处理子模块用于以图像类型为限定条件在预设的图像数据库中进行检索;第一确认子模块用于将检索召回的图像确认为训练样本图像。In some embodiments, the rapid model training device further includes: a second processing submodule and a first confirmation submodule. Wherein, the second processing sub-module is used for searching in a preset image database with the image type as the limiting condition; the first confirmation sub-module is used for confirming the image recalled by the retrieval as the training sample image.
在一些实施方式中,快速模型的训练装置还包括:第三处理子模块、第一提取子模块、第一计算子模块和第四执行子模块。其中,第三处理子模块用于对原始样本图像进行图像处理,生成派生于原始样本图像的派生样本图像;第一提取子模块用于提取原始样本图像的特征向量和派生样本图像的特征向量;第一计算子模块用于计算原始样本图像的特征向量和派生样本图像的特征向量之间的特征差值;第四执行子模块用于当特征差值小于等于预设的第二阈值时,确认原始样本图像和派生样本图像为训练样本图像。In some embodiments, the rapid model training device further includes: a third processing submodule, a first extraction submodule, a first calculation submodule, and a fourth execution submodule. Among them, the third processing sub-module is used to perform image processing on the original sample image to generate a derived sample image derived from the original sample image; the first extraction sub-module is used to extract the feature vector of the original sample image and the feature vector of the derived sample image; The first calculation submodule is used to calculate the feature difference between the feature vector of the original sample image and the feature vector of the derived sample image; the fourth execution submodule is used to confirm when the feature difference is less than or equal to the preset second threshold The original sample image and the derived sample image are training sample images.
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图8,图8为本实施例计算机设备基本结构框图。To solve the above technical problems, embodiments of the present application also provide computer equipment. For details, please refer to FIG. 8, which is a block diagram of the basic structure of the computer device of this embodiment.
如图8所示,计算机设备的内部结构示意图。该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种快速模型的训练方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种快速模型的训练方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。As shown in FIG. 8, a schematic diagram of the internal structure of the computer device. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus. The non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor may implement a A fast model training method. The processor of the computer device is used to provide calculation and control capabilities, and support the operation of the entire computer device. The memory of the computer device may store computer readable instructions. When the computer readable instructions are executed by the processor, the processor may cause the processor to execute a rapid model training method. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art may understand that the structure shown in FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
本实施方式中处理器用于执行图7中获取模块2100、处理模块2200、计算模块2300和执行模块2400的具体功能,存储器存储有执行上述模块所需的程序代码和各类数据。网络接口用于向用户终端或服务器之间的数据传输。本实施方式中的存储器存储有人脸图像关键点检测装置中执行所有子模块所需的程序代码及数据,服务器能够调用服务器的程序代码及数据执行所有子模块的功能。In this embodiment, the processor is used to perform specific functions of the acquisition module 2100, the processing module 2200, the calculation module 2300, and the execution module 2400 in FIG. 7, and the memory stores program codes and various types of data required to execute the above modules. The network interface is used for data transmission between user terminals or servers. The memory in this embodiment stores the program codes and data required to execute all submodules in the face image key point detection device, and the server can call the server program codes and data to execute the functions of all submodules.
计算机设备通过在对快速模型进行训练时,无需对参与训练的样本图像进行标记,节约了标记所需要的时间和花费的精力,提高了训练的速度。同时,直接计算辅助模型输出的表征样本图像特征的特征向量,与快速模型输出的表征样本图像特征的特征向量之间的距离(欧式距离和/或余弦距离)并进行反向传播,采用这种方法将快速模型的训练转化为一种单纯的回归算法,能够最大限度的缩短训练时间,且能够保证训练完成时快速模型输出的准确率。The computer equipment does not need to mark the sample images participating in the training when training the fast model, which saves the time and effort required for the marking and increases the training speed. At the same time, directly calculate the distance between the feature vector output from the auxiliary model that characterizes the sample image and the feature vector output from the fast model that characterizes the sample image (Euclidean distance and / or cosine distance) and perform back propagation. The method transforms the training of the fast model into a simple regression algorithm, which can shorten the training time to the maximum extent, and can guarantee the accuracy rate of the fast model output when the training is completed.
本申请还提供一种存储有计算机可读指令的存储介质,计算机可读指令被一个或 多个处理器执行时,使得一个或多个处理器执行上述任一实施例快速模型的训练方法的步骤。The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the rapid model training method in any of the foregoing embodiments .
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。A person of ordinary skill in the art may understand that all or part of the processes in the method of the above embodiments may be completed by instructing relevant hardware through a computer program. The computer program may be stored in a computer-readable storage medium. When executed, it may include the processes of the foregoing method embodiments. Wherein, the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Claims (20)

  1. 一种快速模型的训练方法,包括:A fast model training method, including:
    获取预设的训练样本图像;Obtain preset training sample images;
    将所述训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,所述辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,所述快速模型为待训练的神经网络模型;The training sample image is input into a preset auxiliary training model and an initial fast model, wherein the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast model is The neural network model to be trained;
    计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离;Calculating the feature distance between the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the rapid model;
    通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数。By backpropagating the feature distance, the weight parameters in the fast model are corrected.
  2. 根据权利要求1所述的快速模型的训练方法,所述通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数之前还包括:The method for training a fast model according to claim 1, before the backpropagating the feature distance to correct the weight parameter in the fast model further includes:
    将所述特征距离与预设的第一阈值进行比对;Compare the feature distance with a preset first threshold;
    当所述特征距离大于所述第一阈值时,确认对所述特征距离进行反向传播。When the feature distance is greater than the first threshold, it is confirmed that the feature distance is back propagated.
  3. 根据权利要求2所述的快速模型的训练方法,所述通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数之后还包括:The method for training a fast model according to claim 2, after correcting the weight parameter in the fast model by backpropagating the feature distance, further comprising:
    反复迭代将所述训练样本图像输入到所述辅助训练模型和所述快速模型中,至所述特征距离小于等于所述第一阈值时,确认所述训练样本图像的训练结束。Iteratively and iteratively input the training sample image into the auxiliary training model and the rapid model, and when the feature distance is less than or equal to the first threshold, confirm that the training of the training sample image is completed.
  4. 根据权利要求1所述的快速模型的训练方法,所述特征距离包括欧氏距离和/或余弦距离,所述计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离包括:The method for training a fast model according to claim 1, wherein the feature distance includes an Euclidean distance and / or a cosine distance, and calculating the feature vector of the training sample image extracted by the auxiliary training model and the extracted by the fast model The feature distance between feature vectors of the training sample image includes:
    获取所述辅助训练模型提取的所述训练样本图像的第一特征向量和所述快速模型提取的所述训练样本图像的第二特征向量;Acquiring a first feature vector of the training sample image extracted by the auxiliary training model and a second feature vector of the training sample image extracted by the fast model;
    比对所述第一特征向量和所述第二特征向量的欧氏距离和/或余弦距离。Compare the Euclidean distance and / or the cosine distance of the first feature vector and the second feature vector.
  5. 根据权利要求1所述的快速模型的训练方法,所述获取预设的训练样本图像之前还包括:According to the rapid model training method of claim 1, before acquiring the preset training sample image further comprises:
    获取目标用户或者目标场景中需要辨识图像的图像信息,其中,所述图像信息包括各辨识图像的图像类别;Acquiring image information of a target user or a target scene that needs to be identified, wherein the image information includes the image category of each identified image;
    根据所述图像信息中的图像类别对辨识图像进行聚类,以获取所述目标用户或者目标场景偏好辨识的图像类型;Clustering the identified images according to the image category in the image information to obtain the image type that the target user or target scene prefers to identify;
    根据所述图像类型收集训练快速模型的训练样本图像。Collect training sample images of the training fast model according to the image type.
  6. 根据权利要求5所述的快速模型的训练方法,所述根据所述图像类型收集训练快速模型的训练样本图像包括:The method for training a rapid model according to claim 5, the collecting the training sample images for training the rapid model according to the image type includes:
    以所述图像类型为限定条件在预设的图像数据库中进行检索;Search in a preset image database using the image type as a limiting condition;
    将检索召回的图像确认为所述训练样本图像。The image recalled by the retrieval is confirmed as the training sample image.
  7. 根据权利要求6所述的快速模型的训练方法,所述训练样本图像包括原始样本图像和派生样本图像,所述将检索召回的图像确认为所述训练样本图像之后还包括:The rapid model training method according to claim 6, wherein the training sample image includes an original sample image and a derived sample image, and after confirming the retrieved image as the training sample image, the method further includes:
    对所述原始样本图像进行图像处理,生成派生于所述原始样本图像的派生样本图像;Performing image processing on the original sample image to generate a derived sample image derived from the original sample image;
    提取所述原始样本图像的特征向量和所述派生样本图像的特征向量;Extract the feature vector of the original sample image and the feature vector of the derived sample image;
    计算所述原始样本图像的特征向量和所述派生样本图像的特征向量之间的特征差值;Calculating the feature difference between the feature vector of the original sample image and the feature vector of the derived sample image;
    当所述特征差值小于等于预设的第二阈值时,确认所述原始样本图像和派生样本图像为所述训练样本图像。When the feature difference value is less than or equal to a preset second threshold, it is confirmed that the original sample image and the derived sample image are the training sample image.
  8. 一种快速模型的训练装置,包括:A rapid model training device, including:
    获取模块,用于获取预设的训练样本图像;The acquisition module is used to acquire preset training sample images;
    处理模块,用于将所述训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,所述辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,所述快速模型为待训练的神经网络模型;A processing module, configured to input the training sample image into a preset auxiliary training model and an initial fast model, wherein the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, The fast model is a neural network model to be trained;
    计算模块,用于计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离;A calculation module, configured to calculate the feature distance between the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the rapid model;
    执行模块,用于通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数。An execution module is used to correct the weight parameters in the fast model by backpropagating the feature distance.
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种快速模型的训练方法,所述方法包括如下步骤:A computer device includes a memory and a processor, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes a fast model training method, The method includes the following steps:
    获取预设的训练样本图像;Obtain preset training sample images;
    将所述训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,所述辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,所述快速模型为待训练的神经网络模型;The training sample image is input into a preset auxiliary training model and an initial fast model, wherein the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast model is The neural network model to be trained;
    计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离;Calculating the feature distance between the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the rapid model;
    通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数。By backpropagating the feature distance, the weight parameters in the fast model are corrected.
  10. 根据权利要求9所述的计算机设备,所述通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数之前还包括:The computer device according to claim 9, before the backpropagating the feature distance to correct the weight parameter in the fast model further comprises:
    将所述特征距离与预设的第一阈值进行比对;Compare the feature distance with a preset first threshold;
    当所述特征距离大于所述第一阈值时,确认对所述特征距离进行反向传播。When the feature distance is greater than the first threshold, it is confirmed that the feature distance is back propagated.
  11. 根据权利要求10所述的计算机设备,所述通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数之后还包括:The computer device according to claim 10, wherein after backpropagating the feature distance to correct the weight parameter in the fast model, the method further comprises:
    反复迭代将所述训练样本图像输入到所述辅助训练模型和所述快速模型中,至所述特征距离小于等于所述第一阈值时,确认所述训练样本图像的训练结束。Iteratively and iteratively input the training sample image into the auxiliary training model and the rapid model, and when the feature distance is less than or equal to the first threshold, confirm that the training of the training sample image is completed.
  12. 根据权利要求9所述的计算机设备,所述特征距离包括欧氏距离和/或余弦距离,所述计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离包括:The computer device according to claim 9, wherein the feature distance includes an Euclidean distance and / or a cosine distance, and calculating the feature vector of the training sample image extracted by the auxiliary training model and the training sample image extracted by the rapid model The feature distance between the feature vectors of includes:
    获取所述辅助训练模型提取的所述训练样本图像的第一特征向量和所述快速模型提取的所述训练样本图像的第二特征向量;Acquiring a first feature vector of the training sample image extracted by the auxiliary training model and a second feature vector of the training sample image extracted by the fast model;
    比对所述第一特征向量和所述第二特征向量的欧氏距离和/或余弦距离。Compare the Euclidean distance and / or the cosine distance of the first feature vector and the second feature vector.
  13. 根据权利要求9所述的计算机设备,所述获取预设的训练样本图像之前还包括:The computer device according to claim 9, before the acquiring the preset training sample image further comprises:
    获取目标用户或者目标场景中需要辨识图像的图像信息,其中,所述图像信息包括各辨识图像的图像类别;Acquiring image information of a target user or a target scene that needs to be identified, wherein the image information includes the image category of each identified image;
    根据所述图像信息中的图像类别对辨识图像进行聚类,以获取所述目标用户或者目标场景偏好辨识的图像类型;Clustering the identified images according to the image category in the image information to obtain the image type that the target user or target scene prefers to identify;
    根据所述图像类型收集训练快速模型的训练样本图像。Collect training sample images of the training fast model according to the image type.
  14. 根据权利要求13所述的计算机设备,所述根据所述图像类型收集训练快速模型的训练样本图像包括:The computer device according to claim 13, the collecting training sample images of the training fast model according to the image type comprises:
    以所述图像类型为限定条件在预设的图像数据库中进行检索;Search in a preset image database using the image type as a limiting condition;
    将检索召回的图像确认为所述训练样本图像。The image recalled by the retrieval is confirmed as the training sample image.
  15. 根据权利要求14所述的计算机设备,所述训练样本图像包括原始样本图像和派生样本图像,所述将检索召回的图像确认为所述训练样本图像之后还包括:The computer device according to claim 14, wherein the training sample image includes an original sample image and a derived sample image, and after confirming the retrieved image as the training sample image, further includes:
    对所述原始样本图像进行图像处理,生成派生于所述原始样本图像的派生样本图像;Performing image processing on the original sample image to generate a derived sample image derived from the original sample image;
    提取所述原始样本图像的特征向量和所述派生样本图像的特征向量;Extract the feature vector of the original sample image and the feature vector of the derived sample image;
    计算所述原始样本图像的特征向量和所述派生样本图像的特征向量之间的特征差值;Calculating the feature difference between the feature vector of the original sample image and the feature vector of the derived sample image;
    当所述特征差值小于等于预设的第二阈值时,确认所述原始样本图像和派生样本 图像为所述训练样本图像。When the feature difference value is less than or equal to a preset second threshold, it is confirmed that the original sample image and the derived sample image are the training sample images.
  16. 一种存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种快速模型的训练方法,所述方法包括以下步骤:A non-volatile storage medium storing computer-readable instructions, which when executed by one or more processors, causes the one or more processors to execute a rapid model training method, The method includes the following steps:
    获取预设的训练样本图像;Obtain preset training sample images;
    将所述训练样本图像输入到预设的辅助训练模型和初始的快速模型中,其中,所述辅助训练模型为预先训练至收敛状态用于提取图像特征向量的神经网络模型,所述快速模型为待训练的神经网络模型;The training sample image is input into a preset auxiliary training model and an initial fast model, wherein the auxiliary training model is a neural network model that is pre-trained to a convergence state for extracting image feature vectors, and the fast model is The neural network model to be trained;
    计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离;Calculating the feature distance between the feature vector of the training sample image extracted by the auxiliary training model and the feature vector of the training sample image extracted by the rapid model;
    通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数。By backpropagating the feature distance, the weight parameters in the fast model are corrected.
  17. 根据权利要求16所述的非易失性存储介质,所述通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数之前还包括:The non-volatile storage medium according to claim 16, before the backpropagating the characteristic distance to correct the weight parameter in the fast model further includes:
    将所述特征距离与预设的第一阈值进行比对;Compare the feature distance with a preset first threshold;
    当所述特征距离大于所述第一阈值时,确认对所述特征距离进行反向传播。When the feature distance is greater than the first threshold, it is confirmed that the feature distance is back propagated.
  18. 根据权利要求17所述的非易失性存储介质,所述通过对所述特征距离进行反向传播,以校正所述快速模型中的权重参数之后还包括:The non-volatile storage medium according to claim 17, after the back propagation of the characteristic distance to correct the weight parameter in the fast model, further comprising:
    反复迭代将所述训练样本图像输入到所述辅助训练模型和所述快速模型中,至所述特征距离小于等于所述第一阈值时,确认所述训练样本图像的训练结束。Iteratively and iteratively input the training sample image into the auxiliary training model and the rapid model, and when the feature distance is less than or equal to the first threshold, confirm that the training of the training sample image is completed.
  19. 根据权利要求16所述的非易失性存储介质,所述特征距离包括欧氏距离和/或余弦距离,所述计算所述辅助训练模型提取的训练样本图像的特征向量与所述快速模型提取的训练样本图像的特征向量之间的特征距离包括:The non-volatile storage medium according to claim 16, wherein the feature distance includes an Euclidean distance and / or a cosine distance, and calculating the feature vector of the training sample image extracted by the auxiliary training model and the fast model extraction The feature distances between the feature vectors of the training sample images include:
    获取所述辅助训练模型提取的所述训练样本图像的第一特征向量和所述快速模型提取的所述训练样本图像的第二特征向量;Acquiring a first feature vector of the training sample image extracted by the auxiliary training model and a second feature vector of the training sample image extracted by the fast model;
    比对所述第一特征向量和所述第二特征向量的欧氏距离和/或余弦距离。Compare the Euclidean distance and / or the cosine distance of the first feature vector and the second feature vector.
  20. 根据权利要求16所述的非易失性存储介质,所述获取预设的训练样本图像之前还包括:The non-volatile storage medium according to claim 16, before the acquiring the preset training sample image further comprises:
    获取目标用户或者目标场景中需要辨识图像的图像信息,其中,所述图像信息包括各辨识图像的图像类别;Acquiring image information of a target user or a target scene that needs to be identified, wherein the image information includes the image category of each identified image;
    根据所述图像信息中的图像类别对辨识图像进行聚类,以获取所述目标用户或者目标场景偏好辨识的图像类型;Clustering the identified images according to the image category in the image information to obtain the image type that the target user or target scene prefers to identify;
    根据所述图像类型收集训练快速模型的训练样本图像。Collect training sample images of the training fast model according to the image type.
PCT/CN2018/125592 2018-11-13 2018-12-29 Method and device for training fast model, computer apparatus, and storage medium WO2020098121A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811348231.6 2018-11-13
CN201811348231.6A CN109614989B (en) 2018-11-13 2018-11-13 Training method and device for rapid model, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020098121A1 true WO2020098121A1 (en) 2020-05-22

Family

ID=66003861

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/125592 WO2020098121A1 (en) 2018-11-13 2018-12-29 Method and device for training fast model, computer apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN109614989B (en)
WO (1) WO2020098121A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680754A (en) * 2020-06-11 2020-09-18 北京字节跳动网络技术有限公司 Image classification method and device, electronic equipment and computer-readable storage medium
CN111881757A (en) * 2020-06-29 2020-11-03 浪潮电子信息产业股份有限公司 Pedestrian re-identification method, device, equipment and medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112348177B (en) * 2019-07-05 2024-01-09 安徽寒武纪信息科技有限公司 Neural network model verification method, device, computer equipment and storage medium
CN111209567B (en) * 2019-12-30 2022-05-03 北京邮电大学 Method and device for judging perceptibility of improving robustness of detection model
CN111368644B (en) * 2020-02-14 2024-01-05 深圳市商汤科技有限公司 Image processing method, device, electronic equipment and storage medium
CN111291841B (en) * 2020-05-13 2020-08-21 腾讯科技(深圳)有限公司 Image recognition model training method and device, computer equipment and storage medium
CN112529040A (en) * 2020-11-16 2021-03-19 深圳壹账通智能科技有限公司 Model generation method and device, electronic equipment and medium
CN112381028A (en) * 2020-11-23 2021-02-19 苏州极目机器人科技有限公司 Target feature detection method and device
CN113065495B (en) * 2021-04-13 2023-07-14 深圳技术大学 Image similarity calculation method, target object re-recognition method and system
CN113139609B (en) * 2021-04-29 2023-12-29 国网甘肃省电力公司白银供电公司 Model correction method and device based on closed loop feedback and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150170020A1 (en) * 2013-12-13 2015-06-18 Amazon Technologies, Inc. Reducing dynamic range of low-rank decomposition matrices
CN107247989A (en) * 2017-06-15 2017-10-13 北京图森未来科技有限公司 A kind of neural network training method and device
CN108133238A (en) * 2017-12-29 2018-06-08 国信优易数据有限公司 A kind of human face recognition model training method and device and face identification method and device
CN108182394A (en) * 2017-12-22 2018-06-19 浙江大华技术股份有限公司 Training method, face identification method and the device of convolutional neural networks

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10713540B2 (en) * 2017-03-07 2020-07-14 Board Of Trustees Of Michigan State University Deep learning system for recognizing pills in images
US20180268292A1 (en) * 2017-03-17 2018-09-20 Nec Laboratories America, Inc. Learning efficient object detection models with knowledge distillation
CN108734146A (en) * 2018-05-28 2018-11-02 北京达佳互联信息技术有限公司 Facial image Age estimation method, apparatus, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150170020A1 (en) * 2013-12-13 2015-06-18 Amazon Technologies, Inc. Reducing dynamic range of low-rank decomposition matrices
CN107247989A (en) * 2017-06-15 2017-10-13 北京图森未来科技有限公司 A kind of neural network training method and device
CN108182394A (en) * 2017-12-22 2018-06-19 浙江大华技术股份有限公司 Training method, face identification method and the device of convolutional neural networks
CN108133238A (en) * 2017-12-29 2018-06-08 国信优易数据有限公司 A kind of human face recognition model training method and device and face identification method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680754A (en) * 2020-06-11 2020-09-18 北京字节跳动网络技术有限公司 Image classification method and device, electronic equipment and computer-readable storage medium
CN111680754B (en) * 2020-06-11 2023-09-19 抖音视界有限公司 Image classification method, device, electronic equipment and computer readable storage medium
CN111881757A (en) * 2020-06-29 2020-11-03 浪潮电子信息产业股份有限公司 Pedestrian re-identification method, device, equipment and medium
CN111881757B (en) * 2020-06-29 2023-09-01 浪潮电子信息产业股份有限公司 Pedestrian re-identification method, device, equipment and medium

Also Published As

Publication number Publication date
CN109614989A (en) 2019-04-12
CN109614989B (en) 2024-06-04

Similar Documents

Publication Publication Date Title
WO2020098121A1 (en) Method and device for training fast model, computer apparatus, and storage medium
CN111368893B (en) Image recognition method, device, electronic equipment and storage medium
WO2020177282A1 (en) Machine dialogue method and apparatus, computer device, and storage medium
US11763164B2 (en) Image-to-image search method, computer-readable storage medium and server
US11238310B2 (en) Training data acquisition method and device, server and storage medium
US20220358742A1 (en) Insect identification method and system
WO2020119350A1 (en) Video classification method and apparatus, and computer device and storage medium
WO2020114022A1 (en) Knowledge base alignment method and apparatus, computer device and storage medium
US20170235730A1 (en) System and method for providing sequentially relevant content
US10291767B2 (en) Information presentation method and device
CN110633669B (en) Mobile terminal face attribute identification method based on deep learning in home environment
CN113434716B (en) Cross-modal information retrieval method and device
CN108734146A (en) Facial image Age estimation method, apparatus, computer equipment and storage medium
US10380267B2 (en) System and method for tagging multimedia content elements
CN113806588B (en) Method and device for searching video
CN108446688B (en) Face image gender judgment method and device, computer equipment and storage medium
CN114550053A (en) Traffic accident responsibility determination method, device, computer equipment and storage medium
CN103440243A (en) Teaching resource recommendation method and device thereof
CN113140012A (en) Image processing method, image processing apparatus, image processing medium, and electronic device
CN112766284A (en) Image recognition method and device, storage medium and electronic equipment
US11032017B2 (en) System and method for identifying the context of multimedia content elements
CN114140723B (en) Multimedia data identification method and device, readable medium and electronic equipment
KR20240099381A (en) Video screening using a machine learning video screening model trained using self-supervised training
CN115599953A (en) Training method and retrieval method of video text retrieval model and related equipment
WO2020151318A1 (en) Corpus construction method and apparatus based on crawler model, and computer device

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: 18940006

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 20.08.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18940006

Country of ref document: EP

Kind code of ref document: A1