Adaptive environment model using method, device and equipment based on monitoring system
Through the adaptive environment model, the monitoring system is adjusted brightness and feature extraction, and combined with incremental learning to optimize model parameters, the reliability problems of traditional monitoring systems in lighting changes and complex environments are solved, and efficient object detection and recognition are achieved.
Patent Information
- Application Number
- CN202411744960.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-11
AI Technical Summary
传统监控系统在光照变化和复杂环境下可靠性差,难以实现高效的目标检测和识别。
The adaptive environment model is used to adjust the brightness and extract the feature of the new scene video images, and optimize the model parameters with incremental learning and backpropagation algorithm to adapt to different lighting and environmental conditions.
It improves the accuracy of object detection and the reliability of monitoring systems, and can generate high-quality object detection results in light changes and complex environments.
Smart Images

Figure CN119810728A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of online learning technology, and in particular to a method, device and equipment for using an adaptive environment model based on a monitoring system. Background Art
[0002] With the rapid development of industrial automation, energy management and smart city construction, monitoring systems are increasingly used in many fields. Modern monitoring systems are not limited to traditional image acquisition and storage functions, but also require real-time analysis, anomaly identification and event response of the collected data.
[0003] However, as the monitoring environment changes, traditional monitoring systems are prone to poor reliability when used. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device and equipment for using an adaptive environment model based on a monitoring system, which can improve the reliability of the monitoring system, in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for using an adaptive environment model based on a monitoring system, comprising:
[0006] Acquire new scene video images;
[0007] The pre-trained adaptive environment model is used to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0008] In one embodiment, the method further includes:
[0009] When the target detection result does not meet the preset conditions, the adaptive environment model is updated; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
[0010] In one embodiment, the training process of the adaptive environment model includes:
[0011] The pre-established initial illumination model is trained based on a plurality of training video images to obtain a first illumination model; the illumination intensities corresponding to the plurality of training video images are different;
[0012] Acquire multiple annotated images; the multiple annotated images correspond to different video recording device angles;
[0013] The first illumination model is trained based on the multiple annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model.
[0014] In one embodiment, the pre-established initial illumination model is trained based on a plurality of training video images to obtain a first illumination model, including:
[0015] For each training video image, input the training video image into the initial illumination model for brightness adjustment processing to obtain an adjusted training video image; the brightness adjustment processing at least includes brightness normalization processing and brightness enhancement processing;
[0016] Based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain a first illumination model.
[0017] In one embodiment, the first illumination model is trained based on the plurality of annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model, including:
[0018] Copying the first illumination model to obtain a second illumination model;
[0019] For each annotated image, performing feature extraction processing and mapping processing on the annotated image in sequence based on the first illumination model to obtain a first probability distribution;
[0020] Based on the second illumination model, feature extraction and mapping are performed on the labeled image in sequence to obtain a second probability distribution;
[0021] The first illumination model is trained based on the first probability distribution, the second probability distribution and the annotation result to obtain an adaptive environment model.
[0022] In one embodiment, the first illumination model is trained based on the first probability distribution, the second probability distribution and the annotation result to obtain an adaptive environment model, including:
[0023] Perform a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value;
[0024] Perform a divergence operation on the first probability distribution and the labeled result to obtain a second loss value;
[0025] Based on the first loss value and the second loss value, the model parameters of the first illumination model are updated to obtain an adaptive environment model.
[0026] In one embodiment, the method of updating the model parameters of the first illumination model based on the first loss value and the second loss value to obtain the adaptive environment model includes:
[0027] Performing weighted sum processing on the first loss value and the second loss value to obtain a target loss value;
[0028] Based on the back propagation algorithm, the model parameters of the first illumination model are updated using the target loss value to obtain an adaptive environment model.
[0029] In a second aspect, the present application also provides a device for using an adaptive environment model based on a monitoring system, comprising:
[0030] An image acquisition module, used to acquire video images of new scenes;
[0031] The processing module is used to use the pre-trained adaptive environment model to perform brightness adjustment processing on the new scene video image to obtain the adjusted new scene video image, and perform feature extraction processing on the adjusted new scene video image to obtain the target detection result corresponding to the new scene video image.
[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Acquire new scene video images;
[0034] The pre-trained adaptive environment model is used to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0036] Acquire new scene video images;
[0037] The pre-trained adaptive environment model is used to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0038] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0039] Acquire new scene video images;
[0040] The pre-trained adaptive environment model is used to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0041] The above-mentioned method, device and apparatus for using the adaptive environment model based on the monitoring system first obtains a video image of a new scene;
[0042] Then, the pre-trained adaptive environment model is used to adjust the brightness of the new scene video image to obtain the adjusted new scene video image, and the adjusted new scene video image is subjected to feature extraction to obtain the target detection result corresponding to the new scene video image; in this method, the accuracy of the detection of the new scene video image is improved by combining brightness adjustment and feature extraction. Regardless of whether the lighting changes greatly or other environmental conditions are complex, the target detection result corresponding to the new scene video image can be obtained, thereby improving the quality of image processing and the ability of target recognition, and thus improving the reliability of the monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 is an internal structure diagram of a computer device in one embodiment;
[0045] Figure 2 A flowchart of a method for using an adaptive environment model based on a monitoring system in one embodiment;
[0046] Figure 3 A flowchart of a method for using an adaptive environment model based on a monitoring system in another embodiment;
[0047] Figure 4 A flowchart of a method for using an adaptive environment model based on a monitoring system in another embodiment;
[0048] Figure 5 A flowchart of a method for using an adaptive environment model based on a monitoring system in another embodiment;
[0049] Figure 6 A flowchart of a method for using an adaptive environment model based on a monitoring system in another embodiment;
[0050] Figure 7 A flowchart of a method for using an adaptive environment model based on a monitoring system in another embodiment;
[0051] Figure 8It is a structural block diagram of a device for using an adaptive environment model based on a monitoring system in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data during the use of the adaptive environment model based on the monitoring system. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for using an adaptive environment model based on a monitoring system is implemented.
[0054] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0055] In an exemplary embodiment, Figure 2 As shown, a method for using an adaptive environment model based on a monitoring system is provided, and the method is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps 201 to 202. Among them:
[0056] Step 201, obtaining a new scene video image.
[0057] The new scene video image refers to a video data frame collected in a new physical scene, which may include an image sequence or a single frame image, and is usually derived from a camera device (such as a camera). The new scene video image reflects the current state of the new scene.
[0058] In an embodiment of the present application, after the camera in the monitoring system starts to start, the computer device acquires the new scene video image from the camera in real time. After acquiring the new scene video image, the computer device preprocesses the new scene video image to optimize the input quality and improve the analysis efficiency. In this process, the computer device can convert the color image into a grayscale image or other color space. Subsequently, through a noise reduction method such as a Gaussian filter and a median filter, random noise points in the new scene video image are eliminated while maintaining the edge feature clarity.
[0059] In some embodiments, if the size of the new scene video image does not meet the subsequent processing requirements, a cropping or scaling operation is required to ensure that the new scene video image meets the specifications and retains necessary detail information.
[0060] Step 202, using the pre-trained adaptive environment model to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and performing feature extraction processing on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0061] Among them, the adaptive environment model can adjust the image parameters of the new scene video image according to different characteristics (such as brightness, color temperature, etc.) of the new scene video image to obtain an adjusted new scene video image.
[0062] The target detection result is the result of identifying and locating the target object (such as a person, object, etc.) in the new scene video image. The target detection result can include:
[0063] (1) Category label: the specific type of the target (such as "person" or "object").
[0064] (2) Bounding box: The rectangular area where the object is located, used to indicate its location.
[0065] (3) Confidence: The probability score that the target belongs to a certain category.
[0066] In the embodiment of the present application, the computer device loads the pre-trained adaptive environment model, which evaluates the global and local brightness distribution of the new scene video image to detect whether there is a problem of being too dark or overexposed. Then, based on the analysis results, the brightness is globally optimized using gamma correction, contrast stretching and other technologies, or the local area is enhanced using multi-scale transformation technology, so that the overall brightness of the new scene video image is more uniform and the details are more prominent.
[0067] After the brightness adjustment is completed, feature extraction is performed on the new scene video image. For example, the region of interest in the new scene video image can be located through a region proposal network or block scanning. In the region of interest, edge direction information is extracted using a feature extraction algorithm, or high-dimensional feature representation is extracted through a convolutional neural network, thereby obtaining the target detection result corresponding to the new scene video image.
[0068] In some embodiments, after the target detection is completed, the target detection result will be further processed. For example, the detected target detection result can be visualized in the image, such as drawing a bounding box and adding a category label to intuitively display the result. At the same time, the target detection result can also be saved in JSON or XML format for subsequent storage or transmission.
[0069] In the above-mentioned method for using the adaptive environment model based on the monitoring system, firstly, a video image of a new scene is obtained;
[0070] Then, the pre-trained adaptive environment model is used to adjust the brightness of the new scene video image to obtain the adjusted new scene video image, and the adjusted new scene video image is subjected to feature extraction to obtain the target detection result corresponding to the new scene video image; in this method, the accuracy of the detection of the new scene video image is improved by combining brightness adjustment and feature extraction. Regardless of whether the lighting changes greatly or other environmental conditions are complex, the target detection result corresponding to the new scene video image can be obtained, thereby improving the quality of image processing and the ability of target recognition, and thus improving the reliability of the monitoring system.
[0071] In an exemplary embodiment, the method further includes:
[0072] When the target detection result does not meet the preset conditions, the adaptive environment model is updated; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
[0073] Among them, the target detection result is the output information generated by the target detection algorithm after identifying and locating the target object in the video image. It usually includes the following contents:
[0074] (1) Behavior category: the action or state of the target object in the scene, such as “pedestrian walking” or “object falling”.
[0075] (2) Box coordinates: Indicates the specific location of the target object in the image, described in the form of a rectangular bounding box, whose coordinates are usually expressed by the pixel positions of the upper left corner and the lower right corner (such as x1, y1, x2, y2, x3, y,3, x4, y4).
[0076] Preset conditions are standards or thresholds for target detection results set before running, which are used to evaluate the completion of the detection task. Preset conditions can include target recognition accuracy, minimum confidence level of the detected object, accuracy of the box coordinates, correctness of the behavior category, etc. For example, only detection results with a confidence level higher than 90% meet the preset conditions.
[0077] Update processing refers to retraining or parameter adjustment of the adaptive environment model deployed in the application environment to improve its performance in specific scenarios. This process may include re-collecting training data, adjusting the model architecture, or optimizing the adaptive environment model parameters, with the goal of making the adaptive environment model better adapt to new environmental conditions, thereby improving the accuracy and robustness of target detection results.
[0078] In an embodiment of the present application, when the target detection result does not meet the preset conditions, the computer device first verifies the validity of the target detection result. Compare it with the preset conditions to determine whether the requirements are met. For example, check whether the behavior category accurately matches the actual action of the target, whether the frame coordinates accurately cover the target area, or whether the detection confidence is higher than the set threshold. If the detection result does not meet the requirements, the computer device marks the target detection result as "not meeting the conditions".
[0079] Next, the computer equipment will collect relevant data that does not meet the conditions to analyze the specific reasons for the insufficient performance of the adaptive environmental model, such as insufficient image brightness leading to failure in target feature extraction, uneven lighting distribution causing model misjudgment, or environmental noise interference leading to reduced detection confidence.
[0080] After identifying the source of the problem, the computer device adjusts the parameters of the adaptive environment model. For example, in the case of insufficient light, it is necessary to increase the processing intensity of the brightness enhancement algorithm to optimize the local details of the image; if the detection boundary is not clear, the contrast or sharpening strategy can be adjusted. In addition, for certain specific scenarios, it may be necessary to modify the local optimization strategy of the model to make it more adaptable to complex environmental conditions.
[0081] After adjusting the parameters, the computer device adds the collected data that does not meet the conditions to the training set of the adaptive environment model and retrains the adaptive environment model using incremental learning technology. Incremental learning allows for rapid updates based on the original adaptive environment, avoiding the high cost of complete retraining. The incrementally trained model needs to be validated on the test set to evaluate its improvement effect.
[0082] The new adaptive environment model that has passed verification will be deployed to the actual system, replacing the old version and put into use. The computer device uses the updated new adaptive environment model to process new video images and generate target detection results that better meet the preset conditions. At the same time, the computer device continues to monitor the performance of target detection during operation. If the new adaptive environment model still performs poorly in subsequent use, the computer device will repeat the above process to ensure that the performance of the adaptive environment model is gradually optimized and ultimately meet the target detection requirements in complex scenarios.
[0083] In an exemplary embodiment, Figure 3 As shown, the training process of the above adaptive environment model includes:
[0084] Step 301 : training a pre-established initial illumination model based on a plurality of training video images to obtain a first illumination model; the illumination intensities corresponding to the plurality of training video images are different.
[0085] In the embodiment of the present application, first, a pre-established initial illumination model is trained through a plurality of training video images. The selected training video images have different illumination intensities to cover a variety of illumination conditions. The initial illumination model gradually optimizes parameters by learning the distribution law of brightness, contrast, and color saturation in the training video images, so as to have a preliminary illumination adaptation capability. After this stage of training, a first illumination model capable of handling a variety of illumination conditions is obtained.
[0086] Step 302, obtaining a plurality of annotated images; the plurality of annotated images correspond to different video recording device angles.
[0087] In the embodiment of the present application, the computer device obtains a set of multi-angle annotated images, which are taken by video recording devices at different angles. In addition, the collection of annotated images should cover the performance of the target object in different scenes and device angles to ensure that the model can adapt to multiple device perspectives. Each annotated image is accompanied by a corresponding annotation result, including the target category, frame coordinates and other relevant information.
[0088] Step 303: training the first illumination model based on the multiple annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model.
[0089] In an embodiment of the present application, the collected annotated image is preprocessed, including noise reduction, cropping, and resolution normalization, to meet the requirements of the first illumination model input. In addition, data enhancement operations are performed, such as image rotation, scaling, contrast adjustment, and noise addition, to expand the coverage of the data set. The preprocessed annotated image and its corresponding annotation results are input into the first illumination model for update training. At this stage, the first illumination model optimizes its illumination adjustment capabilities under different viewing angles by learning the multi-angle characteristics and target results of the annotated image.
[0090] Repeat the update training steps to gradually improve the model performance in multiple rounds of iterations. After each round of training, the first illumination model is further optimized using the newly added annotated images and scene data to gradually adapt it to more diverse device angles and lighting conditions. The first illumination model continuously corrects its brightness adjustment, contrast optimization, and other illumination processing parameters in each round of optimization, and finally obtains an adaptive environment model.
[0091] In an exemplary embodiment, Figure 4 As shown, the above “training a pre-established initial illumination model based on multiple training video images to obtain a first illumination model” includes:
[0092] Step 401: for each training video image, input the training video image into the initial illumination model for brightness adjustment processing to obtain an adjusted training video image.
[0093] The brightness adjustment process at least includes brightness normalization process and brightness enhancement process.
[0094] In the embodiment of the present application, for each frame of training video image, the computer device first inputs it into the initial illumination model to perform brightness adjustment processing on the image.
[0095] In some embodiments, the training video image can be subjected to brightness normalization and brightness enhancement processing. Exemplarily, the initial illumination model analyzes the overall brightness distribution of the training video image and adjusts the brightness value of each pixel so that it is evenly distributed within a specific range. After completing the brightness normalization, the initial illumination model further performs brightness enhancement processing on the image. In this step, the initial illumination model focuses on optimizing the low-brightness areas in the training video image, making the training video image clearer by enhancing the detail expression of the dark area, while avoiding the loss of details in the overly bright area.
[0096] After brightness adjustment, an adjusted training video image is generated. The training video image is normalized and enhanced, which not only optimizes the illumination characteristics but also retains the important content information of the training video image.
[0097] Step 402: Based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain a first illumination model.
[0098] In the embodiment of the present application, the computer device compares the training video image with the adjusted training video image and analyzes the difference between the two in key lighting characteristics such as brightness and contrast. By extracting statistical data of a specific area, it is evaluated whether the adjustment effect of the first lighting model has achieved the expected effect, providing feedback basis for the next step of model optimization.
[0099] Based on the results of the comparative analysis, the computer device optimizes the parameters of the initial illumination model. The first illumination model adjusts the weight parameters of brightness normalization and brightness enhancement according to the difference between the training video image and the adjusted training video image to better adapt to the training images under different illumination conditions. Through this series of steps, the initial illumination model is continuously optimized and finally forms the first illumination model. In the above embodiment,
[0100] In an exemplary embodiment, Figure 5 As shown, the above “training the first illumination model based on multiple annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model” includes:
[0101] Step 501, copy the first illumination model to obtain a second illumination model.
[0102] In the embodiment of the present application, the computer device first copies the first illumination model that has completed preliminary training to obtain a second illumination model. During the copying process, the computer device needs to make the initial parameters and structures of the first illumination model and the second illumination model completely consistent to ensure that they are in the same reference state when processing the annotated image. The purpose of this process is to create a control model to provide a reliable basis for subsequent comparisons while reducing training interference.
[0103] Step 502: for each annotated image, perform feature extraction and mapping processing on the annotated image in sequence based on the first illumination model to obtain a first probability distribution; perform feature extraction and mapping processing on the annotated image in sequence based on the second illumination model to obtain a second probability distribution.
[0104] In an embodiment of the present application, a computer device inputs the annotated image into a first illumination model for feature extraction. The core of feature extraction is to analyze the visual elements in the annotated image through the first illumination model, including brightness distribution, illumination gradient changes, texture characteristics of the target area, etc. After the feature extraction is completed, the first illumination model maps the image based on the extracted feature vector to generate a corresponding first probability distribution. The first probability distribution reflects the correlation between the target object and the background in the annotated image, and reflects the prediction ability of the first illumination model under the current illumination conditions.
[0105] The computer device uses the second illumination model to process the same batch of annotated images, similar to the operations performed by the first illumination model. The computer device extracts the same visual features from the annotated images and maps them to generate a second probability distribution. Since the second illumination model is a copy of the first illumination model, the second probability distribution generated in its initial stage should be highly consistent with the first probability distribution. However, as the subsequent optimization training proceeds, the results of the two models will gradually differ, and this difference becomes an important basis for adjusting the model.
[0106] Step 503: Train the first illumination model based on the first probability distribution, the second probability distribution and the annotation result to obtain an adaptive environment model.
[0107] In an embodiment of the present application, the computer device compares the first probability distribution and the second probability distribution generated by the first illumination model and the second illumination model item by item. The differences between the first probability distribution and the second probability distribution in key parameters are analyzed, including the degree of matching of the target area, the effect of removing background noise, and the adaptability to illumination changes. Through this comparative analysis, the computer device can quantify the difference in details between the two models when processing the same image. In addition, combined with the manual annotation results of the annotated image, the computer device evaluates the accuracy and consistency of each model, thereby obtaining the weak links in the model performance.
[0108] After completing the difference analysis, the computer device optimizes and trains the first illumination model based on the first probability distribution, the second probability distribution, and the annotation results. The annotation results provide an accurate reference target for training. By comparing with the probability distribution generated by the model, the computer device adjusts the parameter settings of the illumination model, including the weight distribution of the feature extraction algorithm, the conversion rules of the mapping process, etc. During the training process, the computer device uses an iterative optimization method to gradually make the output results of the first illumination model close to the annotation results.
[0109] After multiple rounds of training, the first lighting model is gradually optimized and eventually transformed by computer equipment into an adaptive environmental model with efficient lighting adaptation capabilities.
[0110] In an exemplary embodiment, Figure 6 As shown, the above “training the first illumination model based on the first probability distribution, the second probability distribution and the annotation result to obtain an adaptive environment model” includes:
[0111] Step 601, performing a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value.
[0112] In an embodiment of the present application, a computer device uses a cross entropy operation to evaluate the similarity between a first probability distribution and a second probability distribution. Among them, cross entropy is an indicator to measure the difference between distributions. By calculating the degree of match between the two distributions on the target category, the computer device can quantify the performance consistency of the first illumination model and its copy model when processing the annotated image. The lower the cross entropy value, the more similar the probability distributions output by the two are. Finally, the computer device generates a first loss value.
[0113] Step 602: Perform a divergence operation on the first probability distribution and the labeling result to obtain a second loss value.
[0114] In an embodiment of the present application, the computer device uses a cross entropy operation to evaluate the deviation between the first probability distribution of the model and the actual annotation result. The divergence operation can reveal the prediction accuracy of the first illumination model on a specific annotated image, as well as the target area information retention effect of the image after the illumination adjustment process. The computer device calculates the divergence to generate a second loss value, which is used to measure the degree of adaptation of the first illumination model to the annotation result.
[0115] Step 603: Based on the first loss value and the second loss value, the model parameters of the first illumination model are updated to obtain an adaptive environment model.
[0116] In the embodiment of the present application, the computer device will adjust the parameters of the first illumination model based on the two loss values. If the first loss value is large, it means that the brightness adjustment effect of the first illumination model is not ideal. The computer device can increase the influence of the parameters related to the illumination adjustment and enhance the illumination adaptation ability of the first illumination model. If the second loss value is large, it indicates that there is a large difference between the feature extraction and annotation results of the first illumination model. The computer device can adjust the feature extraction module of the model to better match the annotation data.
[0117] When adjusting parameters, the computer device may adopt a local optimization method, that is, perform local adjustments on parts with higher loss values. For example, for parameters related to illumination, the computer device may optimize the illumination adjustment module to make it more accurate under various illumination conditions; for feature extraction modules, the computer device may adjust the parameters of the convolution layer or feature extraction to improve the first illumination model's ability to capture image details, thereby reducing the loss value.
[0118] The optimization process is not completed in one go, but an iterative process. After each adjustment, the computer device will verify the model to check whether the adjusted first illumination model performs better in terms of illumination consistency and annotation matching. If the loss value decreases, it means that the adjustment has worked, and the computer device can continue to iterate the optimization. If the loss value still does not reach the ideal level, the computer device will continue to make further adjustments to the first illumination model based on the feedback until the expected effect is achieved.
[0119] Finally, when the loss value stabilizes or reaches a predetermined threshold, the computer device will stop adjusting, deeming that the first illumination model has fully adapted to the environmental changes and the requirements of the labeled data, and obtaining an adaptive environmental model.
[0120] In an exemplary embodiment, Figure 7 As shown, the above “updating the model parameters of the first illumination model based on the first loss value and the second loss value to obtain an adaptive environment model” includes:
[0121] Step 701, performing weighted sum processing on the first loss value and the second loss value to obtain a target loss value.
[0122] In the embodiment of the present application, the computer device performs a comprehensive analysis on the first loss value and the second loss value, and performs weighted processing on the first loss value and the second loss value according to a preset optimization strategy to generate a target loss. In this process, the computer device can give a higher weight to the second loss value to more strongly guide the first illumination model to approach the real target, while appropriately considering the first loss value to ensure the stability of the training process.
[0123] Step 702: Based on the back propagation algorithm, the model parameters of the first illumination model are updated using the target loss value to obtain an adaptive environment model.
[0124] In an embodiment of the present application, the computer device uses the target loss value as the optimization basis and adopts the back propagation algorithm to update the parameters of the first illumination model. In this process, the computer device adjusts the key parameters in the first illumination model, such as feature extraction weights, mapping rule coefficients, and the priority of the illumination enhancement strategy, to reduce the comprehensive loss value and improve the performance of the first illumination model in illumination adaptation and target detection tasks. After multiple rounds of iterative optimization, the performance of the first illumination model is gradually improved, and the computer device generates an adaptive environment model based on the final optimized model.
[0125] According to some embodiments of the present application, a fault handling method is provided, which is described by taking the method applied to a computer device as an example, and may include the following steps:
[0126] Step 1: for each training video image, input the training video image into the initial illumination model for brightness adjustment processing to obtain an adjusted training video image; the brightness adjustment processing at least includes brightness normalization processing and brightness enhancement processing; the illumination intensities corresponding to the multiple training video images are different.
[0127] Step 2: Based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain a first illumination model.
[0128] Step 3, obtaining a plurality of annotated images; the plurality of annotated images correspond to different recording device angles.
[0129] Step 4, duplicating the first illumination model to obtain a second illumination model;
[0130] For each annotated image, feature extraction processing and mapping processing are sequentially performed on the annotated image based on the first illumination model to obtain a first probability distribution.
[0131] Step 5: Based on the second illumination model, feature extraction processing and mapping processing are performed on the labeled image in sequence to obtain a second probability distribution.
[0132] Step 6: Perform a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value; perform a divergence operation on the first probability distribution and the labeled result to obtain a second loss value.
[0133] Step 7: Perform weighted sum processing on the first loss value and the second loss value to obtain a target loss value.
[0134] Step 8: Based on the back propagation algorithm, the model parameters of the first illumination model are updated using the target loss value to obtain an adaptive environment model.
[0135] Step 9: Acquire the new scene video image.
[0136] Step 10, using the pre-trained adaptive environment model to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and performing feature extraction processing on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0137] Step 11, when the target detection result does not meet the preset conditions, the adaptive environment model is updated; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
[0138] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiment of the present application also provides an adaptive environment model using device based on a monitoring system for implementing the adaptive environment model using method based on a monitoring system involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the adaptive environment model using device based on a monitoring system provided below can refer to the limitations of the adaptive environment model using method based on a monitoring system above, and will not be repeated here.
[0140] In an exemplary embodiment, Figure 8 As shown, a device for using an adaptive environment model based on a monitoring system is provided, comprising: an image acquisition module 801 and a processing module 802, wherein:
[0141] An image acquisition module 801 is used to acquire a new scene video image;
[0142] The processing module 802 is used to use the pre-trained adaptive environment model to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and perform feature extraction processing on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0143] In an exemplary embodiment, the above device further includes:
[0144] The updating module 803 is used to update the adaptive environment model when the target detection result does not meet the preset conditions; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
[0145] In an exemplary embodiment, the processing module 802 is specifically used to train a pre-established initial illumination model based on multiple training video images to obtain a first illumination model; the illumination intensities corresponding to the multiple training video images are different; multiple annotated images are obtained; the recording device angles corresponding to the multiple annotated images are different; the first illumination model is trained based on the multiple annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model.
[0146] In an exemplary embodiment, the processing module 802 is specifically used to input the training video image into the initial illumination model for brightness adjustment processing for each training video image to obtain an adjusted training video image; the brightness adjustment processing includes at least brightness normalization processing and brightness enhancement processing; based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain a first illumination model.
[0147] In an exemplary embodiment, the processing module 802 is specifically used to copy the first illumination model to obtain a second illumination model; for each annotated image, perform feature extraction and mapping processing on the annotated image in sequence based on the first illumination model to obtain a first probability distribution; perform feature extraction and mapping processing on the annotated image in sequence based on the second illumination model to obtain a second probability distribution; and train the first illumination model based on the first probability distribution, the second probability distribution and the annotation results to obtain an adaptive environment model.
[0148] In an exemplary embodiment, the above-mentioned processing module 802 is specifically used to perform a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value; perform a divergence operation on the first probability distribution and the annotation result to obtain a second loss value; based on the first loss value and the second loss value, update the model parameters of the first illumination model to obtain an adaptive environment model.
[0149] In an exemplary embodiment, the processing module 802 is specifically used to perform weighted sum processing on the first loss value and the second loss value to obtain a target loss value; based on a back propagation algorithm, the target loss value is used to update the model parameters of the first illumination model to obtain an adaptive environment model.
[0150] Each module in the above-mentioned adaptive environment model using device based on monitoring system can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0151] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0152] Acquire new scene video images;
[0153] The pre-trained adaptive environment model is used to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0154] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0155] When the target detection result does not meet the preset conditions, the adaptive environment model is updated; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
[0156] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0157] The pre-established initial illumination model is trained based on a plurality of training video images to obtain a first illumination model; the illumination intensities corresponding to the plurality of training video images are different;
[0158] Acquire multiple annotated images; the multiple annotated images correspond to different video recording device angles;
[0159] The first illumination model is trained based on the multiple annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model.
[0160] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0161] For each training video image, input the training video image into the initial illumination model for brightness adjustment processing to obtain an adjusted training video image; the brightness adjustment processing at least includes brightness normalization processing and brightness enhancement processing;
[0162] Based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain a first illumination model.
[0163] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0164] Copying the first illumination model to obtain a second illumination model;
[0165] For each annotated image, performing feature extraction processing and mapping processing on the annotated image in sequence based on the first illumination model to obtain a first probability distribution;
[0166] Based on the second illumination model, feature extraction and mapping are performed on the labeled image in sequence to obtain a second probability distribution;
[0167] The first illumination model is trained based on the first probability distribution, the second probability distribution and the annotation result to obtain an adaptive environment model.
[0168] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0169] Perform a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value;
[0170] Perform a divergence operation on the first probability distribution and the labeled result to obtain a second loss value;
[0171] Based on the first loss value and the second loss value, the model parameters of the first illumination model are updated to obtain an adaptive environment model.
[0172] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0173] Performing weighted sum processing on the first loss value and the second loss value to obtain a target loss value;
[0174] Based on the back propagation algorithm, the model parameters of the first illumination model are updated using the target loss value to obtain an adaptive environment model.
[0175] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0176] Acquire new scene video images;
[0177] The pre-trained adaptive environment model is used to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0179] When the target detection result does not meet the preset conditions, the adaptive environment model is updated; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0181] The pre-established initial illumination model is trained based on a plurality of training video images to obtain a first illumination model; the illumination intensities corresponding to the plurality of training video images are different;
[0182] Acquire multiple annotated images; the multiple annotated images correspond to different video recording device angles;
[0183] The first illumination model is trained based on the multiple annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] For each training video image, input the training video image into the initial illumination model for brightness adjustment processing to obtain an adjusted training video image; the brightness adjustment processing at least includes brightness normalization processing and brightness enhancement processing;
[0186] Based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain a first illumination model.
[0187] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0188] Copying the first illumination model to obtain a second illumination model;
[0189] For each annotated image, performing feature extraction processing and mapping processing on the annotated image in sequence based on the first illumination model to obtain a first probability distribution;
[0190] Based on the second illumination model, feature extraction and mapping are performed on the labeled image in sequence to obtain a second probability distribution;
[0191] The first illumination model is trained based on the first probability distribution, the second probability distribution and the annotation result to obtain an adaptive environment model.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0193] Perform a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value;
[0194] Perform a divergence operation on the first probability distribution and the labeled result to obtain a second loss value;
[0195] Based on the first loss value and the second loss value, the model parameters of the first illumination model are updated to obtain an adaptive environment model.
[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0197] Performing weighted sum processing on the first loss value and the second loss value to obtain a target loss value;
[0198] Based on the back propagation algorithm, the model parameters of the first illumination model are updated using the target loss value to obtain an adaptive environment model.
[0199] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0200] Acquire new scene video images;
[0201] The pre-trained adaptive environment model is used to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0203] When the target detection result does not meet the preset conditions, the adaptive environment model is updated; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
[0204] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0205] The pre-established initial illumination model is trained based on a plurality of training video images to obtain a first illumination model; the illumination intensities corresponding to the plurality of training video images are different;
[0206] Acquire multiple annotated images; the multiple annotated images correspond to different video recording device angles;
[0207] The first illumination model is trained based on the multiple annotated images and the annotation results corresponding to the annotated images to obtain an adaptive environment model.
[0208] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0209] For each training video image, input the training video image into the initial illumination model for brightness adjustment processing to obtain an adjusted training video image; the brightness adjustment processing at least includes brightness normalization processing and brightness enhancement processing;
[0210] Based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain a first illumination model.
[0211] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0212] Copying the first illumination model to obtain a second illumination model;
[0213] For each annotated image, performing feature extraction processing and mapping processing on the annotated image in sequence based on the first illumination model to obtain a first probability distribution;
[0214] Based on the second illumination model, feature extraction and mapping are performed on the labeled image in sequence to obtain a second probability distribution;
[0215] The first illumination model is trained based on the first probability distribution, the second probability distribution and the annotation result to obtain an adaptive environment model.
[0216] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0217] Perform a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value;
[0218] Perform a divergence operation on the first probability distribution and the labeled result to obtain a second loss value;
[0219] Based on the first loss value and the second loss value, the model parameters of the first illumination model are updated to obtain an adaptive environment model.
[0220] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0221] Performing weighted sum processing on the first loss value and the second loss value to obtain a target loss value;
[0222] Based on the back propagation algorithm, the model parameters of the first illumination model are updated using the target loss value to obtain an adaptive environment model.
[0223] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0224] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0225] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0226] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for using an adaptive environment model based on a monitoring system, characterized in that: The method comprises: Acquire new scene video images; The new scene video image is subjected to brightness adjustment processing using a pre-trained adaptive environment model to obtain an adjusted new scene video image, and feature extraction processing is performed on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
2. The method according to claim 1, characterized in that The method further comprises: When the target detection result does not meet the preset conditions, the adaptive environment model is updated; the target detection result at least includes the behavior category and frame coordinates corresponding to the target object in the new scene video image.
3. The method according to any one of claims 1 or 2, characterized in that: The training process of the adaptive environment model includes: The pre-established initial illumination model is trained based on a plurality of training video images to obtain a first illumination model; the illumination intensities corresponding to the plurality of training video images are different; Acquire multiple annotated images; the multiple annotated images correspond to different video recording device angles; The first illumination model is trained based on the plurality of annotated images and the annotation results corresponding to the annotated images to obtain the adaptive environment model.
4. The method according to claim 3, characterized in that The step of training a pre-established initial illumination model based on a plurality of training video images to obtain a first illumination model comprises: For each of the training video images, input the training video image into the initial illumination model to perform brightness adjustment processing to obtain an adjusted training video image; the brightness adjustment processing at least includes brightness normalization processing and brightness enhancement processing; Based on the training video image and the adjusted training video image, the initial illumination model is adjusted to obtain the first illumination model.
5. The method according to claim 3, characterized in that: The step of training the first illumination model based on the plurality of annotated images and the annotation results corresponding to the annotated images to obtain the adaptive environment model includes: Copying the first illumination model to obtain a second illumination model; For each of the annotated images, performing feature extraction processing and mapping processing on the annotated images in sequence based on the first illumination model to obtain a first probability distribution; Based on the second illumination model, the labeled image is sequentially subjected to feature extraction and mapping processing to obtain a second probability distribution; The first illumination model is trained based on the first probability distribution, the second probability distribution, and the annotation result to obtain the adaptive environment model.
6. The method according to claim 5, characterized in that The training of the first illumination model based on the first probability distribution, the second probability distribution and the annotation result to obtain the adaptive environment model includes: Performing a cross entropy operation on the first probability distribution and the second probability distribution to obtain a first loss value; Performing a divergence operation on the first probability distribution and the labeling result to obtain a second loss value; Based on the first loss value and the second loss value, the model parameters of the first illumination model are updated to obtain the adaptive environment model.
7. The method according to claim 6, characterized in that The updating of the model parameters of the first illumination model based on the first loss value and the second loss value to obtain the adaptive environment model includes: Performing weighted sum processing on the first loss value and the second loss value to obtain a target loss value; Based on a back propagation algorithm, the model parameters of the first illumination model are updated using the target loss value to obtain the adaptive environment model.
8. A device for using an adaptive environment model based on a monitoring system, characterized in that: The device comprises: An image acquisition module, used to acquire video images of new scenes; The processing module is used to use the pre-trained adaptive environment model to perform brightness adjustment processing on the new scene video image to obtain an adjusted new scene video image, and perform feature extraction processing on the adjusted new scene video image to obtain a target detection result corresponding to the new scene video image.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.