Video segmentation method and device based on absorbing Markov chain and skeleton mapping network

By introducing absorptive Markov chains and skeleton mapping networks into video segmentation, combined with twin networks and residual networks, and optimizing superpixel labels and spatiotemporal clues, the robustness problem of video segmentation in complex scenes in the existing technology is solved and achieved for more accurate target edge segmentation.

CN114708285BActive Publication Date: 2024-09-13SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210331189.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2024-09-13
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

Existing video segmentation algorithms suffer from contour drift and segmentation errors when processing complex and dynamic scenes, and are particularly difficult to maintain robustness under occlusion, severe deformation, complex backgrounds, and lighting changes.

Method used

Using a method based on absorbing Markov chains and skeleton mapping networks, the target's area of ​​interest is obtained through the twin network tracking algorithm, an absorbing Markov chain is constructed to weight the labels, short-term and long-term spatiotemporal cues are combined to optimize superpixel labels, and residual The difference network and encoding-decoding framework construct a skeleton mapping network, generate foreground and background skeletons, and finally output the video segmentation results.

Benefits of technology

It improves the robustness and accuracy of video segmentation, can more effectively segment target edge contours in complex scenes, reduces false segmentation interference, and improves segmentation effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114708285B
    Figure CN114708285B
Patent Text Reader

Abstract

The present invention discloses a video segmentation method and device based on an absorbing Markov chain and a skeleton mapping network. The method includes the following steps: extracting the region of interest of the target and performing superpixel segmentation on the region; establishing an absorbing Markov chain according to the superpixels of the current frame, the first frame, and the previous frame, and preliminarily judging the label of the superpixel of the current frame; proposing long-term and short-term spatiotemporal clues and optimizing the superpixel label; obtaining the foreground skeleton expressing the target morphology and the background estimation expressing the information of the interfering object according to the superpixel label; constructing a skeleton mapping network, taking the foreground skeleton, the background skeleton and the current frame image as the input of the skeleton mapping network, and outputting the final segmentation result of the target. The present invention can better segment the edge contour of the target in a complex scene, cope with the challenges of severe deformation, similar background, etc. in video segmentation, and does not require long-term training of the neural network, and has low requirements for computer hardware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer vision, and in particular relates to a video segmentation method and device based on an absorbing Markov chain and a skeleton mapping network. Background Art

[0002] Video segmentation refers to the separation of the constantly moving foreground target objects from the background area in a video sequence. Video segmentation provides the basis for identifying target objects in videos and analyzing video content. It is a key step in the study of video semantic parsing, visual navigation, etc., and has wide applications in artificial intelligence, visual perception and other fields. At present, although many successful video segmentation algorithms have been proposed, it is still a challenging problem to develop a robust video segmentation algorithm that can handle complex and dynamic scenes. Because in video segmentation, due to the changes of the target itself and the interference of the external environment, there will be a variety of segmentation challenges, such as occlusion, drastic deformation, complex background, lighting changes, etc. These challenges will cause contour drift during video segmentation and produce segmentation errors. If the segmentation errors continue to accumulate, it will lead to segmentation failure. Therefore, it is necessary to use the motion law of the target, capture the changing trend of the target appearance model, and make full use of the stable features of the target in the first frame to improve the robustness of video segmentation. Summary of the invention

[0003] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a video segmentation method and device based on an absorbing Markov chain and a skeleton mapping network, which can better segment the edge contours of targets in complex scenes.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] On one hand, the present invention provides a video segmentation method based on an absorbing Markov chain and a skeleton mapping network, comprising the following steps:

[0006] Based on the target tracking algorithm of the twin network, the target tracking result of the current frame is obtained, and the target tracking result is expanded outward, the region of interest of the target in each frame is calculated, and the region of interest is superpixel-segmented into several superpixels;

[0007] According to the superpixels of the first frame and the current frame, as well as the superpixels of the previous frame and the current frame, two absorption Markov chains are constructed respectively, two absorption times of each superpixel of the current frame are calculated, and the absorption time is weighted, and the initial foreground label and background label of the superpixel are determined according to the weighted absorption time;

[0008] Construct short-term spatiotemporal cues and long-term spatiotemporal cues to optimize superpixel labels; the short-term spatiotemporal cues are used to describe the appearance changes of the target in a short period of time, and based on the segmentation results of the previous frames of the current frame in the video sequence, the isolated background superpixels that are mistakenly segmented as foreground in the current frame are corrected; the long-term spatiotemporal cues are used to describe the long-term stable appearance characteristics of the target, and a long-term appearance model from the first frame to the current frame is constructed. If multiple regions in the current frame are simultaneously segmented as targets, the similarities between these multiple regions and the long-term appearance model are compared, and the most similar region is selected as the segmentation result;

[0009] Based on the foreground labels of the superpixels in the current frame and the adjacency relationship between superpixels, the foreground skeleton of the target is drawn; based on the interference objects with similar appearance to the target, the background skeleton of the target is drawn;

[0010] A skeleton mapping network is constructed based on the residual network and the encoding and decoding framework. The skeleton mapping network is trained using a common dataset for semantic segmentation and video segmentation. The foreground skeleton, background skeleton, and image information of the current frame are input into the skeleton mapping network, and the video segmentation result of the current frame is output.

[0011] As a preferred technical solution, the target tracking algorithm based on the twin network obtains the target tracking result of the current frame, and expands the target tracking result outward to calculate the region of interest of the target in each frame, specifically:

[0012] In the first frame of the video sequence, the position and size of the target are manually calibrated, that is, a rectangular box tangent to the target in the top, bottom, left and right directions is drawn on the first frame image with the mouse, and the coordinates of the upper left corner of the rectangular box are represented by (x, y), the width of the rectangular box is represented by w, and the height is represented by h. The four parameters x, y, w, and h contain all the spatial information of the rectangular box;

[0013] Based on the twin network, predict the tracking results in subsequent frames, express the tracking results of each frame with (x, y, w, h), and save the tracking results in a text file;

[0014] The length and width of the rectangular box where the tracking result of each frame is located are expanded to obtain the region of interest of each frame. If the boundary of the expanded region of interest exceeds the image range, the image boundary is used as the boundary of the region of interest.

[0015] As a preferred technical solution, the two absorption times of each superpixel in the current frame are calculated, and the absorption time is weighted, and the initial foreground label and background label of the superpixel are determined according to the weighted absorption time, which specifically includes the following steps:

[0016] The constructed absorbing Markov chain is denoted as G, and G includes multiple vertices and multiple edges;

[0017] The vertex construction rule is: each superpixel in the region of interest is represented as a vertex, and according to the construction principle of the absorbing Markov chain, all vertices are classified into absorbing vertices and transient vertices;

[0018] The edge construction rule is as follows: divide all edges in G into two categories: intra-frame edges and inter-frame edges; all superpixels adjacent within one hop and two hops in the same frame are connected by intra-frame edges, one-hop adjacent superpixels are all neighboring superpixels of a superpixel, and two-hop adjacent superpixels are all neighboring superpixels of a superpixel; find corresponding superpixels with similar features and close positions in two frames through the optical flow method, and connect them with inter-frame edges, and the weight of the edge is the similarity of the two superpixels;

[0019] When the current frame and the first frame establish an absorbing Markov chain, according to the vertex construction rule, the background superpixels in the region of interest of the first frame are marked as absorbing vertices, and the foreground superpixels in the region of interest of the first frame and all superpixels in the region of interest of the current frame are marked as transient vertices; according to the edge construction rule, the intra-frame edges within the current frame and the first frame, and the inter-frame edges connecting the current frame and the first frame are constructed, and the weights of the edges are calculated according to the similarity between the superpixels; finally, according to the absorption principle of the absorbing Markov chain, the absorption time H1 of all superpixels in the region of interest of the current frame of the first absorbing Markov chain is obtained;

[0020] When the current frame and the previous frame establish an absorbing Markov chain, according to the vertex construction rule, the background superpixels in the region of interest of the previous frame of the current frame are marked as absorbing vertices, and the foreground superpixels in the region of interest of the previous frame of the current frame and all superpixels in the region of interest of the current frame are marked as transient vertices; according to the edge construction rule, the intra-frame edges within the current frame and the previous frame are constructed respectively, and the inter-frame edges connecting the current frame and the previous frame are constructed, and the weights of the edges are calculated according to the similarity between the superpixels; finally, according to the absorption principle of the absorbing Markov chain, the absorption time H2 of all superpixels in the region of interest of the current frame of the second absorbing Markov chain is obtained;

[0021] According to H1 and H2, the absorption time H of all superpixels in the region of interest of the current frame is obtained, and H is obtained by the linear combination of H1 and H2;

[0022] Based on the absorption time H of all superpixels in the region of interest of the current frame, calculate the average absorption time Superpixel absorption time is greater than , marked as foreground, absorption time is less than , marked as background.

[0023] As a preferred technical solution, the optimization of superpixel labels based on short-term spatiotemporal clues is specifically as follows:

[0024] The video segmentation result of the t frames before the current frame is stored by the storage device. The segmentation result is represented by a 0-1 matrix, where 0 represents background pixels and 1 represents foreground pixels;

[0025] Based on the segmentation results of the previous t frames, count the pixels that are labeled as foreground in the current frame but were labeled as background in the previous t frames of the current frame;

[0026] All pixels with a value of 1 in the matrix are represented as a set S, and the superpixels corresponding to all pixels in S are represented by a set SuperS. In the set SuperS, the labels of all superpixels are foreground. When all the superpixel labels of a superpixel within one hop or two hops adjacent to it in SuperS are background, it is considered that the superpixel label is incorrectly divided, and the superpixel label is corrected to the background.

[0027] As a preferred technical solution, the optimization of superpixel labels based on long-term spatiotemporal clues is specifically as follows:

[0028] Using the foreground labels of the superpixels in the region of interest of the current frame, an undirected graph is constructed; all foreground superpixels in the current frame are used as vertices of the undirected graph, and the adjacent foreground superpixels within two hops are connected by edges. The number of connected regions in the undirected graph is the number of candidate regions segmented in the current frame;

[0029] Based on long-term spatiotemporal clues, the target appearance model F is constructed using the accumulated appearance features of the target in the previous frame from the first frame to the current frame. k-1 ;

[0030] Construct an appearance model for all candidate regions segmented from the current frame n is the number of candidate regions in the current frame. With F k-1 The similarity between k-1 For the candidate area with the highest similarity, the superpixel labels in this area remain as foreground, and the superpixel labels in the remaining areas are corrected to background;

[0031] Combine the current frame with F k-1 The apparent feature of the region with the highest similarity is denoted as F k ', update the appearance model of the target in the current frame, and the updated appearance model of the target in the current frame is recorded as F k , F k For label refinement based on long-term spatiotemporal cues in the next frame.

[0032] As a preferred technical solution, the foreground skeleton of the target is drawn based on the foreground label of the superpixel of the current frame and the adjacency relationship between the superpixels, specifically:

[0033] For each foreground superpixel, first filter out all the foreground superpixels adjacent to it in one hop. Then, according to the positional relationship between superpixels, only connect the foreground superpixels adjacent to it in one hop at the top. If there are none, connect the foreground superpixels adjacent to it in one hop at the bottom. If there are none, connect the foreground superpixels at the leftmost or rightmost end in the order of left first and right later. Connect according to this rule to obtain the foreground skeleton of the target.

[0034] The background skeleton of the target is drawn based on the interference object with similar appearance to the target, specifically:

[0035] Based on long-term spatiotemporal clues, a connected area that is most similar to the target appearance model is selected to keep the foreground label unchanged. The superpixels in other connected areas have their original foreground labels changed to background. The background skeleton of all superpixels with changed labels is extracted using the same strategy as foreground skeleton extraction. If a frame has only one connected area before label optimization, the target in this frame has no background skeleton.

[0036] As a preferred technical solution, the foreground skeleton, the background skeleton, and the image information of the current frame are input into the skeleton mapping network, and the video segmentation result of the current frame is output, specifically:

[0037] The core of the skeleton mapping network is the residual network and the encoding and decoding structure. Resnet50 in the residual network is used as the backbone network to extract the deep features of the image. The network is pre-trained using the standard salient object detection dataset and the semantic segmentation dataset. After the pre-training, the network is trained using the commonly used dataset in video segmentation. The network calculates the loss through the cross entropy loss function.

[0038] The input of the skeleton mapping network consists of the foreground skeleton, the background skeleton, and the image information of the current frame. The skeleton mapping network concatenates the above three inputs along the dimension of the channel to form a five-dimensional tensor; the foreground skeleton annotation map and the background skeleton annotation map are both grayscale images, and the foreground skeleton annotation map and the background skeleton annotation map each occupy one dimension, and W and H are the width and height of each frame in the video sequence;

[0039] The output of the skeleton mapping network is a response map of the same size as the input image. The response values ​​are distributed between 0 and 1, representing the probability of each pixel belonging to the foreground or background. The closer the response value is to 1, the greater the probability that the pixel belongs to the foreground.

[0040] Another aspect of the present invention provides a video segmentation system based on an absorbing Markov chain and a skeleton mapping network, comprising a superpixel segmentation module, an absorbing Markov chain construction module, an optimization module, a skeleton acquisition module, and a video segmentation module;

[0041] The superpixel segmentation module obtains the target tracking result of the current frame based on the target tracking algorithm of the twin network, expands the target tracking result outward, calculates the region of interest of the target in each frame, and performs superpixel segmentation on the region of interest into several superpixels;

[0042] The absorption Markov chain construction module is used to construct two absorption Markov chains according to the superpixels of the first frame and the current frame, and the superpixels of the previous frame and the current frame of the current frame, respectively, calculate two absorption times of each superpixel of the current frame, and weight the absorption time, and determine the initial foreground label and background label of the superpixel according to the weighted absorption time;

[0043] The optimization module is used to construct short-term spatiotemporal cues and long-term spatiotemporal cues to optimize superpixel labels; the short-term spatiotemporal cues are used to describe the appearance changes of the target in a short period of time, and based on the segmentation results of the previous frames of the current frame in the video sequence, the isolated background superpixels that are mistakenly segmented as foreground in the current frame are corrected; the long-term spatiotemporal cues are used to describe the long-term stable appearance characteristics of the target, and a long-term appearance model from the first frame to the current frame is constructed. If multiple regions in the current frame are simultaneously segmented as targets, the similarities between these multiple regions and the long-term appearance model are compared, and the most similar region is selected as the segmentation result;

[0044] The skeleton acquisition module draws the foreground skeleton of the target based on the foreground labels of the superpixels of the current frame and the adjacency relationship between the superpixels; and draws the background skeleton of the target based on the interference objects with similar appearance to the target;

[0045] The video segmentation module constructs a skeleton mapping network based on a residual network and a coding and decoding framework, trains the skeleton mapping network with a common data set for semantic segmentation and video segmentation, inputs the foreground skeleton, background skeleton, and image information of the current frame into the skeleton mapping network, and outputs the video segmentation result of the current frame.

[0046] Another aspect of the present invention provides an electronic device, the electronic device comprising:

[0047] at least one processor; and,

[0048] a memory communicatively connected to the at least one processor; wherein,

[0049] The memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can perform the video segmentation method based on the absorption Markov chain and the skeleton mapping network.

[0050] In another aspect, the present invention provides a computer-readable storage medium storing a program, wherein when the program is executed by a processor, the video segmentation method based on the absorbing Markov chain and the skeleton mapping network is implemented.

[0051] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0052] 1. The present invention adopts a single target tracking method based on a twin network to determine the displacement of the target between two adjacent frames, and generates a region of interest to be segmented based on the target tracking results, providing correct guidance for video segmentation.

[0053] 2. The present invention introduces stable and accurate information of the target in the first frame to generate an absorbing Markov chain, thereby improving the video segmentation effect during occlusion challenges.

[0054] 3. The present invention proposes short-term spatiotemporal clues to capture the movement patterns of the target in a short period of time and reduce the interference of isolated superpixels of mis-segmentation; at the same time, it proposes long-term spatiotemporal clues to find the long-term stable appearance features of the target and prevent similar objects from interfering with segmentation.

[0055] 4. Based on the labels of superpixels and the adjacency relationship between superpixels, the present invention designs the generation algorithm of foreground skeleton and background skeleton. Based on the residual network and the encoding and decoding structure, the skeleton mapping network is constructed to obtain the final segmentation result of the target. The video segmentation based on the skeleton mapping network can achieve a more robust segmentation effect than the superpixel-level video segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 is a flow chart of a video segmentation method based on absorbing Markov chain and skeleton mapping network;

[0058] Figure 2 It is the superpixel segmentation result based on the SLIC algorithm;

[0059] Figure 3 (a) is a schematic diagram of a one-hop connected intra-frame edge. Figure 3 (b) is a schematic diagram of an intra-frame edge connected by two hops, and (c) is a schematic diagram of an inter-frame edge;

[0060] Figure 4 (a) is the segmentation result before short-term temporal cue optimization. Figure 4(b) is the segmentation result after optimizing the short-term time clues. Figure 4 (c) is the accurate target outline;

[0061] Figure 5 (a) is the segmentation result before long-term temporal cue optimization; Figure 5 (b) is the segmentation effect after long-term temporal cue optimization;

[0062] Figure 6 (a) is the original image, Figure 6 (b) Target foreground skeleton extracted based on superpixel labels;

[0063] Figure 7 It is the target background skeleton extracted based on superpixel labels;

[0064] Figure 8 (a) is the original image, Figure 8 (b) is a schematic diagram of the accurate target outline. Figure 8 (c) is a video segmentation result diagram of the present invention;

[0065] Fig. 9 A block diagram of a video segmentation system based on an absorbing Markov chain and a skeleton mapping network according to an embodiment of the present invention;

[0066] Fig.10 4 is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0068] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0069] See also Figure 1In this embodiment, a video segmentation method based on an absorbing Markov chain and a skeleton mapping network is provided. The difficulty lies in introducing the information of the first frame into the absorbing Markov chain to improve the video segmentation result under the challenge of occlusion; proposing short-term spatiotemporal clues to correct the background superpixels that are mistakenly segmented as foreground; proposing long-term spatiotemporal clues to solve the problem of interference from similar objects; extracting the foreground skeleton and background skeleton of the target based on the superpixel label, inputting the skeleton mapping network, and obtaining a segmentation result that is more accurate and robust than the superpixel-level video segmentation. The method comprises the following steps:

[0070] S1. Target tracking algorithm based on Siamese network obtains the target tracking result of the current frame, expands the target tracking result outward, calculates the region of interest of the target in each frame, and divides the region of interest into several superpixels by superpixel;

[0071] For further information, see Figure 2 , based on the twin network, obtain the target tracking result of the current frame, and expand the tracking result outward by 1.5 times to obtain the region of interest of the current frame; perform superpixel segmentation on the region of interest using the SLIC algorithm, and divide the region of interest into several superpixels; the region of interest segmentation method includes the following steps:

[0072] S11, in the first frame of the video sequence, manually calibrate the position and size of the target, that is, use the mouse to draw a rectangular box tangent to the target in the four directions of top, bottom, left and right on the first frame image, and represent the coordinates of the upper left corner of the rectangular box with (x, y), the width of the rectangular box with w, and the height with h. The above four parameters can contain all the spatial information of the rectangular box;

[0073] S12. Based on the twin network, predict the tracking results in subsequent frames, represent the tracking results of each frame with (x, y, w, h), and save the tracking results into a text file;

[0074] S13, the length and width of the rectangular frame where the tracking result of each frame is located are expanded by 1.5 times to obtain the region of interest of each frame. If the boundary of the region of interest after expansion exceeds the image range, the image boundary is used as the boundary of the region of interest.

[0075] For further information, please refer again to Figure 2 , which shows the superpixel segmentation result of the region of interest based on the SLIC algorithm, explained as follows:

[0076] Figure 2 Each closed region with irregular boundaries in represents a superpixel;

[0077] Figure 2 Each point in is the center point of each superpixel.

[0078] It can be understood that the present invention uses a target tracking algorithm based on a twin network to obtain the target tracking result of the current frame, and expands the tracking result outward, calculates the region of interest of the target in each frame, and performs superpixel segmentation on the region of interest using the SLIC algorithm, and divides the region of interest into several superpixels.

[0079] S2, constructing two absorption Markov chains respectively according to the superpixels of the first frame and the current frame, and the superpixels of the previous frame and the current frame, calculating two absorption times of each superpixel of the current frame, and weighting the absorption time, and determining the initial foreground label and background label of the superpixel according to the weighted absorption time, specifically comprising the following steps:

[0080] S21. Let the constructed absorbing Markov chain be G, and let G = (V, E); V is the vertex of G, and each superpixel in the region of interest represents a vertex. According to the construction principle of the absorbing Markov chain, all vertices are classified as absorbing vertices (V A ) and transient vertex (V N );

[0081] S22, E are the edges of G, and all edges in G are divided into two categories: intra-frame edges and inter-frame edges. All superpixels that are adjacent within one hop and two hops in the same frame are connected by intra-frame edges. Superpixels that are adjacent within one hop are all neighboring superpixels of a superpixel, and superpixels that are adjacent within two hops are all neighboring superpixels of a superpixel. This paper uses the optical flow method to find corresponding superpixels with similar features and close positions in two frames, and connect them with inter-frame edges. The weight of the edge is the similarity of the two superpixels;

[0082] S23, when the current frame and the first frame establish an absorbing Markov chain, the background superpixel in the region of interest of the first frame is marked as V A , the foreground superpixels in the ROI of the first frame and all superpixels in the ROI of the current frame are marked as V N According to the edge construction rule described in S22, the intra-frame edges within the current frame and the first frame and the inter-frame edges connecting the current frame and the first frame are constructed, and the weights of the edges are calculated according to the similarity between the superpixels; finally, according to the absorption principle of the absorbing Markov chain, the absorption time H1 of all superpixels in the region of interest of the current frame is obtained;

[0083] S24, when the absorbing Markov chain is established for the frame before the current frame, the background superpixel in the region of interest of the frame before the current frame is marked as V A , the foreground superpixel in the region of interest of the previous frame and all superpixels in the region of interest of the current frame are marked as V NAccording to the edge construction rule described in S22, the intra-frame edges in the current frame and the previous frame are constructed respectively, and the inter-frame edges connecting the current frame and the previous frame are constructed. The weight of the edge is calculated according to the similarity between superpixels. Finally, according to the absorption principle of the absorbing Markov chain, the absorption time H2 of all superpixels in the region of interest of the current frame is obtained.

[0084] S25, H1 and H2 are all matrices with n rows and 1 column, where n is the number of superpixels in the region of interest of the current frame. The absorption time H of all superpixels in the region of interest of the current frame is obtained according to formula (1), and H is obtained by the linear combination of H1 and H2;

[0085]

[0086] Among them, α1, α2, and α3 represent the influence of H2 on the absorption time. The larger the shape variable of the current frame is compared with the first frame, the less guiding significance the first frame has for the current frame. Area1 represents the area of ​​the region of interest of the current frame, and Area2 represents the area of ​​the region of interest of the first frame;

[0087] S26, based on the absorption time H of all superpixels in the region of interest of the current frame in S25, calculate the average absorption time Superpixel absorption time is greater than , marked as foreground, absorption time is less than , marked as background.

[0088] See also Figure 3 (a)- Figure 3 (c) shows a schematic diagram of establishing intra-frame edges and inter-frame edges in an absorbing Markov chain, which is explained as follows:

[0089] like Figure 3 As shown in (a), all straight lines in the figure are superpixels connected to the superpixel at the center of the image and its one-hop adjacent superpixel (light gray superpixel in the figure);

[0090] like Figure 3 As shown in (b), all straight lines in the figure are superpixels connected by two hops from the superpixel at the center of the image to its two-hop adjacent superpixels (dark gray superpixels in the figure);

[0091] Figure 3 (c) Use the optical flow method to find the correspondence between superpixels between two frames, connected by inter-frame edges. The straight line in the figure is a schematic diagram of the inter-frame edge between the two frames.

[0092] S3, construct short-term spatiotemporal cues and long-term spatiotemporal cues to optimize superpixel labels; the short-term spatiotemporal cues are used to describe the appearance changes of the target in a short period of time, and based on the segmentation results of the previous frames of the current frame in the video sequence, the isolated background superpixels that are mistakenly segmented as foreground in the current frame are corrected; the long-term spatiotemporal cues are used to describe the long-term stable appearance characteristics of the target, and a long-term appearance model from the first frame to the current frame is constructed. If multiple regions in the current frame are simultaneously segmented as targets, the similarities between these multiple regions and the long-term appearance model are compared, and the most similar region is selected as the segmentation result;

[0093] S31, based on short-term spatiotemporal clues, correcting isolated background superpixels in the current frame that are mistakenly segmented as foreground, comprising the following steps:

[0094] S311, storing the video segmentation result of t frames before the current frame in a memory, where the segmentation result is represented by a 0-1 matrix, where 0 represents background pixels and 1 represents foreground pixels;

[0095] S312, based on the segmentation results of the previous t frames, count the pixels whose labels are foreground in the current frame and background in the previous t frames of the current frame according to formula (2);

[0096]

[0097] The dimension of the R matrix is ​​t×m×n, where m×n is the length×width of each frame. The R matrix stores the video segmentation results of the previous t frames. k is the initial video segmentation result of the current frame, and the current frame is the kth frame. According to formula (2), the element with a value of 1 in the matrix W indicates that in the kth frame, the label of the pixel is foreground, while the label of the pixel in the previous t frames is background;

[0098] S313. All pixel points with a value of 1 in the matrix W are represented as a set S, and the superpixels corresponding to all pixels in S are represented by a set SuperS. In the set SuperS, the labels of all superpixels are foreground. When the labels of all adjacent superpixels within one hop or two hops of a superpixel in SuperS are background, it is considered that the superpixel label is incorrectly divided, and the superpixel label is corrected to the background.

[0099] S32, eliminating interference from similar objects based on long-term spatiotemporal clues and optimizing superpixel label calibration, specifically including the following steps:

[0100] S321, construct an undirected graph based on the foreground labels of the superpixels in the region of interest of the current frame. Take all foreground superpixels in the current frame as vertices of the graph, use edges to connect adjacent foreground superpixels within two hops, and the number of connected regions in the constructed graph is the number of candidate regions segmented in the current frame;

[0101] S322, based on long-term spatiotemporal clues, using the accumulated appearance features of the target in the previous frame from the first frame to the current frame, according to formula (3), construct the appearance model F of the target k-1 .

[0102]

[0103] Among them, R learn is the learning rate, F i is the target appearance model of the i-th frame, F i The physical meaning of is to map the target's Lab information to a 6×6×6 matrix space;

[0104] S323: construct an appearance model for all candidate regions segmented from the current frame n is the number of candidate regions in the current frame. With F k-1 The similarity between k-1 For the candidate area with the highest similarity, the superpixel labels in this area remain as foreground, and the superpixel labels in the remaining areas are corrected to background;

[0105] S324, the current frame and F k-1 The apparent feature of the region with the highest similarity is denoted as F k ', according to formula (4), the appearance model of the target in the current frame is updated, and the updated appearance model of the target in the current frame is recorded as F k , F k For label refinement based on long-term spatiotemporal cues in the next frame.

[0106]

[0107] See also Figure 4 (a)- Figure 4 (c) The present invention uses short-term temporal cue optimization to process the segmentation results, and can obtain accurate target contours.

[0108] Please refer again Figure 5 (a) Figure 5 (b) Segmentation effect before and after optimization based on long-term spatiotemporal cues. The relevant explanations are as follows:

[0109] like Figure 5 As shown in (a), when two adjacent red-crowned cranes approach each other, the trunk parts of the two cranes with similar shapes are simultaneously segmented as targets, represented by numbers ①②;

[0110] like Figure 5As shown in (b), based on long-term spatiotemporal clues, a long-term appearance model of the target is constructed, and the similarity is compared with regions ① and ②. Since region ② has a high similarity with the long-term appearance model, all superpixels in region ② are foreground labels, and all superpixels in region ① are background labels.

[0111] S4, based on the foreground label of the superpixel of the current frame and the adjacency relationship between the superpixels, draw the foreground skeleton of the target; based on the interference object with similar appearance to the target, draw the background skeleton of the target, specifically including the following steps:

[0112] S41. For each foreground superpixel, first filter out all foreground superpixels adjacent to it in one hop. Then, according to the positional relationship between superpixels, only connect the foreground superpixels adjacent to it in one hop at the top. If there are none, connect the foreground superpixels adjacent to it in one hop at the bottom. If there are none, connect the foreground superpixels at the leftmost or rightmost end in the order of left first and right later. Connect according to this rule to obtain the foreground skeleton of the target;

[0113] S42, based on long-term spatiotemporal clues, a connected area that is most similar to the target appearance model is selected to keep the foreground label unchanged, and the superpixels of other connected areas have their original foreground labels changed to background. The present invention extracts the background skeleton of all the superpixels with changed labels according to the same strategy as extracting the foreground skeleton in S41. If a frame has only one connected area before label optimization, the target of this frame has no background skeleton.

[0114] See also Figure 6 (a) Figure 6 (b) and Figure 7 , based on the foreground labels of the superpixels of the current frame and the adjacency relationship between the superpixels, draw the foreground skeleton of the target; based on the distractors that are similar to the target appearance, draw the background skeleton of the target; construct a skeleton mapping network based on the residual network and the encoding and decoding framework, train the network with a common dataset for semantic segmentation and video segmentation, and input the foreground skeleton, background skeleton, and image information of the current frame into the skeleton mapping network, and output the video segmentation result of the current frame;

[0115] S5. Construct a skeleton mapping network based on the residual network and the encoding and decoding framework, train the skeleton mapping network with a common data set for semantic segmentation and video segmentation, input the foreground skeleton, background skeleton, and image information of the current frame into the skeleton mapping network, and output the video segmentation result of the current frame. The specific steps are as follows:

[0116] S51, the core of the skeleton mapping network is the residual network and the encoding and decoding structure. Using Resnet50 in the residual network as the backbone network can effectively extract the deep features of the image and avoid overfitting. The network uses the standard salient object detection dataset and the semantic segmentation dataset for pre-training; after the pre-training, the network is trained using the commonly used dataset in video segmentation. The network calculates the loss through the cross entropy loss function and fixes the learning rate to 1e-5;

[0117] S52. The input of the skeleton mapping network consists of the foreground skeleton, the background skeleton, and the image information of the current frame. The network concatenates the above three inputs along the channel dimension to form a five-dimensional tensor. The network input is denoted as x i , x i ∈I 5*W*H Among them, the RGB information of the current frame image occupies 3 dimensions; the foreground skeleton annotation map and the background skeleton annotation map are both grayscale images, the grayscale value of the foreground skeleton area is 0, and the grayscale value of the background skeleton area is 100. The foreground skeleton annotation map and the background skeleton annotation map each occupy one dimension, and W and H are the width and height of each frame in the video sequence;

[0118] S53. The output of the network structure is a response map of the same size as the input image. The response values ​​are distributed between 0 and 1, representing the probability of each pixel belonging to the foreground or background. The closer the response value is to 1, the greater the probability that the pixel belongs to the foreground.

[0119] See also Figure 8 (a)- Figure 8 (c) After processing Figure (8) through the technical solution of the present invention, we get Figure 8 (b) Schematic diagram of the accurate target outline and Figure 8 (c) is the video segmentation result. It can be seen from the figure that a better segmentation effect can be obtained by using the technical solution of the present invention.

[0120] It can be understood that the present invention selects the target tracking method proposed by Bo et al. (with High Performance Visual Tracking with Siamese Region Proposal Network as the abbreviation of the method corresponding to the paper title) as the basic method for tracking the target and obtaining the region of interest; and selects the superpixel segmentation method proposed by Achanta et al. (with SLIC Superpixels Compared to State-of-the-Art Superpixel Methods as the abbreviation of the method corresponding to the paper title) as the basic method for superpixel segmentation of the region of interest.

[0121] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.

[0122] Based on the same idea as the video segmentation method based on the dual-stream driven encoder and the feature memory module in the above-mentioned embodiment, the present invention also provides a video segmentation system based on the dual-stream driven encoder and the feature memory module, which can be used to execute the above-mentioned video segmentation method based on the dual-stream driven encoder and the feature memory module. For ease of explanation, in the structural schematic diagram of the embodiment of the video segmentation system based on the dual-stream driven encoder and the feature memory module, only the parts related to the embodiment of the present invention are shown. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0123] Please refer again Fig. 9 In another embodiment of the present application, a video segmentation system 100 based on an absorbing Markov chain and a skeleton mapping network is provided, the system comprising a superpixel segmentation module 101, an absorbing Markov construction module 102, an optimization module 103, a skeleton acquisition module 104 and a video segmentation module 105;

[0124] The superpixel segmentation module 101 obtains the target tracking result of the current frame based on the target tracking algorithm of the twin network, expands the target tracking result outward, calculates the region of interest of the target in each frame, and performs superpixel segmentation on the region of interest into a plurality of superpixels;

[0125] The absorption Markov chain construction module 102 is used to construct two absorption Markov chains according to the superpixels of the first frame and the current frame, and the superpixels of the previous frame and the current frame, respectively, calculate two absorption times of each superpixel of the current frame, and weight the absorption time, and determine the initial foreground label and background label of the superpixel according to the weighted absorption time;

[0126] The optimization module 103 is used to construct short-term spatiotemporal cues and long-term spatiotemporal cues to optimize superpixel labels; the short-term spatiotemporal cues are used to describe the appearance changes of the target in a short period of time, and based on the segmentation results of the previous frames of the current frame in the video sequence, the isolated background superpixels that are mistakenly segmented as foreground in the current frame are corrected; the long-term spatiotemporal cues are used to describe the long-term stable appearance characteristics of the target, and a long-term appearance model from the first frame to the current frame is constructed. If multiple regions in the current frame are simultaneously segmented as targets, the similarities between the multiple regions and the long-term appearance model are compared, and the most similar region is selected as the segmentation result;

[0127] The skeleton acquisition module 104 draws the foreground skeleton of the target based on the foreground labels of the superpixels of the current frame and the adjacency relationship between the superpixels; and draws the background skeleton of the target based on the interference objects with similar appearance to the target;

[0128] The video segmentation module 105 constructs a skeleton mapping network based on the residual network and the encoding and decoding framework, trains the skeleton mapping network with a common data set for semantic segmentation and video segmentation, inputs the foreground skeleton, background skeleton, and image information of the current frame into the skeleton mapping network, and outputs the video segmentation result of the current frame.

[0129] It should be noted that the video segmentation system based on absorbing Markov chain and skeleton mapping network of the present invention corresponds one to one with the video segmentation method based on absorbing Markov chain and skeleton mapping network of the present invention. The technical features and beneficial effects described in the embodiment of the video segmentation method based on absorbing Markov chain and skeleton mapping network are applicable to the embodiment of video segmentation based on absorbing Markov chain and skeleton mapping network. For specific contents, please refer to the description in the embodiment of the method of the present invention, which will not be repeated here. It is hereby declared.

[0130] In addition, in the implementation of the video segmentation system based on the absorbing Markov chain and the skeleton mapping network in the above-mentioned embodiment, the logical division of each program module is only an example. In actual applications, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the video segmentation system based on the absorbing Markov chain and the skeleton mapping network is divided into different program modules to complete all or part of the functions described above.

[0131] See also Fig.10 In one embodiment, an electronic device for implementing a video segmentation method based on an absorbing Markov chain and a skeleton mapping network is provided. The electronic device 200 may include a first processor 201, a first memory 202 and a bus, and may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as a video segmentation method program 203 based on an absorbing Markov chain and a skeleton mapping network.

[0132] Among them, the first memory 202 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the first memory 202 can be an internal storage unit of the electronic device 200, such as a mobile hard disk of the electronic device 200. In other embodiments, the first memory 202 can also be an external storage device of the electronic device 200, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 200. Further, the first memory 202 can also include both an internal storage unit of the electronic device 200 and an external storage device. The first memory 202 can not only be used to store application software and various types of data installed in the electronic device 200, such as the code of the multi-party privacy protection machine learning program 203, but also can be used to temporarily store data that has been output or is to be output.

[0133] In some embodiments, the first processor 201 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The first processor 201 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device 200 by running or executing programs or modules stored in the first memory 202, and calling data stored in the first memory 202.

[0134] Fig.10 Only an electronic device with components is shown, and those skilled in the art will understand that Fig. 9 The structure shown does not constitute a limitation on the electronic device 200 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0135] The video segmentation program 203 based on the dual-stream drive encoder and the feature memory module stored in the first memory 202 of the electronic device 200 is a combination of multiple instructions. When running in the first processor 201, it can achieve:

[0136] The target tracking algorithm based on the twin network calculates the target's region of interest in each frame and performs superpixel segmentation on the region of interest;

[0137] According to the superpixels of the first frame and the current frame, as well as the superpixels of the previous frame and the current frame, two absorption Markov chains are constructed respectively, two absorption times of each superpixel of the current frame are calculated, and the absorption time is weighted, and the initial foreground label and background label of the superpixel are determined according to the weighted absorption time;

[0138] Construct a skeleton mapping network module, draw the foreground skeleton of the target based on the foreground label of the superpixel of the current frame and the adjacency relationship between superpixels; draw the background skeleton of the target based on the interference objects with similar appearance to the target; construct a skeleton mapping network based on the residual network and the encoding and decoding framework, train the network with a common dataset for semantic segmentation and video segmentation, and input the foreground skeleton, background skeleton, and image information of the current frame into the skeleton mapping network, and output the video segmentation result of the current frame;

[0139] The features output by the module based on the absorption Markov chain and the skeleton mapping network are fused, and the fused features are decoded to obtain the video segmentation result of the current frame.

[0140] Furthermore, if the module / unit integrated in the electronic device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0143] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A video segmentation method based on an absorbing Markov chain and a skeleton mapping network, characterized in that: The steps include: Based on the target tracking algorithm of the twin network, the target tracking result of the current frame is obtained, and the target tracking result is expanded outward, the region of interest of the target in each frame is calculated, and the region of interest is superpixel-segmented into several superpixels; According to the superpixels of the first frame and the current frame, as well as the superpixels of the previous frame and the current frame, two absorption Markov chains are constructed respectively, two absorption times of each superpixel of the current frame are calculated, and the absorption time is weighted, and the initial foreground label and background label of the superpixel are determined according to the weighted absorption time; Construct short-term spatiotemporal cues and long-term spatiotemporal cues to optimize superpixel labels; the short-term spatiotemporal cues are used to describe the appearance changes of the target in a short period of time, and based on the segmentation results of the previous frames of the current frame in the video sequence, the isolated background superpixels that are mistakenly segmented as foreground in the current frame are corrected; the long-term spatiotemporal cues are used to describe the long-term stable appearance characteristics of the target, and a long-term appearance model from the first frame to the current frame is constructed. If multiple regions in the current frame are simultaneously segmented as targets, the similarities between these multiple regions and the long-term appearance model are compared, and the most similar region is selected as the segmentation result; Based on the foreground labels of the superpixels in the current frame and the adjacency relationship between superpixels, the foreground skeleton of the target is drawn; based on the interference objects with similar appearance to the target, the background skeleton of the target is drawn; A skeleton mapping network is constructed based on a residual network and an encoding-decoding framework. The skeleton mapping network is trained using a common dataset for semantic segmentation and video segmentation. The foreground skeleton, background skeleton, and image information of the current frame are input into the skeleton mapping network, and the video segmentation result of the current frame is output. The two absorption times of each superpixel in the current frame are calculated, and the absorption time is weighted, and the initial foreground label and background label of the superpixel are determined according to the weighted absorption time, which specifically includes the following steps: The constructed absorbing Markov chain is denoted as G, and G includes multiple vertices and multiple edges; The vertex construction rule is: each superpixel in the region of interest is represented as a vertex, and according to the construction principle of the absorbing Markov chain, all vertices are classified into absorbing vertices and transient vertices; The edge construction rule is: divide all edges in G into two categories: intra-frame edges and inter-frame edges; All superpixels that are adjacent within one hop or two hops in the same frame are connected by intra-frame edges. Superpixels that are adjacent within one hop are all neighboring superpixels of a superpixel, and superpixels that are adjacent within two hops are all neighboring superpixels of a superpixel. The corresponding superpixels with similar features and close positions in two frames are found by the optical flow method, and connected by inter-frame edges. The weight of the edge is the similarity of the two superpixels. When the current frame and the first frame establish an absorbing Markov chain, according to the vertex construction rule, the background superpixels in the region of interest of the first frame are marked as absorbing vertices, and the foreground superpixels in the region of interest of the first frame and all superpixels in the region of interest of the current frame are marked as transient vertices; according to the edge construction rule, the intra-frame edges within the current frame and the first frame, and the inter-frame edges connecting the current frame and the first frame are constructed, and the weights of the edges are calculated according to the similarity between the superpixels; finally, according to the absorption principle of the absorbing Markov chain, the absorption time H1 of all superpixels in the region of interest of the current frame of the first absorbing Markov chain is obtained; When the current frame and the previous frame establish an absorbing Markov chain, according to the vertex construction rule, the background superpixels in the region of interest of the previous frame of the current frame are marked as absorbing vertices, and the foreground superpixels in the region of interest of the previous frame of the current frame and all superpixels in the region of interest of the current frame are marked as transient vertices; according to the edge construction rule, the intra-frame edges within the current frame and the previous frame are constructed respectively, and the inter-frame edges connecting the current frame and the previous frame are constructed, and the weights of the edges are calculated according to the similarity between the superpixels; finally, according to the absorption principle of the absorbing Markov chain, the absorption time H2 of all superpixels in the region of interest of the current frame of the second absorbing Markov chain is obtained; According to H1 and H2, the absorption time H of all superpixels in the region of interest of the current frame is obtained, and H is obtained by the linear combination of H1 and H2; Based on the absorption time H of all superpixels in the region of interest of the current frame, calculate the average absorption time Superpixel absorption time is greater than , marked as foreground, absorption time is less than , marked as background; The optimization of superpixel labels based on short-term spatiotemporal clues is as follows: The video segmentation result of the t frames before the current frame is stored by the storage device. The segmentation result is represented by a 0-1 matrix, where 0 represents background pixels and 1 represents foreground pixels; Based on the segmentation results of the previous t frames, count the pixels that are labeled as foreground in the current frame but were labeled as background in the previous t frames of the current frame; All pixels with a value of 1 in the matrix are represented as a set S, and the superpixels corresponding to all pixels in S are represented by a set SuperS. In the set SuperS, the labels of all superpixels are foreground. When all the labels of the adjacent superpixels within one hop or two hops of a superpixel in SuperS are background, it is considered that the superpixel label is divided incorrectly, and the superpixel label is corrected to the background. The optimization of superpixel labels based on long-term spatiotemporal clues is as follows: Using the foreground labels of the superpixels in the region of interest of the current frame, an undirected graph is constructed; all foreground superpixels in the current frame are used as vertices of the undirected graph, and the adjacent foreground superpixels within two hops are connected by edges. The number of connected regions in the undirected graph is the number of candidate regions segmented in the current frame; Based on long-term spatiotemporal clues, the target appearance model F is constructed using the accumulated appearance features of the target in the previous frame from the first frame to the current frame. k-1 ; Construct an appearance model for all candidate regions segmented from the current frame n is the number of candidate regions in the current frame. With F k-1 The similarity between k-1 For the candidate region with the highest similarity, the superpixel label in the candidate region remains as the foreground, and the superpixel labels of the remaining candidate regions are corrected to the background; Combine the current frame with F k-1 The apparent feature of the region with the highest similarity is denoted as F k ', update the appearance model of the target in the current frame, and the updated appearance model of the target in the current frame is recorded as F k , F k For label refinement based on long-term spatiotemporal cues in the next frame.

2. The video segmentation method based on absorbing Markov chain and skeleton mapping network according to claim 1, characterized in that: The target tracking algorithm based on the twin network obtains the target tracking result of the current frame, and expands the target tracking result outward to calculate the region of interest of the target in each frame, specifically: In the first frame of the video sequence, the position and size of the target are manually calibrated, that is, a rectangular box tangent to the target in the top, bottom, left and right directions is drawn on the first frame image with the mouse, and the coordinates of the upper left corner of the rectangular box are represented by (x, y), the width of the rectangular box is represented by w, and the height is represented by h. The four parameters x, y, w, and h contain all the spatial information of the rectangular box; Based on the twin network, predict the tracking results in subsequent frames, represent the tracking results of each frame with (x, y, x, h), and save the tracking results in a text file; The length and width of the rectangular box where the tracking result of each frame is located are expanded to obtain the region of interest of each frame. If the boundary of the expanded region of interest exceeds the image range, the image boundary is used as the boundary of the region of interest.

3. The video segmentation method based on absorbing Markov chain and skeleton mapping network according to claim 1, characterized in that: The foreground skeleton of the target is drawn based on the foreground label of the superpixel of the current frame and the adjacency relationship between the superpixels, specifically: For each foreground superpixel, first filter out all the foreground superpixels adjacent to it in one hop. Then, according to the positional relationship between superpixels, only connect the foreground superpixels adjacent to it in one hop at the top. If there are none, connect the foreground superpixels adjacent to it in one hop at the bottom. If there are none, connect the foreground superpixels at the leftmost or rightmost end in the order of left first and right later. Connect according to this rule to obtain the foreground skeleton of the target. The background skeleton of the target is drawn based on the interference object with similar appearance to the target, specifically: Based on long-term spatiotemporal clues, a connected area that is most similar to the target appearance model is selected to keep the foreground label unchanged. The superpixels in other connected areas have their original foreground labels changed to background. For all superpixels with changed labels, their background skeletons are extracted using the same strategy as for extracting the foreground skeleton. If a frame has only one connected area before label optimization, the target in this frame has no background skeleton.

4. The video segmentation method based on absorbing Markov chain and skeleton mapping network according to claim 1, characterized in that: The foreground skeleton, the background skeleton, and the image information of the current frame are input into the skeleton mapping network, and the video segmentation result of the current frame is output, specifically: The core of the skeleton mapping network is the residual network and the encoding and decoding structure. Resnet50 in the residual network is used as the backbone network to extract the deep features of the image. The skeleton mapping network uses the standard salient object detection dataset and the semantic segmentation dataset for pre-training. After the pre-training, the network is trained using the commonly used dataset in video segmentation. The skeleton mapping network calculates the loss through the cross entropy loss function. The input of the skeleton mapping network consists of the foreground skeleton, the background skeleton, and the image information of the current frame. The skeleton mapping network concatenates the three inputs along the channel dimension to form a five-dimensional tensor; The foreground skeleton annotation map and the background skeleton annotation map are both grayscale images. The foreground skeleton annotation map and the background skeleton annotation map each occupy one dimension. W and H are the width and height of each frame in the video sequence. The output of the skeleton mapping network is a response map of the same size as the input image. The response values ​​are distributed between 0 and 1, representing the probability of each pixel belonging to the foreground or background. The closer the response value is to 1, the greater the probability that the pixel belongs to the foreground.

5. A video segmentation system based on absorbing Markov chain and skeleton mapping network, characterized in that: The video segmentation method based on the absorbing Markov chain and the skeleton mapping network as described in any one of claims 1 to 4 comprises a superpixel segmentation module, an absorbing Markov chain construction module, an optimization module, a skeleton acquisition module and a video segmentation module; The superpixel segmentation module obtains the target tracking result of the current frame based on the target tracking algorithm of the twin network, expands the target tracking result outward, calculates the region of interest of the target in each frame, and performs superpixel segmentation on the region of interest into several superpixels; The absorption Markov chain construction module is used to construct two absorption Markov chains according to the superpixels of the first frame and the current frame, and the superpixels of the previous frame and the current frame of the current frame, respectively, calculate two absorption times of each superpixel of the current frame, and weight the absorption time, and determine the initial foreground label and background label of the superpixel according to the weighted absorption time; The optimization module is used to construct short-term spatiotemporal cues and long-term spatiotemporal cues to optimize superpixel labels; the short-term spatiotemporal cues are used to describe the appearance changes of the target in a short period of time, and based on the segmentation results of the previous frames of the current frame in the video sequence, the isolated background superpixels that are mistakenly segmented as foreground in the current frame are corrected; the long-term spatiotemporal cues are used to describe the long-term stable appearance characteristics of the target, and a long-term appearance model from the first frame to the current frame is constructed. If multiple regions in the current frame are simultaneously segmented as targets, the similarities between these multiple regions and the long-term appearance model are compared, and the most similar region is selected as the segmentation result; The skeleton acquisition module draws the foreground skeleton of the target based on the foreground labels of the superpixels of the current frame and the adjacency relationship between the superpixels; and draws the background skeleton of the target based on the interference objects with similar appearance to the target; The video segmentation module constructs a skeleton mapping network based on a residual network and a coding and decoding framework, trains the skeleton mapping network with a common data set for semantic segmentation and video segmentation, inputs the foreground skeleton, background skeleton, and image information of the current frame into the skeleton mapping network, and outputs the video segmentation result of the current frame.

6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the video segmentation method based on the absorbing Markov chain and the skeleton mapping network as described in any one of claims 1-4.

7. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the video segmentation method based on absorbing Markov chain and skeleton mapping network described in any one of claims 1 to 4 is implemented.