Image processing method, device, electronic device and storage medium
By performing multi-scale alignment and fusion of the features of the target image and the previous frame image in video instance segmentation, the problem of low accuracy in object segmentation with large scale changes is solved and more efficient video object segmentation is achieved.
Patent Information
- Application Number
- CN202110557016.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-21
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-05-21
AI Technical Summary
Existing video instance segmentation technology has low segmentation accuracy for objects with large scale changes, and cannot be effectively applied to fields such as autonomous driving and robot visual navigation.
By aligning the features of the target image and the previous frame image at multiple preset scales, using the aligned image features for image detection, and combining feature fusion and fusion weight information to improve the detection of objects with large scale changes in the video. segmentation accuracy.
The accuracy of segmentation of objects with large scale changes is significantly improved, the problem of low accuracy in the existing technology is overcome, and the efficiency of object segmentation is improved.
Smart Images

Figure CN113191316B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] Video instance segmentation is an emerging problem in the field of computer vision. Its goal is to detect, segment, and track each instance in a video. This task belongs to the category of multi-task learning and has many application areas. For example, it provides scene perception capabilities for autonomous driving and robot visual navigation, and analyzes and understands sports videos.
[0003] In existing video instance segmentation, the segmentation accuracy of objects with large scale changes is low and cannot be well applied to related application fields. Summary of the invention
[0004] The embodiments of the present disclosure at least provide an image processing method and device.
[0005] In a first aspect, an embodiment of the present disclosure provides an image processing method, including:
[0006] Determine a first image feature of a target image at each preset scale, and a second image feature of an image frame before the target image at each preset scale;
[0007] For each preset scale, based on feature point offset information between the first image feature and the second image feature at the preset scale, feature alignment processing is performed on the first image feature and the second image feature to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature;
[0008] An object segmentation result of the target image is determined based on the first aligned image features and the second aligned image features at each preset scale.
[0009] In this aspect, the image features of the target image at multiple preset scales are aligned with the image features of a frame image before the target image at a preset scale, and then the first aligned image features and the second aligned image features after the feature alignment are used to perform image detection. The image features of the frame image before the target image can be used to supplement and strengthen the image features of the target image, thereby improving the segmentation accuracy of objects with large scale changes in the video.
[0010] In an optional implementation, determining the object segmentation result of the target image based on the first aligned image feature and the second aligned image feature at each preset scale includes:
[0011] For each preset scale, based on the first aligned image features and the second aligned image features at the preset scale, determining a fused image feature at the preset scale;
[0012] Based on the fused image features at each preset scale, an object segmentation result of the target image is determined.
[0013] In this implementation, the first aligned image features and the second aligned image features after feature alignment are feature-fused, which can strengthen the image features of the feature points that match in the first aligned image features and the second aligned image features; and then the fused image features are used to perform image detection, which can effectively use the image features of a frame of image before the target image to supplement and strengthen the image features of the target image, thereby improving the segmentation accuracy of objects with large scale changes in the video.
[0014] In an optional implementation, determining the object segmentation result of the target image based on the fused image features at each preset scale includes:
[0015] For each preset scale, based on the fused image feature at the preset scale and the second image feature at the preset scale, determine a target fused feature at the preset scale;
[0016] Based on the target fusion features at each preset scale, an object segmentation result of the target image is determined.
[0017] This implementation further fuses the second image features corresponding to a frame of image before the target image on the basis of the fused and aligned first aligned image features and the second aligned image features, so that the image features of the feature points with low confidence in the fused image features can be fused and enhanced by using the image features in the frame of image before the target image. The fused image features contain more corresponding image features in the frame of image before the target image, and the confidence of the corresponding feature points is improved, thereby overcoming the defect of low segmentation accuracy for objects with large scale changes in the video.
[0018] In an optional implementation, for each preset scale, determining the target fusion feature at the preset scale based on the fusion image feature at the preset scale and the second image feature at the preset scale includes:
[0019] For each preset scale, determining fusion weight information between the fused image feature and the second image feature at the preset scale;
[0020] The fusion weight information is used to fuse the fused image features and the second image features at the preset scale to obtain the target fusion features at the preset scale.
[0021] In this embodiment, the weight of the feature point with lower confidence in the fused image feature in the fusion weight information is larger. In this way, when the above-mentioned fused image feature and the second image feature are fused using the fusion weight information, it is possible to fuse and enhance the image features of the feature point with lower confidence in the fused image feature using the image features in a frame image before the target image.
[0022] In an optional implementation, determining the object segmentation result of the target image based on the target fusion features at each preset scale includes:
[0023] Acquire the detection fusion depth information corresponding to each preset scale; wherein the preset scale is negatively correlated with the value of the detection fusion depth information; and the preset scale corresponds to the preset resolution of the corresponding feature map;
[0024] According to the acquired detection fusion depth information, feature fusion is performed on the target fusion features at the corresponding preset scales to obtain the final target fusion features at each preset scale;
[0025] Based on the final target fusion features at each preset scale, an object segmentation result of the target image is determined.
[0026] In this implementation, as the preset resolution decreases, the fusion depth corresponding to the detected fusion depth information increases, and the fused image features increase, that is, image features with a larger preset resolution are fused less, and image features with a smaller preset resolution that are insensitive to object scale changes are fused more. This can weaken the impact of object scale changes on image features, thereby improving the segmentation accuracy of objects with large scale changes in the video, and at the same time can reduce the amount of information that needs to be processed, thereby improving object segmentation efficiency.
[0027] In an optional implementation, for each preset scale, determining the fused image feature at the preset scale based on the first aligned image feature and the second aligned image feature at the preset scale includes:
[0028] For each preset scale, based on the first aligned image feature at the preset scale, determining a first latent feature corresponding to the first aligned image feature, and based on the second aligned image feature at the preset scale, determining a second latent feature corresponding to the second aligned image feature;
[0029] Based on the first latent feature, the second latent feature, the first aligned image feature, and the second aligned image feature, a fused image feature at the preset scale is determined.
[0030] In this implementation, the first aligned image features and the second aligned image features after feature alignment are feature-fused, which can strengthen the image features of the feature points that match in the first aligned image features and the second aligned image features; on this basis, the first latent features corresponding to the first aligned image features and the second latent features corresponding to the second aligned image features are fused, which can make the fused image features more complete and accurate, thereby improving the accuracy of object segmentation.
[0031] In an optional implementation, determining the fused image feature at the preset scale based on the first latent feature, the second latent feature, the first aligned image feature, and the second aligned image feature includes:
[0032] Determine a first sub-fusion feature corresponding to the first aligned image feature based on the first latent feature, the first aligned image feature, and the second aligned image feature;
[0033] Determine a second sub-fusion feature corresponding to the first aligned image feature based on the second latent feature, the first aligned image feature, and the second aligned image feature;
[0034] Based on the first sub-fusion feature and the second sub-fusion feature, a fusion image feature at the preset scale is determined.
[0035] In this implementation, based on the feature fusion of the first aligned image feature and the second aligned image feature, the first latent feature is fused, so that the obtained first sub-fusion feature can strengthen the latent image feature in the target image; based on the feature fusion of the first aligned image feature and the second aligned image feature, the second latent feature is fused, so that the obtained second sub-fusion feature can strengthen the latent image feature in a frame image before the target image; and the first sub-fusion feature and the second sub-fusion feature are further fused, so that the fused image feature obtained by fusion can be more complete and accurate.
[0036] In an optional implementation, the feature point offset information includes first position offset information and second position offset information;
[0037] The performing feature alignment processing on the first image feature and the second image feature respectively to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature includes:
[0038] Performing feature space alignment processing on the first image feature by using the first position offset information to obtain a first aligned image feature corresponding to the first image feature;
[0039] The second image feature is aligned in feature space using the second position offset information to obtain a second aligned image feature corresponding to the second image feature.
[0040] In this implementation, the first position offset information and the second position offset information are used to perform spatial alignment processing on feature points of the first image feature and the second image feature respectively, which can improve the accuracy of subsequent feature fusion, thereby improving the accuracy of object segmentation in the video.
[0041] In an optional implementation, the feature point offset information is determined by the following steps:
[0042] For each preset scale, the first image feature and the second image feature at the preset scale are spliced to obtain a spliced image feature;
[0043] Based on the stitched image feature, feature point offset information between the first image feature and the second image feature at the preset scale is determined.
[0044] In this implementation, the first image feature and the second image feature are spliced together, and deep learning is performed based on the spliced image features, so that the position offset information between the feature points between the first image feature and the second image feature, that is, the above-mentioned feature point offset information, can be determined more accurately.
[0045] In an optional implementation, determining a second image feature of an image frame before the target image at each preset scale includes:
[0046] Determine the initial image features of a frame of image before the target image at each preset scale;
[0047] Determine feature fusion depth information of each second image feature at each preset scale;
[0048] Based on the initial image features at each preset scale, the feature fusion depth information of each second image feature, and the first image features at each preset scale, the second image features at each preset scale are determined.
[0049] In this implementation, according to the feature fusion depth information of each second image feature, feature fusion is performed based on the initial image feature at each preset scale and the first image feature at each preset scale, so that the obtained second image feature can fuse image features at different scales, thereby improving the information integrity of the second image feature, which is beneficial to improving the segmentation accuracy of the object.
[0050] In a second aspect, an embodiment of the present disclosure provides an image processing device, including:
[0051] A feature extraction module, used to determine a first image feature of a target image at each preset scale, and a second image feature of an image frame before the target image at each preset scale;
[0052] a feature processing module, configured to perform feature alignment processing on the first image feature and the second image feature respectively for each preset scale based on feature point offset information between the first image feature and the second image feature at the preset scale, so as to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature;
[0053] The image processing module is used to determine the object segmentation result of the target image based on the first aligned image features and the second aligned image features at each preset scale.
[0054] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.
[0055] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.
[0056] For a description of the effects of the above-mentioned image processing device, electronic device, and computer-readable storage medium, please refer to the description of the above-mentioned image processing method, which will not be repeated here.
[0057] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0059] Figure 1A flowchart of an image processing method provided by an embodiment of the present disclosure is shown;
[0060] Figure 2 A flow chart showing the fusion of first aligned image features and second aligned image features at each preset scale in another image processing method provided by an embodiment of the present disclosure is shown;
[0061] Figure 3a One of the image feature fusion flow charts provided by the embodiment of the present disclosure is shown;
[0062] Figure 3b The second image feature fusion flow chart provided by the embodiment of the present disclosure is shown;
[0063] Figure 4 A flowchart of neural network training provided by an embodiment of the present disclosure is shown;
[0064] Figure 5 A schematic diagram of an image processing device provided by an embodiment of the present disclosure is shown;
[0065] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0067] Research has found that in the existing video instance segmentation, the segmentation accuracy of objects with large scale changes is low, and there are few video datasets with large scale changes of objects, which is not conducive to training related neural network models. Therefore, improving the segmentation accuracy of objects with large scale changes in videos has become a technical problem that needs to be solved urgently.
[0068] The above defects are all the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0069] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0070] In response to the above technical problems, the present disclosure provides an image processing method, device, electronic device and storage medium. The present disclosure performs feature alignment processing on the image features of a target image in a video at multiple preset scales and the image features of a frame image before the target image at a preset scale, and then uses the first aligned image features and the second aligned image features after the feature alignment to perform image detection. The image features of the frame image before the target image can be used to supplement and strengthen the image features of the target image, thereby improving the segmentation accuracy of objects with large scale changes in the video.
[0071] The image processing method provided by the embodiment of the present disclosure is described below by taking an execution subject as a device with computing capabilities as an example.
[0072] like Figure 1 As shown, the image processing method provided by the present disclosure comprises the following steps:
[0073] S110, determining a first image feature of a target image at each preset scale, and a second image feature of an image frame preceding the target image at each preset scale.
[0074] The first image feature includes image feature information of the target image at a preset scale, which can be specifically expressed in the form of a feature map, that is, each preset scale corresponds to a first feature map. Similarly, the second image feature includes image feature information of a frame of image before the target image at a preset scale, which can be specifically expressed in the form of a feature map, that is, each preset scale corresponds to a second feature map. The frame of image before the target image can be a previous frame of image of the target image.
[0075] The above preset scale corresponds to the preset resolution of the feature map. The larger the preset scale, the larger the preset resolution. The larger the preset resolution, the corresponding feature map includes more fine-grained image features. Extracting image features of different scales and performing object segmentation based on image features of different scales can obtain more accurate object segmentation results, that is, the following object segmentation results.
[0076] The above-mentioned target image and the frame image before the target image are two adjacent frames of images in a certain section of the video to be processed. Of course, it is not limited to two adjacent frames of images, and can be two frames of images with close shooting time. Before performing this step, it is necessary to first obtain the video to be processed, and then perform the image processing method provided by the present disclosure on two adjacent frames of images or two frames of images with close shooting time in the video to be processed to obtain the object segmentation result of the target image.
[0077] After determining the target image and the frame of image before the target image, the trained neural network model can be used to extract the image features corresponding to different preset scales of the two frames of image. After that, the image features directly extracted can be used as the first image features and the second image features corresponding to different preset scales, or the image features obtained can be fused according to the preset scale and the preset feature fusion depth to obtain the first image features and the second image features corresponding to the different preset scales.
[0078] S120. For each preset scale, based on feature point offset information between the first image feature and the second image feature at the preset scale, perform feature alignment processing on the first image feature and the second image feature, respectively, to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature.
[0079] The feature point offset information includes the offset information of the feature point position between the first image feature and the second image feature. The feature point offset information can be used to align the first image feature and the second image feature on different images in space. Since the camera and the object are moving during video shooting, the image features are not aligned. Therefore, aligning the image features and using the aligned image features to perform object segmentation can improve the accuracy of object segmentation.
[0080] Before executing this step, it is necessary to use a deep learning method to learn feature point offset information between the first image feature and the second image feature at each preset scale.
[0081] When feature point offset information is used to perform feature alignment processing on the first image feature and the second image feature respectively, this can be achieved by using a network structure including deformable convolution.
[0082] S130: Determine an object segmentation result of the target image based on the first aligned image features and the second aligned image features at each preset scale.
[0083] The above object segmentation result may include object detection frames of each object in the target image, position information of each object detection frame, and confidence level of each object detection frame.
[0084] Here, the first aligned image features and the second aligned image features at each preset scale can be fused respectively, and then the object segmentation can be performed according to the fused image features. Specifically, the following steps can be used: first, for each preset scale, based on the first aligned image features and the second aligned image features at the preset scale, the fused image features at the preset scale are determined; then, based on the fused image features at each preset scale, the object segmentation result of the target image is determined.
[0085] The feature fusion of the first aligned image features and the second aligned image features after feature alignment can be specifically implemented using a convolutional neural network, which is pre-trained and can enhance the image features of the feature points that match in the first aligned image features and the second aligned image features.
[0086] In the above embodiment, the image features of the target image at multiple preset scales are aligned with the image features of a frame image before the target image at a preset scale, and then the first aligned image features and the second aligned image features after the feature alignment are fused, which can enhance the image features of the feature points that match in the first aligned image features and the second aligned image features; and then the fused image features are used to perform image detection, which can effectively utilize the image features of the frame image before the target image to supplement and enhance the image features of the target image, thereby improving the segmentation accuracy of objects with large scale changes in the video.
[0087] In some embodiments, Figure 2 As shown, the first aligned image features and the second aligned image features at each preset scale can be fused using the following steps:
[0088] S210. For each preset scale, determine a first latent feature corresponding to the first aligned image feature based on the first aligned image feature at the preset scale, and determine a second latent feature corresponding to the second aligned image feature based on the second aligned image feature at the preset scale.
[0089] Before performing this step, it is necessary to determine the first latent feature and the second latent feature for each preset scale. In a specific implementation, for a preset scale, a convolution operation or a mapping operation similar to a convolution operation can be performed on the first aligned image feature at the preset scale to determine the first latent feature corresponding to the first aligned image feature. The first latent feature includes an image feature in a hidden state in the target image.
[0090] Similarly, a convolution operation or a mapping operation similar to the convolution operation can be performed on the second aligned image feature at the preset scale to determine the second latent feature corresponding to the second aligned image feature. The second latent feature includes an image feature in a hidden state in a frame of image before the target image.
[0091] S220: Determine a fused image feature at the preset scale based on the first latent feature, the second latent feature, the first aligned image feature, and the second aligned image feature.
[0092] By fusing the first aligned image features and the second aligned image features after feature alignment, the image features of the feature points that match in the first aligned image features and the second aligned image features can be strengthened; on this basis, by fusing the first latent features corresponding to the first aligned image features and the second latent features corresponding to the second aligned image features, the fused image features can be made more complete and accurate, thereby improving the accuracy of object segmentation.
[0093] Exemplarily, the feature fusion processing in step S220 above may be implemented using the following sub-steps to obtain fused image features:
[0094] Sub-step 1: determining a first sub-fusion feature corresponding to the first aligned image feature based on the first latent feature, the first aligned image feature and the second aligned image feature.
[0095] Exemplarily, as shown in the following formula (1), a Cat operation may be first performed on the first aligned image feature and the second aligned image feature, that is, the image features in the same channel in the first aligned image and the second aligned image are fused; then, a Gate operation is performed on the image feature obtained by the Cat operation, for example, a convolution operation is performed on the image feature obtained by the Cat operation; then, a dot product operation is performed on the image feature obtained by the Gate operation and the first latent feature to obtain a first sub-fusion feature.
[0096] Sub-step two: determining a second sub-fusion feature corresponding to the first aligned image feature based on the second latent feature, the first aligned image feature and the second aligned image feature.
[0097] Exemplarily, as shown in the following formula (1), the first aligned image feature and the second aligned image feature can be first subjected to a Cat operation, that is, the image features in the same channel of the first aligned image and the second aligned image are fused; then, a Gate operation is performed on the image feature obtained by the Cat operation, for example, a convolution operation is performed on the image feature obtained by the Cat operation; then, a dot product operation is performed on the image feature obtained by the Gate operation and the second latent feature to obtain a second sub-fusion feature.
[0098]
[0099] In the formula, represents the first aligned image feature, represents the second aligned image feature, s represents the preset scale, r represents the target image, q represents the image frame before the target image, and H s i represents the first latent feature or the second latent feature; Y s i , Indicates the first sub-fusion feature or the second sub-fusion feature.
[0100] Sub-step three: determining the fused image features at the preset scale based on the first sub-fusion features and the second sub-fusion features.
[0101] Exemplarily, a convolution operation may be performed on the first sub-fusion feature and the second sub-fusion feature to obtain the above-mentioned fused image feature.
[0102] like Figure 3b As shown in the figure, the inner Gates include the two Gate operations for obtaining the first sub-fusion feature and the second sub-fusion feature. In the process of fusing the above fusion image features, the image features of the feature points that match the first aligned image features and the second aligned image features are enhanced. This effect is due to the convolution operation in the Gate operation. The corresponding neural network is obtained through training and has the function of enhancing the image features of the feature points that match the first aligned image features and the second aligned image features.
[0103] Based on the feature fusion of the first aligned image feature and the second aligned image feature, the first latent feature is fused, so that the obtained first sub-fusion feature can strengthen the latent image feature in the target image; based on the feature fusion of the first aligned image feature and the second aligned image feature, the second latent feature is fused, so that the obtained second sub-fusion feature can strengthen the latent image feature in the frame image before the target image; and the first sub-fusion feature and the second sub-fusion feature are fused again, so that the fused image feature obtained by fusion can be more complete and accurate.
[0104] Based on the description of the above embodiment, it can be known that for a certain preset scale, a convolution operation or a mapping operation similar to a convolution operation can be performed on the first aligned image feature on the preset scale to determine the first latent feature corresponding to the first aligned image feature. The first latent feature here can be regarded as a dimensionality reduction feature corresponding to the first aligned image feature, and is not the first aligned image feature itself, that is, it is not an intuitive feature, but a feature in a hidden state relative to the first aligned image feature. Similarly, the second latent feature can be obtained using a similar method. The second latent feature here can be regarded as a dimensionality reduction feature corresponding to the second aligned image feature, and is not the second aligned image feature itself, that is, it is not an intuitive feature, but a feature in a hidden state relative to the second aligned image feature.
[0105] In some embodiments, after obtaining the fused image features, the object segmentation result of the target image may be determined based on the fused image features at each preset scale using the following steps:
[0106] First, for each preset scale, based on the fused image features at the preset scale and the second image features at the preset scale, the target fusion features at the preset scale are determined; then, based on the target fusion features at each preset scale, the object segmentation result of the target image is determined.
[0107] On the basis of the fused aligned first aligned image features and the second aligned image features, the second image features corresponding to the frame image before the target image are further fused. The goal is to use the image features in the frame image before the target image to fuse and strengthen the image features of the feature points with low confidence in the fused image features. The fused image features contain more corresponding image features in the frame image before the target image, and the confidence of the corresponding feature points is improved, thereby overcoming the defect of low segmentation accuracy of objects with large scale changes in the video.
[0108] Exemplarily, the following method can be used to realize the image features of the feature points with low confidence in the above-mentioned enhanced fusion image features:
[0109] First, for each preset scale, based on the second image features and fused image features corresponding to the preset scale, the fusion weight information corresponding to the preset scale is determined. In the fusion weight information, the weight corresponding to the feature points with lower confidence in the fused image features is larger. In a specific implementation, the second image features and the fused image features can be processed by a trained neural network to obtain the above fusion weight information. The neural network is pre-trained and has the function of setting the weights of the feature points with lower confidence in the fused image features to larger values.
[0110] Afterwards, the fusion weight information is used to perform fusion processing on the fused image feature and the second image feature at the preset scale to obtain the target fusion feature at the preset scale.
[0111] The weight of the feature points with lower confidence in the fused image features in the fusion weight information is larger. In this way, when the above-mentioned fused image features and the second image features are fused using the fusion weight information, the image features of the feature points with lower confidence in the fused image features can be fused and enhanced using the image features in a frame image before the target image.
[0112] For example, the feature fusion operation can be performed using the following formula (2) to obtain the target fusion feature:
[0113]
[0114] In the formula, represents the second image feature, Gs represents the fusion weight information, represents the fused image features, Represents the target fusion feature.
[0115] For example, Figure 3b As shown, the Outer Gate operation can be used to achieve the above The corresponding operation. s r Represents the first image feature.
[0116] In some embodiments, after obtaining the target fusion feature, the object segmentation result of the target image can be determined based on the target fusion feature at each preset scale using the following steps:
[0117] First, the detection fusion depth information corresponding to each preset scale is obtained; wherein the preset scale is negatively correlated with the value of the detection fusion depth information; and the preset scale is related to the preset resolution of the corresponding feature map.
[0118] The detection fusion depth information is used to characterize the number of times the target fusion feature needs to be fused after the target fusion feature is obtained for the first time and before the final target fusion feature is obtained. According to the description of the above embodiment, the larger the preset scale, the smaller the value of the detection fusion depth information, that is, the larger the preset scale, the fewer times the target fusion feature on the corresponding scale needs to be fused. Figure 3a As shown, P3, P4, P5, P6, and P7 represent preset scales, and the corresponding preset scales decrease in sequence. Figure 3aAs shown in FIG. 1 , the number of times the maximum preset scale P3 performs image feature fusion after obtaining the target fusion feature is less than the number of times the preset scale P4 performs image feature fusion after obtaining the target fusion feature, wherein the final target fusion feature X corresponding to the maximum preset scale P3 8 f , the final target fusion feature X corresponding to the preset scale P4 16 f The number of times the preset scale P5 performs image feature fusion after obtaining the target fusion feature is less than the number of times the preset scale P6 performs image feature fusion after obtaining the target fusion feature, wherein the final target fusion feature X corresponding to the preset scale P5 32 f , the final target fusion feature X corresponding to the preset scale P6 64 f .
[0119] As the preset scale decreases, the fused image features gradually decrease. Figure 3a The height of the frame 301 in FIG. 3 is gradually reduced.
[0120] Figure 3a Where r represents the target image, q represents the frame image before the target image, and X 8 r , X 16 r , X 32 r , X 63 r , X 128 r Represents the first image features of the target image at different preset scales. 8 q , X 16 q , X 32 q , X 63 q , X 128 q It represents the initial image features of an image frame before the target image at different preset scales or the second image features of an image frame before the target image at different preset scales.
[0121] Afterwards, according to the acquired detection fusion depth information, feature fusion is performed on the target fusion features at the corresponding preset scales to obtain the final target fusion features at each preset scale.
[0122] According to the number of fusions corresponding to the detection fusion depth information, the target fusion features at different preset scales are fused respectively to obtain the final target fusion features at different preset scales.
[0123] Finally, based on the final target fusion features at each preset scale, the object segmentation result of the target image is determined.
[0124] Exemplarily, the final target fusion features at each preset scale are sent to a trained neural network, which performs object segmentation processing.
[0125] In the above embodiment, as the preset resolution decreases, the fusion depth value corresponding to the detected fusion depth information increases, the number of fusions increases, and the fused image features increase, that is, fewer image features with a larger preset resolution are fused, and more image features with a smaller preset resolution that are insensitive to object scale changes are fused. This can weaken the impact of object scale changes on image features, thereby improving the segmentation accuracy of objects with large scale changes in the video, while also reducing the amount of information that needs to be processed and improving object segmentation efficiency.
[0126] In some embodiments, Figure 3b As shown, the above feature point offset information includes the first position offset information O s r and the second position offset information O s q .
[0127] When performing feature alignment processing on the first image feature and the second image feature to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature, the following steps can be used to implement the process:
[0128] The first image feature is aligned in feature space using the first position offset information to obtain a first aligned image feature corresponding to the first image feature; the second image feature is aligned in feature space using the second position offset information to obtain a second aligned image feature corresponding to the second image feature.
[0129] Exemplarily, a trained deformable convolutional network can be used to process the first position offset information and the first image feature to obtain a first aligned image feature corresponding to the first image feature. A trained deformable convolutional network can be used to process the second position offset information and the second image feature to obtain a second aligned image feature corresponding to the second image feature.
[0130] like Figure 3b As shown, D in the figure represents the deformable convolutional network D trained above.
[0131] Exemplarily, the second alignment image feature may be calculated using the following formula:
[0132]
[0133] In the formula, p n represents the position of feature point i in the second image feature, represents the position offset information of feature point i, W (pn) represents the weight corresponding to feature point i, and R represents all feature points corresponding to the second image feature.
[0134] Similarly, the above-mentioned first aligned image features can be calculated, which will not be described in detail here.
[0135] Using the first position offset information and the second position offset information to perform spatial alignment processing on feature points of the first image feature and the second image feature respectively can improve the accuracy of subsequent feature fusion, thereby improving the accuracy of object segmentation in the video.
[0136] In some embodiments, feature point offset information corresponding to a preset scale may be determined as follows:
[0137] First, the first image feature and the second image feature at the preset scale are spliced to obtain a spliced image feature; then, based on the spliced image feature, feature point offset information between the first image feature and the second image feature at the preset scale is determined.
[0138] For example, Figure 3b As shown, the first image feature and the second image feature can be concatenated using the Concatenation operation represented by C to obtain the above-mentioned concatenated image feature. Afterwards, the concatenated image feature is processed using the trained convolutional neural network Conv to obtain feature point offset information between the first image feature and the second image feature at the preset scale.
[0139] The above-mentioned splicing of the first image feature and the second image feature and performing deep learning based on the spliced image features can more accurately determine the position offset information between the feature points between the first image feature and the second image feature, that is, the above-mentioned feature point offset information.
[0140] According to the above description, the initial image features extracted from the frame of image before the target image can be directly used as the second image features, or the directly extracted image features can be fused to obtain the second image features at each preset scale. The following describes how to obtain the second image features by fusion.
[0141] First, the initial image features at each preset scale are extracted from an image frame before the target image.
[0142] Here, the trained neural network can be used to extract the initial image features of the frame image before the target image.
[0143] Afterwards, feature fusion depth information of each second image feature at each preset scale is determined.
[0144] The feature fusion depth information is used to characterize the number of times the initial image feature needs to be fused before the feature alignment process is performed with the first image feature, such as Figure 3a As shown, the initial image features corresponding to the preset scales P4, P5, P6, and P7 need to be fused multiple times before being aligned with the first image features, and the number of fusions increases as the preset scale decreases. For example, the number of feature fusions required for the initial image features corresponding to the preset scale P4 before being aligned with the first image features is less than the number of feature fusions required for the initial image features corresponding to the preset scale P5 before being aligned with the first image features.
[0145] Finally, based on the initial image features at each preset scale, the feature fusion depth information of each second image feature, and the first image features at each preset scale, the second image features at each preset scale are determined.
[0146] According to Figure 3a The network structure shown can obtain the second image features at each preset scale respectively after fusing the initial image features at each preset scale and the first image features at each preset scale by the number of fusions corresponding to the feature fusion depth information. After that, the second image features are aligned with the first image features.
[0147] like Figure 3a In FIG. 3 , circle 302 represents the node corresponding to the target fusion feature, circle 303 represents the identification node, and circle 304 represents the node after general image feature fusion.
[0148] The above-mentioned feature fusion depth information according to each second image feature, and feature fusion based on the initial image feature at each preset scale and the first image feature at each preset scale, can enable the obtained second image feature to fuse image features at different scales, thereby improving the information integrity of the second image feature, which is beneficial to improving the segmentation accuracy of the object.
[0149] According to the above embodiment, the inner gates are used to fuse the most similar and matching parts of the image features in the two frames, and the outer gate is used to control the fusion of the matching parts and the features of the target image, thereby realizing a more sparse propagation of information in temporal (time series), effectively suppressing background noise, improving object segmentation accuracy, and being well adapted to the segmentation of objects with large scale changes.
[0150] In the above embodiment, the extraction of image features from the target image and the image frame before the target image to obtain the final target fusion feature can be regarded as being realized by a larger neural network. Or in other application scenarios, such as in the object segmentation scenario, the extraction of image features from the target image and the image frame before the target image to obtain the object segmentation result can be regarded as being realized by a larger neural network. Then, in the application, it is necessary to train this large neural network 401, such as Figure 4 As shown, training can be performed as follows:
[0151] Step 1: obtain a sample image and a frame image before the sample image, use a feature extractor to extract image features corresponding to different preset scales, and based on the extracted image features, determine a plurality of first sample image features corresponding to different preset scales of the sample image, and a plurality of second sample image features corresponding to different preset scales of the frame image before the sample image.
[0152] Step 2: In an application scenario where only the target fusion feature needs to be determined, the predicted target fusion feature is determined using the same method as in the above embodiment, and then the loss is determined based on the predicted target fusion feature and the standard target fusion feature, and the large neural network is trained based on the determined loss.
[0153] In an application scenario where object segmentation is required, the predicted target fusion features are determined using the same method as in the above embodiment, and the predicted object segmentation result is determined based on the predicted target fusion features. Then, the loss is determined based on the predicted object segmentation result and the standard object segmentation result, and the large neural network is trained based on the determined loss.
[0154] like Figure 4 As shown, the above training method can also be used in tasks such as object classification, target detection, and object tracking, and corresponding losses are also required to train the model.
[0155] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0156] Based on the same inventive concept, an image processing device corresponding to the image processing method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned image processing method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method.
[0157] like Figure 5 FIG. 1 is a schematic diagram of the architecture of an image processing device provided by an embodiment of the present disclosure, including:
[0158] A feature extraction module 510 is used to determine a first image feature of a target image at each preset scale, and a second image feature of an image frame before the target image at each preset scale;
[0159] The feature processing module 520 is used to perform feature alignment processing on the first image feature and the second image feature at each preset scale based on feature point offset information between the first image feature and the second image feature at the preset scale, to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature;
[0160] The image processing module 530 is used to determine the object segmentation result of the target image based on the first aligned image features and the second aligned image features at each preset scale.
[0161] In some embodiments, when determining the object segmentation result of the target image based on the first aligned image features and the second aligned image features at each preset scale, the image processing module 530 is configured to:
[0162] For each preset scale, based on the first aligned image features and the second aligned image features at the preset scale, determining a fused image feature at the preset scale;
[0163] Based on the fused image features at each preset scale, an object segmentation result of the target image is determined.
[0164] In some embodiments, when determining the object segmentation result of the target image based on the fused image features at each preset scale, the image processing module 530 is used to:
[0165] For each preset scale, based on the fused image feature at the preset scale and the second image feature at the preset scale, determine a target fused feature at the preset scale;
[0166] Based on the target fusion features at each preset scale, an object segmentation result of the target image is determined.
[0167] In some embodiments, when determining the target fusion feature at each preset scale based on the fusion image feature at the preset scale and the second image feature at the preset scale, the image processing module 530 is configured to:
[0168] For each preset scale, determining fusion weight information between the fused image feature and the second image feature at the preset scale;
[0169] The fusion weight information is used to fuse the fused image features and the second image features at the preset scale to obtain the target fusion features at the preset scale.
[0170] In some embodiments, when determining the object segmentation result of the target image based on the target fusion features at each preset scale, the image processing module 530 is used to:
[0171] Acquire the detection fusion depth information corresponding to each preset scale; wherein the preset scale is negatively correlated with the value of the detection fusion depth information; and the preset scale corresponds to the preset resolution of the corresponding feature map;
[0172] According to the acquired detection fusion depth information, feature fusion is performed on the target fusion features at the corresponding preset scales to obtain the final target fusion features at each preset scale;
[0173] Based on the final target fusion features at each preset scale, an object segmentation result of the target image is determined.
[0174] In some embodiments, when determining the fused image feature at each preset scale based on the first aligned image feature and the second aligned image feature at the preset scale, the image processing module 530 is configured to:
[0175] For each preset scale, based on the first aligned image feature at the preset scale, determining a first latent feature corresponding to the first aligned image feature, and based on the second aligned image feature at the preset scale, determining a second latent feature corresponding to the second aligned image feature;
[0176] Based on the first latent feature, the second latent feature, the first aligned image feature, and the second aligned image feature, a fused image feature at the preset scale is determined.
[0177] In some embodiments, when determining the fused image feature at the preset scale based on the first latent feature, the second latent feature, the first aligned image feature, and the second aligned image feature, the image processing module 530 is used to:
[0178] Determine a first sub-fusion feature corresponding to the first aligned image feature based on the first latent feature, the first aligned image feature, and the second aligned image feature;
[0179] Determine a second sub-fusion feature corresponding to the first aligned image feature based on the second latent feature, the first aligned image feature, and the second aligned image feature;
[0180] Based on the first sub-fusion feature and the second sub-fusion feature, a fusion image feature at the preset scale is determined.
[0181] In some embodiments, the feature point offset information includes first position offset information and second position offset information;
[0182] When the feature processing module 520 performs feature alignment processing on the first image feature and the second image feature respectively to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature, the feature processing module 520 is used to:
[0183] Performing feature space alignment processing on the first image feature by using the first position offset information to obtain a first aligned image feature corresponding to the first image feature;
[0184] The second image feature is aligned in feature space using the second position offset information to obtain a second aligned image feature corresponding to the second image feature.
[0185] In some embodiments, the feature processing module 520 is used to determine the feature point offset information by using the following steps:
[0186] For each preset scale, the first image feature and the second image feature at the preset scale are spliced to obtain a spliced image feature;
[0187] Based on the stitched image feature, feature point offset information between the first image feature and the second image feature at the preset scale is determined.
[0188] In some embodiments, when determining the second image feature of an image frame before the target image at each preset scale, the feature extraction module 510 is used to:
[0189] Determine the initial image features of a frame of image before the target image at each preset scale;
[0190] Determine feature fusion depth information of each second image feature at each preset scale;
[0191] Based on the initial image features at each preset scale, the feature fusion depth information of each second image feature, and the first image features at each preset scale, the second image features at each preset scale are determined.
[0192] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0193] Based on the same technical concept, the embodiment of the present disclosure also provides an electronic device. Figure 6 As shown, it is a schematic diagram of the structure of the electronic device 600 provided in the embodiment of the present disclosure, including a processor 61, a memory 62, and a bus 63. Among them, the memory 62 is used to store execution instructions, including a memory 621 and an external memory 622; the memory 621 here is also called an internal memory, which is used to temporarily store the operation data in the processor 61, and the data exchanged with the external memory 622 such as a hard disk. The processor 61 exchanges data with the external memory 622 through the memory 621. When the electronic device 600 is running, the processor 61 communicates with the memory 62 through the bus 63, so that the processor 61 executes the following instructions:
[0194] Determine a first image feature of a target image at each preset scale, and a second image feature of an image frame before the target image at each preset scale;
[0195] For each preset scale, based on feature point offset information between the first image feature and the second image feature at the preset scale, feature alignment processing is performed on the first image feature and the second image feature to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature;
[0196] An object segmentation result of the target image is determined based on the first aligned image features and the second aligned image features at each preset scale.
[0197] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0198] The computer program product of the image processing method provided in the embodiments of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the image processing method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0199] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0200] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0201] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0202] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0203] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0204] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. An image processing method, characterized in that: include: Determine a first image feature of a target image at each preset scale, and a second image feature of an image frame before the target image at each preset scale; For each preset scale, based on feature point offset information between the first image feature and the second image feature at the preset scale, feature alignment processing is performed on the first image feature and the second image feature to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature; Determine an object segmentation result of the target image based on the first aligned image features and the second aligned image features at each preset scale; The determining the object segmentation result of the target image based on the first aligned image feature and the second aligned image feature at each preset scale includes: For each preset scale, based on the first aligned image feature at the preset scale, determining a first latent feature corresponding to the first aligned image feature, and based on the second aligned image feature at the preset scale, determining a second latent feature corresponding to the second aligned image feature; Using the following formula, a Cat operation is performed on the first aligned image feature and the second aligned image feature, a Gate operation is performed on the image feature obtained by the Cat operation, and a dot product operation is performed on the image feature obtained by the Gate operation and the first latent feature to obtain a first sub-fusion feature; Using the following formula, a Cat operation is performed on the first aligned image feature and the second aligned image feature, a Gate operation is performed on the image feature obtained by the Cat operation, and a dot product operation is performed on the image feature obtained by the Gate operation and the second latent feature to obtain a second sub-fusion feature; in, represents the first aligned image feature, represents the second aligned image feature, s represents the preset scale, r represents the target image, q represents the image frame before the target image, represents the first latent feature or the second latent feature; , Indicates the first sub-fusion feature or the second sub-fusion feature; Determining a fused image feature at the preset scale based on the first sub-fusion feature and the second sub-fusion feature; Based on the fused image features at each preset scale, an object segmentation result of the target image is determined.
2. The image processing method according to claim 1, characterized in that: The determining the object segmentation result of the target image based on the fused image features at each preset scale includes: For each preset scale, based on the fused image feature at the preset scale and the second image feature at the preset scale, determine a target fused feature at the preset scale; Based on the target fusion features at each preset scale, an object segmentation result of the target image is determined.
3. The image processing method according to claim 1 or 2, characterized in that: The step of determining, for each preset scale, a target fusion feature at the preset scale based on the fusion image feature at the preset scale and the second image feature at the preset scale includes: For each preset scale, determining fusion weight information between the fused image feature and the second image feature at the preset scale; The fusion weight information is used to fuse the fused image features and the second image features at the preset scale to obtain the target fusion features at the preset scale.
4. The image processing method according to claim 1 or 2, characterized in that: The determining the object segmentation result of the target image based on the target fusion features at each preset scale includes: Acquire the detection fusion depth information corresponding to each preset scale; wherein the preset scale is negatively correlated with the value of the detection fusion depth information; and the preset scale corresponds to the preset resolution of the corresponding feature map; According to the acquired detection fusion depth information, feature fusion is performed on the target fusion features at the corresponding preset scales to obtain the final target fusion features at each preset scale; Based on the final target fusion features at each preset scale, an object segmentation result of the target image is determined.
5. The image processing method according to claim 1, characterized in that: The feature point offset information includes first position offset information and second position offset information; The performing feature alignment processing on the first image feature and the second image feature respectively to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature includes: Performing feature space alignment processing on the first image feature by using the first position offset information to obtain a first aligned image feature corresponding to the first image feature; The second image feature is aligned in feature space using the second position offset information to obtain a second aligned image feature corresponding to the second image feature.
6. The image processing method according to claim 1, characterized in that: The feature point offset information is determined by the following steps: For each preset scale, the first image feature and the second image feature at the preset scale are spliced to obtain a spliced image feature; Based on the stitched image feature, feature point offset information between the first image feature and the second image feature at the preset scale is determined.
7. The image processing method according to claim 1, characterized in that: Determining a second image feature of an image frame before the target image at each preset scale includes: Determine the initial image features of a frame of image before the target image at each preset scale; Determine feature fusion depth information of each second image feature at each preset scale; Based on the initial image features at each preset scale, the feature fusion depth information of each second image feature, and the first image features at each preset scale, the second image features at each preset scale are determined.
8. An image processing device, characterized in that: include: A feature extraction module, used to determine a first image feature of a target image at each preset scale, and a second image feature of an image frame before the target image at each preset scale; a feature processing module, configured to perform feature alignment processing on the first image feature and the second image feature respectively for each preset scale based on feature point offset information between the first image feature and the second image feature at the preset scale, so as to obtain a first aligned image feature corresponding to the first image feature and a second aligned image feature corresponding to the second image feature; An image processing module, configured to determine an object segmentation result of the target image based on the first aligned image features and the second aligned image features at each preset scale; When determining the object segmentation result of the target image based on the first aligned image feature and the second aligned image feature at each preset scale, the image processing module is used to: For each preset scale, based on the first aligned image feature at the preset scale, determining a first latent feature corresponding to the first aligned image feature, and based on the second aligned image feature at the preset scale, determining a second latent feature corresponding to the second aligned image feature; Using the following formula, a Cat operation is performed on the first aligned image feature and the second aligned image feature, a Gate operation is performed on the image feature obtained by the Cat operation, and a dot product operation is performed on the image feature obtained by the Gate operation and the first latent feature to obtain a first sub-fusion feature; Using the following formula, a Cat operation is performed on the first aligned image feature and the second aligned image feature, a Gate operation is performed on the image feature obtained by the Cat operation, and a dot product operation is performed on the image feature obtained by the Gate operation and the second latent feature to obtain a second sub-fusion feature; in, represents the first aligned image feature, represents the second aligned image feature, s represents the preset scale, r represents the target image, q represents the image frame before the target image, represents the first latent feature or the second latent feature; , Indicates the first sub-fusion feature or the second sub-fusion feature; Determining a fused image feature at the preset scale based on the first sub-fusion feature and the second sub-fusion feature; Based on the fused image features at each preset scale, an object segmentation result of the target image is determined.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the image processing method according to any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are executed.
