End-to-edge collaborative video encoding method and video transmission system for machine vision
Through the end-edge collaborative video encoding method, the quantitative parameters are adjusted using genetic algorithms and lightweight neural networks, and the balance problem of bandwidth consumption and analysis accuracy in machine vision tasks is solved, real-time and efficient video encoding and recognition are achieved.
Patent Information
- Application Number
- CN202211294861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-10-21
AI Technical Summary
Existing video encoding algorithms are difficult to maintain high analytical accuracy while reducing bandwidth consumption in machine vision tasks, especially inadequate encoding quality in areas that do not care about texture information.
The end-edge collaborative video encoding method is adopted to adjust the quantization parameters by dividing regional blocks of different important levels and applying genetic algorithms. Combining lightweight neural networks and target recognition modules, the encoding strategy is adjusted in real time to optimize bandwidth utilization and analysis accuracy.
While ensuring analysis accuracy, it effectively reduces bandwidth consumption. Through the regulation mechanism of large and small cycles, the encoding strategy is quickly adjusted to adapt to changes in video content, and the real-time and efficiency of the system are improved.
Smart Images

Figure CN115767098B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of video transmission technology, and more specifically, relates to an end-edge collaborative video encoding method and a video transmission system for machine vision. Background Art
[0002] With the rapid development of technologies like machine vision, we are deploying more and more cameras and recording more and more video. Existing mainstream encoding algorithms, such as H.264 and H.265, primarily focus on texture information in the video. They adjust the quantization parameter (QP) for different regions to minimize video size while preserving more texture information. The quantization parameter (QP) reflects the compression of spatial detail. For example, a smaller QP value preserves more detail; a larger QP value loses more detail, resulting in lower video clarity. However, for many machine vision tasks, texture information on some surfaces is not of interest. We can appropriately reduce the video encoding quality of these areas to reduce encoding latency. However, despite numerous algorithms and optimizations, such video stream analysis systems remain unsatisfactory, struggling to achieve high analysis accuracy while reducing overhead. Summary of the Invention
[0003] In response to the above defects or improvement needs of the existing technology, the present invention provides an end-edge collaborative video encoding method and video transmission system for machine vision, which aims to reduce bandwidth consumption and ensure higher analysis accuracy by adjusting the encoding strategy in real time.
[0004] To achieve the above objectives, according to one aspect of the present invention, a method for device-edge collaborative video encoding for machine vision is provided, which is characterized by comprising:
[0005] Step S1: Divide the frame into M blocks of different importance levels according to the original video data of the current period Each level of area block b i Corresponding to a quantization parameter q i , to quantify the parameters The chromosome is used to maximize the accuracy of the transmission using the current coding strategy. The quantization parameter is determined by genetic algorithm. Get the initialized encoding strategy
[0006] Step S2: The camera captures the video frame and uses the latest quantization parameters The area blocks divided by the latest division method Encode them separately and transmit them to the edge;
[0007] Step S3: The edge decodes the video frame and performs target recognition based on the encoded content;
[0008] Step S4: Determine whether result verification is required. If not, jump to step S5. If required, jump to step S6.
[0009] Step S5: Re-divide the frame into M areas of different importance levels according to the target recognition result of the video frame in the current time slot And update the camera as the area block division method of the camera's next time slot, and jump to step S2;
[0010] Step S6: Determine whether the accuracy A(Q) of the transmission using the current coding strategy is lower than expected or whether the delay exceeds expectations. If so, jump to step S1 and use the current quantization parameter when executing the genetic algorithm. As the first generation chromosome, and when the accuracy A(Q) is lower than expected to reduce the quantization parameter The trend of obtaining new quantitative parameters Reduce the quantization parameter when the delay exceeds the expected value The trend of obtaining new quantitative parameters If not, jump to step S5.
[0011] In one embodiment, in step S1, the process of executing the genetic algorithm includes:
[0012] Set the objective function to: Max A(Q)
[0013] Set the constraint condition as: B(Q)≦B
[0014] t=t encode +t trans +t analysis ≦T
[0015] q1>q2>…>q i …>q M
[0016] Where B(Q) is the bit rate of the video obtained by applying the current encoding strategy, B is the current bandwidth constraint, and t encode , t trans , t analysis The time required for the camera to encode the video, the time required to transmit the video to the edge, and the time required for the edge to perform subsequent analysis tasks are respectively, and T is the duration of the video transmission in the current time slot;
[0017] The fitness function is determined as: A(Q)+α(B(Q)-B)+β(tT), where α and β are the trade-off coefficients between the video bit rate and the delay constraint.
[0018] In one embodiment, in step S1, the accuracy A(Q) is quickly calculated using a trained lightweight neural network.
[0019] In one embodiment, step S100 is performed at the edge.
[0020] In one embodiment, in step S3, a neural network for target recognition is provided at the edge, and the position and size of the target of interest in the picture are obtained through the neural network.
[0021] In one embodiment, both step S1 and step S4 are performed by dividing the region blocks using a quality selection module, and the division method includes:
[0022] Determine the importance evaluation function I(N,S)=N-γ×S, where N is the ratio of the target objects in the current region to the total number of objects in the entire image, S is the ratio of the average size of the target objects in the current region to the total image, and γ is the weight parameter;
[0023] Step A: First, divide the image into several areas with the same initial level.
[0024] Step B: Calculate the importance evaluation function value of each newly divided area, upgrade the level of the area whose importance evaluation function value is greater than the threshold, and further divide the upgraded area into several areas. Repeat step B until M level divisions are obtained.
[0025] In one embodiment, each division is an even division.
[0026] In one embodiment, in step S4, a verification period is set. When the set period interval is reached, it is determined that result verification is required, and the process jumps to step S6.
[0027] According to another aspect of the present invention, a device-edge collaborative video transmission system for machine vision is provided, comprising a camera and an edge, wherein the edge comprises a decoding module, a target recognition module, a quality selection module, a verification trigger module, and an initialization module; wherein,
[0028] The camera is used to shoot video frames and transmit the original video data of the current period to the edge during initialization. Otherwise, the camera is used to capture the video frames according to the latest quantization parameters. The area blocks divided by the latest division method Encode them separately and transmit them to the edge;
[0029] The decoding module is used to decode the video frame according to the encoded content;
[0030] The target recognition module is used to recognize targets in video frames;
[0031] The quality selection module is used to divide the intra-frame image into M regions of different importance levels according to the target recognition result when it is not initialized. And transmit it to the corresponding camera;
[0032] The verification trigger module is used to determine whether the accuracy A(Q) of the transmission using the current coding strategy is lower than expected or whether the delay exceeds expectations when the verification operation is triggered. If so, it enters the initialization phase; if not, it continues the current operation;
[0033] The initialization module is used to divide the frame into M areas of different importance levels according to the original video data of the current period when entering the initialization phase. Each level of area block b i Corresponding to a quantization parameter q i , to quantify the parameters The chromosome is used to maximize the accuracy of the transmission using the current coding strategy. The quantization parameter is determined by genetic algorithm. Get the initialized encoding strategy And send it to the camera to end initialization.
[0034] In one embodiment, each edge controls multiple cameras.
[0035] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0036] The present invention divides the whole control into two cycles, namely the outer large cycle and the inner small cycle. In the initialization stage, the original video data within the current period can be obtained for analysis to obtain the initialization and The original video data is high-quality video data with no substantial loss. The division method of the video frame and the level of each area block can be determined according to The QP value corresponding to each level can be determined to obtain the initialized encoding strategy. Then, the camera encodes the video frame of the next time slot based on the updated encoding strategy and transmits it to the edge. Since the initialized encoding strategy is obtained after video data analysis, and the pictures taken by a fixed camera generally have a certain degree of similarity, the initialized encoding strategy can be used to guide subsequent encoding, and important areas are encoded with high quality, while non-important areas are encoded with low quality, thereby saving bandwidth resources while ensuring the accuracy of analysis. At the same time, considering that the pictures in different time slots are not completely static, the target object will move to a certain extent. Therefore, by setting an internal small loop, after identifying the target in each time slot, the picture in the frame is re-divided according to the target recognition result to update the division method. And according to the updated Kahara A new encoding strategy is formed to guide the video encoding of the next time slot. Considering that the video content may change significantly after a certain period of time, only the It is not enough to guarantee the accuracy of the final result. Therefore, the present invention sets a large loop. When the accuracy is lower than expected, it returns to the initialization step, reacquires the original video data of the current period and obtains the initialized video data based on the original video data. and At the same time, considering the temporal and spatial correlation, when reinitializing the genetic algorithm, the existing quantitative parameters are used. As the first generation chromosome, and with reduced quantization parameters The trend of obtaining new quantitative parameters This can shorten the iteration cycle and quickly locate the best The value is used to form an updated initialization encoding strategy and transmit it to the camera for further encoding. The present invention can effectively reduce bandwidth consumption and ensure high analysis accuracy through two cyclic adjustment processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a diagram of the monitoring system architecture in one embodiment;
[0038] Figure 2 This is a flowchart of the steps of an end-edge collaborative video encoding method for machine vision in one embodiment.
[0039] Figure 3 This is a structural block diagram of an end-to-edge collaborative video transmission system for machine vision in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0041] For ease of understanding, let's first introduce the conventional monitoring system architecture, such as Figure 1 As shown in the figure, cameras distributed across different areas capture video, encode it, and transmit it to the edge center. The edge center processes the video and then transmits it to the cloud for further analysis. Data transmission from the camera to the edge center and from the edge center to the cloud uses limited bandwidth resources.
[0042] like Figure 2 The figure shows a flowchart of the steps of an edge-to-edge collaborative video encoding method for machine vision in one embodiment. The method mainly focuses on information interaction and processing between the camera end and the edge, and includes the following steps:
[0043] Step S100: Divide the intra-frame image into M regions of different importance levels according to the original video data of the current period. Each level of area block b i Corresponding to a quantization parameter q i , to quantify the parameters The chromosome is used to maximize the accuracy of the transmission using the current coding strategy. The quantization parameter is determined by genetic algorithm. Get the initialized encoding strategy
[0044] During the initialization phase, raw video data is first acquired from the current camera, and an initial encoding strategy is derived from this raw video data. The initialization operation can be performed at the edge or by a processor outside the edge. This embodiment uses the edge as an example for initialization. The raw video data is high-quality video data. If transmitted from the camera to the edge, it is high-quality encoded video data to preserve all image features as much as possible.
[0045] After acquiring a certain amount of raw video data, the characteristics of the video data are analyzed, and the screen is divided into M different levels of importance according to the location and size of the target objects. The more targets there are and the smaller the target area is, the more important the corresponding area is. Among them, one importance level can correspond to one area or multiple areas. In this way, the initial screen division method can be obtained. Among them, b iIt represents the area block of the i-th level, which can be one area or multiple areas of the i-th level.
[0046] Then, the initial quantization parameters of M quality levels are determined Each quantization parameter q i Area b assigned to the corresponding level i Specifically, the quantitative parameters The chromosome is used to maximize the accuracy of the transmission using the current coding strategy. The quantization parameter is determined by genetic algorithm. Get the initialized encoding strategy
[0047] In a specific embodiment, different encoding qualities are selected for M different quality levels according to network bandwidth constraints and delay constraints, that is, each quality level corresponds to one of Q i , satisfying the following equation:
[0048] Max A(Q)
[0049] B(Q)≦B
[0050] t=t encode +t trans +t analysis ≦T
[0051] Q=[q1,q2……q M ]
[0052] q1>q2>…>q i …>q M ,q i ∈[0,51]
[0053] Among them, Q is the quantization parameter QP selected for M coding quality levels, A(Q) is the accuracy of the video obtained by applying the coding strategy after the machine vision task, and the goal is to maximize the accuracy of the analysis task; B(Q) is the bit rate of the video obtained by applying the coding strategy, and B is the current bandwidth constraint. The video bit rate cannot be greater than the bandwidth constraint. At the same time, the time required to encode the video on the camera side, transmit the video to the edge, and perform subsequent analysis tasks on the edge needs to be less than the duration T of this video to meet real-time requirements.
[0054] The present invention chooses to use a genetic algorithm to solve this highly complex optimization problem, using Q as the "chromosome" and the Lagrange multiplier method with A(Q)+α(B(Q)-B)+β(tT) as the fitness function, where α and β are the trade-off coefficients between the video bit rate and the delay constraint, and B is the selected bandwidth constraint. The encoder is used to encode the video according to the current Q to obtain the corresponding B(Q) and the predicted corresponding A(Q). By "crossover, mutation and replication" between randomly generated "chromosomes" that meet the requirements, it is iterated step by step, and the elements of the iteratively obtained Q are guaranteed to be arranged from large to small. Within a limited number of times, the "chromosome" that maximizes the fitness function of the sample video is obtained. This is the M quantization parameters QP selected for the M video encoding quality levels.
[0055] The edge node transmits the quantization parameters QP and area division method selected for different areas obtained through the downlink to the corresponding camera end. The camera end stores the analysis results and modifies the encoder instructions to guide the subsequent video encoding.
[0056] Step S200: The camera captures the video frame and uses the latest quantization parameters The area blocks divided by the latest division method They are encoded separately and transmitted to the edge.
[0057] The camera captures and processes light signals from the captured area, converting them into images using a digital signal processing unit (DSP). After obtaining an updated encoding strategy, the camera encodes the image using the latest strategy, applying different quantization parameters (QPs) to different areas. The image content is compressed into video and transmitted via an uplink to its assigned edge control node.
[0058] Step S300: The edge decodes the video frame according to the encoded content and performs target recognition.
[0059] After receiving the encoded content, the edge decodes it to obtain the video frame and performs target recognition on the video frame content.
[0060] In one embodiment, an object recognition neural network is deployed at the edge. The edge node decodes the video streamed from the camera to obtain the frames that make up the video. These frames are then fed into the object recognition neural network to determine the position and size of the object of interest within the frame. The object recognition results are then transmitted to the cloud for analysis and storage.
[0061] In one embodiment, a lightweight neural network analysis accuracy A(Q) can also be set in step S100. The specific steps are: building a lightweight neural network, which extracts low-level features of the input video by the first several convolutional layers and pooling layers of the existing trained target recognition neural network, inputs the obtained low-level features into two fully connected layers, and outputs the predicted value of the analysis accuracy of the video compared with the original video. The target recognition results of the original video and the video encoded with different configurations are used as training sets to train the lightweight neural network. Through this lightweight neural network, the analysis accuracy of a video of a certain configuration can be quickly obtained, thereby accelerating the calculation time of the subsequent genetic algorithm.
[0062] Step S400: Determine whether result verification is required. If result verification is not required, jump to step S500; if result verification is required, jump to step S600.
[0063] In one embodiment, a verification cycle can be set to automatically trigger the verification action or manually trigger the verification action. For example, after each preset time interval, the result verification operation is entered, and the process jumps to step S600 to perform result verification. At other times, the process jumps to step S500 to perform the operation of updating the area division.
[0064] Step S500: Re-divide the frame into M areas of different importance levels according to the target recognition result of the video frame in the current time slot And update it to the camera as the area block division method of the camera's next time slot, and jump to step S200.
[0065] After each frame of data is transmitted to the edge, the edge will perform target recognition operations on it. Once the target is recognized, it can be transmitted to the cloud for further analysis on the one hand, and on the other hand, it can continue to be used to update the regional division information Because the images in different time slots will change to a certain extent, the present invention re-divides the area by identifying the target based on the latest video frame and uses the currently updated and existing A new encoding strategy is formed to guide the encoding of the video frame in the next time slot. Since the re-division is based on the target recognition results uploaded from the edge to the cloud, it does not significantly increase the system consumption compared to the original operation.
[0066] In one embodiment, a region importance assessment function I(N,S) can be defined, where N is the ratio of the number of objects in the region to the total number of objects in the entire image, and S is the ratio of the average size of the objects in the region to the total image. This I(N,S) must be positively correlated with N and negatively correlated with S, that is, the more objects there are, the more important the region is, and the fewer objects there are, the more important the region is. For example, we can choose to set I(N,S) = N-γ×I, where γ is a weight parameter used to adjust the importance between the number and size of objects in the assessment. According to the importance assessment function, the image is divided into M quality levels. The higher the quality level, the more important the region is. A lower quantization parameter QP will be selected for a higher quality level. A lower quantization parameter QP means that the encoding of the region is more detailed, the portrayal of detailed textures will be more accurate, and the video size occupied by this region will also increase.
[0067] Specifically, the following division can be adopted:
[0068] First, divide the image into several initial areas and assign initial levels. For example, divide it into 2*2 areas, namely A, B, C, and D, and assign each area an initial level of 1.
[0069] Then calculate the I(N,S) of each region A, B, C, and D. If the I(N,S) of a region is greater than the preset threshold T, the region is divided into 2*2 regions, and the encoding quality level of these four sub-regions is increased by one level. For example, if the I(N,S) of regions A and B is greater than the preset threshold T, A and B are further divided into 2*2 regions, namely A1, A2, A3, A4, B1, B2, B3, and B4, and the quality level of each is increased to 2;
[0070] Then, I(N,S) is calculated for A1, A2, A3, A4, B1, B2, B3, and B4. If the I(N,S) of a region is greater than the preset threshold T, the region is divided equally into 2*2 regions, and the encoding quality level of each of these four sub-regions is increased by one level. For example, if the I(N,S) of region A1 is greater than the preset threshold T, region A1 is divided into A11, A12, A13, and A14, and the encoding quality level is increased to level 3. This process is repeated until M quality levels are obtained. A quality level can have multiple regions; that is, multiple regions can correspond to a single quality level. Since the target may move locally in the next time slot, there may still be certain errors when the quality level division method of the current time slot is used as the coding strategy for the next time slot. This embodiment divides according to this method, and the quality level gradually increases from large areas to small areas. The quality level of the area gradually degrades from the highest level to the surrounding areas. The quality level of the area with the highest quality level is still the second highest in the adjacent areas. Even if the target moves in a short time slot, it can still be encoded with good quality, thereby ensuring the analysis accuracy.
[0071] Step S600: Determine whether the accuracy A(Q) of the transmission using the current coding strategy is lower than expected or whether the delay exceeds expectations. If so, jump to step S100 and use the current quantization parameter when executing the genetic algorithm. As the first generation chromosome, and when the accuracy A(Q) is lower than expected to reduce the quantization parameter The trend of obtaining new quantitative parameters Reduce the quantization parameter when the delay exceeds the expected value The trend of obtaining new quantitative parameters If not, jump to step S500.
[0072] This step is to verify the accuracy and delay of the coding strategy when the verification operation is triggered. Specifically, when the verification operation is triggered, the camera will transmit the video to the edge according to the current coding strategy on the one hand, and on the other hand, it will also transmit the original video data to the edge. The original video data is high-quality video data that has been finely encoded. By comparing the original video data with the data transmitted by the current coding strategy, the accuracy A(Q) of the transmission using the current coding strategy is obtained. The delay verification only needs to compare the bandwidth required for the current transmission with the actual bandwidth. When the required bandwidth is greater than the actual bandwidth, it means that the delay problem is serious. When the accuracy and bandwidth requirements are in line with expectations, it means that the above coding strategy can continue to be used. If the accuracy is lower than expected or the delay exceeds expectations, it means that the image changes of the current scene are large and the above coding strategy needs to be adjusted. At this time, jump to step S100 and re-execute the initialization step, that is, re-initialize the coding strategy based on the original data of the current time period. The initialization step has been introduced above and will not be repeated here. Among them, when re-initializing, the current quantization parameter can be used. As the first generation of chromosomes, when the accuracy is lower than expected, it means that the video quality needs to be improved, so the quantization parameters should be reduced. The trend of obtaining new quantitative parameters When the delay exceeds the expectation, it means that the encoded video volume is large, and the quantization parameter needs to be increased, sacrificing some details, reducing the video bit rate and delay, so the quantization parameter should be reduced. The trend of obtaining new quantitative parameters This can shorten the iteration time and quickly determine the optimal quantization parameters
[0073] Accordingly, the present invention also relates to a device-edge collaborative video transmission system for machine vision, such as Figure 3 As shown, the system includes a camera and an edge, wherein the camera is used to shoot video frames and transmit the original video data of the current period to the edge during initialization. Otherwise, the camera is used to transmit the original video data of the current period to the edge according to the latest determined quantization parameters. The area blocks divided by the latest division method The edge is used to receive the video data transmitted by the camera and perform target recognition. On the one hand, it uploads the recognition results to the cloud, and on the other hand, it adjusts the encoding strategy and determines whether it is necessary to enter the initialization phase. When entering the initialization phase, the initial quantization parameters are determined based on the original data. and partition information And transmit it to the camera, otherwise, only redetermine the area division method of different quality levels based on the current frame data to update and sent to the camera.
[0074] Specifically, the edge includes a decoding module, a target recognition module, a quality selection module, a verification trigger module and an initialization module.
[0075] The decoding module is used to receive the encoded content transmitted by the camera and decode the video frame according to the encoded content;
[0076] The target recognition module is used to perform target recognition based on the decoded video frames;
[0077] The quality selection module is used to divide the intra-frame image into M regions of different importance levels according to the target recognition results when initialization is not performed. And transmit it to the corresponding camera;
[0078] The verification trigger module is used to determine whether the accuracy A(Q) of the transmission of the current coding strategy is lower than expected or whether the delay exceeds expectations when the verification operation is triggered. If so, it enters the initialization phase. If so, it continues to update the current area block. Cyclic operation;
[0079] Initialization module, used to divide the frame into M areas of different importance levels according to the original video data of the current period when entering the initialization phase Each level of area block b i Corresponding to a quantization parameter q i , to quantify the parameters The chromosome is used to maximize the accuracy of the transmission using the current coding strategy. The quantization parameter is determined by genetic algorithm. Get the initialized encoding strategy And send it to the camera to end initialization.
[0080] When the system is running, the system will directly enter the initialization phase when it is started for the first time. At this time, the camera transmits the original video data of the current period to the edge; the initialization module in the edge obtains the initialization encoding strategy based on the original video data of the current period. And transmit it to the camera to end initialization. The camera is based on the updated encoding strategy The video image is encoded and transmitted to the edge. The target recognition module in the edge performs target recognition, and the quality selection module re-divides the video frame into regions based on the recognition results to update the camera. At the same time, the verification trigger module determines whether a verification trigger operation is received. If a verification operation is triggered, it determines whether the accuracy rate A(Q) of the transmission using the current coding strategy is lower than expected or whether the delay exceeds expectations. If no verification operation is triggered, ... higher than expected, and the accuracy rate A(Q) of the transmission using the current coding strategy is higher than expected. If the accuracy rate A(Q) is lower than expected or the delay exceeds the expected value during the verification operation, the system will be notified to re-enter the initialization phase. At this time, the camera transmits the original video data of the current period to the edge; the initialization module in the edge obtains the initialization encoding strategy based on the original video data of the current period. And transmit it to the camera, end initialization, the camera is based on the updated encoding strategy The video is encoded and transmitted to the edge. This cycle is repeated to reduce bandwidth consumption while ensuring high analysis accuracy.
[0081] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A device-edge collaborative video encoding method for machine vision, characterized in that: include: Step S1: Divide the frame into M blocks of different importance levels according to the original video data of the current period Each level of area block b i Corresponding to a quantization parameter q i , to quantify the parameters The chromosome is used to maximize the accuracy of the transmission using the current coding strategy. The quantization parameter is determined by genetic algorithm. Get the initialized encoding strategy Step S2: The camera captures the video frame and uses the latest quantization parameters The area blocks divided by the latest division method Encode them separately and transmit them to the edge; Step S3: The edge decodes the video frame and performs target recognition based on the encoded content; Step S4: Determine whether result verification is required. If not, jump to step S5. If required, jump to step S6. Step S5: Re-divide the frame into M areas of different importance levels according to the target recognition result of the video frame in the current time slot And update the camera as the area block division method of the camera's next time slot, and jump to step S2; Step S6: Determine whether the accuracy A(Q) of the transmission using the current coding strategy is lower than expected or whether the delay exceeds expectations. If so, jump to step S1 and use the current quantization parameter when executing the genetic algorithm. As the first generation chromosome, and when the accuracy A(Q) is lower than expected to reduce the quantization parameter The trend of obtaining new quantitative parameters Reduce the quantization parameter when the delay exceeds the expected value The trend of obtaining new quantitative parameters If not, jump to step S5.
2. The machine vision-oriented end-edge collaborative video encoding method according to claim 1, wherein: In step S1, the process of executing the genetic algorithm includes: Set the objective function to: Max A(Q) Set the constraint condition as: B(Q)≦B t=t encode +t trans +t analysis ≦T q1>q2>…>q i …>q M Where B(Q) is the bit rate of the video obtained by applying the current encoding strategy, B is the current bandwidth constraint, and t encode , t trans , t analysis The time required for the camera to encode the video, the time required to transmit the video to the edge, and the time required for the edge to perform subsequent analysis tasks are respectively, and T is the duration of the video transmission in the current time slot; The fitness function is determined as: A(Q)+α(B(Q)-B)+β(tT), where α and β are the trade-off coefficients between the video bit rate and the delay constraint.
3. The machine vision-oriented end-edge collaborative video encoding method according to claim 1, wherein: In step S1, the trained lightweight neural network is used to quickly calculate the accuracy A(Q).
4. The machine vision-oriented end-edge collaborative video encoding method according to claim 1, wherein: Step S100 is performed at the edge.
5. The machine vision-oriented end-edge collaborative video encoding method according to claim 1, wherein: In step S3, a neural network for target recognition is provided at the edge, and the position and size of the target of interest in the picture are obtained through the neural network.
6. The machine vision-oriented end-edge collaborative video encoding method according to claim 1, wherein: Step S1 and step S4 both divide the regions by using the quality selection module. The division method includes: Determine the importance evaluation function I(N,S)=N-γ×S, where N is the ratio of the target objects in the current region to the total number of objects in the entire image, S is the ratio of the average size of the target objects in the current region to the total image, and γ is the weight parameter; Step A: First, divide the image into several areas with the same initial level. Step B: Calculate the importance evaluation function value of each newly divided area, upgrade the level of the area whose importance evaluation function value is greater than the threshold, and further divide the upgraded area into several areas. Repeat step B until M level divisions are obtained.
7. The machine vision-oriented end-edge collaborative video encoding method according to claim 6, wherein: Each division is an even division.
8. The machine vision-oriented end-edge collaborative video encoding method according to claim 1, wherein: In step S4, a verification period is set. When the set period interval is reached, it is determined that result verification is required, and the process jumps to step S6.
9. A machine vision-oriented end-edge collaborative video transmission system, comprising a camera and an edge, characterized in that: The edge includes a decoding module, a target recognition module, a quality selection module, a verification trigger module and an initialization module; wherein, The camera is used to shoot video frames and transmit the original video data of the current period to the edge during initialization. Otherwise, the camera is used to capture the video frames according to the latest quantization parameters. The area blocks divided by the latest division method Encode them separately and transmit them to the edge; The decoding module is used to decode the video frame according to the encoded content; The target recognition module is used to recognize targets in video frames; The quality selection module is used to divide the intra-frame image into M regions of different importance levels according to the target recognition result when it is not initialized. And transmit it to the corresponding camera; The verification trigger module is used to determine whether the accuracy A(Q) of the transmission using the current coding strategy is lower than expected or whether the delay exceeds expectations when the verification operation is triggered. If so, it enters the initialization phase; if not, it continues the current operation; The initialization module is used to divide the frame into M areas of different importance levels according to the original video data of the current period when entering the initialization phase. Each level of area block b i Corresponding to a quantization parameter q i , to quantify the parameters The chromosome is used to maximize the accuracy of the transmission using the current coding strategy. The quantization parameter is determined by genetic algorithm. Get the initialized encoding strategy And send it to the camera to end initialization.
10. The device-edge collaborative video transmission system for machine vision according to claim 9, wherein: Each edge controls multiple cameras.
Citation Information
Patent Citations
Video transmission method and transmission system for machine vision
CN115941955A