Data processing method, device, equipment, computer readable storage medium and product

CN115830035BActive Publication Date: 2026-10-20BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211420016.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2026-10-20
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

[0004]本公开实施例提供一种数据处理方法、装置、设备、计算机可读存储介质及产品,用于解决现有的视频分割稳定性不高的技术问题

Benefits of technology

[0029]第七方面,本公开实施例提供一种计算机程序产品,包括计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计或第二方面以及第二方面各种可能的设计所述的数据处理方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115830035B_ABST
    Figure CN115830035B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a data processing method, device, equipment, computer readable storage medium and product, the method comprising: obtaining a first image and a second image, the second image being obtained by processing the first image; inputting the first image and the second image into an original model to obtain different scale results, wherein the different scale results include a first result corresponding to the first image and a second result corresponding to the second image; calculating a target loss value corresponding to the original model according to the different scale results; adjusting the original model according to the target loss value to obtain an image segmentation model. Thus, the stability of the multiple scale results output by the original model can be supervised, which helps to better improve the timing stability of semantic segmentation, so that the segmentation effect of the trained image segmentation model on a video sequence is more stable and natural.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, device, computer-readable storage medium, and product. Background Technology

[0002] Currently, most video segmentation tasks on mobile devices employ frame-by-frame segmentation algorithms. However, deep learning models can experience significant output differences due to minor changes in the input. In other words, even small variations between adjacent frames can cause noticeable jitter at the edges of the mask in the segmentation model's output, affecting the visual quality of special effects.

[0003] Therefore, improving the stability of video segmentation has become an urgent problem to be solved. Summary of the Invention

[0004] This disclosure provides a data processing method, apparatus, device, computer-readable storage medium, and product to address the technical problem of low stability in existing video segmentation methods.

[0005] In a first aspect, embodiments of this disclosure provide a data processing method, including:

[0006] Acquire a first image and a second image, wherein the second image is obtained by processing the first image;

[0007] The first image and the second image are input into the original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image;

[0008] Calculate the target loss value corresponding to the original model based on the results at different scales;

[0009] The original model is adjusted based on the target loss value to obtain an image segmentation model.

[0010] Secondly, embodiments of this disclosure provide a data processing method, including:

[0011] Obtain the video to be segmented;

[0012] Obtain at least one video frame corresponding to the video to be segmented;

[0013] The video frame to be segmented is input into a preset image segmentation model to perform image segmentation operations and obtain the image segmentation result;

[0014] The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value.

[0015] Thirdly, embodiments of this disclosure provide a data processing apparatus, including:

[0016] The acquisition module is used to acquire a first image and a second image, wherein the second image is obtained by processing the first image;

[0017] The processing module is used to input the first image and the second image into the original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image;

[0018] The calculation module is used to calculate the target loss value corresponding to the original model based on the results at different scales;

[0019] The training module is used to adjust the original model according to the target loss value to obtain an image segmentation model.

[0020] Fourthly, embodiments of this disclosure provide a data processing apparatus, including:

[0021] The data acquisition module is used to acquire the video to be segmented;

[0022] The frame extraction module is used to obtain at least one video frame to be segmented corresponding to the video to be segmented;

[0023] The segmentation module is used to input the video frame to be segmented into a preset image segmentation model to perform image segmentation operations and obtain image segmentation results;

[0024] The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value.

[0025] Fifthly, embodiments of this disclosure provide an electronic device, including: at least one processor and a memory;

[0026] The memory stores computer-executed instructions;

[0027] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to implement the data processing method described in the first aspect and various possible designs of the first aspect or the second aspect and various possible designs of the second aspect.

[0028] In a sixth aspect, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the data processing method described in the first aspect and various possible designs of the first aspect or the second aspect and various possible designs of the second aspect.

[0029] In a seventh aspect, embodiments of this disclosure provide a computer program product, including computer execution instructions, which, when executed by a processor, implement the data processing method described in the first aspect and various possible designs of the first aspect or the second aspect and various possible designs of the second aspect.

[0030] The data processing method, apparatus, device, computer-readable storage medium, and product provided in this embodiment, after acquiring multiple sets of first and second images, input the first and second images into a preset original model to obtain results at different scales output by the original model. Based on the results corresponding to each scale output by the original model, the segmentation stability of the original model is improved. This allows for the supervision of the stability of the results output by the original model at multiple scales, which helps to better improve the temporal stability of semantic segmentation, making the segmentation effect of the trained image segmentation model on video sequences more stable and natural. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a system architecture diagram on which this disclosure is based;

[0033] Figure 2 A schematic flowchart illustrating the data processing method provided in this embodiment of the disclosure;

[0034] Figure 3 A schematic flowchart of a data processing method provided in yet another embodiment of this disclosure;

[0035] Figure 4 A schematic flowchart of a data processing method provided in yet another embodiment of this disclosure;

[0036] Figure 5 This is a schematic diagram of the structure of an original model provided in an embodiment of the present disclosure;

[0037] Figure 6 A schematic flowchart of a data processing method provided in yet another embodiment of this disclosure;

[0038] Figure 7 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this disclosure;

[0039] Figure 8 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this disclosure;

[0040] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0042] In view of the aforementioned technical problem of low stability in existing video segmentation, this disclosure provides a data processing method, apparatus, device, computer-readable storage medium, and product.

[0043] It should be noted that the data processing methods, apparatus, devices, computer-readable storage media and products provided in this disclosure can be used in any scenario where model training requires enhanced stability.

[0044] Video segmentation algorithms typically perform image segmentation on each frame of a target video. However, slight differences may exist between different video frames, which can cause noticeable jitter in the segmentation results. Existing model stability improvement schemes generally adjust the model through data augmentation consistency loss functions; however, these methods are often ineffective in improving stability and fail to remove the noticeable jitter in the segmentation results.

[0045] In solving the above technical problems, since the model often outputs results at multiple different scales when performing video frame segmentation, in order to effectively improve the stability of the model, a preset data augmentation consistency loss function can be used to adjust the sampling layer at each scale to ensure the detail information of the segmentation results at different scales and improve the stability of the model in the segmentation process.

[0046] In addition, to address the jitter in segmentation results caused by user movement, moving away, or moving closer in video scenes, the segmentation results obtained after data augmentation processing such as translation, scaling, and rotation of the sample data are aligned with the results obtained after the original sample segmentation results are transformed in the same way (minimizing the difference between the two), thereby correcting the model and enhancing the stability of segmentation.

[0047] Figure 1 The system architecture diagram on which this disclosure is based is as follows: Figure 1 As shown, the system architecture diagram upon which this disclosure is based includes at least a terminal device 11 and a server 12, wherein the server 12 is equipped with a data processing device. This data processing device can be written in languages ​​such as C / C++, Java, Shell, or Python. The terminal device 11 can be any device such as a tablet, computer, or mobile phone.

[0048] Optionally, server 12 can also communicate with a preset data server. Based on the above system architecture, server 12 can obtain training datasets from terminal device 11 or data server, and perform multi-scale model stability improvement operations on the original model based on the training datasets.

[0049] Optionally, after completing the training operation of the original model and obtaining the image segmentation model, the server 12 can also obtain the video to be segmented 13 acquired by the terminal device 11, and obtain multiple video frames 14 to be segmented based on the video to be segmented 13. For each video frame 14 to be segmented, the video frame 14 to be segmented can be input into the preset image segmentation model 15 to complete the segmentation operation of the video frame 14 to be segmented, and obtain the segmentation result 16.

[0050] Figure 2 This is a flowchart illustrating the data processing method provided in the embodiments of this disclosure, as shown below. Figure 2 As shown, the method includes:

[0051] Step 201: Obtain a first image and a second image, wherein the second image is obtained by processing the first image.

[0052] In this embodiment, the execution entity is a data processing device, which can be coupled to a server. This server can communicate with a data server or a terminal device to acquire a first image and a second image from the data server or the terminal device to perform adjustments to the original model.

[0053] In this embodiment, when the image segmentation model performs image segmentation on video frames in a video, the target object in the video may move left or right, move away or move closer, which causes the segmentation results of the existing image segmentation model to jitter.

[0054] Therefore, to improve the stability of the image segmentation model for video frame segmentation, a first image and a second image can be obtained first. The second image is obtained by processing the first image; specifically, this data processing operation can be a data augmentation operation.

[0055] It should be noted that data augmentation operations include one or more of the following: translation, scaling, rotation, and color adjustment. Therefore, the second image obtained after data augmentation of the first image can accurately simulate the left-right movement, moving away, and moving closer to the target object in the video. Thus, adjusting the original model based on multiple sets of first and second images can effectively improve the stability of the adjusted image segmentation model for video frame segmentation.

[0056] Step 202: Input the first image and the second image into the original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image.

[0057] In this embodiment, a pre-set original model can be used. This original model may include multiple levels, each level including upsampling units and downsampling units. Different levels can output results at different scales.

[0058] After obtaining the training dataset, the first and second images can be input into the preset original model to obtain results at different scales output by the original model.

[0059] The results at each scale include a first result corresponding to the first image and a second result corresponding to the second image.

[0060] Step 203: Calculate the target loss value corresponding to the original model based on the results of the different scales.

[0061] In this embodiment, after obtaining results at different scales, for each scale, the first result is the output of the original model after image processing of the first image, and the second result is the output of the original model after image processing of the data-augmented first training image (i.e., the second training image). It is understood that when the image segmentation model is highly stable, the augmented result obtained by performing the same data augmentation operation on the first result should be consistent with the first result. Therefore, the target loss value corresponding to the original model can be determined based on the difference between the first and second results at different scales.

[0062] Optionally, a second loss function can be pre-set, and the target loss value corresponding to the original model can be determined based on the difference between the first and second results in the results at different scales and the second loss function.

[0063] Step 204: Adjust the original model according to the target loss value to obtain an image segmentation model.

[0064] In this embodiment, to improve the stability of the original model and reduce the difference between the augmented result obtained after data augmentation of the first result and the first result, after obtaining the target loss value corresponding to the original model, the model parameters of the original model can be adjusted according to the target loss value to obtain an image segmentation model. Optionally, a second convergence condition can be preset. During the adjustment of the parameters of the original model, when it is detected that the original model meets the preset second convergence condition, the trained image segmentation model is obtained.

[0065] The preset second convergence condition includes, but is not limited to, the target loss value being lower than a preset second loss value threshold, the number of training iterations reaching a preset second number of iterations threshold, the training duration reaching a preset second duration threshold, and the difference between the target loss values ​​obtained from two training rounds being less than a preset second difference threshold. Users can adjust the second convergence condition according to their actual needs, and this disclosure does not impose any restrictions on it.

[0066] Furthermore, based on any of the above embodiments, step 204 includes:

[0067] The parameters of the original model are adjusted using gradient descent based on the target loss value to obtain the adjusted original model.

[0068] The first and second images are input into the adjusted original model to obtain the fourth result output by the original model;

[0069] Based on the fourth result, determine whether the adjusted original model satisfies the preset second convergence condition;

[0070] If so, the image segmentation model is obtained;

[0071] If not, the adjusted original model is determined as the current original model, and the process returns to the step of inputting the first image and the second image into the original model to obtain results at different scales, until the original model meets the preset second convergence condition.

[0072] In this embodiment, the parameters of the original model can be adjusted using gradient descent based on the target loss value to obtain the adjusted original model. Optionally, any method capable of parameter adjustment can be chosen to adjust the parameters of the original model; this disclosure does not impose any limitations on this.

[0073] After adjustment, multiple sets of first and second images can be input into the adjusted original model to obtain the fourth result output by the original model.

[0074] After obtaining the fourth result, the target loss value of the adjusted original model can be calculated based on this fourth result and the preset second loss function. The adjusted original model's target loss value is then used to determine whether it meets the preset second convergence condition. Alternatively, the satisfaction of the preset second convergence condition can be determined based on information such as the current number of iterations and the iteration duration.

[0075] If the adjusted original model is found to meet the preset second convergence condition, the adjusted original model can be determined as an image segmentation model, and then the image segmentation model can be used to perform image segmentation operations on video frames in the video.

[0076] Conversely, if the adjusted original model is detected to not meet the preset second convergence condition, it indicates that iterative adjustment of the adjusted original model is needed. At this time, the adjusted original model can be determined as the current original model, and the process of inputting the first and second images into the original model to obtain results at different scales is returned until the original model meets the preset second convergence condition, thus obtaining the image segmentation model.

[0077] The data processing method provided in this embodiment, after acquiring multiple sets of first and second images, inputs the first and second images into a preset original model to obtain results at different scales output by the original model. Based on the results corresponding to each scale of the original model's output, the segmentation stability of the original model is improved. This allows for the supervision of the stability of the results at multiple scales output by the original model, which helps to better improve the temporal stability of semantic segmentation, making the trained image segmentation model perform more stably and naturally on video sequences.

[0078] Figure 3 This is a flowchart illustrating a data processing method provided in yet another embodiment of the present disclosure. Based on any of the above embodiments, such as... Figure 3 As shown, step 201 includes:

[0079] Step 301: Obtain multiple first images.

[0080] Step 302: For each first image, perform data augmentation operations on the first image to obtain the second image, wherein the data augmentation operations include one or more of translation operations, scaling operations, rotation operations, and color adjustment operations.

[0081] In this embodiment, in order to improve the stability of the image segmentation model when segmenting video frames, a first image and a second image can be obtained first.

[0082] Optionally, multiple first images can be acquired. Data augmentation is performed on each first image to obtain a second image corresponding to the first image. Multiple sets of first and second images are obtained.

[0083] Data augmentation operations include one or more of the following: translation, scaling, rotation, and color adjustment.

[0084] By performing data augmentation on the first image, the resulting second image can simulate the movement of the target object in the video. Furthermore, the image segmentation model obtained by adjusting multiple sets of first and second images exhibits strong stability when segmenting video frames.

[0085] Optionally, based on any of the above embodiments, step 302 includes:

[0086] Determine the image change features corresponding to adjacent video frames in the target video.

[0087] Data augmentation is performed on the first image based on the image change features.

[0088] In this embodiment, to enhance the stability of the image segmentation model when segmenting a target video, image change features corresponding to adjacent video frames in the target video can be summarized. Data augmentation is then performed on the first image based on these image change features.

[0089] The data processing method provided in this embodiment first performs data augmentation on the first image before training the original model to obtain multiple sets of first and second images. These multiple sets of first and second images can simulate the movement, moving away, and moving closer of the target object in the video scene. Based on these multiple sets of first and second images, the original model is adjusted to correct it, thereby improving the stability of the trained image segmentation model in segmenting the image frames to be segmented in the target video.

[0090] Figure 4 This is a flowchart illustrating a data processing method according to another embodiment of the present disclosure. Based on any of the above embodiments, different scales correspond to different first loss functions. Step 203 includes:

[0091] Step 401: Process the results at different scales using the first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales.

[0092] Step 402: Calculate the target loss value corresponding to the original model based on the loss values ​​corresponding to the different scales.

[0093] Figure 5 This is a schematic diagram of the structure of an original model provided in an embodiment of this disclosure, such as... Figure 5 As shown, the original model can specifically be a U-Net model 51, which can have three layers 52. Each layer 52 includes an upsampling unit 53 and a downsampling unit 54. Each layer 52 can output segmentation results 55 at different scales.

[0094] In this embodiment, each scale can correspond to a first loss function that matches the scale. This first loss function is used to determine the loss value corresponding to different scales based on the difference between the first result and the second result corresponding to different scales.

[0095] For each scale, the data can be processed according to the first loss function to obtain the loss value of the original model for each scale.

[0096] Furthermore, the target loss value corresponding to the original model can be calculated based on the loss value corresponding to each scale.

[0097] Optionally, the original model has a second loss function, and the target loss value corresponding to the original model can be calculated based on the loss value corresponding to each scale and the second loss function.

[0098] Furthermore, based on any of the above embodiments, step 402 includes:

[0099] Determine the weight information corresponding to each scale.

[0100] The target loss value corresponding to the original model is calculated based on the weight information corresponding to each scale and the loss value corresponding to each scale.

[0101] In this embodiment, since the required scale of the segmentation result varies in different scenarios in practical applications, different weight information can be set for each scale for different scenarios in order to ensure the accuracy of the segmentation result.

[0102] For example, the original model can output results at three scales: large, medium, and small. In practical applications, the medium-scale results need to be emphasized. Therefore, a larger weight value can be assigned to the medium-scale results, while a smaller weight value can be assigned to the large and small scale results.

[0103] Therefore, after determining the loss value corresponding to each scale, it is also necessary to determine the weight information corresponding to each scale, and calculate the target loss value corresponding to the original model based on the weight information and the loss value corresponding to each scale.

[0104] Specifically, the original model has a second loss function, which can be used to calculate the target loss value based on multiple first loss functions and their corresponding weights. Therefore, the target loss value of the original model can be calculated based on the weight information for each scale, the loss value for each scale, and the second loss function.

[0105] The data processing method provided in this embodiment sets different weight information for each scale, thereby making the final target loss value more in line with the needs of actual applications, and thus improving the accuracy of the image segmentation model in a targeted manner.

[0106] Furthermore, based on any of the above embodiments, step 401 includes:

[0107] For the results corresponding to different scales, the first and second results are sampled to the same scale as the first and second images, respectively, to obtain the processed results.

[0108] The data of the processed results at different scales are processed by using the first loss function corresponding to different scales respectively, so as to obtain the loss value of the original model at each scale.

[0109] In this embodiment, during the calculation of the loss value corresponding to each scale, the result of each scale can be upsampled to the original image size before the loss value is calculated.

[0110] Specifically, for the results corresponding to each scale, the first and second results can be sampled to the same scale as the first and second images, respectively, to obtain the processed results. The first loss function corresponding to each scale is then used to process the data of the processed results at each scale to obtain the loss values ​​of the original model at each scale.

[0111] Furthermore, based on any of the above embodiments, step 401 includes:

[0112] For different scales, data augmentation operations are performed on the first result of the results corresponding to the scale to obtain the third result.

[0113] The loss value corresponding to the scale is determined based on the first loss function corresponding to the scale, the second result, and the third result.

[0114] In this embodiment, when the image segmentation model is highly stable, the augmented result obtained by performing the same data augmentation operation on the first result as on the first image should be consistent with the first result. Therefore, for each scale, a data augmentation operation can be performed on the first result in the results corresponding to that scale to obtain a third result. This data augmentation operation is consistent with the data augmentation operation performed on the first training data. Then, the loss value corresponding to the scale can be determined based on the second and third results and the second loss function corresponding to that scale.

[0115] The data processing method provided in this embodiment determines the loss value corresponding to each scale of the original model, and calculates the target loss value corresponding to the original model based on the loss value corresponding to each scale and the first loss function. This allows for adjustments to the segmentation results at different scales to ensure the detailed information of the segmentation results at different scales.

[0116] Optionally, based on any of the above embodiments, after step 202, the method further includes:

[0117] For each scale, the loss value corresponding to the scale is calculated using the first loss function corresponding to the scale and the result corresponding to the scale.

[0118] Based on the loss value corresponding to each scale, the parameters of the downsampling layer corresponding to each scale are adjusted until all downsampling layers of the original model reach the preset first convergence condition, thereby obtaining the trained image segmentation model.

[0119] In this embodiment, for each scale, a loss value corresponding to the scale can be calculated based on the first loss function corresponding to that scale and the result corresponding to the scale. Then, based on the loss value, the parameters of the downsampling layer corresponding to each scale are adjusted until each downsampling layer reaches the preset first convergence condition, thereby obtaining the trained image segmentation model.

[0120] The preset first convergence condition includes, but is not limited to, the target loss value being lower than a preset first loss value threshold, the number of training iterations reaching a preset first number of iterations threshold, the training duration reaching a preset first duration threshold, and the difference between the target loss values ​​obtained from two training rounds being less than a preset first difference threshold. Users can adjust the first convergence condition according to their actual needs, and this disclosure does not impose any restrictions on it.

[0121] The data processing method provided in this embodiment determines the loss value corresponding to each scale and adjusts the scale based on the loss value. This allows for training of segmentation results at different scales, thereby ensuring the detail information of the segmentation results at different scales in the trained image segmentation model. This improves the segmentation accuracy and stability of the image segmentation model.

[0122] Figure 6 A flowchart illustrating a data processing method provided in yet another embodiment of this disclosure is shown below. Figure 6 As shown, the method includes:

[0123] Step 601: Obtain the video to be segmented.

[0124] Step 602: Obtain at least one video frame corresponding to the video to be segmented.

[0125] Step 603: Input the video frame to be segmented into a preset image segmentation model to perform image segmentation operation and obtain the image segmentation result.

[0126] The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value.

[0127] In this embodiment, the execution entity is a data processing device, which can be coupled to a server. This server is capable of communicating with a terminal device to obtain the video to be segmented and perform image segmentation operations on the video frames to be segmented.

[0128] In this embodiment, to perform image segmentation on the video frames to be segmented in the video to be segmented, the video to be segmented is first acquired. Then, a frame extraction operation is performed on the video to be segmented to obtain at least one video frame corresponding to the video to be segmented.

[0129] A pre-defined image segmentation model is used to perform image segmentation on at least one video frame to be segmented, thereby obtaining the image segmentation result. The image segmentation model is obtained by inputting training data into a pre-defined original model, calculating the target loss value of the original model based on the results at different scales of the original model's output, and using a pre-defined first loss function. The model parameters of the original model are then adjusted based on the target loss value until the original model meets a pre-defined first convergence condition.

[0130] The data processing method provided in this embodiment improves the stability of the image segmentation model by training the original model with data-augmented training data and supervising the output of the original model at multiple scales using a first loss function. Thus, the image segmentation model can perform stable image segmentation operations on multiple video frames to be segmented in a target video.

[0131] Figure 7 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this disclosure, such as... Figure 7 As shown, the device includes: an acquisition module 71, a processing module 72, a calculation module 73, and a training module 74. The acquisition module 71 is used to acquire a first image and a second image, wherein the second image is obtained by processing the first image. The processing module 72 is used to input the first image and the second image into an original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image. The calculation module 73 is used to calculate the target loss value corresponding to the original model based on the results at different scales. The training module 74 is used to adjust the original model based on the target loss value to obtain an image segmentation model.

[0132] Furthermore, based on any of the above embodiments, the acquisition module is configured to: acquire multiple first images; and perform data augmentation operations on each first image to obtain a second image, wherein the data augmentation operations include one or more of translation, scaling, rotation, and color adjustment operations.

[0133] Furthermore, based on any of the above embodiments, the acquisition module is configured to: determine image change features corresponding to adjacent video frames in the target video; and perform data augmentation operations on the first image based on the image change features.

[0134] Furthermore, based on any of the above embodiments, different scales correspond to different first loss functions. The processing module is used to: process the results corresponding to different scales using the first loss functions corresponding to different scales respectively, to obtain the loss values ​​of the original model at different scales; and calculate the target loss value corresponding to the original model based on the loss values ​​corresponding to the scales and the preset second loss function.

[0135] Furthermore, based on any of the above embodiments, the processing module is used to: determine the weight information corresponding to each scale; and calculate the target loss value corresponding to the original model based on the weight information corresponding to each scale, the loss value corresponding to each scale, and the second loss function.

[0136] Furthermore, based on any of the above embodiments, the processing module is used to: sample the first result and the second result in the results to the same scale as the first image and the second image respectively, for the results corresponding to different scales, to obtain the processed results; and use the first loss function corresponding to different scales to process the processed results corresponding to different scales respectively, to obtain the loss value corresponding to each scale of the original model.

[0137] Furthermore, based on any of the above embodiments, the processing module is configured to: perform data augmentation operations on the first result of the results corresponding to the scale for different scales to obtain a third result; and determine the loss value corresponding to the scale based on the first loss function corresponding to the scale, the second result, and the third result.

[0138] Furthermore, based on any of the above embodiments, different scales correspond to different first loss functions. The device further includes: a calculation module, further configured to calculate the loss value corresponding to each scale using the first loss function corresponding to the scale and the result corresponding to the scale; and an adjustment module, configured to adjust the parameters of the downsampling layers corresponding to each scale according to the loss values ​​corresponding to each scale, until all downsampling layers of the original model reach a preset first convergence condition, thereby obtaining the image segmentation model.

[0139] Further, based on any of the above embodiments, the training module is used to: adjust the parameters of the original model using gradient descent according to the target loss value to obtain an adjusted original model; input the first image and the second image into the adjusted original model to obtain a fourth result output by the original model; determine whether the adjusted original model satisfies a preset second convergence condition based on the fourth result; if yes, obtain the image segmentation model; if no, determine the adjusted original model as the current original model, and return to the step of inputting the first image and the second image into the original model to obtain results at different scales, until the original model satisfies the preset second convergence condition.

[0140] Figure 8 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this disclosure, such as... Figure 8 As shown, the device includes a data acquisition module 81, a frame extraction module 82, and a segmentation module 83. The data acquisition module 81 is used to acquire the video to be segmented. The frame extraction module 82 is used to acquire at least one video frame corresponding to the video to be segmented. The segmentation module 83 is used to input the video frame to be segmented into a preset image segmentation model for image segmentation operation to obtain image segmentation results. The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value.

[0141] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0142] Another embodiment of this disclosure also provides an electronic device, including: at least one processor and a memory.

[0143] The memory stores computer-executed instructions.

[0144] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any of the above embodiments.

[0145] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this disclosure, such as... Figure 9As shown, the electronic device 900 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0146] like Figure 9 As shown, the electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0147] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 An electronic device 900 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0148] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of embodiments of this disclosure.

[0149] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0150] Another embodiment of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the method described in any of the above embodiments.

[0151] Another embodiment of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the above embodiments.

[0152] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0153] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0154] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0156] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0157] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0158] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0159] In a first aspect, according to one or more embodiments of the present disclosure, a data processing method is provided, comprising:

[0160] Acquire a first image and a second image, wherein the second image is obtained by processing the first image;

[0161] The first image and the second image are input into the original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image;

[0162] Calculate the target loss value corresponding to the original model based on the results at different scales;

[0163] The original model is adjusted based on the target loss value to obtain an image segmentation model.

[0164] According to one or more embodiments of this disclosure, acquiring the first image and the second image includes:

[0165] Acquire multiple first images;

[0166] For each first image, a data augmentation operation is performed on the first image to obtain the second image, wherein the data augmentation operation includes one or more of translation operation, scaling operation, rotation operation, and color adjustment operation.

[0167] According to one or more embodiments of this disclosure, the data augmentation operation on the first image includes:

[0168] Determine the image change features corresponding to adjacent video frames in the target video;

[0169] Data augmentation is performed on the first image based on the image change features.

[0170] According to one or more embodiments of this disclosure, different scales correspond to different first loss functions; the step of calculating the target loss value corresponding to the original model based on the results of the different scales includes:

[0171] The results at different scales are processed using the first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales.

[0172] The target loss value corresponding to the original model is calculated based on the loss value corresponding to the scale and the preset second loss function.

[0173] According to one or more embodiments of this disclosure, calculating the target loss value corresponding to the original model based on the loss values ​​corresponding to each scale and a preset second loss function includes:

[0174] Determine the weight information corresponding to each scale;

[0175] The target loss value corresponding to the original model is calculated based on the weight information corresponding to each scale, the loss value corresponding to each scale, and the second loss function.

[0176] According to one or more embodiments of this disclosure, the step of processing the results at different scales using a first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales includes:

[0177] For the results corresponding to different scales, the first result and the second result in the results are sampled to the same scale as the first image and the second image, respectively, to obtain the processed result;

[0178] The data of the processed results at different scales are processed by using the first loss function corresponding to different scales respectively, so as to obtain the loss value of the original model at each scale.

[0179] According to one or more embodiments of this disclosure, the step of processing the results at different scales using a first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales includes:

[0180] For different scales, data augmentation operations are performed on the first result of the results corresponding to the scale to obtain the third result;

[0181] The loss value corresponding to the scale is determined based on the first loss function corresponding to the scale, the second result, and the third result.

[0182] According to one or more embodiments of this disclosure, different scales correspond to different first loss functions; after inputting the first image and the second image into the original model to obtain results at different scales, the method further includes:

[0183] For each scale, the loss value corresponding to the scale is calculated using the first loss function corresponding to the scale and the result corresponding to the scale.

[0184] The parameters of the downsampling layers at each scale are adjusted according to the loss value at each scale until all downsampling layers of the original model reach the preset first convergence condition, thereby obtaining the image segmentation model.

[0185] According to one or more embodiments of this disclosure, adjusting the original model based on the target loss value to obtain an image segmentation model includes:

[0186] The parameters of the original model are adjusted using gradient descent based on the target loss value to obtain the adjusted original model.

[0187] The first and second images are input into the adjusted original model to obtain the fourth result output by the original model;

[0188] Based on the fourth result, determine whether the adjusted original model satisfies the preset second convergence condition;

[0189] If so, the image segmentation model is obtained;

[0190] If not, the adjusted original model is determined as the current original model, and the process returns to the step of inputting the first image and the second image into the original model to obtain results at different scales, until the original model meets the preset second convergence condition.

[0191] Secondly, according to one or more embodiments of this disclosure, a data processing method is provided, comprising:

[0192] Obtain the video to be segmented;

[0193] Obtain at least one video frame corresponding to the video to be segmented;

[0194] The video frame to be segmented is input into a preset image segmentation model to perform image segmentation operations and obtain the image segmentation result;

[0195] The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value.

[0196] Thirdly, according to one or more embodiments of the present disclosure, a data processing apparatus is provided, comprising:

[0197] The acquisition module is used to acquire a first image and a second image, wherein the second image is obtained by processing the first image;

[0198] The processing module is used to input the first image and the second image into the original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image;

[0199] The calculation module is used to calculate the target loss value corresponding to the original model based on the results at different scales;

[0200] The training module is used to adjust the original model according to the target loss value to obtain an image segmentation model.

[0201] According to one or more embodiments of this disclosure, the acquisition module is used to:

[0202] Acquire multiple first images;

[0203] For each first image, a data augmentation operation is performed on the first image to obtain the second image, wherein the data augmentation operation includes one or more of translation operation, scaling operation, rotation operation, and color adjustment operation.

[0204] According to one or more embodiments of this disclosure, the acquisition module is used for:

[0205] Determine the image change features corresponding to adjacent video frames in the target video;

[0206] Data augmentation is performed on the first image based on the image change features.

[0207] According to one or more embodiments of this disclosure, different scales correspond to different first loss functions; the processing module is used for:

[0208] The results at different scales are processed using the first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales.

[0209] The target loss value corresponding to the original model is calculated based on the loss value corresponding to the scale and the preset second loss function.

[0210] According to one or more embodiments of this disclosure, the processing module is used for:

[0211] Determine the weight information corresponding to each scale;

[0212] The target loss value corresponding to the original model is calculated based on the weight information corresponding to each scale, the loss value corresponding to each scale, and the second loss function.

[0213] According to one or more embodiments of this disclosure, the processing module is used for:

[0214] For the results corresponding to different scales, the first result and the second result in the results are sampled to the same scale as the first image and the second image, respectively, to obtain the processed result;

[0215] The data of the processed results at different scales are processed by using the first loss function corresponding to different scales respectively, so as to obtain the loss value of the original model at each scale.

[0216] According to one or more embodiments of this disclosure, the processing module is used for:

[0217] For different scales, data augmentation operations are performed on the first result of the results corresponding to the scale to obtain the third result;

[0218] The loss value corresponding to the scale is determined based on the first loss function corresponding to the scale, the second result, and the third result.

[0219] According to one or more embodiments of this disclosure, different scales correspond to different first loss functions; the apparatus further includes:

[0220] For each scale, the loss value corresponding to the scale is calculated using the first loss function corresponding to the scale and the result corresponding to the scale.

[0221] The parameters of the downsampling layers at each scale are adjusted according to the loss value at each scale until all downsampling layers of the original model reach the preset first convergence condition, thereby obtaining the image segmentation model.

[0222] According to one or more embodiments of this disclosure, the training module is used for:

[0223] The parameters of the original model are adjusted using gradient descent based on the target loss value to obtain the adjusted original model.

[0224] The first and second images are input into the adjusted original model to obtain the fourth result output by the original model;

[0225] Based on the fourth result, determine whether the adjusted original model satisfies the preset second convergence condition;

[0226] If so, the image segmentation model is obtained;

[0227] If not, the adjusted original model is determined as the current original model, and the process returns to the step of inputting the first image and the second image into the original model to obtain results at different scales, until the original model meets the preset second convergence condition.

[0228] Fourthly, according to one or more embodiments of this disclosure, a data processing apparatus is provided, comprising:

[0229] The data acquisition module is used to acquire the video to be segmented;

[0230] The frame extraction module is used to obtain at least one video frame to be segmented corresponding to the video to be segmented;

[0231] The segmentation module is used to input the video frame to be segmented into a preset image segmentation model to perform image segmentation operations and obtain image segmentation results;

[0232] The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value.

[0233] Fifthly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;

[0234] The memory stores computer-executed instructions;

[0235] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the data processing method as described in the first aspect and various possible designs of the first aspect or the second aspect and various possible designs of the second aspect.

[0236] In a sixth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, implement the data processing method described in the first aspect and various possible designs of the first aspect or the second aspect and various possible designs of the second aspect.

[0237] In a seventh aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the data processing method described in the first aspect and various possible designs of the first aspect or the second aspect and various possible designs of the second aspect.

[0238] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0239] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0240] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A data processing method, characterized in that, include: Acquire a first image and a second image, wherein the second image is obtained by processing the first image; wherein the second image is used to simulate the target object moving left or right, moving away or moving closer in the video; The first image and the second image are input into the original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image; Calculate the target loss value corresponding to the original model based on the results at different scales; The original model is adjusted based on the target loss value to obtain an image segmentation model.

2. The method according to claim 1, characterized in that, The acquisition of the first image and the second image includes: Obtain at least one first image; For the first image, a data augmentation operation is performed on the first image to obtain the second image, wherein the data augmentation operation includes one or more of the following: translation operation, scaling operation, rotation operation, and color adjustment operation.

3. The method according to claim 2, characterized in that, The data augmentation operation on the first image includes: Determine the image change features corresponding to adjacent video frames in the target video; Data augmentation is performed on the first image based on the image change features.

4. The method according to any one of claims 1-3, characterized in that, Different scales correspond to different first loss functions; the calculation of the target loss value corresponding to the original model based on the results of the different scales includes: The results at different scales are processed using the first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales. Calculate the target loss value corresponding to the original model based on the loss value corresponding to the scale.

5. The method according to claim 4, characterized in that, The step of calculating the target loss value corresponding to the original model based on the loss value corresponding to the scale includes: Determine the weight information corresponding to each scale; The target loss value corresponding to the original model is calculated based on the weight information corresponding to each scale and the loss value corresponding to each scale.

6. The method according to claim 4, characterized in that, The step of processing the results at different scales using a first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales includes: For the results corresponding to different scales, the first result in the results is sampled to the same scale as the first image, and the second result in the results is sampled to the same scale as the second image to obtain the processed result; The data of the processed results at different scales are processed by using the first loss function corresponding to different scales respectively, so as to obtain the loss value of the original model at each scale.

7. The method according to claim 4, characterized in that, The step of processing the results at different scales using a first loss function corresponding to different scales to obtain the loss values ​​of the original model at different scales includes: For different scales, data augmentation operations are performed on the first result of the results corresponding to the scale to obtain the third result; The loss value corresponding to the scale is determined based on the first loss function corresponding to the scale, the second result, and the third result.

8. The method according to any one of claims 1-3, characterized in that, Different scales correspond to different first loss functions; after inputting the first image and the second image into the original model to obtain results at different scales, the process further includes: For each scale, the loss value corresponding to the scale is calculated using the first loss function corresponding to the scale and the result corresponding to the scale. The parameters of the downsampling layers at each scale are adjusted according to the loss value at each scale until all downsampling layers of the original model reach the preset first convergence condition, thereby obtaining the image segmentation model.

9. The method according to any one of claims 1-3, characterized in that, The step of adjusting the original model based on the target loss value to obtain an image segmentation model includes: The parameters of the original model are adjusted using gradient descent based on the target loss value to obtain the adjusted original model. The first and second images are input into the adjusted original model to obtain the fourth result output by the original model; Based on the fourth result, determine whether the adjusted original model satisfies the preset second convergence condition; If so, the image segmentation model is obtained; If not, the adjusted original model is determined as the current original model, and the process returns to the step of inputting the first image and the second image into the original model to obtain results at different scales, until the original model meets the preset second convergence condition.

10. A data processing method, characterized in that, include: Obtain the video to be segmented; Obtain at least one video frame corresponding to the video to be segmented; The video frame to be segmented is input into a preset image segmentation model to perform image segmentation operations and obtain the image segmentation result; The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value. The second image is used to simulate the left and right movement, moving away from or closer to the target object in the video.

11. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire a first image and a second image, wherein the second image is obtained by processing the first image; wherein the second image is used to simulate the target object moving left or right, moving away or moving closer in the video; The processing module is used to input the first image and the second image into the original model to obtain results at different scales, wherein the results at different scales include a first result corresponding to the first image and a second result corresponding to the second image; The calculation module is used to calculate the target loss value corresponding to the original model based on the results at different scales; The training module is used to adjust the original model according to the target loss value to obtain an image segmentation model.

12. A data processing apparatus, characterized in that, include: The data acquisition module is used to acquire the video to be segmented; The frame extraction module is used to obtain at least one video frame to be segmented corresponding to the video to be segmented; The segmentation module is used to input the video frame to be segmented into a preset image segmentation model to perform image segmentation operations and obtain image segmentation results; The image segmentation model is obtained by inputting a first image and a second image into a preset original model, calculating the target loss value corresponding to the original model based on the results of different scales output by the original model, and adjusting the model parameters of the original model based on the target loss value. The second image is used to simulate the left and right movement, moving away from or closer to the target object in the video.

13. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any one of claims 1-9 or 10.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-9 or 10.

15. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-9 or 10.

Citation Information

Patent Citations

  • Image segmentation model training method and device, image segmentation method and device, equipment and medium

    CN110120047A

  • Image feature extraction model training method, image feature extraction method and device

    CN114186622A

  • Transform-based semi-supervised video target segmentation method

    CN114429607A