Video segmentation network model training method, video segmentation method and related equipment

By combining the feature extraction module and the recursive neural module in the video segmentation network model, and using the dilated convolution layer to process inter-frame information, the problem of low video segmentation accuracy caused by error accumulation in the existing technology is solved, and more efficient and accurate are achieved. Video semantic segmentation.

CN111815638BActive Publication Date: 2024-08-30ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010626881.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-01
Publication Date
2024-08-30
Estimated Expiration
2040-07-01

AI Technical Summary

Technical Problem

Existing video segmentation methods have error accumulation when utilizing inter-frame correlation information, which reduces the accuracy of video semantic segmentation.

Method used

A video segmentation network model that combines multiple feature extraction modules and recursive neural modules is used to obtain spatial information through single-frame training and sequential frame training to obtain temporal information. The dilated convolution layer is used to replace the downsampling layer to ensure feature extraction and temporal information. Accurate communication.

Benefits of technology

It effectively avoids error accumulation, improves the accuracy and efficiency of video semantic segmentation, and ensures the synchronous processing of inter-frame temporal information and spatial information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111815638B
    Figure CN111815638B
Patent Text Reader

Abstract

The present application provides a training method for a video segmentation network model, a video segmentation method and related equipment. The video segmentation network model includes multiple feature extraction modules and multiple recursive neural modules, and the feature extraction modules and the recursive neural modules correspond one to one. The method includes: training the feature extraction module using a single frame training image; training the recursive neural module using a continuous frame training image set; wherein the input of the recursive neural module of the current frame includes the output of the recursive neural module of the previous frame and the output of the feature extraction module of the current frame. The training method of the video segmentation network model of the present application improves the accuracy of video segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a training method for a video segmentation network model, a video segmentation method, and related equipment. Background Art

[0002] Video semantic segmentation technology is widely used. Video segmentation is becoming increasingly important in the fields of autonomous driving, human-computer interaction, computational photography, image search engines, augmented reality, etc. In recent years, due to the development of deep neural networks, image semantic segmentation has made great progress. However, image semantic segmentation only considers the spatial information of each frame. For video semantic segmentation, since the video is composed of a continuous sequence of frames, when performing semantic segmentation on the video, not only the spatial information of each frame must be considered, but also the temporal information between frames.

[0003] In the prior art, attention mechanism and deep separable convolution are used to construct a neural network, so as to utilize the relevant information between frames on the basis of the neural network and combine it with the feature aggregation algorithm of the optical flow field to realize feature propagation between different frames. However, this video segmentation method has error accumulation, which reduces the accuracy of segmentation. Summary of the invention

[0004] The present application provides a video segmentation network model training method, a video segmentation method and related equipment, and the main technical problem solved is how to improve the accuracy of video segmentation.

[0005] To solve the above technical problems, the present application provides a training method for a video segmentation network model, wherein the video segmentation network model includes multiple feature extraction modules and multiple recursive neural modules, wherein the feature extraction modules correspond to the recursive neural modules one by one, and the method includes:

[0006] Use a single frame training image to train the feature extraction module;

[0007] The recursive neural module is trained using a continuous frame training image set; wherein the input of the recursive neural module of the current frame includes the output of the recursive neural module of the previous frame and the output of the feature extraction module of the current frame.

[0008] According to an embodiment provided by the present application, the outputs of the feature extraction module and the recursive neural module are feature layers of the same size.

[0009] According to an implementation provided by the present application, the feature extraction module is a residual network, and the last two downsampling layers in the residual network are hole convolution layers.

[0010] According to an embodiment provided by the present application, the last two downsampling layers in the residual network are hole convolution layers with expansion coefficients of 2 and 4, respectively.

[0011] According to an embodiment provided in the present application, the network parameters of the multiple feature extraction modules are the same, and the timing unit parameters of the multiple recursive neural modules are the same.

[0012] According to an embodiment provided by the present application, the video segmentation network model includes a plurality of output modules, and the output modules correspond one to one with the recursive neural modules;

[0013] The output module includes a convolutional layer, and a BatchNorm activation layer and a Relu activation layer after the convolutional layer.

[0014] According to one embodiment provided in the present application, the convolution layer of the recursive neural module has 2048 channels, and the convolution layer of the output module has 512 channels; the convolution layer of the output module includes a 3×3 convolution kernel and a 1×1 convolution kernel.

[0015] In order to solve the above technical problems, the present application provides a video segmentation method, which includes:

[0016] Obtain video data to be segmented;

[0017] Inputting the video data to be segmented into a video segmentation network model to obtain a segmentation result of the video data;

[0018] The video segmentation network model is a video segmentation network model trained by any of the methods described above.

[0019] According to an implementation manner provided by the present application, the video data to be segmented includes multiple frames of images to be segmented; the step of inputting the video data to be segmented into a video segmentation network model to obtain a segmentation result of the video data includes:

[0020] Input each frame of the image to be segmented into a feature extraction module to obtain a feature image; wherein multiple feature extraction modules synchronously extract the input image to be segmented;

[0021] The feature image output by each feature extraction module is input to a corresponding recursive neural module to output the segmentation result of each frame of the image to be segmented; wherein the input of the recursive neural module also includes the segmentation result output by the previous recursive neural module.

[0022] In order to solve the above technical problem, the present application provides a terminal device, the device comprising a memory and a processor coupled to the memory;

[0023] The memory is used to store program data, and the processor is used to execute the program data to implement the training method of the video segmentation network model and / or the video segmentation method as described above.

[0024] To solve the above technical problems, the present application also provides a computer storage medium, which is used to store program data. When the program data is executed by a processor, it is used to implement the training method of the video segmentation network model and / or the above video segmentation method.

[0025] The present application trains the feature extraction module with a single-frame training image to obtain the spatial information of each frame of training image; trains the recursive neural module with a set of continuous-frame training images to obtain the timing information of the continuous-frame training images, so as to perform semantic segmentation on the video according to the obtained spatial information and timing information, thereby avoiding error accumulation and improving the accuracy of video semantic segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0027] Figure 1 It is a flowchart of an embodiment of a training method for a video segmentation network model provided by the present application;

[0028] Figure 2 yes Figure 1 A simplified schematic diagram of the modules in the video segmentation network model shown;

[0029] Figure 3 yes Figure 1 A simplified structural diagram of a recurrent neural module in the video segmentation network model shown;

[0030] Figure 4 A schematic diagram of a flow chart of an embodiment of a video segmentation method provided by the present application;

[0031] Figure 5 is a schematic diagram of the video data to be segmented obtained in the video segmentation method provided in this application;

[0032] Figure 6 yes Figure 5 Schematic diagram of segmentation results in the video segmentation method shown;

[0033] Figure 7 It is a structural diagram of an embodiment of a mobile terminal provided by the present application;

[0034] Figure 8 It is a structural diagram of an embodiment of a computer storage medium provided by the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0036] This application proposes a training method for a video segmentation network model. For details, please refer to Figure 1 , Figure 1 1 is a flow chart of an embodiment of a training method for a video segmentation network model provided by the present application. The training method for a video segmentation network model in this embodiment can be applied to a terminal device for autonomous driving, and can also be applied to a server with data processing capabilities. The training method for a video segmentation network model in this embodiment specifically includes the following steps:

[0037] S101: Train a feature extraction module using a single-frame training image.

[0038] The video segmentation network model includes multiple feature extraction modules, multiple recursive neural modules and multiple output modules. The feature extraction modules, recursive neural modules and output modules correspond to each other. For details, please refer to Figure 2 , Figure 2 yes Figure 1 A simplified diagram of the modules in the video segmentation network model shown.

[0039] Due to the redundancy and huge number of continuous video frames, in order to avoid affecting the video segmentation results when semantic segmentation is directly performed on continuous frame training images, this application trains the feature extraction module using a single frame training image to determine the network weights in the feature extraction module. Specifically, by inputting a single frame training image into the image semantic segmentation network model, the image semantic segmentation network model is supervised using a cross entropy loss function, that is, the image semantic segmentation network model is trained with the goal of minimizing the cross entropy loss function until the requirements are met. Among them, the image semantic segmentation network model is composed of a connection between a feature extraction module and an output module, and the image semantic segmentation network model can be a convolutional neural network CNN (Convolutional Neural Networks).

[0040] S102: Train the recursive neural module using a continuous frame training image set.

[0041] Based on the network weights of the feature extraction module obtained in S101, the recursive neural network module is trained using the continuous frame training image set, and the segmentation results of the continuous frame training images are supervised using the cross entropy loss function. Specifically, the network weights of the feature extraction module obtained in S101 are added to Figure 2 In the video segmentation network model shown, the video segmentation network model is trained using a continuous frame training image set, and the video segmentation network model is trained with the goal of reducing the cross entropy loss function until the requirement is met. The recursive neural module is a long short-term memory network LSTM (Long Short-Term Memory).

[0042] In order to make full use of the temporal information between continuous frame training image sets and to distinguish different categories of objects with the same spatial features in the continuous frame training image sets, in the recursive neural module of this embodiment, the input of the recursive neural module of the current frame includes the output of the recursive neural module of the previous frame and the output of the feature extraction module of the current frame.

[0043] In this embodiment, a single-frame training image is used to train the feature extraction module to obtain the spatial information of each frame of the training image and to determine the network weights in the feature extraction module; a continuous frame training image set is used to train the recursive neural module to obtain the timing information of the continuous frame training images, so as to facilitate semantic segmentation of the video based on the obtained spatial information and timing information, thereby avoiding error accumulation and improving the accuracy of video semantic segmentation.

[0044] Furthermore, in order to avoid the feature extraction module causing a decrease in the resolution of a single-frame training image when performing feature extraction, the present embodiment replaces the last two downsampling layers of the feature extraction module with dilated convolution layers to save more information. Specifically, the feature extraction module may be a residual network, and the last two downsampling layers in the residual network are replaced with dilated convolution layers, and the two downsampling layers are set as dilated convolution layers with expansion coefficients of 2 and 4. The network parameters of multiple feature extraction modules are the same.

[0045] See also Figure 3 , Figure 3 yes Figure 1 The simplified structural diagram of the recursive neural module in the video segmentation network model shown in FIG. The recursive neural module is composed of two convolutional layers, namely the first convolutional layer and the second convolutional layer, and the timing unit parameters between multiple recursive neural modules are the same. The input of each recursive neural module is the output of the recursive neural module of the previous time sequence and the output of the feature extraction module corresponding to the current time sequence.

[0046] For the output module, the output module includes multiple convolutional layers, followed by a BatchNorm activation layer and a Relu activation layer. The convolutional layer of the output module includes a 3×3 convolutional kernel and a 1×1 convolutional kernel. The output module is composed of a 3×3 convolutional kernel and a 1×1 convolutional kernel with the same number of channels.

[0047] Please continue reading Figure 2 In a specific embodiment, the input module is a 3-channel RGB image, the input of the feature extraction module connected to the input module is the output of the input module, that is, the 3-channel RGB image, and the output of the feature extraction module is a feature layer of 2048 channels that is 1 / 8 the size of the original image; the input of the recursive neural module is the output of the recursive neural module of the previous time sequence and the output of the feature extraction module corresponding to the current time sequence, that is, the output of the recursive neural module is also a feature layer of 2048 channels that is 1 / 8 the size of the original image; the input of the output module is the output of the recursive neural module, that is, the feature layer of 2048 channels that is 1 / 8 the size of the original image, and the output of the output module is the semantic segmentation result of the current frame.

[0048] In a specific embodiment, the video network segmentation model also includes a semantic segmentation module, which corresponds one-to-one to the output module. The input of the semantic segmentation module is the semantic segmentation result output by the output module, and the output of the semantic segmentation module is the semantic segmentation result of a single frame training image.

[0049] Before using the continuous frame training image set to train the recursive neural module in step S102, it is necessary to collect video data and manually annotate the semantic segmentation results. The annotation set is divided into single-frame training images and continuous frame training images. Specifically, in addition to annotating the semantic segmentation results of single-frame training images, only a small amount of video semantic segmentation results need to be annotated, and no additional optical flow information needs to be annotated, saving manpower and material resources. In a specific embodiment, if there is no continuous frame training image set, key frame images can be used to train the recursive neural module, and the cross-entropy loss function can be used to supervise the segmentation results of the continuous frame training images.

[0050] In this embodiment, a single-frame training image is used to train a feature extraction module to obtain spatial information of each frame of the training image and determine the network weights in the feature extraction module; a continuous frame training image set is used to train a recursive neural module to obtain timing information of the continuous frame training images, so as to facilitate semantic segmentation of the video based on the obtained spatial information and timing information, thereby avoiding error accumulation and improving the accuracy of video semantic segmentation; the last two downsampling layers in the feature extraction module are replaced with atrous convolution layers with expansion coefficients of 2 and 4 to avoid the feature extraction module causing a decrease in the resolution of the single-frame training image when performing feature extraction.

[0051] In another embodiment, see Figure 4 , Figure 4 The flowchart of an embodiment of the video segmentation method provided by the present application is shown in FIG. The video segmentation method of the present embodiment can be applied to the video segmentation network model trained in the above-mentioned video segmentation network model training method, thereby improving the efficiency and accuracy of video segmentation. The video segmentation method provided by the present application is introduced below by taking a server for video segmentation as an example. The video segmentation method of the present embodiment specifically includes the following steps:

[0052] S201: Obtain video data to be segmented.

[0053] S202: Input the video data to be segmented into a video segmentation network model to obtain a segmentation result of the video data.

[0054] For practical application scenarios of steps S201 and S202, please refer to Figure 5 and Figure 6 , Figure 5 is a schematic diagram of the video data to be segmented obtained in the video segmentation method provided in this application, Figure 6 yes Figure 5 Schematic diagram of segmentation results in the video segmentation method shown.

[0055] In a specific embodiment, each frame of the image to be segmented is input into a feature extraction module to obtain a feature image, and the feature image output by each feature extraction module is input into a corresponding recursive neural module to output the segmentation result of each frame of the image to be segmented. In order to improve the segmentation efficiency of video segmentation, this embodiment uses multiple feature extraction modules to synchronously extract the image features of the input image to be segmented, that is, multiple feature extraction modules extract image features in parallel, so that the total segmentation time of the video segmentation network model is the sum of the parallel extraction time of the feature extraction module and the running time of the recursive neural module, which reduces the total running time of the video segmentation and improves the running efficiency. Among them, the input of the recursive neural module is the output of each feature extraction module and the output of the previous recursive neural network model. The recursive neural module is conducive to extracting the timing information of the continuous frame training image set, so that the segmentation result is more accurate. While utilizing the inter-frame timing information, it can also maintain the inter-frame spatial information, and the spatial features of all frames are extracted synchronously, which improves the efficiency of video segmentation. The video data to be segmented includes multiple frames of images to be segmented.

[0056] In this embodiment, the video data to be segmented is obtained, and the video data to be segmented is input into the video segmentation network model to obtain the segmentation result of the video data. The present application uses the feature extraction module to synchronously extract the image features of the input image to be segmented, so that the total running time of the video segmentation is the time of parallel extraction of the feature extraction module and the running time of the recursive neural model, which reduces the total time of the video segmentation and improves the efficiency of the video segmentation.

[0057] In order to implement the network model training method and / or video segmentation method of the above-mentioned embodiment, the present application proposes another terminal device, which can be specifically referred to in Figure 7 , Figure 7 It is a structural diagram of an embodiment of a terminal device provided in this application.

[0058] The terminal device 700 includes a memory 71 and a processor 72 , wherein the memory 71 and the processor 72 are coupled.

[0059] The memory 71 is used to store program data, and the processor 72 is used to execute the program data to implement the video segmentation network model training method and / or the video segmentation method of the above embodiment.

[0060] In this embodiment, the processor 72 may also be referred to as a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip having signal processing capabilities. The processor 72 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 72 may also be any conventional processor, etc.

[0061] The present application also provides a computer storage medium 800, such as Figure 8 As shown, the computer storage medium 800 is used to store program data 81. When the program data 81 is executed by the processor, it is used to implement the video segmentation network model training method and / or video segmentation method as described in the method embodiment of the present application.

[0062] The training method of the video segmentation network model of the present application and / or the method involved in the video segmentation method embodiment, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0063] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A training method for a video segmentation network model, characterized in that: The video segmentation network model includes a plurality of feature extraction modules and a plurality of recursive neural modules, wherein the feature extraction modules correspond to the recursive neural modules one by one, and the method includes: Use a single frame training image to train the feature extraction module; The recursive neural module is trained using a continuous frame training image set; wherein the input of the recursive neural module of the current frame includes the output of the recursive neural module of the previous frame and the output of the feature extraction module of the current frame; The single-frame training image and the images in the continuous-frame training image set are RGB images, the feature extraction module is a residual network, and the last two downsampling layers in the residual network are hole convolution layers.

2. The training method according to claim 1, characterized in that: The outputs of the feature extraction module and the recursive neural module are feature layers of the same size.

3. The training method according to claim 1, characterized in that: The last two downsampling layers in the residual network are dilated convolutional layers with expansion coefficients of 2 and 4, respectively.

4. The training method according to claim 1, characterized in that: The network parameters of the multiple feature extraction modules are the same, and the timing unit parameters of the multiple recursive neural modules are the same.

5. The training method according to claim 1, characterized in that: The video segmentation network model includes a plurality of output modules, and the output modules correspond one to one with the recursive neural modules; The output module includes a convolutional layer, and a BatchNorm activation layer and a Relu activation layer after the convolutional layer.

6. The training method according to claim 5, characterized in that: The convolution layer of the recursive neural module has 2048 channels, and the convolution layer of the output module has 512 channels; the convolution layer of the output module includes a 3×3 convolution kernel and a 1×1 convolution kernel.

7. A video segmentation method, characterized in that: The method comprises: Obtain video data to be segmented; Inputting the video data to be segmented into a video segmentation network model to obtain a segmentation result of the video data; The video segmentation network model is a video segmentation network model trained by the method according to any one of claims 1 to 6.

8. The video segmentation method according to claim 7, characterized in that: The video data to be segmented includes a plurality of frames of images to be segmented; and the step of inputting the video data to be segmented into a video segmentation network model to obtain a segmentation result of the video data includes: Input each frame of the image to be segmented into a feature extraction module to obtain a feature image; wherein multiple feature extraction modules synchronously extract the input image to be segmented; The feature image output by each feature extraction module is input to a corresponding recursive neural module to output the segmentation result of each frame of the image to be segmented; wherein the input of the recursive neural module also includes the segmentation result output by the previous recursive neural module.

9. A terminal device, characterized in that: The device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the training method of the video segmentation network model as described in any one of claims 1 to 6 and / or the video segmentation method as described in claims 7-8.

10. A computer storage medium, characterized in that: The computer storage medium is used to store program data, and when the program data is executed by the processor, it is used to implement the training method of the video segmentation network model as described in any one of claims 1 to 6 and / or the video segmentation method as described in claims 7-8.

Citation Information

Patent Citations

  • Pedestrian re-identification method, model construction method and device, equipment and storage medium

    CN110399789A