Method for generating video analysis model and video analysis system
Through online training of video stream data and automatic image data cleaning and annotation in the video analysis system, combined with the online training algorithm to optimize the video analysis model, the problem of performance degradation of the video analysis model in actual scenarios is solved, and adaptive optimization of the model is achieved. and real-time updates.
Patent Information
- Application Number
- CN201811321394.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-07
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2038-11-07
AI Technical Summary
The performance of existing video analysis models declines after deployment in actual scenarios, and they lack effective methods for online updates, making them unable to quickly adapt to changes in different scenarios.
By implementing online training of video stream data in the video analysis system, image data is automatically cleaned and annotated, a data set is generated for model training, and online training algorithms (such as incremental training, transfer learning, knowledge distillation, etc.) are used to train the model. Perform optimization, automatically adjust hyperparameters, and achieve online optimization and real-time update of the model.
It improves the performance of the video analysis model, avoids performance degradation, realizes adaptive optimization of the model, reduces manual participation and labeling costs, and can dynamically update model parameters according to specific scenarios.
Smart Images

Figure CN111160380B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video, and in particular to a method for generating a video analysis model and a video analysis system. Background Art
[0002] With the development of video surveillance technology, surveillance has evolved from simple video recording to intelligent development, and the requirements for video surveillance have gradually changed from "visible" to "understandable". Therefore, intelligent video analysis technology is currently widely used in the field of video surveillance. Based on the video data obtained from the video source (such as a network camera, etc.), after being decoded into an image in the video analysis system, the image is processed using a pre-trained video analysis model to achieve a series of complex functions such as target detection, target tracking, target attributes and target recognition. The target objects in video analysis are most typical, such as faces, people and cars, and they have more application prospects and are widely concerned.
[0003] Depending on the purpose of analysis, video analysis technology can be divided into the following four aspects.
[0004] Object detection mainly solves the problem of where multiple targets are on an image. Through the object detection model, the region of interest (ROI) bounding box of all targets is given on the image.
[0005] Target tracking is to find the target in the image sequence, complete the one-to-one correspondence between the same target in different frames, and give the trajectory of the target.
[0006] Target attributes use structured analysis technology to analyze the attribute details of the target in the image, such as the gender, age, clothing of the person, and the model and brand of the car.
[0007] When identifying a target, it searches for the best match with the object model library in the image based on the features extracted from the image, and outputs the category of the object. A typical application is face recognition, which extracts the face feature vector from the input face image based on the face feature extraction model, and then matches it with the face feature vector in the database based on similarity, realizing functions such as face control, face search and face comparison.
[0008] The video analysis models that realize the above functions in the video analysis system are mostly trained by machine learning methods related to image processing and analysis, among which the Convolutional Neural Network (CNN) model in deep learning is widely used due to its better performance. With the development of semiconductor technology and the maturity of lightweight model compression, video analysis models can be deployed on cloud servers as well as terminals.
[0009] The current video analysis model is trained offline and then deployed to the user's actual scene (online). Once the model is deployed online in the actual scene, the model parameters are no longer updated, and the determined model parameters are directly used to complete the inference.
[0010] Existing video analysis models can achieve good performance offline, but due to the complexity of actual scenes and the difference in sample distribution between training sets and actual scenes, the performance of the model usually degrades after it is deployed in the actual scene. There are also differences between different scenes, and there is no good way to quickly and efficiently update the parameters of the video analysis model in the actual scene. Summary of the invention
[0011] In view of this, the embodiments of the present application provide a method for generating a video analysis model and a video analysis system, which can effectively utilize data collected in actual scenes for online training to improve the model performance of video analysis.
[0012] To achieve the above-mentioned purpose, in the first aspect, the embodiment of the present application provides a method for generating a video analysis model, which is applied to a video analysis system. In the method, first, video stream data is received, the video stream data is parsed, and unlabeled image data is obtained, and the unlabeled image data may include corresponding structured information; then, low-quality images in the unlabeled image data are filtered to obtain images whose image quality meets the model training requirements, and then the obtained images are annotated to obtain a data set for model training, wherein the data set includes a training set and a test set; then, an online training algorithm is used to perform online training on the training set in the data set to obtain a video analysis model; and finally, the video analysis model is released. The method for generating a video analysis model provided by the embodiment of the present application can use the video data collected by the video surveillance front-end device to automatically extract images, clean and annotate images, obtain a data set for model training, and then use the model online training algorithm to perform model training on the data set to obtain a video analysis model. The method provided by the embodiment of the present application does not require too much manual participation, automates the model training process, and can be deployed in a video analysis system to realize online training and real-time optimization of the model to avoid performance degradation of the video analysis model.
[0013] Optionally, the training set may be trained online using a transfer learning or incremental training algorithm based on an original video analysis model, wherein the original video analysis model includes an externally input video analysis model or a previous version of a video analysis model saved by the video analysis system. In this way, the original video analysis model may be optimized based on the image data obtained from the actual video surveillance scene, and the original video analysis model may be optimized in a targeted manner to maintain the performance of the video analysis model.
[0014] Among them, the online training algorithm can be one or more of incremental training, transfer training, knowledge distillation and meta-learning.
[0015] Optionally, when an online training algorithm is used to perform online training on the training model in the data set, the model training hyperparameters can be automatically adjusted. The hyperparameters used for video analysis model training can be automatically generated according to the deployment scenario of the video analysis model, where the hyperparameters include one or more of the learning rate decay step, the total training step, the basic learning rate and the batch size.
[0016] Among them, images whose image quality meets the training requirements are pre-labeled by adopting multi-model fusion evaluation, and the pre-labeled image data are verified using the structured information of the images whose image quality meets the training requirements, so as to generate a data set for model training and realize image labeling.
[0017] Optionally, publishing a video analysis model includes: testing the performance of the trained video analysis model, generating a model performance analysis report, and when the performance of the trained video analysis model meets the usage standards, publishing the trained video analysis model to the video analysis system. Before publishing the trained video analysis model to the video analysis system, testing the performance of the video analysis model can further screen the video analysis models that meet the standards and avoid publishing a video analysis model with poor performance to the video analysis system, which will cause a decrease in video analysis performance.
[0018] Optionally, when there is an existing video analysis model in the video analysis system, the video analysis model obtained through online training is released. Specifically, when the existing video analysis model is in an updateable state, the video analysis model obtained through online training is used to replace the existing video analysis model. At the same time, the replaced existing video analysis model can also be saved for version rollback.
[0019] Optionally, publishing the video analysis model also includes online training of a new video analysis model using the video analysis model obtained through online training.
[0020] Optionally, the performance of the video analysis model can be tested using a test set provided by the user or a test set in a cleaned and labeled data set. The video analysis model performance analysis report may include one or more parameters such as the video analysis model's inference latency, memory usage, and accuracy based on the test set.
[0021] In a second aspect, an embodiment of the present application provides a video analysis system. The video analysis system has the function of implementing the method described in the first aspect above. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more subsystems corresponding to the above functions.
[0022] In a third aspect, an embodiment of the present application provides a video analysis system, comprising: a processor, a memory, a bus and a communication interface; the memory is used to store computer execution instructions, the processor is connected to the memory through the bus, and when the device management center is running, the processor executes the computer execution instructions of the memory so that the device management center executes the method for generating a video analysis model as described in any of the first aspects above.
[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer can execute any one of the methods for generating a video analysis model in the first aspect.
[0024] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any one of the methods for generating a video analysis model according to the first aspect.
[0025] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
[0026] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of the architecture of a video analysis system provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of another architecture of the video analysis system provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of a video analysis method flow chart for online optimization of a video analysis model provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of the process of online optimization of the target recognition model provided in the embodiment of the present application;
[0032] Figure 6 A schematic diagram of the process of online optimization of the target attribute model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. The specific operation methods in the method embodiments can also be applied to the device embodiments.
[0034] Model training in current video analysis technology is completed offline before being deployed to actual user scenarios. Once the model is deployed online, the model parameters are no longer updated, and the determined model parameters need to be used to complete video analysis. If the model parameters need to be updated, the model parameters need to be incrementally trained offline based on the labeled data set to obtain a new model, and then the new model needs to be uploaded to replace the online model.
[0035] There are a large number of video data sources in actual video analysis application scenarios. For example, there are a large number of IP Cameras (IPC) in video surveillance scenarios. Users can obtain a large amount of video data, which is a prerequisite for improving model performance in actual scenarios. However, there is no good way to effectively use this data in existing technologies. In addition, due to privacy issues, this part of the data cannot be directly transmitted to manufacturers for model training.
[0036] To solve the problems in existing video analysis systems, the embodiments of the present application provide a video analysis method and system that supports online optimization. After the model is deployed in the actual scene, it can automatically clean and annotate the video data obtained in the actual scene, and use the annotated data to perform online model training to alleviate the performance degradation of the model in the actual scene.
[0037] like Figure 1 As shown, a possible video analysis system supporting online optimization is provided in an embodiment of the present application, which includes a video analysis subsystem, a data management subsystem, an online training subsystem, and a model evaluation and publishing subsystem.
[0038] The video analysis subsystem can support basic functions such as decoding of video streams, storage and detection of video data and its decoded images, and can also include video analysis models to realize various complex functions such as target detection, tracking and recognition. The video data acquired in real time by the front end is transmitted to the video analysis system. The video analysis subsystem decodes the received video data into an image sequence through the video analysis decoding tool, which can be stored through the storage area network (SAN) and other methods, and can realize image retrieval based on time, video source and other information based on algorithms such as Deep First Search (DFS). Since the video analysis subsystem stores the video analysis model, the video analysis subsystem can also support intelligent analysis of the decoded original image sequence, such as extracting target cutouts, target trajectories or target structured information (such as attributes, feature vectors, etc.) through the video analysis model. The video analysis subsystem can uniformly store and manage the results of intelligent analysis, and also support retrieval of information such as saved images and analysis results when necessary. The functions of the video analysis subsystem in this solution can be implemented by the original video analysis system, or new video analysis functions can be added on the basis of the original video analysis system. A new system for video analysis can also be provided separately as the video analysis subsystem in the embodiment of the present application.
[0039] The data management subsystem is used to manage the data sets used for online training of the video analysis model, such as automatically cleaning, labeling, and storing the unlabeled image data obtained by the video subsystem. The image data obtained by the video analysis subsystem from parsing the video stream cannot be directly used for online training of the video analysis model. The data management subsystem needs to automatically clean and label the image data and its structured information generated by the video analysis subsystem.
[0040] The data management subsystem cleans the unlabeled images, that is, filters out the images whose quality does not meet the training requirements, and selects the image data whose image clarity and the shooting angle of the target in the image meet the conditions for online training of the video analysis model. Image cleaning usually filters blurred images, images with inappropriate shooting angles, and images with occlusions. Usually, the Laplace operator and other evaluation indicators can be used to filter out blurred images, the Euler angle detection model can be used to output the angle of the target in the image, and the target angle threshold can be limited to filter out large-angle images. The trained occlusion classifier can also be used to filter out images with occluded targets. In addition, the image quality scoring model can be trained to automatically achieve image quality scoring, and the threshold can be preset to automatically filter out images with low image quality.
[0041] Image annotation is to mark the selected image data with corresponding attribute information (such as identity, external features, etc.) whose quality meets the requirements of online training. The data management subsystem can use its own integrated series of algorithms and strategies, or call other video analysis models in the video analysis system to clean and annotate the data, and generate a data set for online model training. The data set can be divided into a training set and a test set. For example, multi-model fusion evaluation can be used for pre-annotation, and the annotation results can be verified and corrected in combination with the structured information of the image, as follows: 1. Use multiple different models with the same function to vote on the input image data to determine the pre-annotation results; 2. Based on the structured information carried by the image itself and the assistance of other functional models, the annotated data is verified and corrected. For image data used for different task objectives, the annotation strategies will be different, and the error correction methods of different categories of models will also be different. After the data management subsystem has collected enough model training data, it can hand over these data to the online training subsystem for model training.
[0042] It should be noted that the data management subsystem can automatically clean and annotate image data. If the data management subsystem cannot determine whether certain image data is suitable for online model training, it can hand over these data to manual judgment and annotation, and decide whether to discard these image data manually. Optionally, in order to improve the efficiency of cleaning and annotation, the data management subsystem can also choose to directly discard the above image data. Users can set corresponding cleaning and annotation strategies according to actual needs.
[0043] The online training subsystem is used to perform online training on the model training data generated by the data management subsystem, and output the video analysis model obtained by online training. Depending on the application scenario, one or more of a variety of online training algorithms can be used, such as incremental training, transfer learning, knowledge distillation, or meta-learning algorithms. Hyperparameters need to be configured during model training, such as the learning rate decay step, the total training step, the basic learning rate, or the batch size. The hyperparameters of model training can be automatically generated according to the deployment environment of the video analysis model. There are many ways to automatically generate and adjust hyperparameters. For example, in model training, the learning rate can be automatically multiplied by the decay coefficient according to the change in the accuracy of the intermediate model on the test set and the change in the current loss function; similarly, the initial learning rate of model training can be automatically generated according to the accuracy of the original video analysis model on the test set. If there is no original video analysis model, a larger initial learning rate can be set; and the batch size depends on the amount of data, and a smaller batch size can be set for small samples.
[0044] The online training subsystem can perform online training based on the original video analysis model and output the video analysis model after online training. The original video analysis model can be an external input video analysis model, an intermediate model saved when the training process is interrupted, or a previous version of the model saved in the video analysis system. When the original video analysis model is used for online training, the internal parameters of the original video analysis model are optimized by knowledge distillation or transfer learning using incremental image data collected from actual scenes. The optimization strategies for different scenes can be set manually or adaptively adjusted through the internal framework. The online training subsystem also supports the management and storage of the original video analysis model and different versions of the video analysis model obtained after online training.
[0045] It can be understood that in actual implementation, a suitable model training algorithm can be selected in the online training subsystem according to scenario requirements, data set size, original model category or performance requirements, etc. For example, a stochastic gradient descent (SGD) algorithm can be used for a neural network model, a boosting algorithm can be used for a decision tree model, and incremental training can be used for a support vector machine model to obtain a new support vector, etc. The embodiments of the present application do not limit the specific model training algorithm used in the online training subsystem.
[0046] The model evaluation and release subsystem is used to evaluate the performance and make release decisions on the models generated by the online training subsystem. Usually, the new model generated by online training cannot be used for video analysis immediately, but the performance of the model obtained by online training needs to be evaluated. The model evaluation and release subsystem is used to perform performance testing on the model and output detailed performance test reports of the model, such as latency, resource overhead, and accuracy. After obtaining the performance test report, the user can decide whether to release the video analysis model generated by online training based on the performance test report, or pre-set the release strategy, and the system will automatically decide whether to release the video analysis model based on the model performance test report.
[0047] Optionally, the video analysis system also includes a resource scheduling subsystem for allocating and scheduling computing and storage resources. Compared with the local environment dedicated to model training, the hardware computing resources in the actual scene are usually relatively scarce, and online training should not interrupt the ongoing video analysis business and affect the user experience. The resource scheduling subsystem can automatically suspend the model training task in a timely manner according to the resources occupied by the training and the current status of available resources, and quickly interrupt the model training when the video analysis business needs to occupy resources, save the model in the middle of the training, and initiate training again when the computing resources are sufficient.
[0048] The video analysis system provided by the embodiment of the present application can decode the video stream acquired by the front end into an image sequence, clean and annotate the image sequence, obtain an image data set that can be used for model training, and then perform model training based on the above image data set to obtain a video analysis model, and continuously improve the performance of the video analysis system. The embodiment of the present application can make full use of the video data collected by the front end to generate a model for video analysis, avoiding the performance degradation of the model generated by offline training after being deployed online. In addition, the method provided by the embodiment of the present application is to generate a video analysis model using image data collected in an actual monitoring scene. Even if two different video monitoring scenes provide the same initial training model, due to different monitoring scenes, there are differences in the collected image data, and after a period of time, the video analysis model generated by online training will also be different.
[0049] With the development of cloud technology, the video analysis system in the embodiment of the present application can be deployed on a cloud platform. The front end sends the collected video data to the video analysis system deployed on the cloud platform. The video analysis system processes the video data collected by the front end and trains and generates a video analysis model.
[0050] The video analysis system in the embodiment of the present application may also exist in the form of software and be provided to the user, who can install the video analysis system in the embodiment of the present application in the back-end analysis system of the video surveillance system and control the operation of the video analysis system in the embodiment of the present application to realize online optimization of the video analysis model.
[0051] As an implementation method, the original video analysis system can also be improved and upgraded to obtain the video analysis system provided by the embodiment of the present application, that is, on the basis of the original video analysis system, the function of the online optimization model is expanded. The interface of the original video analysis system can be opened to the video analysis system provided by the embodiment of the present application, so that the original video analysis system can be used as a video analysis subsystem in the video analysis system provided by the embodiment of the present application, for acquiring the video stream and decoding to obtain an image sequence for subsequent processing. After the video analysis model is generated, the original video analysis system can use the generated video analysis model to perform video analysis.
[0052] As another implementation, the video analysis system provided in the embodiment of the present application can be provided to users as an independent device, which can support online updating of the video analysis model. Figure 2 As shown, Figure 1 The video analysis system in Figure 2 This is achieved by using the computer equipment in the system.
[0053] Figure 2The figure is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. The computer device 200 includes at least one processor 201 , a communication bus 202 , a memory 203 and at least one communication interface 204 .
[0054] The processor 201 may be a general-purpose central processing unit (CPU), a graphic processing unit (GPU), a neural-network processing unit (NPU) microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. Figure 2 Take CPU as an example.
[0055] The communication bus 202 may include a pathway for transmitting information between the above-mentioned components.
[0056] The communication interface 204 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. The communication method can be selected according to the actual application scenario, and this application does not limit this.
[0057] The memory 203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0058] The memory 203 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 201. The processor 201 is used to execute the application code stored in the memory 203, thereby realizing the method for generating a video analysis model provided in the following embodiment of the present application.
[0059] In a specific implementation, as an embodiment, the processor 201 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 in.
[0060] In a specific implementation, as an embodiment, the computer device 200 may include multiple processors, such as Figure 2 201 and processor 207 in the embodiment of the present invention. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0061] In a specific implementation, as an embodiment, the computer device 200 may further include an output device 205 and an input device 206. The output device 205 communicates with the processor 201 and may display information in a variety of ways. For example, the output device 205 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 206 communicates with the processor 201 and may receive user input in a variety of ways. For example, the input device 206 may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0062] The computer device 200 may be a general-purpose computer device or a dedicated computer device. In a specific implementation, the computer device 200 may be a desktop computer, a portable computer, a network server, a wireless terminal device, an embedded device, or a computer with a processor. Figure 3 The embodiment of the present application does not limit the type of the computer device 200.
[0063] The following will be combined Figure 1 to Figure 2 , the video analysis system and method for generating a video analysis model provided in the embodiment of the present application are further explained from aspects such as data flow in the video analysis system and online optimization steps, and taking the online optimization of the target recognition model and the target attribute model as an example.
[0064] Figure 3The direction of data flow in the system when generating a video analysis model in an embodiment of the present application is shown. Figure 4 The process of online optimization of the model in this scheme is shown below. Figure 3 and Figure 4 To describe this scheme.
[0065] like Figure 4 As shown in FIG. 1 , the process of generating a video analysis model in this solution includes the following steps:
[0066] S401: Receive and parse a video stream to generate unlabeled image data.
[0067] The video analysis system can receive video stream data collected by the front-end camera, and can also receive video stream data saved by other devices. Various video analysis decoding tools are integrated in the video analysis subsystem. The video analysis subsystem decodes the received video stream data to obtain an unlabeled image sequence. The video analysis subsystem also stores a video analysis model, which can analyze the decoded image sequence and support the extraction of target cutouts, target trajectories, and image structured information (such as target attributes, feature vectors, etc.) through the video analysis model. The video analysis subsystem can also store the analysis results in the data warehouse (Data Bank, DB), which is responsible for unified storage and management of the analysis results. The video analysis subsystem can also retrieve and store the decoded image sequence. The typical retrieval method can be based on algorithms such as DFS to realize retrieval based on time, video source, etc., and the typical storage method can be SAN and other methods. The video analysis subsystem can also classify and retrieve the stored images and analysis results through the multiple classifier system (Multiple Classifier System, MCS).
[0068] S402: Clean and label unlabeled image data to obtain a data set for model training.
[0069] The image sequence obtained by decoding the video at the front end cannot be used directly for model training and needs to be cleaned and annotated. Image cleaning is mainly to filter out low-quality images and obtain image data whose image quality meets the training requirements. Low-quality images include blurred images, large-angle images, and images with occlusions. Usually, evaluation indicators such as the Laplace operator can be used to filter out blurred images, and the Euler angle detection model can be used to output the angle of the target in the image. At the same time, the target angle threshold is limited to filter out large-angle images, and the trained occlusion classifier can be used to filter out images where the target is occluded. In addition, the image quality scoring model can be trained to automatically achieve image quality scoring, and the threshold can be preset to automatically filter out images with low image quality.
[0070] Image annotation is to mark the selected image data with corresponding attribute information (such as identity, external features, etc.) whose quality meets the requirements of online training. Different model training tasks can specify different annotation strategies. The data management subsystem in the video analysis system stores image cleaning algorithms and annotation strategies for automatic cleaning and annotation of image sequences. The data management subsystem can use a series of algorithms and strategies integrated by itself, or call other video analysis models in the video analysis system to clean and annotate the data to generate a data set for online model training. The data set can be divided into a training set and a test set. For example, multi-model fusion evaluation can be used for pre-annotation, and the annotation results can be verified and corrected in combination with the structured information of the image, as follows: 1. Use multiple different models with the same function to vote on the input image data to determine the pre-annotation results; 2. Based on the structured information carried by the image itself and the assistance of other functional models, the annotated data is verified and corrected. For image data used for different task objectives, the annotation strategies will be different, and the error correction methods of different categories of models will also be different.
[0071] Optionally, if the data management subsystem cannot determine that certain image data is suitable for online model training, it can hand over these data to manual identification and labeling, and decide whether to discard these image data or labeled information manually. Optionally, in order to improve the efficiency of cleaning and labeling, the data management subsystem can also choose to discard the above image data, and users can set corresponding cleaning and labeling strategies according to actual needs.
[0072] After cleaning and labeling the unlabeled image data, we finally get a data set for online training. The data set can be divided into a training set and a test set according to its use in model training. Video analysis model training requires sufficient image data. When the labeled image data obtained in the data set is sufficient, a model training request can be initiated.
[0073] S403: Perform online training based on the data set to obtain a video analysis model.
[0074] When enough annotated images are obtained in the data set, the model online training process can be initiated. The model online training can be based on the original video analysis model and training set. The original video analysis model can call an external model, or an intermediate model in the training process, or any version of the model specified by the user retained internally. The video analysis model is a model parameter file composed of some trained model parameters. The online training algorithm can use one or more of incremental training, transfer learning, knowledge distillation and meta-learning algorithms.
[0075] In this embodiment, during model training, the hyperparameters used in model training can be automatically adjusted, where the hyperparameters include learning rate decay step, total training step, basic learning rate, batch size, etc. Different tuning strategies can be set for different monitoring scenarios and video analysis requirements, and the internal framework can also be adaptively trained through parameters.
[0076] During model training, you can save the intermediate models obtained during the training process, or you can save the final model after the training is completed. The version management and storage of the model can be implemented within the online training subsystem or by external devices.
[0077] It should be noted that the online model training algorithm in the embodiments of the present application has a variety of implementation methods, such as the traditional stochastic gradient descent (SGD) method, which obtains the corresponding output based on the input image of the training set through the video analysis model, calculates the objective function between the same labels, and then derivatives the weights, multiplies them by the adaptive learning rate and feeds back to the original weight update, and repeats the update until the parameters of the entire model converge; another example is the method based on the support vector machine (SVM), which updates the support vector through incremental training of the new training set. The present application does not limit the specific model training method adopted here.
[0078] S404: Publish the video analysis model.
[0079] Usually, the video analysis model obtained through online training cannot be used directly for video analysis. Instead, its parameter performance needs to be tested first to evaluate the effectiveness of the model. When the performance of the video analysis model meets the usage standards, the video analysis model is published to the video analysis system. The model evaluation and publishing subsystem in the video analysis system is used to evaluate and publish the video analysis model. The model test is usually based on the test set, and the performance test is performed through the test framework or model performance testing tool integrated within the model evaluation and publishing subsystem. Detailed, multi-dimensional model performance reports are output to assist in the release of decision-making models. The model performance report can include information such as latency, resource overhead, and accuracy.
[0080] Model testing can use the test set in the data management subsystem data set, or it can be provided by the user, such as a standard data set dedicated to performance acceptance. The test framework or test tool uses the input model and test set to obtain the model output results and calculate performance indicators, and then evaluates the corresponding model performance based on the output results and according to different task objectives or video analysis requirements.
[0081] After obtaining the performance analysis report of the model, the user can decide whether to publish the obtained model based on the performance analysis report, or customize the publishing strategy in advance, and then write the customized publishing strategy into a script, which will be automatically executed by the system to automatically decide whether to publish the model based on the model performance analysis report. It should be noted that model publishing means providing the trained model to the video analysis subsystem for video analysis, or to the online training subsystem for subsequent online model training, or publishing it to the network for other users to use.
[0082] The video analysis method for online optimization of the model provided in the embodiment of the present application can automatically generate an online training data set based on the front-end video stream data, and can realize the online optimization of the intelligent video analysis model, which is used to alleviate the problem of performance degradation of the video analysis model in the actual scene. The method provided in the embodiment of the present application can make full use of the video data in the monitoring scene without the need for feedback, and will not infringe on the privacy of the user. The cleaning and labeling of the front-end data can greatly reduce or even be separated from manual participation, which can greatly reduce the labeling cost. In addition, since the online training of the model is trained using video data from a specific scene, the model obtained in this way is more targeted, different models can be obtained for different scenes, and it has adaptive capabilities.
[0083] Figure 5 and Figure 6 The system and method provided in this application are further explained by taking the online training of the target recognition model and the target attribute model as an example.
[0084] Figure 5 It is an online optimization for target recognition models. Typical targets include faces, bodies, or vehicles. The method includes the following steps:
[0085] S501: The video analysis subsystem receives a request for video data to flow in from a front-end device.
[0086] The front-end video data inflow request may carry relevant information of the video stream, such as the bit rate, time and source identification field of the video stream.
[0087] S502: The video analysis subsystem applies to the computing and storage resource scheduling subsystem for storage space and computing resources for intelligent analysis.
[0088] The video analysis subsystem may also choose to carry video related information when sending a request to the computing and storage resource scheduling subsystem.
[0089] S503: The computing and storage resource scheduling subsystem responds to the request of the video analysis subsystem.
[0090] The computing and storage resource scheduling subsystem evaluates the currently available computing resources and storage resources. If there is sufficient storage space, it plans storage addresses and memory units for the video data and feeds the results back to the video analysis subsystem, which then performs decoding, storage, and analysis of the video data.
[0091] S504: The image sequence after the video stream is decoded and sent by the front end is processed by the target detection and tracking algorithm integrated in the video analysis subsystem to obtain the target trajectory.
[0092] Different videos will definitely get different trajectories, and different targets in the same video will also have different trajectories. Ideally, the same target in the same video will get the same trajectory, but due to the inability to achieve absolute accuracy in detection and tracking performance and the complexity of the actual scene, different trajectories may also be obtained in this case. The target trajectory is an image sequence composed of target cutouts, and each target image carries trajectory information, such as the original video ID, target trajectory ID, and the cutout ID of the target in the trajectory. The above IDs can be used to assist in subsequent image annotation.
[0093] S505, the video analysis subsystem uses the obtained target cutout to obtain a series of structured information through an internally integrated intelligent analysis algorithm, and sends an inflow request for the target cutout and structured information to the data management subsystem.
[0094] S506: The data management subsystem applies for computing and storage resources from the computing and storage resource scheduling subsystem.
[0095] Similarly, before processing the target cutout sent by the data management subsystem, the data management subsystem also needs to apply for computing and storage resources from the computing and storage resource scheduling system.
[0096] S507. The computing and storage resource scheduling subsystem responds to the request of the data management subsystem.
[0097] The computing and storage resource scheduling subsystem allocates storage space and computing resources for cleaning and labeling for the incoming target images. If the computing resources are temporarily insufficient, the image can be stored first and then cleaned and labeled when the computing resources are sufficient.
[0098] Optionally, if the data management subsystem and the video analysis subsystem are located on the same hardware device, the computing and storage resource scheduling subsystem may choose to return only the storage location of the target image to the data management subsystem without allocating additional storage space for the incoming target image.
[0099] S508. The data management subsystem uses the allocated computing resources to automatically clean and label the input target data and structured information to obtain a data set.
[0100] The data cleaning of target recognition is mainly to ensure that the angle and clarity of the target meet the requirements. The labeling requires that different images of the same target only correspond to the same ID, and there are no images of different targets under the same ID. There are many methods for automatic data cleaning and labeling. For example, the Laplace operator and other evaluation indicators can be used to filter out blurry images, and the Euler angle detection model outputs the target angle and limits the angle threshold to filter out large-angle images. The labeling schemes in different scenarios will be different. For example, in the face recognition scenario with witness comparison, it is only necessary to aggregate the targets in the collected video using witness information to achieve high-precision labeling; in the scenario without witness information, the detection and tracking algorithm can be used to extract the trajectory of the target, and then select several optimal frames under each trajectory based on the quality score, and then use multiple face feature extraction models to calculate the feature similarity between different trajectories, and then merge different trajectories. If the image carries time and location information, image data with the same time but different locations under the same ID will be identified as a wrong example. Finally, the data management subsystem stores the labeled data in the data set, which can be divided into a training set for model training and a test set for testing the trained model.
[0101] S509: When sufficient annotated image data is obtained, the data management subsystem requests online model training.
[0102] The cleaned and annotated data is uniformly managed within the data management subsystem. The newly added target image data needs to be ID-fused with the previously stored target image to meet the target recognition annotation principle. The system will count the amount of image data currently collected, and when it meets the training model requirements, it will send an online training request to the computing and storage resource scheduling subsystem.
[0103] S510: The online training subsystem applies to the computing and storage resource scheduling subsystem for computing and storage resources for online training.
[0104] S511. The data storage resource scheduling subsystem responds to a request from the online training subsystem.
[0105] The data storage resource scheduling subsystem responds to the online training subsystem request based on the current available resource status, and allocates computing and storage resources for the online training of the target recognition model when resources are sufficient.
[0106] S512: The online training subsystem performs online model training.
[0107] The online training subsystem uses the resources allocated by the computing and storage resource scheduling subsystem, based on the training data set provided by the data management subsystem, and uses the internal integrated online training framework or online training tool to perform online incremental training to obtain the video analysis model and complete the model online training. There are also many model training methods, such as transfer learning, knowledge distillation, and meta-learning.
[0108] Optionally, when computing resources are tight or the video analysis system has other urgent analysis tasks to perform, the online training subsystem can interrupt model training and save the intermediate results of model training, and support the continuation of interrupted training when computing resources are idle.
[0109] S513: The online training subsystem requests model evaluation.
[0110] After obtaining the video analysis model, the online training subsystem requests the model evaluation and publishing subsystem to evaluate the model performance.
[0111] S514. The model evaluation and publishing subsystem applies to the computing and storage resource scheduling subsystem for computing resources for model testing and evaluation.
[0112] S515. The computing and storage scheduling subsystem responds to the request of the model evaluation and publishing subsystem.
[0113] The computing and storage resource scheduling subsystem responds to requests from the model evaluation and publishing subsystem based on the current available resource status. When resources are sufficient, computing and storage resources are allocated for the test and evaluation of the video analysis model obtained through online training.
[0114] S516, the model evaluation and release subsystem tests the model performance.
[0115] The model evaluation and release subsystem uses the allocated resources to automatically evaluate the performance of the model obtained through online training based on the user's decision, the test set provided by the user, or the test set generated by the data management subsystem, and obtains and records the multi-dimensional analysis report of the model, including the model's inference latency, memory usage, model size, false alarm rate based on the test set, and recall rate. The model evaluation and release subsystem can also support the performance comparison of the new model with the previous version of the model under the same test set.
[0116] S517, the model evaluation and release subsystem decides the release strategy of the video analysis model obtained through online training.
[0117] The model evaluation and release subsystem feeds back the model's performance analysis report to the user, and releases the video analysis model based on user or automated decisions. a) If the video analysis model does not meet the comprehensive performance requirements, you can choose to retrain the model online. b) If the comprehensive performance of the video analysis model is improved, you can choose to request the model release from the computing and storage resource scheduling subsystem.
[0118] S518. The computing and storage resource scheduling subsystem responds to the request of the model evaluation and publishing subsystem.
[0119] If the model evaluation and publishing subsystem requests model publishing, the computing and storage resource scheduling subsystem allocates storage space for the video analysis model in the video analysis subsystem and the online training subsystem based on the request.
[0120] S519: Publish and store the video analysis model.
[0121] After the new model release request is approved, a) the model evaluation and release subsystem stores the video analysis model in the video analysis subsystem. When the original target recognition model in the video analysis subsystem is in an updateable idle state, the new model replaces the original model. Optionally, the model version confirmed to be replaced can also be archived in the data management subsystem for version rollback to complete the online optimization of the model. b) The model evaluation and release subsystem can also store the video analysis model in the online training subsystem for subsequent target recognition model online training process.
[0122] Optionally, the model evaluation and publishing subsystem can also send the video analysis model to the data management subsystem to assist in image annotation.
[0123] Figure 5 The method shown includes a computing and resource scheduling subsystem, which can realize reasonable allocation and scheduling of computing and storage resources among subsystems, thereby improving resource utilization efficiency.
[0124] Figure 6 It is an online optimization method for the target attribute model. The online optimization process of the target attribute model is similar to that of the target recognition model. The main difference lies in the different labeling strategies and model testing methods. It includes the following steps:
[0125] S601: The video analysis subsystem receives a request for video data to flow in from a front-end.
[0126] The front-end video data inflow request may carry relevant information of the video stream, such as the bit rate, time and source identification field of the video stream.
[0127] S602: The video analysis subsystem responds to the request of the terminal.
[0128] The video analysis subsystem evaluates the available computing resources and storage resources within the system. If there is enough storage space, it plans the storage address and memory unit for the input video stream data, and then performs decoding, storage and analysis of the video stream data.
[0129] S603: The image sequence after the video stream is decoded and sent by the front end is processed by the target detection and tracking algorithm integrated in the video analysis subsystem to obtain the target trajectory.
[0130] Different videos will definitely get different trajectories, and different targets in the same video will also have different trajectories. Ideally, the same target in the same video will get the same trajectory, but due to the inability to achieve absolute accuracy in detection and tracking performance and the complexity of the actual scene, different trajectories may also be obtained in this case. The target trajectory is an image sequence composed of target cutouts, and each target image carries trajectory information, such as the original video ID, target trajectory ID, and the cutout ID of the target in the trajectory. The above IDs can be used to assist in subsequent image annotation.
[0131] S604, the video analysis subsystem uses the obtained target cutout to obtain a series of structured information through an internally integrated intelligent analysis algorithm, and sends an inflow request to the data management subsystem.
[0132] S605. The data management subsystem responds to the request of the video analysis subsystem and allocates storage space and computing resources for cleaning and labeling for the incoming images. If the computing resources are temporarily insufficient, the images can be stored first and then cleaned and labeled when the computing resources are sufficient.
[0133] Optionally, if the data management subsystem and the video analysis subsystem are located on the same hardware device, the data management subsystem may choose to send only the storage location of the target image to the data management subsystem, and the data management subsystem only needs to read the target image according to the storage location of the target image.
[0134] S606: The data management subsystem cleans and labels the target.
[0135] The data management subsystem uses the allocated computing resources to automatically clean and annotate the input data and structured information, and divides the annotated data into training sets and test sets according to a certain ratio. The image data in the training set and the test set are independent of each other, and there is no duplicate image data in the training set and the test set. Data cleaning in the target attribute model training is mainly to ensure that the angle and clarity of the target meet the requirements, and the annotation requires that the attributes of the target image are correct. Different monitoring scenarios correspond to different attribute annotation schemes. For example, in the face / body attribute annotation in the scene with a witness, some attributes can be directly labeled based on the witness information, such as obtaining gender, age and ethnicity based on the identity document information; in the scene without a witness, the trajectory can also be extracted based on the target detection and tracking algorithm. Different frames under the same trajectory are predicted by the basic human attribute model and then voted. If there is a difference between the attributes of a few images and other images, it is a wrong example. If the attribute confidence of the image is low, it is a difficult example. Then, the wrong examples and difficult examples can be handed over to multiple human attribute models for voting prediction and annotation. Finally, the data management subsystem stores the annotated data in the data set. The data set can be divided into a training set for model training and a test set for testing the trained model.
[0136] S607: When sufficient annotated image data is obtained, the data management subsystem requests online model training.
[0137] The cleaned and labeled data will be uniformly managed within the data management subsystem. The newly added target image data will be uniformly managed with the previously stored target images, and there is no need to fusion ID. The system will count the current amount of collected data. When the number requirement for training the model is reached, an online training request will be sent to the online training subsystem.
[0138] S608. The online training subsystem responds to the online training subsystem request according to the current available resource status, and allocates computing and storage resources for online training of the target attribute model when resources are sufficient.
[0139] S609: The online training subsystem performs online model training.
[0140] The online training subsystem uses internal computing and storage resources, based on the training data set provided by the data management subsystem, and uses an internal integrated online training framework or online training tool to perform online training to obtain a video analysis model, thereby completing the online generation of a video analysis model. There are many model training methods, such as transfer learning, knowledge distillation, and meta-learning, etc. The corresponding model training method can be selected according to the actual scenario needs, and this embodiment of the present application does not limit this.
[0141] Optionally, when computing resources are tight or the video analysis system has other urgent analysis tasks to perform, the online training subsystem can interrupt model training and save the intermediate results of model training, and support the continuation of interrupted training when computing resources are idle.
[0142] S610: The online training subsystem requests model evaluation.
[0143] After the online training of the model is completed and a new model is obtained, the online training subsystem requests the model evaluation and release subsystem to evaluate the model performance.
[0144] S611, the model evaluation and publishing subsystem responds to the request of the online training subsystem.
[0145] The model evaluation and release subsystem responds to model evaluation and release subsystem requests based on the current available resource status, and allocates computing and storage resources for the test and evaluation of new models obtained through online training when resources are sufficient.
[0146] S612, the model evaluation and release subsystem tests the model performance.
[0147] The model evaluation and release subsystem uses the allocated resources to automatically evaluate the performance of the model obtained through online training based on the user's decision, the test set provided by the user, or the test set generated by the data management subsystem, and obtains a multi-dimensional analysis report of the model, including the model's inference latency, memory usage, model size, rejection rate based on the test set, and accuracy of each attribute label. The model evaluation and release subsystem can also support performance comparison of the new model with the previous version of the model under the same test set.
[0148] S613, the model evaluation and release subsystem determines the release strategy of the model.
[0149] The model evaluation and publishing subsystem feeds back the model's performance analysis report to the user, and makes decisions based on the user or automated model release. a) If the model generated by training does not meet the comprehensive performance requirements, the model can be selected for online retraining; b) If the comprehensive performance of the new model is improved, the trained model will be published and stored in the video analysis subsystem. When the original target attribute model in the video analysis subsystem is in an updateable idle state, the new model will replace the original model.
[0150] Optionally, the model version that is confirmed to be replaced can also be archived in the data management subsystem for version rollback to complete the online optimization of the model. In addition, the model evaluation and publishing subsystem can also publish the generated model to the online training subsystem for the subsequent online training process of the target recognition model.
[0151] Optionally, the model evaluation and publishing subsystem can also send the video analysis model obtained through online training to the data management subsystem to assist in image annotation.
[0152] Relative to Figure 5 , Figure 6 The method shown does not set up a computing and storage resource scheduling subsystem to manage the computing and storage resources in the system, but each subsystem manages the computing and storage resources by itself.
[0153] In the video analysis method for online model optimization provided in the embodiment of the present application, on the one hand, online training data sets can be automatically generated based on the front-end video stream data, supporting the online optimization of the video analysis model, and alleviating the problem of performance degradation of the video analysis model in actual scenarios; on the other hand, the data of the actual monitoring scene collected by the front-end can be fully utilized without the need for back transmission, saving bandwidth and avoiding infringement of user privacy. At the same time, since the model is obtained by training using monitoring data from a specific monitoring scene, different training models can be obtained for different scenarios, so that the entire video analysis system has adaptive capabilities.
[0154] The above operations mainly performed from within the video analysis system introduce the method provided by the embodiment of the present application. It can be understood that in order to realize the above functions, the above video analysis system includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0155] The embodiment of the present application can divide the video analysis system into various subsystems according to the above method embodiment. For example, the subsystems can be divided according to the various functions, or two or more functions can be integrated into one subsystem. The above integrated subsystem can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of subsystems in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0156] For example, when each subsystem is divided into different functions, Figure 1A possible structural schematic diagram of the video analysis system involved in the above embodiment is shown. The video analysis system 100 includes a video analysis subsystem 110, a data management subsystem 120, an online training subsystem 130, and a model evaluation and publishing subsystem 140. The video analysis subsystem 110 is used to receive and parse video stream data to obtain unlabeled image data, wherein the unlabeled image data includes structured information. The data management subsystem 120 is used to clean and label the unlabeled image data, that is, to filter the low-quality images in the unlabeled image data to obtain image data whose image quality meets the training requirements, and to pre-label the image data that meets the training requirements using multi-model fusion evaluation, and then use structured data to verify the pre-labeled images, and finally generate a data set for online model training, wherein the data set includes a training set and a test set. The online training subsystem 130 is used to use an online training algorithm to perform online training on the training set to obtain the parameters of the video analysis model. The model evaluation and publishing subsystem 140 is used to publish the video analysis model.
[0157] The low-quality images include one or more of blurred images, large-angle images, and images with occlusions.
[0158] Optionally, the video analysis subsystem 110 may receive video stream data collected by a front-end camera, or may receive video stream data saved by other devices. The video stream data received by the video analysis subsystem 110 may include attribute information of the video stream data, such as video stream bit rate, shooting time, and source identification, etc. The video analysis subsystem 110 is integrated with various video analysis decoding tools to decode the video stream data to obtain unlabeled image data. The unlabeled image data may include structured information of the image, such as target attributes, feature vectors, etc.
[0159] Optionally, the data management subsystem 120 can clean and annotate unlabeled image data in a variety of ways. For example, the data management subsystem 120 can use evaluation indicators such as the Laplace operator to filter out blurred images, use the Euler angle detection model to output the angle of the target in the image, and limit the target angle threshold to filter out large-angle images, and can also use a trained occlusion classifier to filter out images where the target is occluded. In addition, the data management subsystem 120 can also use the training image quality scoring model to automatically implement image quality scoring, and preset image quality thresholds to filter image data whose image quality does not meet the model training requirements. The data management subsystem 120 can use a feature vector clustering algorithm or a multi-model fusion evaluation algorithm to annotate the unlabeled image data obtained by screening, and obtain a data set for online model training. When the number of labeled image data in the training set meets the requirements of model training, a model training request can be initiated.
[0160] Optionally, the online training subsystem 130 can use an internally integrated online training algorithm or online training tool to perform online training to obtain a new video analysis model, or it can use transfer learning or incremental training algorithms based on the original video analysis model to perform online training on the training set to obtain a video analysis model, which is an optimization of the original video analysis model for the current monitoring scenario.
[0161] The online training algorithm used by the online training subsystem 130 may be one or more of incremental training, transfer learning knowledge distillation, or meta-learning algorithms. During online training, the hyperparameters used for online training may be automatically adjusted, such as one or more of the learning rate decay step, the total training step, the basic learning rate, and the batch size.
[0162] Optionally, when publishing the video analysis model to the video analysis system, the model evaluation and publishing subsystem 140 first tests the performance of the video analysis model and generates a model performance analysis report. When the performance of the video analysis model meets the usage standard, the video analysis model is published to the video analysis system 100. The video analysis subsystem 110 in the video analysis system 100 can use the video analysis model obtained by online training to perform video analysis and processing, and the online training subsystem 130 can also use the video analysis model obtained by online training to perform online training.
[0163] Optionally, the model evaluation and publishing subsystem 140 can test the performance of the video analysis model based on a test set provided by the user or a training set in the data set. The resulting model performance analysis report may include one or more of the video analysis model's inference latency, memory usage, and accuracy based on the test set, but is not limited to the above parameters.
[0164] Optionally, the video analysis system 100 may further include a resource scheduling subsystem 150 for allocating and scheduling computing and storage resources of the video analysis system.
[0165] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding subsystem, and will not be repeated here.
[0166] In this embodiment, the video analysis system is presented in the form of dividing each subsystem corresponding to each function, or the video analysis system is presented in the form of dividing each subsystem in an integrated manner. The "subsystem" here can refer to an application-specific integrated circuit (ASIC), a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions. In a simple embodiment, a person skilled in the art can imagine that the video analysis system 100 can be used Figure 2 For example, Figure 1 The video analysis subsystem 110, the data management subsystem 120, the online training subsystem 130, the model evaluation and publishing subsystem 140 and the resource scheduling subsystem 150 in the system can be realized by Figure 2 The processor 201 and the memory 203 are implemented. Specifically, the video analysis subsystem 110, the data management subsystem 120, the online training subsystem 130, the model evaluation and publishing subsystem 140, and the resource scheduling subsystem 150 can be executed by the processor 201 calling the application code stored in the memory 203, and the embodiment of the present application does not impose any limitation on this.
[0167] Since the video analysis system provided in the embodiment of the present application can be used to execute the video analysis method for online optimization of the above-mentioned model, the technical effects that can be obtained can be referred to the above-mentioned method embodiment and will not be repeated here.
[0168] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0169] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in a claim. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0170] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for generating a video analysis model, characterized in that: The method is applied to a video analysis system in a network camera, and the method comprises: Receiving video stream data, parsing the video stream data, and obtaining unlabeled image data, wherein the unlabeled image data includes structured information, and the video stream data includes video data obtained by real-time monitoring of the network camera in a video monitoring scene; Filtering low-quality images in the unlabeled image data to obtain image data with image quality that meets training requirements, wherein the low-quality images include one or more of blurred images, large-angle images, and occluded images; The images whose image quality meets the training requirements are pre-labeled by using multi-model fusion evaluation, and the pre-labeled image data are verified by using the structural information of the images whose image quality meets the training requirements to generate a data set for model training, wherein the data set includes a training set; The online training algorithm is used to perform online training on the training set to obtain a video analysis model, wherein the online training algorithm is used to perform online training on the training set, including: automatically adjusting model training hyperparameters, wherein the hyperparameters include one or more of a learning rate decay step, a total training step, a basic learning rate, and a batch size, and wherein the online training algorithm is one or more of an incremental training, a transfer learning, a knowledge distillation, and a meta-learning algorithm; The video analysis model is released.
2. The method according to claim 1, characterized in that The adopting an online training algorithm to perform online training on the training set comprises: Based on the original video analysis model, the training set is trained online using a transfer learning or incremental training algorithm, wherein the original video analysis model includes an externally input video analysis model or a previous version of a video analysis model saved by the video analysis system.
3. The method according to claim 1 or 2, characterized in that: The publishing of the video analysis model comprises: Testing the performance of the video analysis model and generating a model performance analysis report; When the performance of the video analysis model meets the usage standard, the video analysis model is published to the video analysis system.
4. The method according to claim 3, characterized in that The data set also includes a test set, which tests the performance of the video analysis model and generates a model performance analysis report, including: Testing the performance of the video analysis model according to a test set provided by a user or a test set in the data set; The model performance analysis report includes: one or more of the inference latency, memory usage and accuracy based on the test set of the video analysis model.
5. A video analysis system, characterized in that: The video analysis system comprises a video analysis subsystem, a data management subsystem, an online training subsystem and a model evaluation and publishing subsystem, and the video analysis system is applied to a network camera, wherein: The video analysis subsystem is used to receive video stream data, parse the video stream data, and obtain unlabeled image data, wherein the unlabeled image data includes structured information, and the video stream data includes video data obtained by real-time monitoring of the network camera in a video monitoring scene; The data management subsystem is used to filter low-quality images in the unlabeled image data to obtain image data with image quality that meets training requirements, wherein the low-quality images include one or more of blurred images, large-angle images, and occluded images; The data management subsystem is further used to pre-label the image data whose image quality meets the training requirements by using multi-model fusion evaluation, verify the pre-labeled images by using the structural information of the images whose image quality meets the training requirements, and generate a data set for model training, wherein the data set includes a training set and a test set; The online training subsystem is used to perform online training on the training set using an online training algorithm to obtain a video analysis model; The online training subsystem is further used to automatically adjust model training hyperparameters, wherein the hyperparameters include one or more of a learning rate decay step, a total training step, a basic learning rate, and a batch size, and the online training algorithm is one or more of incremental training, transfer learning, knowledge distillation, or a meta-learning algorithm; The model evaluation and publishing subsystem is used to publish the video analysis model.
6. The video analysis system according to claim 5, characterized in that: The online training subsystem is used to perform online training on the training set based on the original video analysis model using transfer learning or incremental training algorithm, wherein the original video analysis model includes an externally input video analysis model or a previous version of the video analysis model saved by the video analysis system.
7. The video analysis system according to claim 5 or 6, characterized in that: The model evaluation and publishing subsystem is also used to test the performance of the video analysis model and generate a model performance analysis report; When the performance of the video analysis model meets the usage criteria, the model evaluation and publishing subsystem publishes the video analysis model to the video analysis system.
8. The video analysis system according to claim 7, characterized in that: The model evaluation and publishing subsystem tests the performance of the video analysis model according to a test set provided by a user or a test set in the data set; The model performance analysis report includes one or more of the inference latency, memory usage, and accuracy based on a test set of the video analysis model.
9. A video analysis device, characterized in that: include: Processors, memories, buses, and communication interfaces; The memory is used to store computer-executable instructions, and the processor is connected to the memory via the bus. When the control device is running, the processor executes the computer-executable instructions stored in the memory, so that the control device executes the method for generating a video analysis model as described in any one of claims 1-4.
10. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, enable the computer to execute the method for generating a video analysis model as claimed in any one of claims 1 to 4.
