A method, device and medium for monitoring violations of intelligently adapted environments
By performing grayscale conversion and average processing on the environmental brightness data, the violation monitoring model is trained, which solves the accuracy and performance problems of violation monitoring in complex light environments, achieves efficient monitoring under different brightness, and improves the performance of the monitoring algorithm. and accuracy.
Patent Information
- Application Number
- CN202410939618.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-15
AI Technical Summary
Existing technology is difficult to achieve real-time and accurate violation monitoring in complex light environments, resulting in an increase in model complexity and increased demand for computing resources, making it impossible to improve the performance of violation monitoring algorithms while ensuring real-time performance.
By obtaining the environmental brightness data set for grayscale conversion and average processing, dividing the grayscale range, training a violation monitoring model, and combining real-time video streams to identify violations, we can achieve accurate monitoring in different brightness environments.
It improves the performance and accuracy of the violation detection algorithm under complex light conditions, reduces the analysis complexity and background interference, realizes violation detection under different brightness, and improves the accuracy and efficiency of monitoring.
Smart Images

Figure CN118506285B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a violation monitoring method, device and medium for intelligently adapting an environment. Background Art
[0002] In a dim environment, the lack of light makes the target object in the image blurry and difficult to distinguish, which greatly affects the accuracy of target monitoring. In some complex application scenarios, especially in traditional factory environments, the high complexity of the scene and the light itself brings great inconvenience to the monitoring of illegal targets.
[0003] Existing technologies generally handle this in the following two ways: on the one hand, by incorporating a large amount of data from complex lighting environments to retrain the target monitoring model; on the other hand, by deepening the network depth of the target monitoring algorithm or performing transfer learning, the model aims to improve the feature extraction ability of targets in dim scenes. However, these two methods often lead to increased model complexity, which in turn increases the demand for computing resources, and cannot achieve the performance of the violation monitoring algorithm under complex lighting conditions while ensuring real-time performance. Summary of the invention
[0004] The embodiments of the present invention provide a violation monitoring method, device and medium with intelligent adaptive environment, which solves the technical problem that the prior art cannot accurately identify violation behaviors in different brightness environments while improving the performance of the violation monitoring algorithm under complex lighting conditions.
[0005] In a first aspect, an embodiment of the present invention provides a violation monitoring method for an intelligently adaptive environment, characterized in that the method includes: obtaining an environmental brightness data set, and performing grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; performing grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set; dividing the environmental average grayscale data set into a grayscale range to obtain an environmental grayscale training data set; inputting the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained, and a violation monitoring module to be trained; inputting a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result.
[0006] In one implementation of the present invention, an ambient brightness data set is grayscale converted to obtain an ambient grayscale data set, specifically including: preprocessing the ambient brightness data to obtain ambient brightness standard data; assigning grayscale parameters to the ambient brightness standard data to determine grayscale conversion parameters; and performing weighted averaging on the ambient brightness standard data according to the grayscale conversion parameters to obtain an ambient grayscale data set.
[0007] In one implementation of the present invention, grayscale averaging processing is performed on the environmental grayscale data set to obtain an environmental average grayscale data set, specifically including: extracting pixel grayscale from the environmental grayscale data to obtain pixel grayscale data; and performing data averaging processing on the pixel grayscale data to obtain an environmental average grayscale data set.
[0008] In one implementation of the present invention, the environment average grayscale data set is divided into grayscale ranges to obtain an environment grayscale training data set, specifically including: determining the grayscale division range based on the environment average grayscale data; wherein the grayscale division range includes: a bright grayscale range and a dim grayscale range; and dividing the environment average grayscale data into the environment grayscale training data set according to the grayscale division range.
[0009] In one implementation of the present invention, an environmental grayscale training data set is input into a preset violation monitoring model to be trained to determine a violation monitoring model group, specifically including: converting the environmental grayscale training data set into an environmental grayscale training vector; wherein the environmental training vector includes a grayscale training vector and an environmental training vector; inputting the grayscale training vector into the grayscale monitoring module to be trained until the training of the grayscale monitoring module to be trained converges to obtain a grayscale monitoring module; inputting the environmental training vector into the violation monitoring module to be trained until the training of the violation monitoring module to be trained converges to obtain a violation monitoring module; determining a violation monitoring model based on the grayscale monitoring module and the violation monitoring module; performing grayscale matching on the violation monitoring model to determine the monitoring grayscale corresponding to the violation monitoring model, and performing model integration on the violation monitoring model after grayscale matching to determine a violation monitoring model group.
[0010] In one implementation of the present invention, a preset real-time environmental video stream is input into a violation monitoring model group to obtain a violation monitoring result, specifically including: performing video frame judgment on the real-time environmental video stream to determine the grayscale division range corresponding to the real-time environmental video stream; according to the grayscale division range, by matching the violation monitoring model containing the grayscale division range, determining the violation monitoring model group; inputting the real-time environmental video stream into the violation monitoring model group, and determining the frame where the violation behavior is located through the violation monitoring model group, and intercepting the frame where the violation behavior is located; according to the frame where the violation behavior is located, obtaining the violation monitoring result.
[0011] In one implementation of the present invention, after performing grayscale averaging processing on the environmental grayscale data set to obtain the environmental average grayscale data set, the method also includes: determining the pixel grayscale range based on the environmental average grayscale data set; querying the pixel occurrence frequency corresponding to the pixel grayscale range based on the pixel grayscale range; generating an environmental grayscale distribution histogram based on the pixel grayscale range and the pixel occurrence frequency.
[0012] In one implementation of the present invention, after obtaining the violation monitoring results based on the frame where the violation behavior is located, the method also includes: generating real-time on-site prompts based on the violation monitoring results; converting the violation monitoring results into a monitoring report, and uploading the violation monitoring report to a preset violation monitoring system; and sending a violation alarm to the management party through the violation monitoring system.
[0013] In a second aspect, an embodiment of the present invention further provides a violation monitoring device that is intelligently adaptable to the environment, characterized in that the device includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: obtain an environmental brightness data set, and perform grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; perform grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set; divide the environmental average grayscale data set into a grayscale range to obtain an environmental grayscale training data set; input the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained, and a violation monitoring module to be trained; input a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result.
[0014] In a third aspect, an embodiment of the present invention further provides a non-volatile computer storage medium for violation monitoring of an intelligent adaptive environment, storing computer executable instructions, characterized in that the computer executable instructions are configured to: obtain an environmental brightness data set, and perform grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; perform grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set; divide the environmental average grayscale data set into a grayscale range to obtain an environmental grayscale training data set; input the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained, and a violation monitoring module to be trained; input a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result.
[0015] The embodiments of the present invention provide a violation monitoring method, device and medium for intelligently adapting to the environment. By converting the brightness parameters of the video stream acquired through monitoring into grayscale parameters and dividing the grayscale parameters into grayscale ranges, violation monitoring is performed according to the grayscale ranges. This solves the technical problem that the prior art cannot accurately identify violations in different brightness environments while improving the performance of the violation monitoring algorithm under complex lighting conditions. Violation monitoring under different brightness is achieved, the performance of the violation monitoring algorithm under complex lighting conditions and the accuracy of violation monitoring are improved, and cost reduction and efficiency improvement of violation monitoring in complex environments are achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 A flow chart of a violation monitoring method for an intelligent adaptive environment provided by an embodiment of the present invention;
[0018] Figure 2 A complex environment grayscale distribution histogram provided by an embodiment of the present invention; Figure 2 (a) is the grayscale histogram of the bright data set. Figure 2 (b) is the grayscale histogram of the dim dataset;
[0019] Figure 3 A schematic diagram of the internal structure of a violation monitoring device with an intelligent adaptive environment provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0021] The embodiments of the present invention provide a violation monitoring method, device and medium for intelligently adapting to the environment. By converting the brightness parameters of the video stream acquired through monitoring into grayscale parameters and dividing the grayscale parameters into grayscale ranges, violation monitoring is performed according to the grayscale ranges. This solves the technical problem that the prior art cannot accurately identify violations in different brightness environments while improving the performance of the violation monitoring algorithm under complex lighting conditions. Violation monitoring under different brightness is achieved, the performance of the violation monitoring algorithm under complex lighting conditions and the accuracy of violation monitoring are improved, and cost reduction and efficiency improvement of violation monitoring in complex environments are achieved.
[0022] The technical solution proposed in the embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0023] Figure 1 A flow chart of a violation monitoring method for an intelligent adaptive environment provided by an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a violation monitoring method for an intelligent adaptive environment, which specifically includes the following steps:
[0024] Step 101: Acquire an environment brightness data set, and perform grayscale conversion on the environment brightness data set to obtain an environment grayscale data set.
[0025] Specifically, the method includes: preprocessing the ambient brightness data to obtain ambient brightness standard data; assigning grayscale parameters to the ambient brightness standard data to determine grayscale conversion parameters; and weighted averaging the ambient brightness standard data according to the grayscale conversion parameters to obtain an ambient grayscale data set.
[0026] The present invention converts the brightness information of the video stream into grayscale information and performs weighted averaging on the grayscale information to obtain an environmental grayscale data set, thereby analyzing the brightness information through the grayscale information, reducing the complexity of the analysis and the degree of interference from complex backgrounds, and improving the accuracy of violation monitoring.
[0027] In the embodiments of the present invention, detailed explanation is given by the following Example 1.
[0028] Example 1: The environmental brightness data set is collected through the monitoring device installed on site to obtain a video stream containing frames of different brightness.
[0029] Due to the complex on-site environments such as factories and workshops, the brightness distribution of the environment is also very chaotic under the same lighting conditions, which will make the edge contours of the illegal monitoring frames (i.e., frame images in the video stream) difficult to identify.
[0030] In order to accurately analyze the edge contour, the monitoring frame needs to be converted into grayscale. First, the monitoring frame needs to be standardized to obtain the correct ambient brightness standard data.
[0031] Next, the standard ambient brightness data is gray-scaled to determine the gray-scale parameters required for the conversion, and then the weighted average formula is determined. The following formula (1) is used for detailed explanation;
[0032] )(1)
[0033] in, is grayscale;
[0034] , , They are red, green and blue respectively;
[0035] 0.3, 0.59 and 0.11 are the grayscale conversion parameters.
[0036] Through grayscale conversion, the original color image is converted into a grayscale image containing only brightness information, thereby highlighting the brightness features in the image.
[0037] Step 102: Perform grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set.
[0038] Specifically, it includes: extracting pixel grayscale from environmental grayscale data to obtain pixel grayscale data; and performing data averaging on the pixel grayscale data to obtain an environmental average grayscale data set.
[0039] After grayscale averaging is performed on the environmental grayscale data set to obtain an environmental average grayscale data set, the method further includes: determining a pixel grayscale range based on the environmental average grayscale data set; querying a pixel occurrence frequency corresponding to the pixel grayscale range based on the pixel grayscale range; and generating an environmental grayscale distribution histogram based on the pixel grayscale range and the pixel occurrence frequency.
[0040] The present invention performs grayscale averaging processing on an environmental grayscale data set to obtain an environmental average grayscale data set, thereby achieving the representation of the overall brightness level of the image and improving the accuracy of monitoring illegal behaviors.
[0041] Figure 2 A complex environment grayscale distribution histogram provided in an embodiment of the present invention is explained in detail through the following Example 2 in the embodiment of the present invention.
[0042] Example 2: First, extract the grayscale value of each pixel in the environmental grayscale dataset and calculate the grayscale average value, which can reflect the overall brightness level of the image.
[0043] Figure 2 In the figure, (a) is the grayscale histogram of the bright data set, and (b) is the grayscale histogram of the dim data set.
[0044] The horizontal axis is the grayscale range corresponding to the brightness of the scene environment, and the vertical axis is the number of pixel occurrences at each grayscale value. Since statistical violations require obtaining multiple frames of data, the number of occurrences also represents the frequency of pixel occurrence at a certain grayscale.
[0045] Step 103: divide the environment average grayscale data set into grayscale ranges to obtain an environment grayscale training data set.
[0046] Specifically, it includes: determining the grayscale division range based on the average grayscale data of the environment; wherein the grayscale division range includes: a bright grayscale range and a dim grayscale range; and dividing the average grayscale data of the environment into an environmental grayscale training data set according to the grayscale division range.
[0047] The present invention divides the environmental average grayscale data set into grayscale ranges to obtain an environmental grayscale training data set, thereby realizing analysis of complex environments with different brightness, improving the accuracy of model training and being able to improve the monitoring efficiency of the model.
[0048] In the embodiments of the present invention, detailed explanation is given by the following Example 3.
[0049] Example 3: N grayscale ranges are set according to the grayscale average value, and the image dataset is classified into N levels. When N=2, the bright environment dataset and the dim environment dataset are divided according to the two grayscale ranges. Images with a grayscale average value higher than 60 are classified as bright datasets, while images with a grayscale average value lower than or equal to 60 are classified as dim datasets.
[0050] Step 104: input the environmental grayscale training data set into the preset violation monitoring model to be trained to determine the violation monitoring model group.
[0051] Among them, the violation monitoring model to be trained includes: a grayscale monitoring module to be trained and a violation monitoring module to be trained.
[0052] Specifically, it includes: converting the environmental grayscale training data set into an environmental grayscale training vector; wherein the environmental training vector includes a grayscale training vector and an environmental training vector; inputting the grayscale training vector into the grayscale monitoring module to be trained until the training of the grayscale monitoring module to be trained converges to obtain a grayscale monitoring module; inputting the environmental training vector into the violation monitoring module to be trained until the training of the violation monitoring module to be trained converges to obtain a violation monitoring module; determining a violation monitoring model based on the grayscale monitoring module and the violation monitoring module; performing grayscale matching on the violation monitoring model to determine the monitoring grayscale corresponding to the violation monitoring model, and integrating the violation monitoring model after grayscale matching to determine a violation monitoring model group.
[0053] The present invention realizes violation monitoring and identification under different grayscale ranges by training the violation monitoring model, achieves cost reduction and efficiency improvement of the project, and improves the accuracy of identifying violations in complex environments.
[0054] In the embodiments of the present invention, detailed explanation is given by the following Example 4.
[0055] Example 4: First, the environment grayscale training data set is converted into an environment grayscale training vector; wherein the environment training vector includes a grayscale training vector and an environment training vector.
[0056] The grayscale training vector is input into the grayscale monitoring module to be trained until the training of the grayscale monitoring module to be trained converges to obtain the grayscale monitoring module.
[0057] The environmental training vector is input into the violation monitoring module to be trained until the training of the violation monitoring module to be trained converges to obtain the violation monitoring module.
[0058] It should be noted that the grayscale monitoring module to be trained targets the pixel grayscale of the environmental frame image, and the violation monitoring module to be trained targets the identification of violation behaviors.
[0059] After the training of the above two modules is completed, a violation monitoring model group is obtained.
[0060] Step 105: Input the preset real-time environment video stream into the violation monitoring model group to obtain the violation monitoring result.
[0061] Specifically, the method includes: performing video frame judgment on the real-time environmental video stream to determine the grayscale division range corresponding to the real-time environmental video stream; determining the violation monitoring model group according to the grayscale division range by matching the violation monitoring model containing the grayscale division range; inputting the real-time environmental video stream into the violation monitoring model group, and determining the frame where the violation behavior is located through the violation monitoring model group, and intercepting the frame where the violation behavior is located; and obtaining the violation monitoring result according to the frame where the violation behavior is located.
[0062] After obtaining the violation monitoring result according to the frame where the violation behavior is located, the method also includes: generating real-time on-site prompts according to the violation monitoring result; converting the violation monitoring result into a monitoring report, and uploading the violation monitoring report to a preset violation monitoring system; and sending a violation alarm to the management party through the violation monitoring system.
[0063] The present invention monitors violation behaviors of video streams acquired by on-site monitoring devices through violation monitoring model groups, realizes analysis of environments with different light intensities in complex environments, and improves the accuracy of violation monitoring of video streams with fuzzy boundaries and complex light intensities.
[0064] In the embodiments of the present invention, detailed explanation is given by the following Example 5.
[0065] Example 5: First, a video stream is captured from a scene in real time, and then the captured video stream is converted into grayscale, and its grayscale average value is calculated. The grayscale average value represents the overall brightness level of each frame in the video stream.
[0066] According to the calculated average gray value, it is judged and divided into N gray intervals. The gray level of the video stream is judged frame by frame and imported into the violation monitoring model group for target monitoring.
[0067] If the monitoring device detects any violation by on-site personnel, it will immediately trigger the screenshot mechanism to capture the video frame containing the violation and generate a corresponding alarm record for subsequent review and processing.
[0068] At the same time, an alarm signal will be sent to the on-site sensors to remind on-site personnel to stop illegal behaviors.
[0069] It should be noted that based on the on-site video stream data obtained by the monitoring device, the system can automatically classify the grayscale information after each brightness conversion, but there is a threshold for the grayscale range. If the environment is not dim but dark or the environment is too bright to cause exposure, the system will issue over-brightness or over-darkness instructions based on the brightness and darkness on site, and the monitoring system will be converted to a night monitoring system or send an overexposure problem investigation instruction.
[0070] The above is an embodiment of the method proposed by the present invention. Based on the same inventive concept, the embodiment of the present invention also provides a violation monitoring device with intelligent adaptive environment, and its structure is as follows: Figure 3 shown.
[0071] Figure 3 A schematic diagram of the internal structure of a violation monitoring device for intelligently adapting to the environment provided by an embodiment of the present invention. Figure 3 As shown, the device includes:
[0072] at least one processor 301;
[0073] and, a memory 302 communicatively connected to at least one processor;
[0074] The memory 302 stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor 301 to enable at least one processor 301 to:
[0075] Acquire an environmental brightness data set, and perform grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; perform grayscale averaging on the environmental grayscale data set to obtain an environmental average grayscale data set; divide the environmental average grayscale data set into grayscale ranges to obtain an environmental grayscale training data set; input the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained and a violation monitoring module to be trained; input a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result.
[0076] Some embodiments of the present invention provide corresponding Figure 1 A non-volatile computer storage medium for monitoring violations of an intelligent adaptive environment, storing computer executable instructions, wherein the computer executable instructions are set as follows:
[0077] Acquire an environmental brightness data set, and perform grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; perform grayscale averaging on the environmental grayscale data set to obtain an environmental average grayscale data set; divide the environmental average grayscale data set into grayscale ranges to obtain an environmental grayscale training data set; input the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained and a violation monitoring module to be trained; input a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result.
[0078] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the IoT device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0079] The system and medium provided in the embodiments of the present invention correspond one-to-one to the method, and therefore, the system and medium also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the system and medium will not be repeated here.
[0080] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0082] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0084] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0085] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0086] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0087] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0088] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for monitoring violations in an intelligent adaptive environment, characterized in that: The method comprises: Acquire an environmental brightness data set, and perform grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; Performing grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set; Dividing the environment average grayscale data set into grayscale ranges to obtain an environment grayscale training data set; Inputting the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained and a violation monitoring module to be trained; Inputting a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result; Inputting the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group, specifically including: Converting the environmental grayscale training data set into an environmental grayscale training vector; wherein the environmental training vector includes a grayscale training vector and an environmental training vector; Inputting the grayscale training vector into the grayscale monitoring module to be trained until the training of the grayscale monitoring module to be trained converges to obtain a grayscale monitoring module; Inputting the environmental training vector into the to-be-trained violation monitoring module until the to-be-trained violation monitoring module is trained and converged, so as to obtain a violation monitoring module; Determining a violation monitoring model according to the grayscale monitoring module and the violation monitoring module; Performing grayscale matching on the violation monitoring model to determine the monitoring grayscale corresponding to the violation monitoring model, and integrating the violation monitoring model after grayscale matching to determine the violation monitoring model group; Inputting the preset real-time environment video stream into the violation monitoring model group to obtain violation monitoring results, specifically including: Performing video frame judgment on the real-time environment video stream to determine the grayscale division range corresponding to the real-time environment video stream; According to the grayscale division range, the violation monitoring model group is determined by matching the violation monitoring model including the grayscale division range; Input the real-time environment video stream into the violation monitoring model group, determine the frame where the violation behavior is located through the violation monitoring model group, and intercept the frame where the violation behavior is located; The violation monitoring result is obtained according to the frame where the violation behavior is located.
2. The method for monitoring violations of an intelligent adaptive environment according to claim 1, characterized in that: The environmental brightness data set is gray-scale converted to obtain an environmental gray-scale data set, specifically including: Preprocessing the ambient brightness data to obtain ambient brightness standard data; Assigning grayscale parameters to the ambient brightness standard data to determine grayscale conversion parameters; According to the grayscale conversion parameters, the environmental brightness standard data is weighted averaged to obtain the environmental grayscale data set.
3. The method for monitoring violations of an intelligent adaptive environment according to claim 1, characterized in that: Performing grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set specifically includes: Extracting pixel grayscale from the environmental grayscale data to obtain pixel grayscale data; The pixel grayscale data are averaged to obtain an environment average grayscale data set.
4. The method for monitoring violations of an intelligent adaptive environment according to claim 1, characterized in that: The environmental average grayscale data set is divided into grayscale ranges to obtain an environmental grayscale training data set, specifically including: Based on the average grayscale data of the environment, a grayscale division range is determined; wherein the grayscale division range includes: a bright grayscale range and a dim grayscale range; According to the grayscale division range, the environment average grayscale data is divided into the environment grayscale training data set.
5. The method for monitoring violations of an intelligent adaptive environment according to claim 1, characterized in that: After performing grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set, the method further includes: Determining a pixel grayscale range according to the environmental average grayscale data set; According to the pixel grayscale range, query the pixel occurrence frequency corresponding to the pixel grayscale range; An environment grayscale distribution histogram is generated according to the pixel grayscale range and the pixel occurrence frequency.
6. The method for monitoring violations of an intelligent adaptive environment according to claim 1, characterized in that: After obtaining the violation monitoring result according to the frame where the violation behavior is located, the method further includes: Generate real-time on-site prompts based on the violation monitoring results; Converting the violation monitoring results into a monitoring report, and uploading the violation monitoring report to a preset violation monitoring system; Violation monitoring system sends violation warnings to management.
7. A violation monitoring device that intelligently adapts to the environment, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: Acquire an environmental brightness data set, and perform grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; Performing grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set; Dividing the environment average grayscale data set into grayscale ranges to obtain an environment grayscale training data set; Inputting the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained and a violation monitoring module to be trained; Inputting a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result; Inputting the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group, specifically including: Converting the environmental grayscale training data set into an environmental grayscale training vector; wherein the environmental training vector includes a grayscale training vector and an environmental training vector; Inputting the grayscale training vector into the grayscale monitoring module to be trained until the training of the grayscale monitoring module to be trained converges to obtain a grayscale monitoring module; Inputting the environmental training vector into the to-be-trained violation monitoring module until the to-be-trained violation monitoring module is trained and converged, so as to obtain a violation monitoring module; Determining a violation monitoring model according to the grayscale monitoring module and the violation monitoring module; Performing grayscale matching on the violation monitoring model to determine the monitoring grayscale corresponding to the violation monitoring model, and integrating the violation monitoring model after grayscale matching to determine the violation monitoring model group; Inputting the preset real-time environment video stream into the violation monitoring model group to obtain violation monitoring results, specifically including: Performing video frame judgment on the real-time environment video stream to determine the grayscale division range corresponding to the real-time environment video stream; According to the grayscale division range, the violation monitoring model group is determined by matching the violation monitoring model including the grayscale division range; Input the real-time environment video stream into the violation monitoring model group, determine the frame where the violation behavior is located through the violation monitoring model group, and intercept the frame where the violation behavior is located; The violation monitoring result is obtained according to the frame where the violation behavior is located.
8. A non-volatile computer storage medium for monitoring violations of an intelligent adaptive environment, storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Acquire an environmental brightness data set, and perform grayscale conversion on the environmental brightness data set to obtain an environmental grayscale data set; Performing grayscale averaging processing on the environmental grayscale data set to obtain an environmental average grayscale data set; Dividing the environment average grayscale data set into grayscale ranges to obtain an environment grayscale training data set; Inputting the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group; wherein the violation monitoring model to be trained includes: a grayscale monitoring module to be trained and a violation monitoring module to be trained; Inputting a preset real-time environmental video stream into the violation monitoring model group to obtain a violation monitoring result; Inputting the environmental grayscale training data set into a preset violation monitoring model to be trained to determine a violation monitoring model group, specifically including: Converting the environmental grayscale training data set into an environmental grayscale training vector; wherein the environmental training vector includes a grayscale training vector and an environmental training vector; Inputting the grayscale training vector into the grayscale monitoring module to be trained until the training of the grayscale monitoring module to be trained converges to obtain a grayscale monitoring module; Inputting the environmental training vector into the to-be-trained violation monitoring module until the to-be-trained violation monitoring module is trained and converged, so as to obtain a violation monitoring module; Determining a violation monitoring model according to the grayscale monitoring module and the violation monitoring module; Performing grayscale matching on the violation monitoring model to determine the monitoring grayscale corresponding to the violation monitoring model, and integrating the violation monitoring model after grayscale matching to determine the violation monitoring model group; Inputting the preset real-time environment video stream into the violation monitoring model group to obtain violation monitoring results, specifically including: Performing video frame judgment on the real-time environment video stream to determine the grayscale division range corresponding to the real-time environment video stream; According to the grayscale division range, the violation monitoring model group is determined by matching the violation monitoring model including the grayscale division range; Input the real-time environment video stream into the violation monitoring model group, determine the frame where the violation behavior is located through the violation monitoring model group, and intercept the frame where the violation behavior is located; The violation monitoring result is obtained according to the frame where the violation behavior is located.
