Monitoring data processing method and device, storage medium, and terminal
Monitoring images are corrected through UAV collection and motion locator, combined with HOG directional gradient histogram method and federated learning algorithm for local processing, which solves the problems of data transmission delay and security risk in traditional monitoring systems, and achieves high accuracy and real-time sex.
Patent Information
- Application Number
- CN202410842042.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-27
AI Technical Summary
Traditional monitoring systems have delays and security risks during data transmission, leading to real-time monitoring delays and data leakage or corruption.
Monitoring images are collected through drones and corrected based on motion locators. Local feature extraction is performed using the HOG directional gradient histogram method, and the image classification model trained with the federated learning algorithm is used for classification processing to avoid data transmission to the central server and reduce theft and Risk of Tampering.
It improves the accuracy of surveillance image classification results, ensures user privacy and the timeliness of real-time monitoring, and reduces risks during data transmission.
Smart Images

Figure CN118397492B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a monitoring data processing method and device, a storage medium, and a terminal. Background Art
[0002] Human-machine collaboration is an important research direction in the intelligent monitoring system based on autonomous robots, aiming to ensure that the monitoring system can capture and process monitoring data in a timely and accurate manner to ensure the safety of the monitored area.
[0003] The workflow of traditional monitoring systems is usually that monitoring equipment collects monitoring data on site, and then transmits the monitoring data from the monitoring equipment to a central server for processing and analysis. However, due to the cumbersome monitoring data transmission process, real-time monitoring is prone to delays; and because the monitoring data needs to be transmitted from the monitoring equipment to the central server, there may be security risks such as theft and tampering during the data transmission process, resulting in data leakage or damage, which in turn threatens the privacy of users. Therefore, a monitoring data processing method is urgently needed to solve the above problems. Summary of the invention
[0004] In view of this, the present application provides a monitoring data processing method and device, a storage medium, and a terminal, the main purpose of which is to improve the problems of delays in existing real-time monitoring and data leakage or damage due to theft and tampering during data transmission.
[0005] According to one aspect of the present application, a monitoring data processing method is provided, comprising:
[0006] Acquire a surveillance image to be processed, where the surveillance image to be processed is collected by a drone, and based on a positioning result obtained by positioning the drone by a motion locator, the image collected by the drone is corrected;
[0007] Extracting features from the monitored image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image, wherein the feature extraction is performed locally;
[0008] The HOG feature image is classified based on an image classification model that has completed model training to obtain a classification result of the monitoring image to be processed. The image classification model is based on a federated learning algorithm and is obtained by a central server aggregating model parameters of local models trained on multiple terminals.
[0009] Preferably, the feature extraction from the monitoring image to be processed based on the HOG directional gradient histogram method to obtain the HOG feature image includes:
[0010] The horizontal gradient and vertical gradient are calculated based on the following formulas:
[0011]
[0012]
[0013] in, represents the horizontal gradient, represents the vertical gradient, and I represents the pixel value of each pixel in the monitored image to be processed;
[0014] The amplitude and direction angle of each pixel are calculated according to the horizontal gradient and the vertical gradient based on the following formula:
[0015]
[0016]
[0017] Among them, G represents the amplitude of each pixel, Indicates the direction angle, represents the horizontal gradient, represents the vertical gradient;
[0018] Divide the monitored image to be processed into a plurality of first cells according to a preset pixel size, and generate an amplitude list and a direction angle list for each of the first cells;
[0019] Corresponding each direction angle included in the direction angle list to each group, respectively accumulating the amplitude corresponding to each direction angle to the group corresponding to each direction angle, and generating a first gradient histogram of the first cell based on the accumulated amplitude corresponding to each group, wherein the number of histograms in the first gradient histogram is the same as the number of groups, and the groups are pre-divided according to preset angle units based on an angle range of 0 to 180 degrees;
[0020] Combining a preset number of the first cells to obtain a second cell, concatenating the first gradient histograms corresponding to the preset number of the first cells to obtain a second gradient histogram of the second cell, and normalizing the second gradient histogram;
[0021] The normalized full second gradient histogram is spliced to obtain the HOG feature image of the monitoring image to be processed.
[0022] Preferably, before the image classification model based on the completed model training performs classification processing on the HOG feature image to obtain the classification result of the monitoring image to be processed, the method further includes:
[0023] Downloading an initial image classification model from a central server, wherein the initial image classification model is constructed based on a convolutional neural network;
[0024] Performing model training on the initial image classification model based on a preset training data set to obtain an updated image classification model, wherein the preset training data set is constructed based on local data;
[0025] The updated image classification model is tested based on a preset test data set. If all evaluation indicators meet the corresponding evaluation standards, the updated image classification model is uploaded to the central server, and the image classification model that has completed model training is received to classify the HOG feature image based on the image classification model. The image classification model that has completed model training is obtained by aggregating multiple locally updated image classification models by the central server.
[0026] Preferably, the performing model training on the initial image classification model based on a preset data set to obtain an updated image classification model includes:
[0027] Classifying the samples in the preset training data set based on the initial image classification model to obtain a predicted classification result for each of the samples;
[0028] Calculating a loss function between the predicted classification result and the actual classification result of the sample;
[0029] The model parameters of the initial image classification model are updated based on the gradient descent algorithm to reduce the loss function until the preset model training conditions are met, the model training is stopped, and an updated image classification model is obtained.
[0030] Preferably, the obtaining of the surveillance image to be processed includes:
[0031] Obtain surveillance images collected by drones;
[0032] Determining the altitude of the drone based on ultrasonic data method;
[0033] Based on the following formula, the position coordinates of the drone in the drone coordinate system are determined according to the height:
[0034]
[0035] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. Indicates the tangent value of the drone in the x direction, Indicates the tangent value of the drone in the y direction;
[0036] The position coordinates of the drone in the drone coordinate system are converted into the coordinate system of the collaborative robot, and the collaborative robot is equipped with the motion locator based on the following formula:
[0037]
[0038] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. , , represents the position coordinates of the UAV in the collaborative robot coordinate system, and h represents the height of the UAV;
[0039] The monitoring image is corrected based on the converted coordinate position to obtain a monitoring image to be processed.
[0040] Preferably, the determining the height of the drone based on the ultrasonic data method comprises:
[0041] The altitude of the drone is determined based on the following formula:
[0042]
[0043] in, A function representing the altitude of the drone, represents the position vector of the collaborative robot, z represents the height of the drone, Indicates the tangent value of the drone in the x direction, represents the tangent value of the drone in the y direction, R represents the rotation matrix of the drone, Indicates the flight angle of the drone relative to the ground.
[0044] According to another aspect of the present application, a monitoring data processing device is provided, comprising:
[0045] An image acquisition module is used to acquire a monitoring image to be processed, wherein the monitoring image to be processed is acquired by a drone and correcting the image acquired by the drone based on a positioning result obtained by locating the drone by a motion locator;
[0046] A feature extraction module, used for extracting features from the monitoring image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image, wherein the feature extraction is performed locally;
[0047] The image classification module is used to classify the HOG feature image based on the image classification model that has completed model training to obtain the classification result of the monitoring image to be processed. The image classification model is based on the federated learning algorithm, and the central server aggregates the model parameters of the local models trained by multiple terminals.
[0048] Preferably, the feature extraction module is specifically used for:
[0049] The horizontal gradient and vertical gradient are calculated based on the following formulas:
[0050]
[0051]
[0052] in, represents the horizontal gradient, represents the vertical gradient, and I represents the pixel value of each pixel in the monitored image to be processed;
[0053] The amplitude and direction angle of each pixel are calculated according to the horizontal gradient and the vertical gradient based on the following formula:
[0054]
[0055]
[0056] Among them, G represents the amplitude of each pixel, Indicates the direction angle, represents the horizontal gradient, represents the vertical gradient;
[0057] Divide the monitored image to be processed into a plurality of first cells according to a preset pixel size, and generate an amplitude list and a direction angle list for each of the first cells;
[0058] Corresponding each direction angle included in the direction angle list to each group, respectively accumulating the amplitude corresponding to each direction angle to the group corresponding to each direction angle, and generating a first gradient histogram of the first cell based on the accumulated amplitude corresponding to each group, wherein the number of histograms in the first gradient histogram is the same as the number of groups, and the groups are pre-divided according to preset angle units based on an angle range of 0 to 180 degrees;
[0059] Combining a preset number of the first cells to obtain a second cell, concatenating the first gradient histograms corresponding to the preset number of the first cells to obtain a second gradient histogram of the second cell, and normalizing the second gradient histogram;
[0060] The normalized full second gradient histogram is spliced to obtain the HOG feature image of the monitoring image to be processed.
[0061] Preferably, before the image classification module, the device further includes:
[0062] A model building module, used for downloading an initial image classification model from a central server, wherein the initial image classification model is built based on a convolutional neural network;
[0063] A model training module, used to perform model training on the initial image classification model based on a preset training data set to obtain an updated image classification model, wherein the preset training data set is constructed based on local data;
[0064] A model testing module is used to test the updated image classification model based on a preset test data set. If all evaluation indicators meet the corresponding evaluation standards, the updated image classification model is uploaded to the central server, and an image classification model that has completed model training is received to classify the HOG feature image based on the image classification model. The image classification model that has completed model training is obtained by the central server aggregating multiple locally updated image classification models.
[0065] Preferably, the model training module is specifically used for:
[0066] Classifying the samples in the preset training data set based on the initial image classification model to obtain a predicted classification result for each of the samples;
[0067] Calculating a loss function between the predicted classification result and the actual classification result of the sample;
[0068] The model parameters of the initial image classification model are updated based on the gradient descent algorithm to reduce the loss function until the preset model training conditions are met, the model training is stopped, and an updated image classification model is obtained.
[0069] Preferably, the image acquisition module specifically includes:
[0070] An image acquisition unit, used to acquire monitoring images collected by the drone;
[0071] an altitude determination unit, for determining the altitude of the drone based on an ultrasonic data method;
[0072] A three-dimensional coordinate determination unit, configured to determine the position coordinates of the drone in the drone coordinate system according to the height based on the following formula,
[0073]
[0074] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. Indicates the tangent value of the drone in the x direction, Indicates the tangent value of the drone in the y direction;
[0075] A coordinate conversion unit, used to convert the position coordinates of the drone in the drone coordinate system into the coordinate system of the collaborative robot, the collaborative robot being equipped with the motion locator, based on the following formula,
[0076]
[0077] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. , , represents the position coordinates of the UAV in the collaborative robot coordinate system, and h represents the height of the UAV;
[0078] The image correction unit is used to correct the monitoring image based on the converted coordinate position to obtain a monitoring image to be processed.
[0079] Preferably, the height determination unit is specifically used for:
[0080] The altitude of the drone is determined based on the following formula:
[0081]
[0082] in, A function representing the altitude of the drone, represents the position vector of the collaborative robot, z represents the height of the drone, Indicates the tangent value of the drone in the x direction, represents the tangent value of the drone in the y direction, R represents the rotation matrix of the drone, Indicates the flight angle of the drone relative to the ground.
[0083] According to another aspect of the present application, a storage medium is provided, in which at least one executable instruction is stored, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned monitoring data processing method.
[0084] According to another aspect of the present application, a terminal is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;
[0085] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned monitoring data processing method.
[0086] By means of the above technical solution, the technical solution provided by the embodiment of the present application has at least the following advantages:
[0087] The present application provides a monitoring data processing method and device, a storage medium, and a terminal. First, a monitoring image to be processed is obtained, where the monitoring image to be processed is collected by a drone, and the image collected by the drone is corrected based on a positioning result obtained by positioning the drone based on a motion locator; secondly, feature extraction is performed from the monitoring image to be processed based on a HOG directional gradient histogram method to obtain a HOG feature image, where the feature extraction is performed locally; finally, the HOG feature image is classified based on an image classification model for which model training has been completed to obtain a classification result of the monitoring image to be processed, where the image classification model is based on a federated learning algorithm, and is obtained by a central server aggregating model parameters of local models trained by multiple terminals. Compared with the prior art, the embodiment of the present application obtains a HOG feature image by performing feature extraction on the surveillance image to be processed locally, and then classifies the HOG feature image based on the image classification model trained by the federated learning algorithm to obtain a classification result. Since the feature extraction and classification are both performed locally, there is no need to transmit the surveillance image to the central server, which reduces the risk of data being stolen or tampered with during transmission and ensures user privacy. At the same time, since the data transmission step is omitted, the data processing process is optimized and the timeliness of real-time monitoring is ensured. The surveillance image is collected by a drone, and then the drone is positioned according to the motion locator to obtain a positioning result, and the surveillance image is corrected according to the positioning result. Finally, the corrected surveillance image is processed, which reduces the degree of distortion of the drone's shooting, thereby improving the accuracy of the surveillance image classification result.
[0088] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0090] Figure 1 A flow chart of a monitoring data processing method provided by an embodiment of the present application is shown;
[0091] Figure 2 The feature extraction flow chart provided by the embodiment of the present application is shown;
[0092] Figure 3 The following is a flowchart of the image classification model training provided by the embodiment of the present application;
[0093] Figure 4 A monitoring image correction flow chart provided in an embodiment of the present application is shown;
[0094] Figure 5 A block diagram of a monitoring data processing device provided in an embodiment of the present application is shown;
[0095] Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0096] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0097] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0098] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0099] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0100] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0101] The embodiments of the present application can be applied to computer systems / servers, which can operate with many other general or special computing system environments or configurations. Examples of well-known computing systems, environments and / or configurations suitable for use with computer systems / servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0102] Computer systems / servers may be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. In general, program modules may include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers may be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules may be located on local or remote computing system storage media including storage devices.
[0103] The present application embodiment provides a monitoring data processing method, such as Figure 1 As shown, the method includes:
[0104] 101. Obtain surveillance images to be processed.
[0105] Among them, the monitoring image to be processed is collected by a drone, and the image collected by the drone is corrected based on the positioning result obtained by positioning the drone with a motion locator. In an embodiment of the present application, the current execution end may be a local data processing unit of the monitoring system. The monitoring system includes at least a drone, a collaborative robot, and a data processing unit; the drone is equipped with an image acquisition device for acquiring images of the monitoring area; the collaborative robot is equipped with a motion locator for locating the drone based on optical data or ultrasonic data, so that the drone can correct the collected image based on the positioning result, thereby reducing the distortion of the monitoring image; the data processing unit is used to extract features and classify the corrected image.
[0106] In specific application scenarios, the ground station collects data integrated with the drone and the collaborative robot. Specifically, first, data acquisition devices are set up at the ground station. These devices can be connected to the sensors and control systems of the drone and the collaborative robot to collect the data generated by them; then, through the preset communication protocol and interface, the ground station communicates with the drone and the collaborative robot to obtain their status information, sensor data, etc.; further, since the data received by the ground station may come from multiple sensors, such as image sensors, inertial sensors, laser radars, etc., the ground station will integrate these data together to form a complete data record of the drone and the collaborative robot; finally, the ground station stores these data in a local database or server for subsequent analysis and processing. In addition, the collected data may be a real-time data stream or a historical data record.
[0107] Collect ground source data through cloud services. Specifically, first, based on the platform and tools provided by the cloud service provider, receive and store data and provide data processing and analysis services; then upload the collected ground source data to the cloud service platform through the network connection through the ground station. It is understandable that this step may involve data encryption, compression and other operations to ensure the security and efficiency of data transmission; further, the cloud service platform stores the received ground source data on the cloud server for subsequent use; when the data is stored in the cloud, it can be processed and analyzed through the tools and algorithms provided by the cloud service platform, which may include data cleaning, feature extraction, pattern recognition and other operations to extract useful information from the data. In addition, the processed and analyzed data can also be applied to various application scenarios, such as intelligent monitoring, environmental monitoring, decision support, etc.
[0108] Based on the above process, the ground station can collect data integrated with the drone and collaborative robot, and collect ground source data through cloud services to achieve monitoring, management and optimization of the entire system.
[0109] 102. Based on the HOG directional gradient histogram method, feature extraction is performed from the monitoring image to be processed to obtain a HOG feature image.
[0110] Among them, feature extraction is performed locally. In the embodiment of the present application, the HOG directional gradient histogram method is used to extract features from the surveillance image to be processed. Since the new HOG directional gradient histogram method based on recursive calculation of the block histogram obtains the histogram through a single memory access, compared with the histogram obtained through four memory accesses in the histogram integration method, the feature extraction speed can be increased to four times, thereby effectively improving the processing speed of the surveillance data.
[0111] It should be noted that the feature extraction process is performed locally. Since there is no need to transmit the surveillance images to the central server, the risk of data being stolen or tampered with during transmission is reduced, thus ensuring user privacy. At the same time, since the data transmission step is omitted, the data processing process is optimized, ensuring the timeliness of real-time monitoring.
[0112] 103. Classify the HOG feature image based on the image classification model that has completed model training to obtain the classification result of the monitoring image to be processed.
[0113] The image classification model is based on a federated learning algorithm, and is obtained by a central server aggregating model parameters of local models trained on multiple terminals; the classification results include illegal intrusion detected and illegal intrusion not detected. In the embodiment of the present application, the federated learning algorithm used in model training is a distributed machine learning method that can realize model training on multiple devices or data sources without the need to centrally store or transmit data to a central server, thereby avoiding the risk of data being stolen or tampered with during transmission.
[0114] Compared with the prior art, the embodiment of the present application obtains a HOG feature image by performing feature extraction on the surveillance image to be processed locally, and then classifies the HOG feature image based on the image classification model trained by the federated learning algorithm to obtain a classification result. Since the feature extraction and classification are both performed locally, there is no need to transmit the surveillance image to the central server, which reduces the risk of data being stolen or tampered with during transmission and ensures user privacy. At the same time, since the data transmission step is omitted, the data processing process is optimized and the timeliness of real-time monitoring is ensured. The surveillance image is collected by a drone, and then the drone is positioned according to the motion locator to obtain a positioning result, and the surveillance image is corrected according to the positioning result. Finally, the corrected surveillance image is processed, which reduces the degree of distortion of the drone's shooting, thereby improving the accuracy of the surveillance image classification result.
[0115] In an embodiment of the present application, in order to further define and illustrate, Figure 2 As shown, step 102 of the embodiment extracts features from the monitored image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image, which specifically includes:
[0116] 201. Calculate the horizontal gradient and the vertical gradient.
[0117] The horizontal gradient and vertical gradient are calculated based on the following formulas:
[0118]
[0119]
[0120] in, represents the horizontal gradient, represents the vertical gradient, and I represents the pixel value of each pixel in the monitored image to be processed.
[0121] It should be noted that before calculating the horizontal gradient and the vertical gradient, the monitoring image to be processed may be converted into a grayscale image in advance to reduce computing resources, and then the horizontal gradient and the vertical gradient of the grayscale image of the monitoring image to be processed may be calculated.
[0122] 202. Calculate the amplitude and direction angle of each pixel according to the horizontal gradient and the vertical gradient.
[0123] The amplitude and direction angle of each pixel are calculated according to the horizontal gradient and vertical gradient based on the following formula:
[0124]
[0125]
[0126] Where G represents the amplitude, Indicates direction, represents the horizontal gradient, Represents the vertical gradient.
[0127] It should be noted that each pixel has its own amplitude and direction angle. In addition, the direction angle can take an absolute value, so the angle range is [0, 180°].
[0128] 203. Divide the surveillance image to be processed into a plurality of first cells according to a preset pixel size, and generate an amplitude list and a direction angle list for each first cell.
[0129] In an embodiment of the present application, the preset pixel size can be 8×8 pixel size, and the monitored image to be processed is further divided into multiple first cells according to the 8×8 pixel size, and a corresponding amplitude list and a direction angle list are generated, wherein the amplitude list and the direction angle list are both composed of 8×8 values, each value in the amplitude list represents the amplitude of each pixel, and each value in the direction angle list represents the direction angle of each pixel.
[0130] 204. Correspond each direction angle included in the direction angle list to each group, respectively add the amplitude corresponding to each direction angle to the group corresponding to each direction angle, and generate a first gradient histogram of the first cell based on the accumulated amplitude corresponding to each group.
[0131] Among them, the number of histograms in the first gradient histogram is the same as the number of groups, and the groups are pre-divided according to the preset angle units based on the angle range of 0 to 180 degrees. In the embodiment of the present application, the preset angle unit can be 20°, and [0,180°] is divided into 9 groups of 20° each, namely 20, 40, 60, 80, 100, 120, 140, and 160. Further, each direction angle included in the direction angle list is mapped to each group, and the amplitude corresponding to each direction angle is accumulated in each group. Exemplarily, the first row of values in the direction angle list is 80, 36, 5, 10, 0, 64, 90, 73, and the corresponding amplitudes are 2, 3, 4, 4, 3, 4, 2, 2. The value 80 in the direction angle list corresponds to the "80" group, and the corresponding amplitude is 2, so 2 is added to the "80" group; the value 10 in the direction angle list is between 0 and 20, so the corresponding amplitude is 4 and proportionally accumulated to the "0" group and the "20" group, that is, 2 is added to each. It should be noted that if the value in the direction angle list is greater than 160, it means that it is between 160 and 180. At this time, the corresponding amplitude can be proportionally accumulated to the "0" group and the "160" group. By analogy, after all the values in the direction angle list and the amplitude list are processed according to the above method, the first gradient histogram of the first cell is obtained, that is, a histogram with a length of 9.
[0132] 205. Combine a preset number of first cells to obtain a second cell, concatenate the first gradient histograms corresponding to the preset number of first cells to obtain a second gradient histogram of the second cell, and normalize the second gradient histogram.
[0133] In the embodiment of the present application, the preset number can be 2×2, 2×2 first cells are combined to obtain a second cell, and the first gradient histograms of the 2×2 first cells are spliced to obtain a second gradient histogram of the second cell. It can be understood that since each first cell contains 9 values, each second cell contains 36 values. Further, in order to reduce light interference, the second gradient histogram can be normalized.
[0134] 206. Perform splicing processing on the normalized full second gradient histogram to obtain a HOG feature image of the monitoring image to be processed.
[0135] In an embodiment of the present application, the second cell is used as a window to slide in the surveillance image to be processed, and a second gradient histogram is obtained each time it slides. The entire second gradient histogram is spliced to obtain the HOG feature image of the surveillance image to be processed.
[0136] In an embodiment of the present application, in order to further define and illustrate, Figure 3 As shown, in step 103 of the embodiment, the HOG feature image is classified based on the image classification model for which model training has been completed, and before the classification result of the monitoring image to be processed is obtained, the embodiment method further includes:
[0137] 301. Download the initial image classification model from the central server.
[0138] The initial image classification model is constructed based on a convolutional neural network. In the embodiment of the present application, the initial image classification model includes a convolutional layer, a maximum pooling layer, a fully connected layer and an output layer.
[0139] 302. Perform model training on the initial image classification model based on a preset training data set to obtain an updated image classification model.
[0140] Among them, the preset training data set is built based on local data. The preset training set can use the Microsoft COCO (Common Objects in Context) data set, which is a large-scale image data set widely used for tasks such as target detection, image segmentation, and image annotation. Among them, it covers pictures in a variety of different scenes and provides detailed annotation information, including the category, location, and attributes of the object. The images in the COCO data set have rich content and complex scenes, including multiple objects, complex backgrounds, and various occlusions. The data set contains about 100,000 pictures, covering 80 different object categories, such as people, vehicles, animals, furniture, etc. Each picture is equipped with rich annotation information, including the bounding box, category label, and key points of each object. In an embodiment of the present application, first, samples in a preset training data set are classified based on an initial image classification model. Specifically, in the convolution layer of the initial image classification model, multiple filters are applied to the samples, and the application functions are activated in sequence. It should be noted that each filter has a depth that is the same as the image channel, and the parameters include the filter kernel and the bias term; in the pooling layer of the initial image classification model, the convolved image is downsampled to summarize the information. It should be noted that the average pooling layer and the maximum pooling layer are usually used; the extracted image features are then input into the fully connected layer of the initial image classification model. The fully connected layer is composed of a finite number of neurons, receives a vector as input, and outputs another vector. The learned parameters include weights and bias terms, thereby obtaining the predicted classification results of each sample. Secondly, the loss function between the predicted classification result and the actual classification result of the sample is calculated based on the following formula,
[0141]
[0142] Among them, m represents the size of the preset training data set, represents the model parameters, L represents The cost function is a cost function. It should be noted that the loss function can be calculated based on a batch of samples or on the entire data set. Finally, the gradient of the cost function is calculated, and the model parameters of the initial image classification model are updated using the gradient descent algorithm to reduce the loss function until the preset number of iterations is met or the loss function is less than the preset threshold. The model training is stopped to obtain the updated image classification model.
[0143] Correspondingly, step 302 of the embodiment specifically includes: classifying the samples in the preset training data set based on the initial image classification model to obtain the predicted classification results of each sample; calculating the loss function between the predicted classification results and the actual classification results of the samples; updating the model parameters of the initial image classification model based on the gradient descent algorithm to reduce the loss function until the preset model training conditions are met, stopping the model training, and obtaining the updated image classification model.
[0144] 303. The updated image classification model is tested based on a preset test data set. If all evaluation indicators meet the corresponding evaluation standards, the updated image classification model is uploaded to the central server, and the image classification model that has completed model training is received.
[0145] Furthermore, the HOG feature image is classified based on the image classification model.
[0146] The preset test data set can also be constructed based on the Microsoft COCO data set; the evaluation indicators can include accuracy, precision, recall, F1 value, etc. In the embodiment of the present application, the central server aggregates the model parameters of the multiple local models trained in the terminal to obtain an image classification model that has completed model training, and sends it to each terminal.
[0147] In an embodiment of the present application, in order to further define and illustrate, Figure 4 As shown, step 101 of the embodiment obtains the surveillance image to be processed, which specifically includes:
[0148] 401. Obtain surveillance images collected by the drone.
[0149] In the embodiment of the present application, images within the monitoring area are collected based on the image acquisition device equipped on the drone.
[0150] 402. Determine the altitude of the drone.
[0151] It should be noted that the determination can be made using an optical data method or an ultrasonic data method. In an embodiment of the present application, when the optical data method is used, the height of the drone is first estimated. Specifically, it can be obtained based on existing instruments. When the estimated height is less than the preset height, the height of the drone can be estimated by the inverse of the proportional factor. Among them, the calculation process of the proportional factor is to first measure the distance between the two infrared markers in the image; then compare the measured distance with the actual distance (known) of the two infrared markers; finally, calculate the average of all differences, which is the proportional factor. When the estimated height is less than the preset height, it is calculated based on the relationship between the height measurement error and the distance from the drone to the target point, the flight angle error, the scene field of view width, and the number of image pixels.
[0152] When the ultrasonic data method is used, the height of the drone can be calculated based on the horizontal position of the drone relative to the robot and the yaw angle of the drone.
[0153] Accordingly, when the optical data method is used, determining the height of the drone specifically includes: obtaining an estimated height of the drone; if the estimated height is less than a preset height, determining the height of the drone based on the following formula:
[0154]
[0155]
[0156] Where S represents the scaling factor, represents the measured distance between the two drone positioning markers in the image, represents the actual distance between the two drone positioning marks, and z represents the height of the drone;
[0157] If the estimated height is greater than the preset height, the height of the drone is determined based on the following formula:
[0158]
[0159]
[0160]
[0161] Among them, z represents the height of the drone, X represents the horizontal distance between the drone and the target point, Indicates the tangent value of the drone and the flight angle, Indicates the flight angle of the drone relative to the ground. represents the error in height measurement, Indicates angle The error, represents the width of the field of view of the scene, and N represents the number of pixels in the image.
[0162] When using the ultrasonic data method, determine the altitude of the drone, including:
[0163] Determine the altitude of the drone based on the following formula:
[0164]
[0165] in, A function representing the altitude of the drone, represents the position vector of the collaborative robot, z represents the height of the drone, Indicates the tangent value of the drone in the x direction, represents the tangent value of the drone in the y direction, R represents the rotation matrix of the drone, Indicates the flight angle of the drone relative to the ground. , , , Represents the coordinates of a specific beacon point, used to calculate .
[0166] 403. Determine the position coordinates of the drone in the drone coordinate system according to the altitude.
[0167] Based on the following formula, the position coordinates of the drone in the drone coordinate system are determined according to the altitude:
[0168]
[0169] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. Indicates the tangent value of the drone in the x direction, Indicates the tangent value of the drone in the y direction.
[0170] 404. Convert the position coordinates of the drone in the drone coordinate system to the collaborative robot coordinate system.
[0171] Among them, the collaborative robot is equipped with a motion locator.
[0172] The position coordinates of the UAV in the UAV coordinate system are converted to the collaborative robot coordinate system based on the following formula:
[0173]
[0174] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. , , represents the position coordinates of the drone in the collaborative robot coordinate system, and h represents the height of the drone. It should be noted that the coordinate conversion process may also involve transformations such as rotation, translation, and scaling between coordinate systems. In addition, since there may be errors and uncertainties in actual application scenarios, in order to avoid the above problems, the converted coordinates can also be calibrated and corrected.
[0175] 405. Correct the monitoring image based on the converted coordinate position to obtain a monitoring image to be processed.
[0176] In the embodiment of the present application, the monitoring image is corrected to reduce the degree of distortion of the monitoring image.
[0177] In one embodiment of the present application, for further limitation and explanation, before determining the height of the drone in step 402 of the embodiment, the embodiment method also includes: acquiring an image of the drone positioning mark, and converting the drone positioning mark image into a binary image based on a preset brightness threshold to establish parameters of the non-zero area; calculating the contour moment of the non-zero area, determining the center point of the drone positioning mark according to the average angular coordinates of the contour, and determining the angular coordinates of the drone according to the center point.
[0178] Furthermore, the height of the UAV is determined based on the optical data method according to the angle coordinates. Among them, the non-zero area is used to characterize the area where the pixel points in the binary image are not zero. In an embodiment of the present application, one and two concentric patterns are pre-arranged on the UAV to form a UAV positioning mark, which is used for visual inspection by a collaborative robot located on the ground to locate the UAV. First, an image of the UAV positioning mark is collected by adjusting the aperture and exposure. The image is then converted into a binary image based on a preset brightness threshold to distinguish between the foreground pattern and the background in the image. Specifically, pixels in the image that are greater than the preset brightness threshold are set to a value (which can be white), and pixels in the image that are less than the preset brightness threshold are set to another value (which can be black), thereby enhancing the specific features of the UAV positioning mark. Finally, the parameters of the non-zero area (x, y, ), where (x, y) represents the coordinates of the image, Represents the area of the drone positioning mark, which is used to indicate the range of the drone positioning mark.
[0179] The formula for calculating the contour moment of the non-zero area is as follows,
[0180]
[0181] in, Indicates the area of the drone positioning mark, Represents the number of pixels in the non-zero area, Indicates the center point coordinates of the drone positioning marker, as well as represents the spatial moment, Represents the p+q-order moment of the drone positioning mark, which is used to quantify the drone positioning mark.
[0182] The present application provides a monitoring data processing method, firstly, obtaining a monitoring image to be processed, wherein the monitoring image to be processed is collected by a drone, and the image collected by the drone is corrected based on a positioning result obtained by positioning the drone based on a motion locator; secondly, extracting features from the monitoring image to be processed based on a HOG directional gradient histogram method to obtain a HOG feature image, wherein the feature extraction is performed locally; finally, classifying the HOG feature image based on an image classification model for which model training has been completed to obtain a classification result of the monitoring image to be processed, wherein the image classification model is based on a federated learning algorithm, and is obtained by a central server aggregating model parameters of local models trained on multiple terminals. Compared with the prior art, the embodiment of the present application obtains a HOG feature image by performing feature extraction on the surveillance image to be processed locally, and then classifies the HOG feature image based on the image classification model trained by the federated learning algorithm to obtain a classification result. Since the feature extraction and classification are both performed locally, there is no need to transmit the surveillance image to the central server, which reduces the risk of data being stolen or tampered with during transmission and ensures user privacy. At the same time, since the data transmission step is omitted, the data processing process is optimized and the timeliness of real-time monitoring is ensured. The surveillance image is collected by a drone, and then the drone is positioned according to the motion locator to obtain a positioning result, and the surveillance image is corrected according to the positioning result. Finally, the corrected surveillance image is processed, which reduces the degree of distortion of the drone's shooting, thereby improving the accuracy of the surveillance image classification result.
[0183] Furthermore, as a response to the above Figure 1 To implement the method shown in the figure, the present application embodiment provides a monitoring data processing device, such as Figure 5 As shown, the device comprises:
[0184] Image acquisition module 51, feature extraction module 52, image classification module 53.
[0185] An image acquisition module 51 is used to acquire a monitoring image to be processed, wherein the monitoring image to be processed is acquired by a drone and correcting the image acquired by the drone based on a positioning result obtained by locating the drone by a motion locator;
[0186] A feature extraction module 52, used for extracting features from the monitored image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image, wherein the feature extraction is performed locally;
[0187] The image classification module 53 is used to classify the HOG feature image based on the image classification model that has completed model training to obtain the classification result of the monitoring image to be processed. The image classification model is based on a federated learning algorithm, and the central server aggregates the model parameters of the local models trained by multiple terminals.
[0188] In a specific application scenario, the feature extraction module is specifically used to:
[0189] The horizontal gradient and vertical gradient are calculated based on the following formulas:
[0190]
[0191]
[0192] in, represents the horizontal gradient, represents the vertical gradient, and I represents the pixel value of each pixel in the monitored image to be processed;
[0193] The amplitude and direction angle of each pixel are calculated according to the horizontal gradient and the vertical gradient based on the following formula:
[0194]
[0195]
[0196] Among them, G represents the amplitude of each pixel, Indicates the direction angle, represents the horizontal gradient, represents the vertical gradient;
[0197] Divide the monitored image to be processed into a plurality of first cells according to a preset pixel size, and generate an amplitude list and a direction angle list for each of the first cells;
[0198] Corresponding each direction angle included in the direction angle list to each group, respectively accumulating the amplitude corresponding to each direction angle to the group corresponding to each direction angle, and generating a first gradient histogram of the first cell based on the accumulated amplitude corresponding to each group, wherein the number of histograms in the first gradient histogram is the same as the number of groups, and the groups are pre-divided according to preset angle units based on an angle range of 0 to 180 degrees;
[0199] Combining a preset number of the first cells to obtain a second cell, concatenating the first gradient histograms corresponding to the preset number of the first cells to obtain a second gradient histogram of the second cell, and normalizing the second gradient histogram;
[0200] The normalized full second gradient histogram is spliced to obtain the HOG feature image of the monitoring image to be processed.
[0201] In a specific application scenario, before the image classification module, the device further includes:
[0202] A model building module, used for downloading an initial image classification model from a central server, wherein the initial image classification model is built based on a convolutional neural network;
[0203] A model training module, used to perform model training on the initial image classification model based on a preset training data set to obtain an updated image classification model, wherein the preset training data set is constructed based on local data;
[0204] A model testing module is used to test the updated image classification model based on a preset test data set. If all evaluation indicators meet the corresponding evaluation standards, the updated image classification model is uploaded to the central server, and an image classification model that has completed model training is received to classify the HOG feature image based on the image classification model. The image classification model that has completed model training is obtained by the central server aggregating multiple locally updated image classification models.
[0205] In a specific application scenario, the model training module is specifically used to:
[0206] Classifying the samples in the preset training data set based on the initial image classification model to obtain a predicted classification result for each of the samples;
[0207] Calculating a loss function between the predicted classification result and the actual classification result of the sample;
[0208] The model parameters of the initial image classification model are updated based on the gradient descent algorithm to reduce the loss function until the preset model training conditions are met, the model training is stopped, and an updated image classification model is obtained.
[0209] In a specific application scenario, the image acquisition module specifically includes:
[0210] An image acquisition unit, used to acquire monitoring images collected by the drone;
[0211] an altitude determination unit, for determining the altitude of the drone based on an ultrasonic data method;
[0212] A three-dimensional coordinate determination unit, configured to determine the position coordinates of the drone in the drone coordinate system according to the height based on the following formula,
[0213]
[0214] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. Indicates the tangent value of the drone in the x direction, Indicates the tangent value of the drone in the y direction;
[0215] A coordinate conversion unit, used to convert the position coordinates of the drone in the drone coordinate system into the coordinate system of the collaborative robot, the collaborative robot being equipped with the motion locator, based on the following formula,
[0216]
[0217] Among them, x, y, and z represent the position coordinates of the drone in the drone coordinate system. , , represents the position coordinates of the UAV in the collaborative robot coordinate system, and h represents the height of the UAV;
[0218] The image correction unit is used to correct the monitoring image based on the converted coordinate position to obtain a monitoring image to be processed.
[0219] In a specific application scenario, the height determination unit is specifically used to:
[0220] The altitude of the drone is determined based on the following formula:
[0221]
[0222] in, A function representing the altitude of the drone, represents the position vector of the collaborative robot, z represents the height of the drone, Indicates the tangent value of the drone in the x direction, represents the tangent value of the drone in the y direction, R represents the rotation matrix of the drone, Indicates the flight angle of the drone relative to the ground.
[0223] The present application provides a monitoring data processing device, which first obtains a monitoring image to be processed, wherein the monitoring image to be processed is collected by a drone, and the image collected by the drone is corrected based on a positioning result obtained by positioning the drone based on a motion locator; secondly, feature extraction is performed from the monitoring image to be processed based on a HOG directional gradient histogram method to obtain a HOG feature image, and the feature extraction is performed locally; finally, the HOG feature image is classified based on an image classification model for which model training has been completed to obtain a classification result of the monitoring image to be processed, and the image classification model is based on a federated learning algorithm, and is obtained by a central server aggregating model parameters of local models trained on multiple terminals. Compared with the prior art, the embodiment of the present application obtains a HOG feature image by performing feature extraction on the surveillance image to be processed locally, and then classifies the HOG feature image based on the image classification model trained by the federated learning algorithm to obtain a classification result. Since the feature extraction and classification are both performed locally, there is no need to transmit the surveillance image to the central server, which reduces the risk of data being stolen or tampered with during transmission and ensures user privacy. At the same time, since the data transmission step is omitted, the data processing process is optimized and the timeliness of real-time monitoring is ensured. The surveillance image is collected by a drone, and then the drone is positioned according to the motion locator to obtain a positioning result, and the surveillance image is corrected according to the positioning result. Finally, the corrected surveillance image is processed, which reduces the degree of distortion of the drone's shooting, thereby improving the accuracy of the surveillance image classification result.
[0224] According to an embodiment of the present application, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the monitoring data processing method in any of the above method embodiments.
[0225] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0226] Figure 6 A schematic diagram of the structure of a terminal provided according to an embodiment of the present application is shown, and the specific embodiment of the present application does not limit the specific implementation of the terminal.
[0227] like Figure 6 As shown, the terminal may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0228] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0229] The communication interface 604 is used to communicate with other devices such as clients or other servers.
[0230] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps in the above-mentioned monitoring data processing method embodiment.
[0231] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0232] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0233] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0234] The program 610 may be specifically configured to enable the processor 602 to perform the following operations:
[0235] Acquire a surveillance image to be processed, where the surveillance image to be processed is collected by a drone and the positioning result of the drone is corrected according to a motion locator;
[0236] Extracting features from the monitored image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image, wherein the feature extraction is performed locally;
[0237] The HOG feature image is classified based on an image classification model that has completed model training to obtain a classification result of the monitoring image to be processed, and the image classification model is obtained by performing local model training based on a federated learning algorithm.
[0238] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device of the above-mentioned monitoring data processing method, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0239] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0240] The method and system of the present application may be implemented in many ways. For example, the method and system of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present application may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present application. Therefore, the present application also covers a recording medium storing a program for executing the method according to the present application.
[0241] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0242] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A monitoring data processing method, characterized in that: include: Acquire a surveillance image to be processed, where the surveillance image to be processed is collected by a drone, and based on a positioning result obtained by positioning the drone by a motion locator, the image collected by the drone is corrected; Extracting features from the monitored image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image, wherein the feature extraction is performed locally; Classify the HOG feature image based on an image classification model that has completed model training to obtain a classification result of the monitoring image to be processed, wherein the image classification model is based on a federated learning algorithm and is obtained by a central server aggregating model parameters of local models trained by multiple terminals; The method of extracting features from the monitoring image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image includes: The horizontal gradient and vertical gradient are calculated based on the following formulas: in, represents the horizontal gradient, represents the vertical gradient, and I represents the pixel value of each pixel in the monitored image to be processed; The amplitude and direction angle of each pixel are calculated according to the horizontal gradient and the vertical gradient based on the following formula: Among them, G represents the amplitude of each pixel, Indicates the direction angle; Divide the monitored image to be processed into a plurality of first cells according to a preset pixel size, and generate an amplitude list and a direction angle list for each of the first cells; Corresponding each direction angle included in the direction angle list to each group, respectively accumulating the amplitude corresponding to each direction angle to the group corresponding to each direction angle, and generating a first gradient histogram of the first cell based on the accumulated amplitude corresponding to each group, wherein the number of histograms in the first gradient histogram is the same as the number of groups, and the groups are pre-divided according to preset angle units based on an angle range of 0 to 180 degrees; Combining a preset number of the first cells to obtain a second cell, concatenating the first gradient histograms corresponding to the preset number of the first cells to obtain a second gradient histogram of the second cell, and normalizing the second gradient histogram; The normalized full amount of the second gradient histogram is spliced to obtain the HOG feature image of the monitoring image to be processed; Before classifying the HOG feature image based on the image classification model for which model training has been completed to obtain the classification result of the monitoring image to be processed, the method further includes: Downloading an initial image classification model from a central server, wherein the initial image classification model is constructed based on a convolutional neural network; Performing model training on the initial image classification model based on a preset training data set to obtain an updated image classification model, wherein the preset training data set is constructed based on local data; The updated image classification model is tested based on a preset test data set. If all evaluation indicators meet the corresponding evaluation standards, the updated image classification model is uploaded to the central server, and the image classification model that has completed model training is received to classify the HOG feature image based on the image classification model. The image classification model that has completed model training is obtained by aggregating multiple locally updated image classification models by the central server.
2. The method according to claim 1, characterized in that The performing model training on the initial image classification model based on a preset training data set to obtain an updated image classification model includes: Classifying the samples in the preset training data set based on the initial image classification model to obtain a predicted classification result for each of the samples; Calculating a loss function between the predicted classification result and the actual classification result of the sample; The model parameters of the initial image classification model are updated based on the gradient descent algorithm to reduce the loss function until the preset model training conditions are met, the model training is stopped, and an updated image classification model is obtained.
3. A monitoring data processing device, characterized in that: include: An image acquisition module is used to acquire a monitoring image to be processed, wherein the monitoring image to be processed is acquired by a drone and correcting the image acquired by the drone based on a positioning result obtained by locating the drone by a motion locator; A feature extraction module, used for extracting features from the monitoring image to be processed based on the HOG directional gradient histogram method to obtain a HOG feature image, wherein the feature extraction is performed locally; An image classification module is used to classify the HOG feature image based on an image classification model that has completed model training to obtain a classification result of the monitoring image to be processed, wherein the image classification model is based on a federated learning algorithm and is obtained by a central server aggregating model parameters of local models trained by multiple terminals; The feature extraction module is used to: The horizontal gradient and vertical gradient are calculated based on the following formulas: in, represents the horizontal gradient, represents the vertical gradient, and I represents the pixel value of each pixel in the monitored image to be processed; The amplitude and direction angle of each pixel are calculated according to the horizontal gradient and the vertical gradient based on the following formula: Among them, G represents the amplitude of each pixel, Indicates the direction angle; Divide the monitored image to be processed into a plurality of first cells according to a preset pixel size, and generate an amplitude list and a direction angle list for each of the first cells; Corresponding each direction angle included in the direction angle list to each group, respectively accumulating the amplitude corresponding to each direction angle to the group corresponding to each direction angle, and generating a first gradient histogram of the first cell based on the accumulated amplitude corresponding to each group, wherein the number of histograms in the first gradient histogram is the same as the number of groups, and the groups are pre-divided according to preset angle units based on an angle range of 0 to 180 degrees; Combining a preset number of the first cells to obtain a second cell, concatenating the first gradient histograms corresponding to the preset number of the first cells to obtain a second gradient histogram of the second cell, and normalizing the second gradient histogram; The normalized full amount of the second gradient histogram is spliced to obtain the HOG feature image of the monitoring image to be processed; Before the image classification module, the device further includes: A model building module, used for downloading an initial image classification model from a central server, wherein the initial image classification model is built based on a convolutional neural network; A model training module, used to perform model training on the initial image classification model based on a preset training data set to obtain an updated image classification model, wherein the preset training data set is constructed based on local data; A model testing module is used to test the updated image classification model based on a preset test data set. If all evaluation indicators meet the corresponding evaluation standards, the updated image classification model is uploaded to the central server, and an image classification model that has completed model training is received to classify the HOG feature image based on the image classification model. The image classification model that has completed model training is obtained by the central server aggregating multiple locally updated image classification models.
4. A storage medium, wherein at least one executable instruction is stored in the storage medium, characterized in that: The executable instructions enable the processor to execute operations corresponding to the monitoring data processing method as described in claim 1 or 2.
5. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, wherein the executable instruction enables the processor to execute an operation corresponding to the monitoring data processing method according to claim 1 or 2.
Citation Information
Patent Citations
Method for recognizing nest on power transmission line based on HOG features and machine learning
CN108537154A
Rotation-invariant HOG infrared image power equipment identification method
CN111950566A
Multi-target tracking positioning and motion state estimation method based on unmanned aerial vehicle
CN113269098A
Image classification method and device, electronic equipment and storage medium
CN116342945A
