Video processing method and device, equipment and storage medium
By converting videos of monitoring devices on edge devices, identifying human information and blurring them, generating fake face replacement, and achieving automation and privacy protection of video processing, solving the problem of low video processing efficiency in the existing technology and improving monitoring The efficiency and privacy protection of device video processing.
Patent Information
- Application Number
- CN202411212691.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-20
AI Technical Summary
The video processing process of existing surveillance equipment is cumbersome, resulting in low processing efficiency and is susceptible to human factors, which makes it impossible to effectively improve the video processing speed.
Implement video processing methods on edge devices, by obtaining videos of the monitoring device, converting them to RGB format, identifying human body information, using fuzzy processing and generation of adversarial networks to generate fake faces, replacing the original face and torso parts, generating the processed video, and Perform encryption and compression to achieve automated processing.
It realizes the automation of video processing, reduces manual processing time, improves video processing efficiency, and achieves the purpose of privacy protection through anonymization.
Smart Images

Figure CN119166589A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video surveillance, and in particular to a video processing method, device, equipment and storage medium. Background Art
[0002] The increase in monitoring equipment has not only enhanced social security prevention capabilities, allowing criminal activities to be prevented and combated more effectively, but also promoted the improvement of urban management efficiency and provided strong support for rapid response to emergencies.
[0003] However, the processing process of the video of the existing monitoring equipment is cumbersome, which is not conducive to improving the processing efficiency of the video. The reason is that the existing technology mainly uses manual processing to process the human body information of the video of the monitoring equipment, and the manual processing method consumes a lot of human resources and time resources, increases the processing time of the video, and is easily affected by human factors. Therefore, it is not conducive to improving the processing efficiency of the video. Summary of the invention
[0004] The present invention provides a video processing method, device, edge device and storage medium to solve the technical problem that the video processing process of the existing monitoring equipment is complicated and is not conducive to improving the video processing efficiency.
[0005] In a first aspect, a video processing method is provided, which is applied to an edge device. The video processing method includes:
[0006] Connecting to a monitoring device and acquiring a video sent by the monitoring device;
[0007] Acquire a video image of the video, and acquire a data format of the video image;
[0008] When the data format is not a preset RGB format, converting the video image into a format to generate an RGB image;
[0009] Acquire human body information appearing in the RGB image, the human body information including a face and a torso;
[0010] Using a predefined fuzzy method, fuzzy processing is performed on the torso part to generate a fuzzy part;
[0011] A fake face is generated by adopting a predefined generation method, and in the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image, and the processed video is generated based on the processed RGB image.
[0012] In a possible implementation manner of the first aspect, acquiring the video image of the video and acquiring the data format of the video image includes:
[0013] Obtaining format information of the video;
[0014] In the format information, a video image of the video is obtained, and a data format of the video image is obtained.
[0015] In a possible implementation manner of the first aspect, when the data format is not a preset RGB format, performing format conversion on the video image to generate an RGB image includes:
[0016] When the data format is not the preset RGB format, calling a format conversion function of a preset image processing tool;
[0017] The format conversion function is used to convert the video image into a format to generate an RGB image.
[0018] In a possible implementation manner of the first aspect, obtaining human body information appearing in the RGB image, the human body information including a face and a torso, includes:
[0019] Performing image recognition on the RGB image to generate a recognition result;
[0020] In the recognition result, human body information appearing in the RGB image is obtained.
[0021] In a possible implementation manner of the first aspect, the using a predefined fuzzy method to perform fuzzy processing on the torso part to generate a fuzzy part includes:
[0022] In the RGB image, the torso part is located, and an image area corresponding to the torso part is obtained;
[0023] A Gaussian blur algorithm is used to blur the pixels in the image area to generate a blurred portion.
[0024] In a possible implementation manner of the first aspect, the method of using a predefined generation method to generate a fake face, replacing the human face with the fake face, and replacing the torso with the blurred part in the RGB image to obtain the processed RGB image, and generating the processed video based on the processed RGB image includes:
[0025] Using a generator in a generative adversarial network to generate a fake face, in the RGB image, replacing the human face with the fake face, and replacing the torso part with the blurred part, to obtain the processed RGB image;
[0026] The processed RGB image is encrypted to generate a first image, the first image is compressed to generate a second image, and the processed video is generated based on a plurality of different second images.
[0027] In a possible implementation manner of the first aspect, after generating a fake face by using a predefined generation method, replacing the human face with the fake face and replacing the torso with the blurred part in the RGB image to obtain the processed RGB image, and generating the processed video based on the processed RGB image, the video processing method includes:
[0028] Read the preset upload time and determine whether the current time is the upload time; if the current time is the upload time, connect to the video analysis system corresponding to the monitoring device and upload the processed video to the video analysis system.
[0029] In a second aspect, a video processing device is provided, which is applied to an edge device, and the video processing device includes:
[0030] A first acquisition module, used to connect to a monitoring device and acquire a video sent by the monitoring device;
[0031] A second acquisition module is used to acquire a video image of the video and acquire a data format of the video image;
[0032] A conversion module, used for converting the format of the video image to generate an RGB image when the data format is not a preset RGB format;
[0033] A third acquisition module is used to acquire human body information appearing in the RGB image, wherein the human body information includes a face and a torso;
[0034] A generating module, used for performing fuzzy processing on the torso part by using a predefined fuzzy method to generate a fuzzy part;
[0035] The processing module is used to generate a fake face by using a predefined generation method, replace the human face with the fake face, and replace the torso with the blurred part in the RGB image to obtain the processed RGB image, and generate the processed video based on the processed RGB image.
[0036] In a third aspect, an edge device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned video processing method when executing the computer program.
[0037] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned video processing method are implemented.
[0038] The present application provides a video processing method, apparatus, edge device and storage medium, which are connected to a monitoring device to obtain a video sent by the monitoring device; obtain a video image of the video and obtain a data format of the video image; when the data format is not a preset RGB format, perform format conversion on the video image to generate an RGB image; obtain human body information appearing in the RGB image, the human body information includes a face and a torso; use a predefined blur method to blur the torso to generate a blurred part; use a predefined generation method to generate a fake face, replace the face with the fake face, and replace the torso with the blurred part in the RGB image, and obtain the processed The RGB image is obtained, and the processed video is generated based on the processed RGB image. The beneficial effects are in two aspects. On the one hand, a predefined generation method is used to generate a fake face, and in the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image. Based on the processed RGB image, the processed video is generated. Since a fake face is generated to replace the human face in the video, and the torso part is replaced by the blurred part, the anonymization process can be completed to achieve the purpose of privacy protection. On the other hand, since no manual processing is required, the processing time of the video is reduced, which is conducive to improving the processing efficiency of the video. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0040] Figure 1 is a schematic diagram of an application environment of a video processing method in one embodiment of the present invention;
[0041] Figure 2 A schematic flow chart of a video processing method provided by an embodiment of the present invention;
[0042] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step S23;
[0043] Figure 4 yes Figure 1A schematic flow chart of a specific implementation of step S25;
[0044] Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S26;
[0045] Figure 6 is a structural schematic diagram of a video processing device in one embodiment of the present invention;
[0046] Figure 7 It is a schematic diagram of the structure of an edge device in one embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0048] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application environment of a video processing method according to an embodiment of the present invention. The video processing method provided by the embodiment of the present invention can be applied in the following embodiments: Figure 1 edge devices in application environments.
[0049] exist Figure 1 In the process, the monitoring device is connected to the edge device through the network, the edge device is connected to the server through the network, and the server is connected to the user through the network.
[0050] The network includes one or a combination of Ethernet, 4G network, 5G network, and WIFI network.
[0051] in, Figure 1 The workflow is described in detail as follows:
[0052] The monitoring device sends video to the edge device.
[0053] The edge device is connected to the monitoring device to obtain the video sent by the monitoring device;
[0054] Acquire a video image of the video, and acquire a data format of the video image;
[0055] When the data format is not a preset RGB format, converting the video image into a format to generate an RGB image;
[0056] Acquire human body information appearing in the RGB image, the human body information including a face and a torso;
[0057] Using a predefined fuzzy method, fuzzy processing is performed on the torso part to generate a fuzzy part;
[0058] A fake face is generated by adopting a predefined generation method, and in the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image, and the processed video is generated based on the processed RGB image.
[0059] The edge device sends the processed video to the server, and the server stores the processed video. The user terminal views the processed video in the server.
[0060] In the scheme implemented by the above-mentioned video processing method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, a predefined generation method is used to generate a fake face, and in the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image. Based on the processed RGB image, the processed video is generated. Since a fake face is generated to replace the human face in the video, and the torso part is replaced by the blurred part, the anonymization process can be completed, which is conducive to achieving the purpose of privacy protection. On the other hand, since no manual processing is required, the video processing time is reduced, which is conducive to improving the video processing efficiency.
[0061] The user terminal may include but is not limited to various personal computers, smart phones and portable wearable devices.
[0062] The server can be implemented with an independent task database or a task database cluster composed of multiple task databases. The present invention is described in detail below through specific embodiments.
[0063] See also Figure 2 , Figure 2 A schematic flow chart of a video processing method provided by an embodiment of the present invention includes the following steps:
[0064] S21, connecting to a monitoring device and acquiring a video sent by the monitoring device;
[0065] The monitoring equipment includes one or a combination of a capture device and a video camera.
[0066] Among them, the camera usually has high-definition image capture capabilities to ensure that the evidence of illegal behavior captured is clear and identifiable. It also has the functions of rapid response and automatic shooting, which can capture and record illegal behavior in a short time.
[0067] Among them, cameras can be divided into traditional box cameras, hemispherical cameras, all-in-one cameras, infrared cameras, high-speed dome cameras, and network cameras according to their types.
[0068] S22, obtaining a video image of the video, and obtaining a data format of the video image;
[0069] Wherein, the step of obtaining the video image of the video and obtaining the data format of the video image includes:
[0070] Obtaining format information of the video;
[0071] In the format information, a video image of the video is obtained, and a data format of the video image is obtained.
[0072] S23, when the data format is not a preset RGB format, converting the video image into a format to generate an RGB image;
[0073] Among them, RGB image: this refers to the image generated using the RGB color mode.
[0074] Among them, RGB is the abbreviation of Red, Green, Blue, representing red, green and blue, which are the three basic primary colors.
[0075] S24, obtaining human body information appearing in the RGB image, the human body information including a face and a torso;
[0076] The step of obtaining the human body information appearing in the RGB image, wherein the human body information includes a face and a torso, comprises:
[0077] Performing image recognition on the RGB image to generate a recognition result;
[0078] In the recognition result, human body information appearing in the RGB image is obtained.
[0079] The RGB image is subjected to image recognition using a preset image recognition method to generate a recognition result. The image recognition method may be any existing recognition method and is not limited here.
[0080] S25, using a predefined fuzzy method to perform fuzzy processing on the torso part to generate a fuzzy part;
[0081] S26, using a predefined generation method to generate a fake face, in the RGB image, replacing the human face with the fake face, replacing the torso part with the blurred part, to obtain the processed RGB image, and generating the processed video based on the processed RGB image.
[0082] Among them, in the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image. Since a new fake face is generated to replace the human face in the original video, and the torso part is replaced by the blurred part, the anonymization process is completed, which can achieve the purpose of privacy protection.
[0083] The method of generating a fake face by using a predefined generation method, replacing the human face with the fake face and replacing the torso with the blurred part in the RGB image to obtain the processed RGB image, and generating the processed video based on the processed RGB image includes:
[0084] Using a generator in a generative adversarial network to generate a fake face, in the RGB image, replacing the human face with the fake face, and replacing the torso part with the blurred part, to obtain the processed RGB image;
[0085] The processed RGB image is encrypted to generate a first image, the first image is compressed to generate a second image, and the processed video is generated based on a plurality of different second images.
[0086] Before step S21, the LSGAN loss function is used to train the generator and discriminator of the generative adversarial network. After the training is completed, the trained generator is deployed to the edge device.
[0087] Among them, the Generative Adversarial Network refers to a deep learning model that generates high-quality data by training the generator and the discriminator against each other. The generator is responsible for generating new data that is as close to the real data as possible, while the discriminator is responsible for distinguishing the generated data from the real data. Both are continuously optimized during the training process to improve the authenticity of the generated data and the accuracy of the discriminator.
[0088] Among them, the LSGAN loss function is the loss function of LSGAN.
[0089] Among them, LSGAN (Least Squares Generative Adversarial Networks).
[0090] Among them, the loss function of LSGAN replaces the cross entropy loss function in the traditional GAN with the least squares loss function. Specifically, for the discriminator, its goal is to minimize the mean square error between the real data and 1, and maximize the mean square error between the generated data and 0. For the generator, its goal is to minimize the mean square error between the generated data and 1, so that the generated data is as likely to be mistaken by the discriminator as real data.
[0091] Exemplarily, generating the processed video based on the processed RGB image includes:
[0092] Create a file and import the multiple processed RGB images into the file;
[0093] In the file, multiple processed RGB images are merged according to the shooting time of each processed RGB image to generate the processed video.
[0094] Wherein, in the file, according to the shooting time of each processed RGB image, multiple processed RGB images are merged to generate the processed video, including:
[0095] The shooting time of the RGB image before processing is set as the shooting time of the RGB image after processing. In the file, the processed RGB images are sorted in the order of the shooting time of the RGB images after processing, and the sorted RGB images are merged to generate the processed video.
[0096] The RGB image before processing is an RGB image in which the human face is not replaced by a fake face and the torso part is not replaced by a blurred part.
[0097] The processed RGB images are sorted according to the order of their shooting time, and the sorted RGB images are merged to generate the processed video, which is conducive to ensuring the continuity of the video content in the processed video.
[0098] Wherein, after a fake face is generated by adopting a predefined generation method, the human face is replaced with the fake face, and the torso part is replaced with the blurred part in the RGB image to obtain the processed RGB image, and the processed video is generated based on the processed RGB image, the video processing method includes:
[0099] Read the preset upload time and determine whether the current time is the upload time;
[0100] If the current time is the upload time, connect to the video analysis system corresponding to the monitoring device and upload the processed video to the video analysis system.
[0101] The video analysis system is a system that focuses on other body features, postures, behaviors or movement patterns of the human body besides the face. The video analysis system uses a variety of technical means such as computer vision, machine learning, and sensor technology to analyze the performance of the human body in video streams, images or real-time sensor data.
[0102] For ease of explanation, the types of video analysis systems are as follows:
[0103] 1. Posture estimation system:
[0104] Pose estimation systems estimate the pose and posture of a person by analyzing key points of the person in an image or video. They can be used in areas such as motion analysis and virtual reality applications.
[0105] 2. Behavior recognition and analysis system:
[0106] Behavior recognition systems focus on analyzing human behavior patterns in video streams to identify specific actions, activities, or behavior sequences. Behavior recognition and analysis systems can be used in security monitoring, human-computer interaction, smart home, and other fields. For example, behavior recognition and analysis systems can identify whether people are dancing, running, falling, or performing other activities.
[0107] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, a fake face is generated by adopting a predefined generation method. In the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image. Based on the processed RGB image, the processed video is generated. Since a fake face is generated to replace the human face in the video, and the torso part is replaced by the blurred part, the anonymization process can be completed to achieve the purpose of privacy protection. On the other hand, since no manual processing is required, the processing time of the video is reduced, which is conducive to improving the processing efficiency of the video.
[0108] See also Figure 3 , Figure 3 yes Figure 1 A specific implementation flow diagram of step S23 is described in detail as follows:
[0109] S31, when the data format is not the preset RGB format, calling a format conversion function of a preset image processing tool;
[0110] S32, performing format conversion on the video image through the format conversion function to generate an RGB image.
[0111] In the embodiment of the present invention, a video image can be converted from one format to an RGB image through a format conversion function. By converting the video image into the RGB image format, an image processing algorithm can directly act on the RGB image.
[0112] See also Figure 4 , Figure 4 yes Figure 1 A specific implementation flow diagram of step S25 is described in detail as follows:
[0113] S41, locating the torso in the RGB image, and acquiring an image region corresponding to the torso;
[0114] S42, using a Gaussian blur algorithm to blur the pixels in the image area to generate a blurred portion.
[0115] The Gaussian blur algorithm calculates the value of each pixel by applying a Gaussian kernel and applies it to edge pixels. This method can smooth edges while preserving image details and does not cause noticeable noise.
[0116] In the embodiment of the present invention, in the field of image processing, blurring the torso can reduce the clarity and recognizability of the image area corresponding to the torso, effectively prevent the leakage of the torso of an individual, and is beneficial to protecting the torso.
[0117] See also Figure 5 , Figure 5 yes Figure 1 A specific implementation flow diagram of step S26 is described in detail as follows:
[0118] S51, using a generator in a generative adversarial network to generate a fake face, replacing the human face with the fake face, and replacing the torso part with the blurred part in the RGB image, to obtain the processed RGB image;
[0119] S52, encrypting the processed RGB image to generate a first image, compressing the first image to generate a second image, and generating the processed video based on a plurality of different second images.
[0120] Exemplarily, encrypting the processed RGB image to generate a first image, compressing the first image to generate a second image, and generating the processed video based on a plurality of different second images includes:
[0121] Using a preset secret key and a pseudo-random number generator to generate a matrix, using the matrix to rearrange the positions of macroblocks in the processed RGB image, and setting the rearranged RGB image as the first image;
[0122] The first image is compressed to generate a second image, and the processed video is generated based on a plurality of different second images.
[0123] Exemplarily, compressing the first image to generate a second image, and generating the processed video based on a plurality of different second images includes:
[0124] Get the compression time and compression rate of the compression algorithm;
[0125] When the compression time is less than a preset time and the compression rate is higher than a preset value, compressing the first image by using the compression algorithm to generate a second image;
[0126] The processed video is generated based on a plurality of different second images.
[0127] Among them, when the compression time is less than the preset time and the compression rate is higher than the preset value, the first image is compressed by the compression algorithm to generate the second image, which is conducive to improving the compression effect of the first image.
[0128] Exemplarily, generating the processed video based on a plurality of different second images includes:
[0129] Create a file, import multiple different second images into the file, set the shooting time of the RGB image before processing as the shooting time of the second image, sort the second images in the file according to the chronological order of the shooting time of the second images, merge the sorted second images, and generate the processed video.
[0130] The RGB image before processing is an RGB image in which the human face is not replaced by a fake face and the torso part is not replaced by a blurred part.
[0131] Among them, in the file, the second images are sorted in the order of the shooting time of the second images, and the sorted second images are merged to generate the processed video, which is conducive to ensuring the continuity of the video content in the processed video.
[0132] In the embodiment of the present invention, since a new fake face is generated to replace the human face in the original video and the torso part is replaced by the blurred part, the anonymization process can be completed, which is beneficial to achieving the purpose of privacy protection and also beneficial to improving the processing efficiency of the video.
[0133] See also Figure 6 , Figure 6 is a schematic diagram of a structure of a video processing device in one embodiment of the present invention. Figure 6 As shown, the video processing device includes a first acquisition module 101, a second acquisition module 102, a conversion module 103, a third acquisition module 104, a generation module 105, and a processing module 106. The functional modules are described in detail as follows:
[0134] A first acquisition module 101 is used to connect to a monitoring device and acquire a video sent by the monitoring device;
[0135] The second acquisition module 102 is used to acquire the video image of the video and acquire the data format of the video image;
[0136] The conversion module 103 is used for converting the video image into a RGB image when the data format is not a preset RGB format;
[0137] A third acquisition module 104 is used to acquire human body information appearing in the RGB image, wherein the human body information includes a face and a torso.
[0138] A generating module 105, configured to perform fuzzification processing on the torso part by using a predefined fuzzy method to generate a fuzzy part;
[0139] The processing module 106 is used to generate a fake face by using a predefined generation method, replace the human face with the fake face, and replace the torso part with the blurred part in the RGB image to obtain the processed RGB image, and generate the processed video based on the processed RGB image.
[0140] In one embodiment, the second acquisition module 102 includes:
[0141] A first acquisition subunit, used to acquire format information of the video;
[0142] The second acquisition subunit is used to acquire the video image of the video and the data format of the video image from the format information.
[0143] In one embodiment, the conversion module 103 includes:
[0144] A calling subunit, used for calling a format conversion function of a preset image processing tool when the data format is not a preset RGB format;
[0145] The generating subunit is used to perform format conversion on the video image through the format conversion function to generate an RGB image.
[0146] In one embodiment, the third acquisition module 104 includes:
[0147] The recognition subunit is used to perform image recognition on the RGB image and generate a recognition result;
[0148] The third acquisition subunit is used to acquire human body information appearing in the RGB image in the recognition result.
[0149] In one embodiment, the generating module 105 includes:
[0150] A positioning subunit, used for positioning the torso part in the RGB image and obtaining an image area corresponding to the torso part;
[0151] The generating subunit is used to use a Gaussian blur algorithm to perform blur processing on the pixels in the image area to generate a blurred part.
[0152] In one embodiment, the processing module 106 includes:
[0153] A replacement subunit, used for generating a fake face by using a generator in a generative adversarial network, replacing the human face with the fake face, and replacing the torso with the blurred part in the RGB image, to obtain the processed RGB image;
[0154] The processing subunit is used to encrypt the processed RGB image to generate a first image, compress the first image to generate a second image, and generate the processed video based on multiple different second images.
[0155] In one embodiment, the video processing device further includes:
[0156] The upload module is used to read the preset upload time and determine whether the current time is the upload time; if the current time is the upload time, connect to the video analysis system corresponding to the monitoring device and upload the processed video to the video analysis system.
[0157] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, a fake face is generated by adopting a predefined generation method. In the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image. Based on the processed RGB image, the processed video is generated. Since a fake face is generated to replace the human face in the video, and the torso part is replaced by the blurred part, the anonymization process can be completed to achieve the purpose of privacy protection. On the other hand, since no manual processing is required, the processing time of the video is reduced, which is conducive to improving the processing efficiency of the video.
[0158] For specific limitations on the video processing device, please refer to the limitations on the video processing method above, which will not be repeated here.
[0159] Each module in the above video processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the edge device in hardware form, or can be stored in the memory in the edge device in software form, so that the processor can call and execute the operations corresponding to each module above.
[0160] See also Figure 7 , Figure 7 is a schematic diagram of a structure of an edge device in an embodiment of the present invention. In one embodiment, an edge device is provided. The internal structure diagram of the edge device can be as follows Figure 7 As shown in FIG. 1 , the edge device includes a processor, a memory, and a network interface connected through a system bus.
[0161] The processor of the edge device is used to provide computing and control capabilities. The memory of the edge device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the edge device is used to communicate with an external user terminal through a network connection. When the computer program is executed by the processor, a function or step of a video processing method is implemented.
[0162] Preferably, the edge device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the edge device is used to provide computing and control capabilities. The memory of the edge device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the edge device is used to communicate with an external task database via a network connection. When the computer program is executed by the processor, a function or step of a video processing method is implemented.
[0163] In one embodiment, an edge device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0164] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or edge device can refer to the relevant descriptions on the server side and the user side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0165] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0166] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0167] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0168] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0169] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A video processing method, applied to an edge device, characterized in that: The video processing method comprises: Connecting to a monitoring device and acquiring a video sent by the monitoring device; Acquire a video image of the video, and acquire a data format of the video image; When the data format is not a preset RGB format, converting the video image into a format to generate an RGB image; Acquire human body information appearing in the RGB image, the human body information including a face and a torso; Using a predefined fuzzy method, fuzzy processing is performed on the torso part to generate a fuzzy part; A fake face is generated by adopting a predefined generation method, and in the RGB image, the human face is replaced by the fake face, and the torso part is replaced by the blurred part to obtain the processed RGB image, and the processed video is generated based on the processed RGB image.
2. The video processing method according to claim 1, characterized in that: The step of obtaining the video image of the video and obtaining the data format of the video image includes: Obtaining format information of the video; In the format information, a video image of the video is obtained, and a data format of the video image is obtained.
3. The video processing method according to claim 1, characterized in that: When the data format is not a preset RGB format, converting the video image into a format to generate an RGB image includes: When the data format is not the preset RGB format, calling a format conversion function of a preset image processing tool; The format conversion function is used to convert the video image into a format to generate an RGB image.
4. The video processing method according to claim 1, characterized in that: The acquiring of human body information appearing in the RGB image, wherein the human body information includes a face and a torso, comprises: Performing image recognition on the RGB image to generate a recognition result; In the recognition result, human body information appearing in the RGB image is obtained.
5. The video processing method according to claim 1, characterized in that: The method of using a predefined fuzzy method to perform fuzzy processing on the torso part to generate a fuzzy part includes: In the RGB image, the torso part is located, and an image area corresponding to the torso part is obtained; A Gaussian blur algorithm is used to blur the pixels in the image area to generate a blurred portion.
6. The video processing method according to claim 1, characterized in that: The method of using a predefined generation method to generate a fake face, replacing the human face with the fake face and replacing the torso with the blurred part in the RGB image to obtain the processed RGB image, and generating the processed video based on the processed RGB image includes: Using a generator in a generative adversarial network to generate a fake face, in the RGB image, replacing the human face with the fake face, and replacing the torso part with the blurred part, to obtain the processed RGB image; The processed RGB image is encrypted to generate a first image, the first image is compressed to generate a second image, and the processed video is generated based on a plurality of different second images.
7. The video processing method according to any one of claims 1 to 6, characterized in that: After generating a fake face by adopting a predefined generation method, replacing the human face with the fake face and replacing the torso with the blurred part in the RGB image to obtain the processed RGB image, and generating the processed video based on the processed RGB image, the video processing method includes: Read the preset upload time and determine whether the current time is the upload time; If the current time is the upload time, connect to the video analysis system corresponding to the monitoring device and upload the processed video to the video analysis system.
8. A video processing device, applied to an edge device, characterized in that: The video processing device comprises: A first acquisition module, used to connect to a monitoring device and acquire a video sent by the monitoring device; A second acquisition module is used to acquire a video image of the video and acquire a data format of the video image; A conversion module, used for converting the format of the video image to generate an RGB image when the data format is not a preset RGB format; A third acquisition module is used to acquire human body information appearing in the RGB image, wherein the human body information includes a face and a torso; A generating module, used for performing fuzzy processing on the torso part by using a predefined fuzzy method to generate a fuzzy part; The processing module is used to generate a fake face by using a predefined generation method, replace the human face with the fake face, and replace the torso with the blurred part in the RGB image to obtain the processed RGB image, and generate the processed video based on the processed RGB image.
9. An edge device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the video processing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the video processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Imaging system and video processing method
CN110610456A
Human body sensitive information hiding method based on skeleton point information
CN114913548A
In-vehicle video face image desensitization method and device based on generative adversarial network
CN118247824A
Video desensitization processing method and device, electronic equipment and readable storage medium
CN118283330A
Digital video recoding system for privacy protectionand method thereof
KR1020070113661A
