WO2021000956A1 - 一种智能模型的升级方法及装置 - Google Patents
一种智能模型的升级方法及装置 Download PDFInfo
- Publication number
- WO2021000956A1 WO2021000956A1 PCT/CN2020/100250 CN2020100250W WO2021000956A1 WO 2021000956 A1 WO2021000956 A1 WO 2021000956A1 CN 2020100250 W CN2020100250 W CN 2020100250W WO 2021000956 A1 WO2021000956 A1 WO 2021000956A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- model
- output data
- environment
- sample data
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F18/2148—Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the process organisation or structure, e.g. boosting cascade
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/217—Validation; Performance evaluation; Active pattern learning techniques
- G06F18/2178—Validation; Performance evaluation; Active pattern learning techniques based on feedback of a supervisor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V10/443—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
- G06V10/449—Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
- G06V10/451—Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
- G06V10/454—Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V10/7747—Organisation of the process, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/778—Active pattern-learning, e.g. online learning of image or video features
- G06V10/7784—Active pattern-learning, e.g. online learning of image or video features based on feedback from supervisors
- G06V10/7788—Active pattern-learning, e.g. online learning of image or video features based on feedback from supervisors the supervisor being a human, e.g. interactive learning with a human teacher
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/58—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
Definitions
- This application relates to the field of intelligent analysis, and in particular to a method and device for upgrading an intelligent model.
- the intelligent model is obtained by training the deep learning algorithm.
- the vehicle detection model is obtained by training a deep learning algorithm through a large number of training samples.
- the training samples include two types.
- One type of training samples includes vehicle images and manually labeled annotation information.
- the annotation information can be "Yes”
- Another type of training sample includes non-vehicle images and manually labeled annotation information, which can be "No".
- the trained vehicle detection model can detect whether the image taken by the camera includes a vehicle image.
- the training samples used to train the vehicle detection model are the training samples in the first environment.
- the vehicle detection model detects whether the image taken by the camera includes a vehicle image. Higher performance results in higher accuracy of vehicle detection models for detecting vehicle images.
- the vehicle detection model may not detect the vehicle image, which reduces the scene generalization performance of the vehicle detection model, resulting in detection The accuracy of vehicle images will also decrease.
- This application provides a method and device for upgrading an intelligent model to improve the scene generalization performance of the intelligent model.
- the technical solution is as follows:
- this application provides a method for upgrading a smart model, applied to a first device, and the method includes:
- the first environment is different from the second environment of the first intelligent model to be upgraded, and the first intelligent model is trained based on the first sample data belonging to the second environment owned;
- the training the first intelligent model to obtain the second intelligent model according to the first sample data and the output data includes:
- labeling information is set in the input data corresponding to the output data to obtain second sample data belonging to the first environment, and the labeling information is used to indicate whether the target in the input data is a real target ;
- the first device setting label information in input data corresponding to the output data according to the output data includes:
- label information is set in the input data corresponding to the selected output data.
- the method further includes:
- the second sample data is displayed, and when a correction operation performed by the user on the annotation information in the second sample data is detected, the annotation information is corrected according to the correction operation.
- the training the first intelligent model to obtain the second intelligent model according to the second sample data and the first sample data includes:
- the method before inputting the input data into the first smart model, the method further includes:
- the method further includes:
- this application provides a device for upgrading a smart model, the device comprising:
- the first acquisition module is configured to acquire input data belonging to a first environment, and the first environment is different from the second environment to which the first intelligent model to be upgraded is applied.
- the first intelligent model is based on the second environment belonging to the second environment.
- the first sample data of the environment is obtained through training;
- the second acquiring module is configured to input the input data into the first smart model, and acquire output data corresponding to the input data that the first smart model processes the input data and outputs, the output data Including confidence and target frame information;
- the training module is configured to train the first intelligent model according to the first sample data and the output data to obtain a second intelligent model.
- the training module includes:
- the setting unit is configured to set label information in the input data corresponding to the output data according to the output data to obtain second sample data belonging to the first environment, and the label information is used to indicate the content in the input data Whether the target is a real target;
- the training unit is configured to train the first intelligent model according to the second sample data and the first sample data to obtain a second intelligent model.
- the setting unit is used to:
- label information is set in the input data corresponding to the selected output data.
- the device further includes:
- the correction module is configured to display the second sample data, and when a correction operation performed by the user on the label information in the second sample data is detected, correct the label information according to the correction operation.
- the training unit is used for:
- the device further includes:
- the receiving module is configured to receive input data belonging to the first environment sent by the second device, and the input data is collected by the second device.
- the device further includes:
- the sending module is configured to send the second smart model to a second device, so that the second device upgrades the first smart model installed in the second device to the second smart model.
- this application provides an electronic device, including:
- a memory for storing executable instructions of the processor
- the processor is used to execute the executable instructions to implement the instructions of the smart model upgrade method.
- this application provides a computer-readable storage medium for storing a computer program that is loaded and executed by a processor to implement the instructions of the above-mentioned intelligent model upgrade method.
- the first intelligent model is obtained by processing the input data belonging to the first environment to output output data, and the first intelligent model is trained according to the first sample data and each output data to obtain the second intelligent model.
- the second intelligent model is suitable for the first environment, and the scene generalization performance of the second intelligent model is improved.
- FIG. 1 is a flowchart of a method for upgrading an intelligent model provided by an embodiment of the present application
- FIG. 2 is a flowchart of another intelligent model upgrade method provided by an embodiment of the present application.
- FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of the present application.
- FIG. 4 is a schematic diagram of another system architecture provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a device for upgrading an intelligent model provided by an embodiment of the present application
- FIG. 6 is a schematic diagram of a terminal structure provided by an embodiment of the present application.
- Intelligent models are obtained by training machine learning algorithms.
- the machine learning algorithm may be an algorithm such as a deep learning algorithm, for example, may be a convolutional neural grid.
- the smart model for example, the smart model may be at least one of a vehicle detection model or an object detection model.
- the first sample data belonging to the second environment is usually used to train the deep learning algorithm, so that the trained intelligent model can process the input data belonging to the second environment.
- the first example takes training a vehicle detection model as an example. It is assumed that the input data belonging to the second environment are images collected in 2018, so the trained vehicle detection model is used to detect vehicle images that have appeared in the market in 2018.
- the vehicle detection model is obtained by training the deep learning algorithm using the first sample data belonging to the second environment.
- the second environment is the vehicles that have appeared in the market in 2018.
- the first sample data is image data, including two types. One type of first sample data includes vehicle images and label information of vehicles that have appeared in the market in 2018. The label information can be "Yes". The vehicle images in the data are manually annotated.
- Another type of first sample data includes images that are non-vehicle images, and the included annotation information may be "No", and another type of first sample data includes images that may be at least one of building images or animal images, etc.
- One. Using the first sample data to train the machine learning algorithm can obtain a vehicle detection model for detecting vehicle images.
- the second example still takes training a vehicle detection model as an example.
- the input data belonging to the second environment are images collected during the day, that is, the second environment is a daytime environment, so the trained vehicle detection model is used to detect vehicles during the day image.
- the vehicle detection model is obtained by training the deep learning algorithm using the first sample data belonging to the second environment.
- the first sample data is image data, including two types.
- One type of first sample data includes vehicle images taken during the day and label information.
- the label information can be "Yes". In this type of first sample data,
- the vehicle image is manually annotated.
- Another type of first sample data includes images that are non-vehicle images, and the included annotation information may be "No", and another type of first sample data includes images that may be at least one of building images or animal images, etc.
- One. Using the first sample data to train the machine learning algorithm can obtain a vehicle detection model for detecting vehicle images during the day.
- the camera When the camera is installed with the vehicle detection model, the camera captures an image, and the captured image is input to the vehicle detection model as the input data of the second environment.
- the vehicle detection model processes the input data to obtain output data corresponding to the input data.
- the output data may include content such as confidence and target frame information.
- the target frame information includes target frame position and target frame size. Based on the confidence level, it can be determined whether the image in the target frame corresponding to the target frame information in the input data is a vehicle image.
- the smart model is used to process the input data belonging to the second environment, sometimes the smart model is used to process the data belonging to the new environment.
- the new environment is called the first environment, that is, the smart model is applied to the first environment. Environment.
- the performance of the smart model may be reduced, resulting in that when the smart model processes input data belonging to the first environment, the accuracy of the processing results output by the smart model may be reduced.
- the vehicle detection model trained in 2018 will continue to be used in 2020 to detect vehicle images of vehicles that have already appeared on the market in 2020.
- the vehicle detection model may not be able to detect the vehicle image of the new model, the performance of the vehicle detection model will decrease, and the accuracy of the vehicle detection model in detecting vehicle images will also decrease.
- the first environment is the vehicles that have appeared in the market in 2020
- the vehicle detection model when the vehicle detection model continues to be used at night to detect vehicle images of the vehicle, the second environment to which the first sample data for training the vehicle detection model belongs is the daytime environment Therefore, the vehicle detection model may not be able to detect the vehicle image of the vehicle type in the dark, and the performance of the vehicle detection model will decrease, and the accuracy of the vehicle detection model in detecting the vehicle image will also decrease.
- the dark night environment is the first environment.
- this application can automatically upgrade the smart model through any of the following embodiments, so that when the upgraded smart model can be applied to the first environment, there will be no performance degradation.
- the input data of the first environment is processed to improve the accuracy of processing the input data of the first environment.
- an embodiment of the present application provides a method for upgrading a smart model.
- the method for upgrading may be online or offline, and is applied to the first device.
- the method includes:
- Step 101 Obtain input data belonging to the first environment.
- the first environment is different from the second environment of the first intelligent model to be upgraded.
- the first intelligent model is obtained by training based on the first sample data belonging to the second environment.
- Step 102 Input the input data to the first smart model, and obtain output data corresponding to the input data that the first smart model processes the input data to output, and the output data includes confidence and target frame information.
- the output data further includes category information, for example, the category information is vehicles, buildings, commodities, or animals.
- Step 103 Train a first intelligent model according to the first sample data and the output data to obtain a second intelligent model.
- the output data of the first intelligent model for processing input data belonging to the first environment is obtained, and the first intelligent model is trained according to the first sample data and each output data to obtain the second intelligent model.
- the second intelligent model is suitable for the first environment, and the scene generalization performance of the second intelligent model is improved.
- an embodiment of the present application provides a method for upgrading a smart model, and the method for upgrading may be an online upgrade or an offline upgrade.
- the method includes:
- Step 201 The first device obtains at least one piece of input data belonging to a first environment.
- the first environment is different from the second environment of the first intelligent model to be upgraded.
- the first intelligent model is based on the first sample data belonging to the second environment Obtained by training machine learning algorithms.
- the first device can be a camera, a server, a desktop computer or a tablet computer, etc.
- the first device may be installed with the first smart model, and the first device may form a network with other devices, or may not form a network with other devices.
- the first device may form a network with at least one second device, and the second device may be installed with the first smart model.
- the first device and the second device may be devices such as cameras.
- the first device may collect at least one piece of input data belonging to the first environment.
- the first device and the second device form a network
- the first device may also receive at least one piece of input data belonging to the first environment collected by the second device.
- the input data collected by the first device is image data
- the input data collected by the second device is image data.
- a network composed of a management device and at least one end device.
- the management device may be a server, a desktop computer, or a tablet computer, etc., and the first smart model may be stored therein.
- the end device may be a camera, etc., in which the first smart model is installed.
- the first device may be a certain end device, or may be a management device.
- the second device is at least one end device, the second device collects input data of the first environment, sends the input data to the first device, and the first device receives the input data.
- the first device is a certain end device, the second device can be another end device, and the first device can collect input data or receive input data sent by the second device.
- the input data can be image data or the like.
- the first smart model to be upgraded is the vehicle detection model used to detect vehicle images.
- the first smart model is the smart model trained in 2018.
- the first device to install the vehicle detection model is The first camera, that is to say, the input data belonging to the second environment is the image taken by the first camera in 2018.
- the vehicle detection model will continue to be used in 2020 to detect vehicle images of vehicles that have appeared on the market in 2020. That is to say, the input data belonging to the first environment is the image taken by the first camera in 2020.
- the first camera captures image data including vehicle images appearing on the market in 2020. At this time, the image data captured by the first camera is input data belonging to the first environment.
- the second camera captures image data including images of vehicles appearing in the market in 2020, and then sends the captured image data to the first camera.
- the first camera receives the image data and combines it with the image data taken by itself to form multiple input data belonging to the first environment.
- the first smart model to be upgraded is still the vehicle detection model used to detect vehicle images
- the second environment to which the first sample data of the training first smart model belongs is the daytime environment.
- the first device of the vehicle detection model is the first camera, that is to say, the input data belonging to the second environment is the image taken by the first camera during the day.
- the vehicle model detection model in the dark night for the vehicle image of the vehicle, which means that the input data belonging to the first environment is the image taken by the first camera in the dark night.
- the first camera captures the image data including the vehicle image in the dark. At this time, the image data captured by the first camera is the input data belonging to the first environment, and the first environment is the dark night environment.
- the second camera captures image data including vehicle images in the dark, and then sends the captured image data to the first camera.
- the first camera receives the image data and combines it with the image data taken by itself to form multiple input data belonging to the first environment.
- Step 202 The first device inputs the multiple input data to the first smart model, and obtains the output data corresponding to each input data output by the first smart model for processing each input data, and the output data includes at least the confidence and Target box information.
- the first smart model For each input data input to the first smart model, the first smart model processes the input data and outputs the output data corresponding to the input data.
- the output data is essentially obtained by the first smart model processing the input data process result.
- the output data includes confidence and target box information.
- the target frame information may include a target frame position and a target frame size
- the output data may also include at least one feature such as data type, high-level semantic feature, time, location, or description.
- the output data further includes category information, for example, the category information is vehicles, buildings, commodities, or animals.
- Confidence is obtained by the first intelligent model based on high-level semantic features.
- the first camera inputs image data belonging to the first environment to the vehicle detection model, and the vehicle detection model detects each input image data and outputs each image The output data corresponding to the data.
- the output data includes confidence and target frame information
- the target frame information includes target frame position and target frame size.
- a target frame can be determined based on the target frame position and the target frame size.
- the image framed by the target frame is the vehicle image detected by the vehicle detection model.
- the confidence level indicates that the detected vehicle image is a real vehicle. Probability of the image.
- Step 203 For each output data, the first device sets label information for input data corresponding to the output data according to the output data, so as to obtain second sample data belonging to the first environment.
- the labeling information can be "Yes” or “No”, and the labeling information in the second sample data is "Yes”, indicating that the target image framed by the target frame in the second sample data is a real target.
- the label information in the second sample data is "No”, which means that the target image framed by the target frame in the second sample data is not a real target.
- This step can be implemented by the following operations from 2031 to 2033.
- the operations from 2031 to 2033 are:
- the first device calculates a value score of the output data according to the output data, and the value score is used to indicate the suitability of the input data corresponding to the output data as the second sample data.
- An intelligent analysis model for calculating value may be installed in the first device.
- the first device may input the output data to the intelligent analysis model.
- the intelligent analysis model calculates the output data based on the confidence level and target frame information included in the output data. The value score of the output data.
- the intelligent analysis model is obtained by training algorithms such as deep learning algorithms in advance.
- the intelligent analysis model is obtained by training algorithms such as convolutional neural networks in advance. Multiple training samples can be set in advance, and each training sample includes the output data output by the smart module and the value score for manually marking the output data. Input the training sample into the deep learning algorithm, and then start training the deep learning algorithm.
- the training process is:
- the deep learning algorithm calculates the value score of the output data based on the output data, compares the calculated value score with the value score manually labeled on the output data, and obtains the score difference, and adjusts the value of the deep learning algorithm according to the score difference. parameter. Repeat the above training process to train an intelligent analysis model.
- the first device selects output data meeting preset conditions from each output data according to the value score of each output data.
- the first device may select output data with a value score exceeding a preset score threshold from each output data, or the first device may select a preset number of output data with the largest value score from each output data.
- the output data can also be a data category, and the output data can be classified according to the data category included in each output data. For any data category, from the output data corresponding to the data category, a preset number of output data meeting the preset conditions is selected according to the value score of each output data. In this way, the output data of each data category can be selected in a balanced manner.
- the first device For each selected output data, the first device sets label information in the input data corresponding to the output data according to the output data, so as to obtain second sample data belonging to the first environment.
- the output data includes the confidence level and target frame information
- the target frame information may include the target frame position and the target size.
- the target frame information in the output data the target frame is determined in the input data corresponding to the output data. Determine whether the target framed by the target frame is a real target according to the confidence level, and set label information for the target according to the determined result.
- the confidence level exceeds the preset confidence threshold, it can be determined that the target framed by the target box in the input data is the real target, the label information set for the target is "Yes", and the label information "Yes” is used to indicate This goal is a real goal.
- the confidence does not exceed the preset confidence threshold, it can be determined that the target framed by the target box in the input data is not a real target, the label information set for the target is "No", and the label information "No” is used for Indicates that the target is not a real target.
- the input data corresponding to each output data is image data
- the image data is image data taken in 2020.
- a target frame is determined in the image data corresponding to the output data according to the target frame information included in the output data, and whether the target framed by the target frame is a vehicle image is determined according to the confidence level, and whether the determination result is Set label information for the target, and obtain the second sample data in the first environment, that is, obtain the second sample data in 2020.
- the input data corresponding to each output data is image data
- the image data is image data taken at night.
- a target frame is determined in the image data corresponding to the output data according to the target frame information included in the output data, and whether the target framed by the target frame is a vehicle image is determined according to the confidence level, and whether the determination result is Set label information for the target, and obtain the second sample data in the first environment, that is, obtain the second sample data in the dark night environment.
- the label information set in the second sample data may be wrong, that is, the target in the second sample data may not be a real target, but the labeled label information is "Yes", or the target in the second sample data may be real Target, but the marked information is "No".
- the second sample data may be displayed for the user to confirm.
- the user confirms that the label information in the second sample data is incorrect, the user can correct the label information in the second sample data.
- a correction button can also be displayed. If the user finds that the annotation information in the second sample data is incorrect, he can click the modify button to trigger the modification operation. In the case where the label information in the second sample data is "Yes”, the label information in the second sample data is modified to "No". When the label information in the second sample data is "No”, the label information in the second sample data is modified to "Yes”.
- Step 204 The first device trains the first intelligent model according to the first sample data and the second sample data to obtain a second intelligent model.
- the first intelligent model is obtained by training the machine learning algorithm based on the first sample data belonging to the second environment.
- the first sample data is manually labeled, and the first sample data can be saved after the first intelligent model is trained using the first sample data.
- the first sample data can be stored in the server or directly in the first device.
- the first device can download the first sample data from the server, and in the first device for storing the first sample data, the first device can directly obtain the stored first sample data .
- the version number of the first smart model may also be saved, that is, there may be a correspondence between the first sample data and the version number of the first smart model.
- the first sample data corresponding to the version number of the first smart model may be image data, or may be high-level semantic features obtained by converting the image data by the first smart model. Since the corresponding relationship may be installed on different devices along with the first smart model, in order to increase privacy, the first sample data corresponding to the version number of the first smart model in the corresponding relationship is in the form of high-level semantic features exist.
- the corresponding first sample data is queried from the corresponding relationship according to the version number of the first smart model, and the first smart model is trained according to the first sample data and the second sample data of the query to obtain the second smart model. model.
- a version number may be determined, the version number being lower than the version number of the first smart model, and the corresponding first sample data may be queried from the correspondence relationship according to the determined version number.
- the first sample data of the query is input into a conversion model, and the conversion model is used to convert the input first sample data into first sample data corresponding to the version number of the first smart model.
- the first sample data corresponding to the version number of the first smart model output by the conversion model is acquired, and the first smart model is trained according to the acquired first sample data and the second sample data to obtain the second smart model.
- the determined version number is the version number with the smallest difference from the version number of the first intelligent model.
- the conversion model is obtained by training the deep learning algorithm through training data in advance.
- the training data includes sample data corresponding to the first version number and sample data corresponding to the second version number, and the first version number is smaller than the second version number.
- the deep learning algorithm converts the sample data corresponding to the first version number to obtain the sample data corresponding to the second version number.
- the deep learning algorithm adjusts its own parameters according to the sample data corresponding to the converted second version number and the input sample data corresponding to the second version number.
- the deep learning algorithm repeats the above process and continuously adjusts its own parameters.
- the deep learning algorithm obtained after stopping training is the conversion model.
- the first device inputs the first sample data and the second sample data to the first intelligent model, and the first intelligent model is trained according to the first sample data and the second sample data.
- the training process is:
- the first intelligent model uses both the first sample data and the second sample data as sample data. For each sample data, the target in the sample data is detected according to the sample data, and the detected target is compared with the label in the sample data. The information is compared to obtain difference information, and the parameters of the first intelligent model are adjusted according to the difference information. Repeat the above training process to train the second intelligent model.
- the first sample data, the output data corresponding to the second sample data, and the second sample data can be input to the first smart model, so that the first smart model is based on the second sample data and the second sample data.
- the output data and the first sample data train the first intelligent model to obtain the second intelligent model.
- the first device may upgrade the first smart model installed by itself to the second smart model.
- the first device may also send the first smart model to the second device, and the second device may also upgrade the first smart model installed by itself to the second smart model.
- the output data corresponding to the first sample data in 2018, the second sample data in 2020, and the second sample data are input to the first intelligent model, so that the first intelligent model is based on
- the second sample data in 2020, the output data corresponding to the second sample data in 2020, and the first sample data in 2018 train the first intelligent model to obtain the second intelligent model.
- the second intelligent model trained will improve the accuracy of detection when detecting vehicle images of vehicles that have appeared on the market in 2020.
- the first sample data in the daytime environment, the output data corresponding to the second sample data in the dark night environment, and the second sample data in the dark night environment are input to the first intelligent model
- the first intelligent model trains the first intelligent model to obtain the second intelligent model according to the second sample data in the dark night environment, the output data corresponding to the second sample data in the dark night environment, and the first sample data in the daytime environment.
- the trained second intelligent model will improve the accuracy of detection when detecting vehicle images in a dark night environment.
- the first device and each second device can obtain the second intelligent model in the above-mentioned manner.
- the management device and each end device can obtain the second intelligent model in the above-mentioned manner.
- test data can be set in the device in advance.
- the test data includes input data belonging to the first environment and output data corresponding to the input data.
- the device can input input data included in each test data to the second smart model, and obtain output data corresponding to each input data included in each test data output by the second smart model. According to the output data included in each test data and the output data corresponding to the input data included in each test data, the correct rate is obtained.
- the device can send the correct rate to other devices and receive the correct rate sent by other devices.
- the accuracy rate obtained by the device is greater than the accuracy rate sent by each other device, then the installed first smart model is upgraded to the second smart model obtained by itself, and the second smart model obtained by itself is sent to each other device.
- Each other device receives the second smart model, and upgrades the first smart model installed by itself to the received second smart model.
- the correct rate of the device's acquisition is less than the correct rate sent by one or more other devices, then the device receives the second smart model sent by the other device with the highest correct rate, and upgrades the first smart model installed by itself to the received one The second intelligent model.
- the output data that the first intelligent model processes and outputs the input data belonging to the first environment is obtained, and the label information is set in the input data corresponding to each output data according to each output data, and the output data belonging to the first environment is obtained.
- the first intelligent model is trained according to the second sample data and the first sample data to obtain the second intelligent model.
- the second intelligent model is suitable for the first environment, and the performance of the second intelligent model is improved. It can realize the automatic upgrade of the first intelligent model, reduce human resources, improve upgrade efficiency and improve the generalization adaptability of the intelligent model to the environment.
- an embodiment of the present application provides a device for upgrading a smart model
- the device 300 includes:
- the first acquisition module 301 is configured to acquire input data belonging to a first environment, where the first environment is different from the second environment of the first intelligent model to be upgraded, and the first intelligent model is based on belonging to the second environment
- the first sample data of is obtained by training the machine learning algorithm
- the second obtaining module 302 is configured to input the input data into the first smart model, and obtain output data corresponding to the input data that the first smart model processes the input data to output, and the output
- the data includes confidence and target frame information
- the training module 303 is configured to train the first intelligent model according to the first sample data and the output data to obtain a second intelligent model.
- the training module 303 includes:
- the setting unit is configured to set label information in the input data corresponding to the output data according to the output data to obtain second sample data belonging to the first environment, and the label information is used to indicate the content in the input data Whether the target is a real target;
- the training unit is configured to train the first intelligent model according to the second sample data and the first sample data to obtain a second intelligent model.
- the setting unit is used to:
- label information is set in the input data corresponding to the selected output data.
- the device 300 further includes:
- the correction module is configured to display the second sample data, and when a correction operation performed by the user on the label information in the second sample data is detected, correct the label information according to the correction operation.
- the training unit is used for:
- the device 300 further includes:
- the receiving module is configured to receive input data belonging to the first environment sent by the second device, and the input data is collected by the second device.
- the device 300 further includes:
- the sending module is configured to send the second smart model to a second device, so that the second device upgrades the first smart model installed in the second device to the second smart model.
- the second acquisition module acquires the output data that the first intelligent model processes the input data belonging to the first environment, and the training module trains the first intelligent model according to the first sample data and each output data. Get the second intelligent model.
- the second intelligent model is suitable for the first environment, and the scene generalization performance of the second intelligent model is improved.
- Fig. 6 shows a structural block diagram of a terminal 400 provided by an exemplary embodiment of the present invention.
- the terminal 400 may be a portable mobile terminal, such as a tablet computer, a notebook computer, or a desktop computer.
- the terminal 400 includes a processor 401 and a memory 402.
- the processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on.
- the processor 401 may adopt at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array, Programmable Logic Array). achieve.
- the processor 401 may also include a main processor and a coprocessor.
- the main processor is a processor used to process data in the wake state, also called a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor used to process data in the standby state.
- the processor 401 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw content that needs to be displayed on the display screen.
- the processor 401 may also include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
- AI Artificial Intelligence
- the memory 402 may include one or more computer-readable storage media, which may be non-transitory.
- the memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
- the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 401 to implement the intelligent model provided in the method embodiment of this application. Upgrade method.
- the terminal 400 may optionally further include: a peripheral device interface 403 and at least one peripheral device.
- the processor 401, the memory 402, and the peripheral device interface 403 may be connected by a bus or a signal line.
- Each peripheral device can be connected to the peripheral device interface 403 through a bus, a signal line or a circuit board.
- the peripheral device includes at least one of a radio frequency circuit 404, a touch display screen 405, a camera 406, an audio circuit 407, a positioning component 408, and a power supply 409.
- the peripheral device interface 403 can be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 401 and the memory 402.
- the processor 401, the memory 402, and the peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 401, the memory 402, and the peripheral device interface 403 or The two can be implemented on separate chips or circuit boards, which are not limited in this embodiment.
- the radio frequency circuit 404 is used to receive and transmit RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals.
- the radio frequency circuit 404 communicates with a communication network and other communication devices through electromagnetic signals.
- the radio frequency circuit 404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
- the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on.
- the radio frequency circuit 404 can communicate with other terminals through at least one wireless communication protocol.
- the wireless communication protocol includes but is not limited to: World Wide Web, Metropolitan Area Network, Intranet, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area network and/or WiFi (Wireless Fidelity, wireless fidelity) network.
- the radio frequency circuit 404 may also include a circuit related to NFC (Near Field Communication), which is not limited in this application.
- the display screen 405 is used to display a UI (User Interface, user interface).
- the UI can include graphics, text, icons, videos, and any combination thereof.
- the display screen 405 also has the ability to collect touch signals on or above the surface of the display screen 405.
- the touch signal can be input to the processor 401 as a control signal for processing.
- the display screen 405 may also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
- the display screen 405 there may be one display screen 405 to set the front panel of the terminal 400; in other embodiments, there may be at least two display screens 405, respectively set on different surfaces of the terminal 400 or in a folded design; In still other embodiments, the display screen 405 may be a flexible display screen, which is arranged on the curved surface or the folding surface of the terminal 400. Furthermore, the display screen 405 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
- the display screen 405 may be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
- the camera assembly 406 is used to capture images or videos.
- the camera assembly 406 includes a front camera and a rear camera.
- the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
- the camera assembly 406 may also include a flash.
- the flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to a combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
- the audio circuit 407 may include a microphone and a speaker.
- the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 401 for processing, or input to the radio frequency circuit 404 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively set in different parts of the terminal 400.
- the microphone can also be an array microphone or an omnidirectional acquisition microphone.
- the speaker is used to convert the electrical signal from the processor 401 or the radio frequency circuit 404 into sound waves.
- the speaker can be a traditional membrane speaker or a piezoelectric ceramic speaker.
- the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into human audible sound waves, but also convert the electrical signal into human inaudible sound waves for purposes such as distance measurement.
- the audio circuit 407 may also include a headphone jack.
- the positioning component 408 is used to locate the current geographic location of the terminal 400 to implement navigation or LBS (Location Based Service, location-based service).
- the positioning component 408 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, or the Galileo system of Russia.
- the power supply 409 is used to supply power to various components in the terminal 400.
- the power source 409 may be alternating current, direct current, disposable batteries, or rechargeable batteries.
- the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery.
- a wired rechargeable battery is a battery charged through a wired line
- a wireless rechargeable battery is a battery charged through a wireless coil.
- the rechargeable battery can also be used to support fast charging technology.
- the terminal 400 further includes one or more sensors 410.
- the one or more sensors 410 include, but are not limited to: an acceleration sensor 411, a gyroscope sensor 412, a pressure sensor 413, a fingerprint sensor 414, an optical sensor 415, and a proximity sensor 416.
- the acceleration sensor 411 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 400.
- the acceleration sensor 411 may be used to detect the components of the gravitational acceleration on three coordinate axes.
- the processor 401 may control the touch screen 405 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 411.
- the acceleration sensor 411 may also be used for the collection of game or user motion data.
- the gyroscope sensor 412 can detect the body direction and rotation angle of the terminal 400, and the gyroscope sensor 412 can cooperate with the acceleration sensor 411 to collect the user's 3D actions on the terminal 400. Based on the data collected by the gyroscope sensor 412, the processor 401 can implement the following functions: motion sensing (for example, changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
- motion sensing for example, changing the UI according to the user's tilt operation
- image stabilization during shooting for example, changing the UI according to the user's tilt operation
- game control for example, changing the UI according to the user's tilt operation
- inertial navigation for example, changing the UI according to the user's tilt operation
- the pressure sensor 413 may be arranged on the side frame of the terminal 400 and/or the lower layer of the touch screen 405.
- the processor 401 performs left and right hand recognition or quick operation according to the holding signal collected by the pressure sensor 413.
- the processor 401 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 405.
- the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
- the fingerprint sensor 414 is used to collect the user's fingerprint.
- the processor 401 can identify the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 can identify the user's identity based on the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 401 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings.
- the fingerprint sensor 414 may be provided on the front, back or side of the terminal 400. When a physical button or a manufacturer logo is provided on the terminal 400, the fingerprint sensor 414 can be integrated with the physical button or the manufacturer logo.
- the optical sensor 415 is used to collect the ambient light intensity.
- the processor 401 may control the display brightness of the touch display screen 405 according to the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch screen 405 is decreased.
- the processor 401 may also dynamically adjust the shooting parameters of the camera assembly 406 according to the ambient light intensity collected by the optical sensor 415.
- the proximity sensor 416 also called a distance sensor, is usually provided on the front panel of the terminal 400.
- the proximity sensor 416 is used to collect the distance between the user and the front of the terminal 400.
- the processor 401 controls the touch screen 405 to switch from the on-screen state to the off-screen state; when the proximity sensor 416 detects When the distance between the user and the front of the terminal 400 gradually increases, the processor 401 controls the touch display screen 405 to switch from the rest screen state to the bright screen state.
- FIG. 6 does not constitute a limitation on the terminal 400, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Life Sciences & Earth Sciences (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Medical Informatics (AREA)
- Human Computer Interaction (AREA)
- Molecular Biology (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Biodiversity & Conservation Biology (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
- Image Analysis (AREA)
Abstract
一种智能模型的升级方法及装置(300),属于智能分析领域。所述方法包括:获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据进行训练得到的(101);将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息(102);根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型(103)。所述方法能够提高智能模型的场景泛化性能。
Description
本申请要求于2019年7月4日提交的申请号为201910600514.3、发明名称为“一种智能模型的升级方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及智能分析领域,特别涉及一种智能模型的升级方法及装置。
智能模型是通过对深度学习算法进行训练得到的。例如,车辆检测模型是通过大量的训练样本对深度学习算法进行训练得到的,训练样本包括两类,一类训练样本中包括车辆图像和被人工标注的标注信息,该标注信息可以为“是”,另一类训练样本包括非车辆图像和被人工标注的标注信息,该标注信息可以为“否”。训练得到的车辆检测模型可以检测摄像机拍摄的图像中是否包括车辆图像。
当在某个环境下训练的智能模型通常只应用到该环境,如果应用到新环境下该智能模型的性能会发生降低现象。例如,对于车辆检测模型,训练车辆检测模型使用的训练样本是第一环境下的训练样本,在第一环境下车辆检测模型检测摄像像机拍摄的图像中是否包括车辆图像时,车辆检测模型的性能较高,导致车辆检测模型检测车辆图像的精度随之较高。
但是在与第一环境不同的第二环境下继续使用将该车辆检测模型检测摄像机拍摄的图像时,该车辆检测模型可能检测不出车辆图像,使得车辆检测模型的场景泛化性能降低,导致检测车辆图像的精度也会随之降低。
发明内容
本申请提供了一种智能模型的升级方法及装置,提高智能模型的场景泛化性能。所述技术方案如下:
一方面,本申请提供了一种智能模型的升级方法,应用于第一设备,所述方法包括:
获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据进行训练得到的;
将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息;
根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型。
可选的,所述根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型,包括:
根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息,以得到属于第一环境的第二样本数据,所述标注信息用于表示所述输入数据中的目标是否为真实目标;
根据所述第二样本数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
可选的,所述第一设备根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息,包括:
根据所述输出数据计算所述输出数据的价值得分,所述价值得分用于表示所述输出数据对应的输入数据作为第二样本数据的合适程度;
根据每个输出数据的价值得分,从所述每个输出数据中选择满足预设条件的输出数据;
根据所述选择的输出数据,在所述选择的输出数据对应的输入数据中设置标注信息。
可选的,所述根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息之后,还包括:
显示第二样本数据,在检测到用户对所述第二样本数据中的标注信息进行的修正操作时,根据根据所述修正操作对所述标注信息进行修正。
可选的,所述根据所述第二样本数据和所述第一样本数据训练所述第一智能模型得到第二智能模型,包括:
根据所述第二样本数据、所述第二样本数据对应的输出数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
可选的,所述将所述输入数据输入到所述第一智能模型之前,还包括:
接收第二设备发送的属于第一环境的输入数据,所述输入数据是所述第二设备采集得到的。
可选的,所述根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型之后,还包括:
向第二设备发送所述第二智能模型,以使所述第二设备将所述第二设备中安装的所述第一智能模型升级为所述第二智能模型。
另一方面,本申请提供了一种智能模型的升级装置,所述装置包括:
第一获取模块,用于获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型所应用的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据进行训练得到的;
第二获取模块,用于将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息;
训练模块,用于根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型。
可选的,所述训练模块,包括:
设置单元,用于根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息,以得到属于第一环境的第二样本数据,所述标注信息用于表示所 述输入数据中的目标是否为真实目标;
训练单元,用于根据所述第二样本数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
可选的,所述设置单元,用于:
根据所述输出数据计算所述输出数据的价值得分,所述价值得分用于表示所述输出数据对应的输入数据作为第二样本数据的合适程度;
根据每个输出数据的价值得分,从所述每个输出数据中选择满足预设条件的输出数据;
根据所述选择的输出数据,在所述选择的输出数据对应的输入数据中设置标注信息。
可选的,所述装置还包括:
修正模块,用于显示第二样本数据,在检测到用户对所述第二样本数据中的标注信息进行的修正操作时,根据根据所述修正操作对所述标注信息进行修正。
可选的,所述训练单元,用于:
根据所述第二样本数据、所述第二样本数据对应的输出数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
可选的,所述装置还包括:
接收模块,用于接收第二设备发送的属于第一环境的输入数据,所述输入数据是所述第二设备采集得到的。
可选的,所述装置还包括:
发送模块,用于向第二设备发送所述第二智能模型,以使所述第二设备将所述第二设备中安装的所述第一智能模型升级为所述第二智能模型。
另一方面,本申请提供了一种电子设备,包括:
处理器;
用于存储所述处理器的可执行指令的存储器;
其中,所述处理器用于执行所述可执行指令,以实现上述智能模型的升级方法的指令。
另一方面,本申请提供了一种计算机可读存储介质,用于存储计算机程序,所述计算机程序被处理器加载并执行,以实现上述智能模型的升级方法的指令。
本申请实施例提供的技术方案可以包括以下有益效果:
通过获取第一智能模型对属于第一环境的输入数据进行处理输出的输出数据,根据第一样本数据和每个输出数据训练第一智能模型以得到第二智能模型。使得第二智能模型适用于第一环境,提高了第二智能模型的场景泛化性能。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。
图1是本申请实施例提供的一种智能模型的升级方法流程图;
图2是本申请实施例提供的另一种智能模型的升级方法流程图;
图3是本申请实施例提供的一种系统架构示意图;
图4是本申请实施例提供的另一种系统架构示意图;
图5是本申请实施例提供的一种智能模型的升级装置结构示意图;
图6是本申请实施例提供的一种终端结构示意图。
通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描 述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
智能模型是通过对机器学习算法进行训练得到的。机器学习算法可以为深度学习算法等算法,例如可以为卷积神经网格等。对于该智能模型,例如,智能模型可以为车辆检测模型或物体检测模型等中的至少一个。在训练机器学习算法时,通常使用属于第二环境的第一样本数据来训练深度学习算法,使训练得到的智能模型能够对属于第二环境的输入数据进行处理。
例如,第一个实例以训练车辆检测模型为例,假设属于第二环境的输入数据为2018年采集的图像,所以训练的车辆检测模型用于检测在2018年市场已出现的车辆图像。车辆检测模型是使用属于第二环境的第一样本数据对深度学习算法进行训练得到的,第二环境为2018年市场已出现的车辆。第一样本数据为图像数据,包括两类,一类第一样本数据包括2018年市场已出现车辆的车辆图像和标注信息,该标注信息可以为“是”,在该类第一样本数据中的车辆图像被人工标注。另一类第一样本数据包括的图像为非车辆图像,以及包括的标注信息可以为“否”,另一类第一样本数据包括的图像可以为建筑物图像或动物图像等中的至少一个。使用第一样本数据对机器学习算法进行训练可以得到用于检测车辆图像的车辆检测模型。
再如,第二个实例仍以训练车辆检测模型为例,假设属于第二环境的输入数据为白天采集的图像,即第二环境为白天环境,所以训练的车辆检测模型用于在白天检测车辆图像。车辆检测模型是使用属于第二环境的第一样本数据对深度学习算法进行训练得到的。第一样本数据为图像数据,包括两类,一类第一样本数据包括白天拍摄得到的车辆图像和标注信息,该标注信息可以为“是”,在该类第一样本数据中的车辆图像被人工标注。另一类第一样本数据包括的图像为非车辆图像,以及包括的标注信息可以为“否”,另一类第一样本数据包括的图像可以为建筑物图像或动物图像等中的至少一个。使用第一样本数据对机器学习算法进行训练可以得到用于在白天检测车辆图像的车辆检测模型。
当摄像机安装有该车辆检测模型后,该摄像机拍摄图像,将拍摄的图像作 为第二环境的输入数据输入到该车辆检测模型。该车辆检测模型对该输入数据进行处理,得到该输入数据对应的输出数据,该输出数据可以包括置信度和目标框信息等内容,目标框信息包括目标框位置和目标框尺寸。基于该置信度可以确定该输入数据中的位于该目标框信息对应的目标框内的图像是否为车辆图像。
虽然智能模型用于对属于第二环境的输入数据进行处理,但是有时也会使用智能模型对属于新环境的数据进行处理,为了便于说明称新环境为第一环境,即将智能模型应用到第一环境中。智能模型应用到第一环境中,智能模型的性能可能发生降低,导致智能模型在对属于第一环境的输入数据进行处理时,智能模型输出的处理结果的精度可能降低。
例如,在上述第一个实例中在2020年继续使用2018年训练出来的车辆检测模型,用于检测在2020年市场上已出现的车辆的车辆图像时,对于在2018年至2020年市场新出现的新车辆,该车辆检测模型可能无法检测出新车型的车辆图像,车辆检测模型的性能会下降,车辆检测模型在检测车辆图像的精度也随之降低。其中,第一环境为2020年市场已出现的车辆
再如,在上述第二个实例中,在黑夜继续使用该车辆检测模型,用于检测在车辆的车辆图像时,由于训练该车辆检测模型的第一样本数据属于的第二环境为白天环境,使得该车辆检测模型在黑夜可能无法检测出车型的车辆图像,车辆检测模型的性能会下降,车辆检测模型在检测车辆图像的精度也随之降低。其中,黑夜环境为第一环境。
为了使智能模型能够适应第一环境,本申请可以通过如下任一实施例对智能模型进行自动升级,使得到升级后的智能模型能够应用于第一环境时,也不会出现性能下降的现象,对第一环境的输入数据进行处理,提高对第一环境的输入数据进行处理的精度。
参见图1,本申请实施例提供了一种智能模型的升级方法,该升级方法可以为在线升级,也可以为离线升级,应用于第一设备。所述方法包括:
步骤101:获取属于第一环境的输入数据,第一环境与待升级的第一智能模型的第二环境不同,第一智能模型是基于属于第二环境的第一样本数据进行训练得到的。
步骤102:将该输入数据输入到第一智能模型,获取第一智能模型对该输入数据进行处理输出的该输入数据对应的输出数据,该输出数据包括置信度和目标框信息。
可选的,该输出数据还包括类别信息,例如该类别信息为车辆、建筑物、商品或动物等。
步骤103:根据第一样本数据和该输出数据训练第一智能模型得到第二智能模型。
在本申请实施例中,获取第一智能模型对属于第一环境的输入数据进行处理输出的输出数据,根据第一样本数据和每个输出数据训练第一智能模型以得到第二智能模型。使得第二智能模型适用于第一环境,提高了第二智能模型的场景泛化性能。
参见图2,本申请实施例提供了一种智能模型的升级方法,该升级方法可以为在线升级,也可以为离线升级。该方法包括:
步骤201:第一设备获取属于第一环境的至少一个输入数据,第一环境与待升级的第一智能模型的第二环境不同,第一智能模型是基于属于第二环境的第一样本数据对机器学习算法进行训练得到的。
第一设备可以为摄像机、服务器、台式电脑或平板电脑等。第一设备可以是安装有第一智能模型,第一设备可以与其他设备组成网络,也可以不与其他设备组成网络。参见图3,第一设备可以与至少一个第二设备组成网络,第二设备可以安装有第一智能模型。在此种情况下,第一设备和第二设备可以为摄像机等设备。第一设备可以采集属于第一环境的至少一个输入数据,在第一设备和第二设备组成网络时,第一设备还可以接收第二设备采集属于第一环境的至少一个输入数据。其中,在第一设备和第二设备为摄像机时,第一设备采集的输入数据为图像数据,第二设备采集的输入数据为图像数据。
参见图4,管理设备和至少一个端设备组成的网络,管理设备可以为服务器、台式电脑或平板电脑等,其内可以保存有第一智能模型。端设备可以为摄像机等,其内安装有第一智能模型。第一设备可以为某个端设备,或者,可以为管理设备。在第一设备为管理设备时,第二设备为至少一个端设备,第二设备采集第一环境的输入数据,向第一设备发送该输入数据,第一设备接收该输入数 据。第一设备为某个端设备,第二设备可以为其他端设备,第一设备可以采集输入数据或接收第二设备发送的输入数据。
输入数据可以为图像数据等。例如,在第一个实例中以待升级的第一智能模型为用于检测车辆图像的车辆检测模型,第一智能模型是2018年训练出来的智能模型,安装该车辆检测模型的第一设备为第一摄像机,也就是说属于第二环境的输入数据为第一摄像机在2018年拍摄的图像。2020年继续使用该车型检测模型,用于检测2020年市场上已出现的车辆的车辆图像,也就是说属于第一环境的输入数据是第一摄像机在2020年拍摄的图像。第一摄像机拍摄得到包括在2020年市场上出现的车辆图像的图像数据,此时第一摄像机拍摄的图像数据为属于第一环境的输入数据。假设存在安装有待升级的车辆检测模型的第二摄像机,第二摄像机拍摄得到包括2020年市场出现的车辆图像的图像数据,然后向第一摄像机发送拍摄的图像数据。第一摄像头接收该图像数据,并与自己拍摄的图像数据合并组成属于第一环境的多个输入数据。
再如,在第二个实例中仍以待升级的第一智能模型为用于检测车辆图像的车辆检测模型,训练第一智能模型的第一样本数据属于的第二环境为白天环境,安装该车辆检测模型的第一设备为第一摄像机,也就是说属于第二环境的输入数据为第一摄像机在白天拍摄的图像。在黑夜继续使用该车型检测模型,用于车辆的车辆图像,也就是说属于第一环境的输入数据是第一摄像机在黑夜拍摄的图像。第一摄像机在黑夜拍摄得到包括车辆图像的图像数据,此时第一摄像机拍摄的图像数据为属于第一环境的输入数据,第一环境为黑夜环境。假设存在安装有待升级的车辆检测模型的第二摄像机,第二摄像机在黑夜拍摄得到包括车辆图像的图像数据,然后向第一摄像机发送拍摄的图像数据。第一摄像头接收该图像数据,并与自己拍摄的图像数据合并组成属于第一环境的多个输入数据。
步骤202:第一设备将该多个输入数据输入到第一智能模型,获取第一智能模型对每个输入数据进行处理输出的每个输入数据对应的输出数据,该输出数据至少包括置信度和目标框信息。
对于输入到第一智能模型的每个输入数据,第一智能模型对该输入数据进行处理,输出该输入数据对应的输出数据,该输出数据实质是第一智能模型对该输入数据进行处理得到的处理结果。该输出数据包括置信度和目标框信息。
可选的,该目标框信息可以包括目标框位置和目标框尺寸,该输出数据还可以包括数据类别、高层语义特征、时间、点位或描述等至少一个特征。
可选的,该输出数据还包括类别信息,例如该类别信息为车辆、建筑物、商品或动物等。
置信度是第一智能模型基于高层语义特征得到的。
例如,在上述第一个实例或第二个实例中,第一摄像机将属于第一环境的图像数据输入到车辆检测模型,车辆检测模型对输入的每个图像数据进行检测,并输出每个图像数据对应的输出数据。对于任一个图像数据,该输出数据包括置信度和目标框信息,目标框信息包括目标框位置和目标框尺寸。在该图像数据中基于该目标框位置和目标框尺寸可以确定一个目标框,该目标框框出的图像为车辆检测模型检测出的车辆图像,该置信度表示该检测出的车辆图像是真实的车辆图像的概率。
步骤203:对于每个输出数据,第一设备根据该输出数据对该输出数据对应的输入数据设置标注信息,以得到属于第一环境的第二样本数据。
标注信息可以为“是”或“否”,在第二样本数据中的标注信息为“是”,表示在第二样本数据中目标框所框起的目标图像为真实目标。在第二样本数据中的标注信息为“否”,表示在第二样本数据中目标框所框起的目标图像不是真实目标。
本步骤中可以通过如下2031至2033的操作来实现,该2031至2033的操作分别为:
2031:第一设备根据该输出数据计算该输出数据的价值得分,该价值得分用于表示该输出数据对应的输入数据作为第二样本数据的合适程度。
第一设备中可以安装有用于计算价值得到的智能分析模型,第一设备可以向该智能分析模型输入该输出数据,智能分析模型根据该输出数据包括的置信度和目标框信息等内容计算出该输出数据的价值得分。
智能分析模型是事先对深度学习算法等算法进行训练得到的,例如智能分析模型是事先对卷积神经网络等算法进行训练得到的。事先可以设置多个训练样本,每个训练样本包括智能模块输出的输出数据和人工对该输出数据进行标记的价值得分。将该训练样本输入到深度学习算法中,然后开始训练深度学习算法,该训练过程为:
深度学习算法根据该输出数据计算出该输出数据的价值得分,将计算的价值得分与人工对该输出数据进行标记的价值得分进行比较,得到得分差值,根据该得分差值调整深度学习算法的参数。重复上述训练过程,以训练出智能分析模型。
输出数据包括的置信度越低,智能分析模型输出的该输出数据的价值得分可能越高。反之,输出数据包括的置信度越高,智能分析网络输出的该输出数据的价值得分可能越低。
2032:第一设备根据每个输出数据的价值得分,从每个输出数据中选择满足预设条件的输出数据。
第一设备可以从每个输出数据中选择价值得分超过预设得分阈值的输出数据,或者,第一设备可以从每个输出数据中选择价值得分最大的预设数目个输出数据。
可选的,输出数据还可以数据类别,可以根据每个输出数据包括的数据类别,对输出数据进行分类。对于任一个数据类别,从该数据类别对应的输出数据中,根据每个输出数据的价值得分选择预设个数个满足预设条件的输出数据。这样可以均衡地选择各数据类别的输出数据。
2033:对于选择的每个输出数据,第一设备根据该输出数据在该输出数据对应的输入数据中设置标注信息,以得到属于第一环境的第二样本数据。
对于每个选择的输出数据,该输出数据包括置信度和目标框信息,该目标框信息可以包括目标框位置和目标尺寸。根据该输出数据中的目标框信息,在该输出数据对应的输入数据中确定出目标框。根据该置信度确定该目标框框出的目标是否为真实目标,根据确定的结果为该目标设置标注信息。
在该置信度超过预设置信度阈值时,可以确定该目标框在该输入数据中框出的目标为真实目标,为该目标设置的标注信息为“是”,标注信息“是”用于表示该目标为真实的目标。在该置信度未超过预设置信度阈值时,可以确定该目标框在该输入数据中框出的目标不是真实目标,为该目标设置的标注信息为“否”,标注信息“否”用于表示该目标不是真实的目标。
例如,对于上述第一个实例,以第一智能模型为车辆检测模型为例,每个输出数据对应的输入数据为图像数据,图像数据为在2020年拍摄的图像数据。对于每个输出数据,根据该输出数据包括的目标框信息在该输出数据对应的图 像数据中确定目标框,以及根据该置信度确定该目标框框住的目标是否为车辆图像,根据该确定结果是否为该目标设置标注信息,得到第一环境下的第二样本数据,即得到在2020年的第二样本数据。
例如,对于上述第二个实例,以第一智能模型为车辆检测模型为例,每个输出数据对应的输入数据为图像数据,图像数据为在黑夜拍摄的图像数据。对于每个输出数据,根据该输出数据包括的目标框信息在该输出数据对应的图像数据中确定目标框,以及根据该置信度确定该目标框框住的目标是否为车辆图像,根据该确定结果是否为该目标设置标注信息,得到第一环境下的第二样本数据,即得到黑夜环境下的第二样本数据。
在第二样本数据中设置的标注信息可能有误,即第二样本数据中的目标可能不是真实的目标,但标注的标注信息为“是”,或者,第二样本数据中的目标可能是真实的目标,但标注的标注信息为“否”。
为了提高设置标注信息的精度,以提高第二样本数据的精度,可以显示第二样本数据,以让用户进行确认。在用户确认出第二样本数据中的标注信息有误时,用户可以对第二样本数据中的标注信息进行修正。
在实现时:显示第二样本数据,在检测到用户对第二样本数据中的标注信息进行的修正操作时,根据根据该修正操作对第二样本数据中的标注信息进行修正。
在显示第二样本数据时,还可以显示一个修正按钮。如果用户发现第二样本数据中的标注信息有误,可以点击该修改按钮触发修改操作。在第二样本数据中的标注信息为“是”的情况,将第二样本数据中的该标注信息修改为“否”。在第二样本数据中的标注信息为“否”的情况,将第二样本数据中的该标注信息修改为“是”。
步骤204:第一设备根据第一样本数据和第二样本数据训练第一智能模型得到第二智能模型。
第一智能模型是基于属于第二环境的第一样本数据对机器学习算法进行训练得到的。第一样本数据是人工进行标注得到的,在使用第一样本数据训练出第一智能模型后可以保存第一样本数据。第一样本数据可以保存在服务器中,也可以直接保存在第一设备中。
在第一样本数据保存在服务器中,第一设备可以从服务器中下载第一样本 数据,在第一样本数据保存第一设备中,第一设备可以直接获取保存的第一样本数据。
在保存第一样本数据时,还可以保存第一智能模型的版本号,即可以存在第一样本数据与第一智能模型的版本号的对应关系。在该对应关系中,第一智能模型的版本号对应的第一样本数据可以是图像数据,也可以是通过第一智能模型对该图像数据进行转换得到的高层语义特征。由于该对应关系可能会随着第一智能模型安装在不同的设备上,为了增加隐私性,该对应关系中的与第一智能模型的版本号对应的第一样本数据以高层语义特征的形式存在。
在本步骤中,根据第一智能模型的版本号从该对应关系中查询对应的第一样本数据,根据该查询的第一样本数据和第二样本数据训练第一智能模型得到第二智能模型。
如果从该对应关系中没有查询出对应的第一样本数据,可以进行错误提示。或者,可以确定一版本号,该版本号低于第一智能模型的版本号,根据确定的版本号从该对应关系中查询对应的第一样本数据。将该查询的第一样本数据输入到转换模型,该转换模型用于将输入的第一样本数据转换成与第一智能模型的版本号相对应的第一样本数据。获取该转换模型输出的与第一智能模型的版本号相对应的第一样本数据,根据该获取的第一样本数据和第二样本数据训练第一智能模型得到第二智能模型。
可选的,确定的版本号是与第一智能模型的版本号相差最小的版本号。
转换模型是事先通过训练数据对深度学习算法进行训练得到的。该训练数据包括第一版本号对应的样本数据和第二版本号对应的样本数据,第一版本号小于第二版本号。将该训练数据输入到深度学习算法。深度学习算法转换第一版本号对应的样本数据,得到第二版本号对应的样本数据。深度学习算法根据转换得到的第二版本号对应的样本数据和输入的第二版本号对应的样本数据调整自身的参数。深度学习算法重复上述过程,不断地调整自身的参数。在停止训练后得到的深度学习算法即为转换模型。
第一设备将第一样本数据和第二样本数据输入到第一智能模型,第一智能模型根据该第一样本数据和第二样本数据进行训练。训练过程为:
第一智能模型将第一样本数据和第二样本数据均作为样本数据,对于每个样本数据,根据该样本数据检测出该样本数据中的目标,将检测的目标与该样 本数据中的标注信息进行比较,得到差异信息,根据该差异信息调整第一智能模型的参数。重复上述训练过程,以训练出第二智能模型。
可选的,可以将第一样本数据、第二样本数据对应的输出数据和第二样本数据输入到第一智能模型,以使第一智能模型根据第二样本数据、第二样本数据对应的输出数据和第一样本数据训练第一智能模型得到第二智能模型。
在第一设备安装有第一智能模型的情况下,第一设备可以将自身安装的第一智能模型升级为第二智能模型。
第一设备还可以将第一智能模型发送给第二设备,第二设备还可以将自身安装的第一智能模型升级为第二智能模型。
例如,在上述第一个实例中,将2018年的第一样本数据、2020年的第二样本数据对应的输出数据和第二样本数据输入到第一智能模型,以使第一智能模型根据2020年的第二样本数据、2020年的第二样本数据对应的输出数据和2018年的第一样本数据训练第一智能模型得到第二智能模型。训练出的第二智能模型在检测2020年市场上已出现的车辆的车辆图像时,会提高检测的精度。
再如,在上述第二个实例中,将白天环境下的第一样本数据、黑夜环境下的第二样本数据对应的输出数据和黑夜环境下的第二样本数据输入到第一智能模型,以使第一智能模型根据黑夜环境下的第二样本数据、黑夜环境下的第二样本数据对应的输出数据和白天环境下的第一样本数据训练第一智能模型得到第二智能模型。训练出的第二智能模型在检测黑夜环境下的车辆图像时,会提高检测的精度。
可选的,对于图3所示的场景,第一设备和每个第二设备均可以按上述方式得到第二智能模型。或者,对于图3所示的场景,管理设备和每个端设备均可以按上述方式得到第二智能模型。
对于任一个设备(可以为第一设备、第二设备、管理设备或端设备),可以事先在该设备中设置多个测试数据。对于每个测试数据,该测试数据包括属于第一环境的输入数据和该输入数据对应的输出数据。该设备可以将每个测试数据包括的输入数据输入到第二智能模型,获取第二智能模型输出的每个测试数据包括的每个输入数据对应的输出数据。根据每个测试数据包括的输出数据和每个测试数据包括的输入数据对应的输出数据,获取正确率。
该设备可以向其他设备发送该正确率,以及接收其他设备发送的正确率。 该设备的获取的正确率大于其他每个设备发送的正确率,则将安装的第一智能模型升级为自身得到的第二智能模型,以及向其他每个设备发送自身得到的第二智能模型。其他每个设备接收该第二智能模型,将自身安装的第一智能模型升级为接收的第二智能模型。
该设备的获取的正确率小于某一个或多个其他设备发送的正确率,则该设备接收正确率最大的一个其他设备发送的第二智能模型,将自身安装的第一智能模型升级为接收的第二智能模型。
在本申请实施例中,获取第一智能模型对属于第一环境的输入数据进行处理输出的输出数据,根据每个输出数据在每个输出数据对应的输入数据中设置标注信息,得到属于第一环境的第二样本数据。根据第二样本数据和第一样本数据训练第一智能模型以得到第二智能模型。使得第二智能模型适用于第一环境,提高了第二智能模型的性能。可以实现自动升级第一智能模型,减小人力资源,提高升级效率和提高了智能模型对环境的场景泛化适应性。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
参见图5,本申请实施例提供了一种智能模型的升级装置,所述装置300包括:
第一获取模块301,用于获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据对机器学习算法进行训练得到的;
第二获取模块302,用于将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息;
训练模块303,用于根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型。
可选的,所述训练模块303,包括:
设置单元,用于根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息,以得到属于第一环境的第二样本数据,所述标注信息用于表示所 述输入数据中的目标是否为真实目标;
训练单元,用于根据所述第二样本数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
可选的,所述设置单元,用于:
根据所述输出数据计算所述输出数据的价值得分,所述价值得分用于表示所述输出数据对应的输入数据作为第二样本数据的合适程度;
根据每个输出数据的价值得分,从所述每个输出数据中选择满足预设条件的输出数据;
根据所述选择的输出数据,在所述选择的输出数据对应的输入数据中设置标注信息。
可选的,所述装置300还包括:
修正模块,用于显示第二样本数据,在检测到用户对所述第二样本数据中的标注信息进行的修正操作时,根据根据所述修正操作对所述标注信息进行修正。
可选的,所述训练单元,用于:
根据所述第二样本数据、所述第二样本数据对应的输出数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
可选的,所述装置300还包括:
接收模块,用于接收第二设备发送的属于第一环境的输入数据,所述输入数据是所述第二设备采集得到的。
可选的,所述装置300还包括:
发送模块,用于向第二设备发送所述第二智能模型,以使所述第二设备将所述第二设备中安装的所述第一智能模型升级为所述第二智能模型。
在本申请实施例中,第二获取模块获取第一智能模型对属于第一环境的输入数据进行处理输出的输出数据,训练模块根据第一样本数据和每个输出数据训练第一智能模型以得到第二智能模型。使得第二智能模型适用于第一环境,提高了第二智能模型的场景泛化性能。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图6示出了本发明一个示例性实施例提供的终端400的结构框图。该终端400可以是便携式移动终端,比如:平板电脑、、笔记本电脑或台式电脑。
通常,终端400包括有:处理器401和存储器402。
处理器401可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器401可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器401也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器401可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器401还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器402可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器402还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器402中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器401所执行以实现本申请中方法实施例提供的智能模型的升级方法。
在一些实施例中,终端400还可选包括有:外围设备接口403和至少一个外围设备。处理器401、存储器402和外围设备接口403之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口403相连。具体地,外围设备包括:射频电路404、触摸显示屏405、摄像头406、音频电路407、定位组件408和电源409中的至少一种。
外围设备接口403可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器401和存储器402。在一些实施例中,处理器401、存储器402和外围设备接口403被集成在同一芯片或电路板上;在一些其他实施例中,处理器401、存储器402和外围设备接口403中的任意一个或两个可以 在单独的芯片或电路板上实现,本实施例对此不加以限定。
射频电路404用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路404通过电磁信号与通信网络以及其他通信设备进行通信。射频电路404将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路404包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路404可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路404还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。
显示屏405用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏405是触摸显示屏时,显示屏405还具有采集在显示屏405的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器401进行处理。此时,显示屏405还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏405可以为一个,设置终端400的前面板;在另一些实施例中,显示屏405可以为至少两个,分别设置在终端400的不同表面或呈折叠设计;在再一些实施例中,显示屏405可以是柔性显示屏,设置在终端400的弯曲表面上或折叠面上。甚至,显示屏405还可以设置成非矩形的不规则图形,也即异形屏。显示屏405可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件406用于采集图像或视频。可选地,摄像头组件406包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件406还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以 用于不同色温下的光线补偿。
音频电路407可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器401进行处理,或者输入至射频电路404以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端400的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器401或射频电路404的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路407还可以包括耳机插孔。
定位组件408用于定位终端400的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件408可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统或俄罗斯的伽利略系统的定位组件。
电源409用于为终端400中的各个组件进行供电。电源409可以是交流电、直流电、一次性电池或可充电电池。当电源409包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。
在一些实施例中,终端400还包括有一个或多个传感器410。该一个或多个传感器410包括但不限于:加速度传感器411、陀螺仪传感器412、压力传感器413、指纹传感器414、光学传感器415以及接近传感器416。
加速度传感器411可以检测以终端400建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器411可以用于检测重力加速度在三个坐标轴上的分量。处理器401可以根据加速度传感器411采集的重力加速度信号,控制触摸显示屏405以横向视图或纵向视图进行用户界面的显示。加速度传感器411还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器412可以检测终端400的机体方向及转动角度,陀螺仪传感器412可以与加速度传感器411协同采集用户对终端400的3D动作。处理器401根据陀螺仪传感器412采集的数据,可以实现如下功能:动作感应(比如根 据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器413可以设置在终端400的侧边框和/或触摸显示屏405的下层。当压力传感器413设置在终端400的侧边框时,可以检测用户对终端400的握持信号,由处理器401根据压力传感器413采集的握持信号进行左右手识别或快捷操作。当压力传感器413设置在触摸显示屏405的下层时,由处理器401根据用户对触摸显示屏405的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器414用于采集用户的指纹,由处理器401根据指纹传感器414采集到的指纹识别用户的身份,或者,由指纹传感器414根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器401授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器414可以被设置终端400的正面、背面或侧面。当终端400上设置有物理按键或厂商Logo时,指纹传感器414可以与物理按键或厂商Logo集成在一起。
光学传感器415用于采集环境光强度。在一个实施例中,处理器401可以根据光学传感器415采集的环境光强度,控制触摸显示屏405的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏405的显示亮度;当环境光强度较低时,调低触摸显示屏405的显示亮度。在另一个实施例中,处理器401还可以根据光学传感器415采集的环境光强度,动态调整摄像头组件406的拍摄参数。
接近传感器416,也称距离传感器,通常设置在终端400的前面板。接近传感器416用于采集用户与终端400的正面之间的距离。在一个实施例中,当接近传感器416检测到用户与终端400的正面之间的距离逐渐变小时,由处理器401控制触摸显示屏405从亮屏状态切换为息屏状态;当接近传感器416检测到用户与终端400的正面之间的距离逐渐变大时,由处理器401控制触摸显示屏405从息屏状态切换为亮屏状态。
本领域技术人员可以理解,图6中示出的结构并不构成对终端400的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。
Claims (16)
- 一种智能模型的升级方法,应用于第一设备,其特征在于,所述方法包括:获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据进行训练得到的;将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息;根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型。
- 如权利要求1所述的方法,其特征在于,所述根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型,包括:根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息,以得到属于第一环境的第二样本数据,所述标注信息用于表示所述输入数据中的目标是否为真实目标;根据所述第二样本数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
- 如权利要求2所述的方法,其特征在于,所述根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息,包括:根据所述输出数据计算所述输出数据的价值得分,所述价值得分用于表示所述输出数据对应的输入数据作为第二样本数据的合适程度;根据每个输出数据的价值得分,从所述每个输出数据中选择满足预设条件的输出数据;根据所述选择的输出数据,在所述选择的输出数据对应的输入数据中设置标注信息。
- 如权利要求2所述的方法,其特征在于,所述根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息之后,还包括:显示第二样本数据,在检测到用户对所述第二样本数据中的标注信息进行的修正操作时,根据根据所述修正操作对所述标注信息进行修正。
- 如权利要求2至4任一项所述的方法,其特征在于,所述根据所述第二样本数据和所述第一样本数据训练所述第一智能模型得到第二智能模型,包括:根据所述第二样本数据、所述第二样本数据对应的输出数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
- 如权利要求1至4任一项所述的方法,其特征在于,所述将所述输入数据输入到所述第一智能模型之前,还包括:接收第二设备发送的属于第一环境的输入数据,所述输入数据是所述第二设备采集得到的。
- 如权利要求1至4任一项所述的方法,其特征在于,所述根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型之后,还包括:向第二设备发送所述第二智能模型,以使所述第二设备将所述第二设备中安装的所述第一智能模型升级为所述第二智能模型。
- 一种智能模型的升级装置,其特征在于,所述装置包括:第一获取模块,用于获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据进行训练得到的;第二获取模块,用于将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息;训练模块,用于根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型。
- 如权利要求8所述的装置,其特征在于,所述训练模块,包括:设置单元,用于根据所述输出数据,在所述输出数据对应的输入数据中设置标注信息,以得到属于第一环境的第二样本数据,所述标注信息用于表示所述输入数据中的目标是否为真实目标;训练单元,用于根据所述第二样本数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
- 如权利要求9所述的装置,其特征在于,所述设置单元,用于:根据所述输出数据计算所述输出数据的价值得分,所述价值得分用于表示所述输出数据对应的输入数据作为第二样本数据的合适程度;根据每个输出数据的价值得分,从所述每个输出数据中选择满足预设条件的输出数据;根据所述选择的输出数据,在所述选择的输出数据对应的输入数据中设置标注信息。
- 如权利要求9所述的装置,其特征在于,所述装置还包括:修正模块,用于显示第二样本数据,在检测到用户对所述第二样本数据中的标注信息进行的修正操作时,根据根据所述修正操作对所述标注信息进行修正。
- 如权利要求9至11任一项所述的装置,其特征在于,所述训练单元,用于:根据所述第二样本数据、所述第二样本数据对应的输出数据和所述第一样本数据训练所述第一智能模型得到第二智能模型。
- 如权利要求8至11任一项所述的装置,其特征在于,所述装置还包括:接收模块,用于接收第二设备发送的属于第一环境的输入数据,所述输入数据是所述第二设备采集得到的。
- 如权利要求8至11任一项所述的装置,其特征在于,所述装置还包括:发送模块,用于向第二设备发送所述第二智能模型,以使所述第二设备将所述第二设备中安装的所述第一智能模型升级为所述第二智能模型。
- 一种电子设备,其特征在于,包括:处理器;用于存储所述处理器的可执行指令的存储器;其中,所述处理器用于执行所述可执行指令,以实现:获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据进行训练得到的;将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息;根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型。
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序被处理器加载并执行,以实现:获取属于第一环境的输入数据,所述第一环境与待升级的第一智能模型的第二环境不同,所述第一智能模型是基于属于所述第二环境的第一样本数据进行训练得到的;将所述输入数据输入到所述第一智能模型,获取所述第一智能模型对所述输入数据进行处理输出的所述输入数据对应的输出数据,所述输出数据包括置信度和目标框信息;根据所述第一样本数据和所述输出数据训练所述第一智能模型得到第二智能模型。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP20835645.1A EP4040332A4 (en) | 2019-07-04 | 2020-07-03 | METHOD AND DEVICE FOR RETROFITTING AN INTELLIGENT MODEL AND NON-VOLATILE COMPUTER READABLE STORAGE MEDIUM |
US17/624,531 US20220245403A1 (en) | 2019-07-04 | 2020-07-03 | Method and apparatus for upgrading intelligent model, electronic device and non-transitory computer readable storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910600514.3 | 2019-07-04 | ||
CN201910600514.3A CN111753606A (zh) | 2019-07-04 | 2019-07-04 | 一种智能模型的升级方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021000956A1 true WO2021000956A1 (zh) | 2021-01-07 |
Family
ID=72672763
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/100250 WO2021000956A1 (zh) | 2019-07-04 | 2020-07-03 | 一种智能模型的升级方法及装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20220245403A1 (zh) |
EP (1) | EP4040332A4 (zh) |
CN (1) | CN111753606A (zh) |
WO (1) | WO2021000956A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11587042B2 (en) | 2006-03-30 | 2023-02-21 | Geographic Solutions, Inc. | Automated reactive talent matching |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113672252B (zh) * | 2021-07-23 | 2024-07-12 | 浙江大华技术股份有限公司 | 模型升级方法、视频监控系统、电子设备和可读存储介质 |
CN116827693B (zh) * | 2023-08-29 | 2023-11-17 | 深圳摩吉智行科技有限公司 | 基于can总线对两轮车进行离线OTA的方法及系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140079314A1 (en) * | 2012-09-18 | 2014-03-20 | Yury Yakubovich | Method and Apparatus for Improved Training of Object Detecting System |
CN108010030A (zh) * | 2018-01-24 | 2018-05-08 | 福州大学 | 一种基于深度学习的航拍图像绝缘子实时检测方法 |
CN108446721A (zh) * | 2018-03-02 | 2018-08-24 | 广东华中科技大学工业技术研究院 | 一种基于多分支网络的水面环境解析方法 |
CN108647655A (zh) * | 2018-05-16 | 2018-10-12 | 北京工业大学 | 基于轻型卷积神经网络的低空航拍影像电力线异物检测方法 |
CN109359573A (zh) * | 2018-09-30 | 2019-02-19 | 天津天地伟业投资管理有限公司 | 一种基于准确人车分离的警戒方法及装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10572828B2 (en) * | 2015-10-28 | 2020-02-25 | Qomplx, Inc. | Transfer learning and domain adaptation using distributable data models |
US10699139B2 (en) * | 2017-03-30 | 2020-06-30 | Hrl Laboratories, Llc | System for real-time object detection and recognition using both image and size features |
US20190080354A1 (en) * | 2017-09-08 | 2019-03-14 | Estia, Inc. | Location prediction based on tag data |
US11416546B2 (en) * | 2018-03-20 | 2022-08-16 | Hulu, LLC | Content type detection in videos using multiple classifiers |
-
2019
- 2019-07-04 CN CN201910600514.3A patent/CN111753606A/zh active Pending
-
2020
- 2020-07-03 EP EP20835645.1A patent/EP4040332A4/en active Pending
- 2020-07-03 WO PCT/CN2020/100250 patent/WO2021000956A1/zh unknown
- 2020-07-03 US US17/624,531 patent/US20220245403A1/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140079314A1 (en) * | 2012-09-18 | 2014-03-20 | Yury Yakubovich | Method and Apparatus for Improved Training of Object Detecting System |
CN108010030A (zh) * | 2018-01-24 | 2018-05-08 | 福州大学 | 一种基于深度学习的航拍图像绝缘子实时检测方法 |
CN108446721A (zh) * | 2018-03-02 | 2018-08-24 | 广东华中科技大学工业技术研究院 | 一种基于多分支网络的水面环境解析方法 |
CN108647655A (zh) * | 2018-05-16 | 2018-10-12 | 北京工业大学 | 基于轻型卷积神经网络的低空航拍影像电力线异物检测方法 |
CN109359573A (zh) * | 2018-09-30 | 2019-02-19 | 天津天地伟业投资管理有限公司 | 一种基于准确人车分离的警戒方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4040332A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11587042B2 (en) | 2006-03-30 | 2023-02-21 | Geographic Solutions, Inc. | Automated reactive talent matching |
Also Published As
Publication number | Publication date |
---|---|
EP4040332A4 (en) | 2022-09-07 |
US20220245403A1 (en) | 2022-08-04 |
CN111753606A (zh) | 2020-10-09 |
EP4040332A1 (en) | 2022-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10574895B2 (en) | Image capturing method and camera equipped electronic device | |
CN111127509B (zh) | 目标跟踪方法、装置和计算机可读存储介质 | |
WO2021000956A1 (zh) | 一种智能模型的升级方法及装置 | |
CN108897659B (zh) | 修改日志级别的方法、装置及存储介质 | |
CN110134744B (zh) | 对地磁信息进行更新的方法、装置和系统 | |
CN109558837B (zh) | 人脸关键点检测方法、装置及存储介质 | |
CN110926473A (zh) | 识别楼层的方法、装置、电子设备及存储介质 | |
CN110839128B (zh) | 拍照行为检测方法、装置及存储介质 | |
CN110163296B (zh) | 图像识别的方法、装置、设备及存储介质 | |
CN110933468A (zh) | 播放方法、装置、电子设备及介质 | |
WO2020108041A1 (zh) | 耳部关键点检测方法、装置及存储介质 | |
CN111192072A (zh) | 用户分群方法及装置、存储介质 | |
CN110633336B (zh) | 激光数据搜索范围的确定方法、装置及存储介质 | |
CN113843814A (zh) | 机械臂设备的控制系统、方法、装置和存储介质 | |
CN111179628B (zh) | 自动驾驶车辆的定位方法、装置、电子设备及存储介质 | |
CN111488895B (zh) | 对抗数据生成方法、装置、设备及存储介质 | |
CN111898535A (zh) | 目标识别方法、装置及存储介质 | |
CN111723615B (zh) | 对检测物图像进行检测物匹配判定的方法和装置 | |
CN111757146B (zh) | 视频拼接的方法、系统及存储介质 | |
CN113936240A (zh) | 确定样本图像的方法、装置、设备及存储介质 | |
CN110851435B (zh) | 一种存储数据的方法及装置 | |
CN112214115A (zh) | 输入方式的识别方法、装置、电子设备及存储介质 | |
CN112132472A (zh) | 资源管理方法、装置、电子设备及计算机可读存储介质 | |
CN112135256A (zh) | 移动轨迹的确定方法、装置、设备及可读存储介质 | |
CN111158791A (zh) | 配置文件更新方法、装置及系统、存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20835645 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2020835645 Country of ref document: EP Effective date: 20220204 |