Image processing method and device, electronic equipment and computer readable storage medium

By generating texture and difference images, the input image processing model automatically identifies the differences between virtual scene images, solving the problems of low efficiency and insufficient accuracy in existing technologies, and achieving efficient and accurate difference detection.

CN116958010BActive Publication Date: 2025-12-30TENCENT TECH (CHENGDU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210369421.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2025-12-30
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

In existing technologies, when application versions are updated, the difference detection of virtual scenes relies on manual comparison, which is inefficient and prone to missing small differences, resulting in unsatisfactory detection results.

Method used

By acquiring different versions of the same virtual scene, texture and difference images are generated, stitched together, and input into a trained image processing model to extract difference features and automatically identify target differences between images.

Benefits of technology

It enables rapid and accurate identification of target differences between images, reduces human intervention, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116958010B_ABST
    Figure CN116958010B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method and device, electronic equipment and computer readable storage medium, relating to the fields of games, artificial intelligence and cloud technology. The method comprises: obtaining a first image and a second image, the first image and the second image being scene images of a same virtual scene in different versions of a same application; obtaining a to-be-merged image based on the first image and the second image, splicing the first image, the second image and the to-be-merged image to obtain a to-be-processed image; inputting the to-be-processed image into a trained image processing model, extracting a difference feature between the first image and the second image based on the to-be-processed image, and predicting an image recognition result based on the difference feature. The embodiments of the present application do not require human intervention when identifying effective differences, greatly improving the recognition efficiency and also improving the accuracy of recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of gaming, artificial intelligence, multimedia, and cloud technology. Specifically, this application relates to an image processing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] With the development of technology and the continuous improvement of people's living standards, various applications have become an indispensable part of people's daily lives. In order to provide users with better services, application providers will also continuously optimize the applications they provide and update the application versions.

[0003] When an application updates, most of the content remains unchanged, but updates may occur to the scene resources of some virtual scenes displayed within the application. Before a new version is released, different versions need to be tested, and detecting and identifying changes to the virtual scene caused by changes in scene resources is also part of the testing. In practical applications, even if the scene resources have not changed, for the same virtual scene in different versions of the same application, there may still be differences in the virtual scene at the binary level due to the influence of random numbers or other reasons during scene loading and rendering. However, these differences are not usually of concern to testers.

[0004] In existing technologies, the identification of differences in virtual scenes caused by changes in scene resources is usually done by manually comparing and identifying images of the same virtual scene in different versions. This method suffers from low detection efficiency and wastes a lot of manpower. In addition, manual identification often fails to detect subtle differences caused by resource changes, resulting in missed detections and unsatisfactory detection results. Summary of the Invention

[0005] This application provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can effectively improve the detection efficiency and accuracy of target differences. The technical solution provided by this application is as follows:

[0006] According to one aspect of the embodiments of this application, an image processing method is provided, the method comprising:

[0007] Acquire a first image and a second image, wherein the first image and the second image are scene images of the same virtual scene in different versions of the same application;

[0008] Based on the first image and the second image, an image to be merged is obtained, wherein the image to be merged includes at least one of a texture image and a difference image, the texture image includes a first texture image of the first image and a second texture image of the second image, and the difference image characterizes the difference in image content between the first image and the second image;

[0009] The first image, the second image, and the image to be merged are stitched together to obtain the image to be processed.

[0010] The image to be processed is input into the trained image processing model, and the image processing model performs the following operations to obtain the image recognition result corresponding to the image to be processed:

[0011] Based on the image to be processed, the difference features between the first image and the second image are extracted. Based on the difference features, the image recognition result is predicted, wherein the image recognition result characterizes whether there is a target difference between the first image and the second image.

[0012] According to another aspect of the embodiments of this application, an image processing apparatus is provided, the apparatus comprising:

[0013] The image acquisition module is used to acquire a first image and a second image, wherein the first image and the second image are scene images of the same virtual scene in different versions of the same application;

[0014] The image to be merged acquisition module is used to acquire an image to be merged based on the first image and the second image, wherein the image to be merged includes at least one of a texture image and a difference image, the texture image includes a first texture image of the first image and a second texture image of the second image, and the difference image characterizes the difference in image content between the first image and the second image;

[0015] The stitching module is used to stitch the first image, the second image, and the image to be merged to obtain the image to be processed;

[0016] The model processing module is used to input the image to be processed into the trained image processing model, and the image processing model performs the following operations to obtain the image recognition result corresponding to the image to be processed:

[0017] Based on the image to be processed, the difference features between the first image and the second image are extracted. Based on the difference features, the image recognition result is predicted, wherein the image recognition result characterizes whether there is a target difference between the first image and the second image.

[0018] Optionally, the images to be merged include difference images, which include a first difference image corresponding to the first image and a second difference image corresponding to the second image;

[0019] The images to be merged are obtained based on the first and second images, and are used for:

[0020] Determine the frame difference image between the first image and the second image;

[0021] The frame difference image is binarized, and the resulting binarized image is then subjected to morphological dilation to obtain the processed frame difference image.

[0022] The first image and the processed frame difference image are masked to obtain the first difference image corresponding to the first image. The second image and the processed frame difference image are masked to obtain the second difference image corresponding to the first image.

[0023] Optionally, the model processing module, when extracting the difference features between the first image and the second image based on the image to be processed, is used for:

[0024] Feature extraction is performed on the image to be processed to obtain an initial feature map, which includes the first feature map of multiple channels;

[0025] Based on the correlation between the first feature maps of multiple channels, the weight corresponding to the first feature map of each channel is determined, and the first feature maps of each channel are weighted using the weights corresponding to the first feature maps of each channel to obtain the second feature map corresponding to the first feature map of each channel.

[0026] Based on the second feature map corresponding to each channel, the difference features between the first image and the second image are obtained.

[0027] Optionally, the model processing module determines the weight corresponding to the first feature map of each channel based on the correlation between the first feature maps of multiple channels. When weighting the first feature maps of each channel using the weights corresponding to the first feature maps of each channel to obtain the second feature map corresponding to the first feature map of each channel, it is used for:

[0028] Based on the correlation between the first feature maps of multiple channels, the distinguishing features corresponding to the first feature map of each channel are extracted. The distinguishing features corresponding to each channel represent the differences between the first feature map of that channel and the first feature maps of other channels.

[0029] Based on the distinguishing features corresponding to the first feature maps of multiple channels, determine the channel weights corresponding to the first feature map of each channel.

[0030] Based on the distinguishing features corresponding to the first feature maps of multiple channels, determine the channel weights corresponding to the first feature map of each channel.

[0031] The first feature map of each channel is weighted by the channel weight corresponding to the first feature map of each channel to obtain the intermediate feature map corresponding to the first feature map of each channel;

[0032] Based on the intermediate feature maps corresponding to each channel, the second feature map corresponding to each channel is determined.

[0033] Optionally, the model processing module, when determining the second feature map for each channel based on the intermediate feature map corresponding to each channel, uses it for:

[0034] The feature values ​​of feature points at the same position in the intermediate feature maps of each channel are fused to obtain a fused feature map.

[0035] Based on the correlation between feature points in the fused feature map, extract the distinguishing features corresponding to each feature point in the fused feature map;

[0036] Based on the distinguishing features corresponding to each feature point in the fused feature map, the weights corresponding to each feature point in the fused feature map are determined.

[0037] By using the weights corresponding to each feature point in the fused feature map, the feature values ​​of feature points at the same position in the first feature map of each channel are weighted to obtain the second feature map corresponding to each channel.

[0038] Optionally, the difference features include difference feature maps from multiple channels; the model processing module uses these difference features to predict image recognition results.

[0039] For each feature point at the same position in the difference feature maps of multiple channels, the feature values ​​of the feature point in the difference feature maps of multiple channels are concatenated to obtain the feature vector of the feature point.

[0040] Based on the correlation between the feature vectors of each feature point, the weights corresponding to each feature point are determined, and the feature vectors of each feature point are weighted using the weights of each feature point.

[0041] Based on the weighted feature vectors of each feature point, the image recognition result is predicted.

[0042] Optionally, both the first image and the second image are multi-color channel images. The first texture image includes the texture images corresponding to each color channel image of the first image, and the second texture image includes the texture images corresponding to each color channel image of the second image.

[0043] The model processing module performs a masking operation on the first image and the processed frame difference image to obtain the first difference image corresponding to the first image, which is then used for:

[0044] The color channel images of the first image are masked with the processed frame difference image to obtain the first difference image corresponding to each color channel image of the first image.

[0045] Optionally, the image processing model is a classification model, which includes a first convolutional feature extraction module, at least one convolutional attention module, a feature re-extraction module based on a self-attention mechanism, and a classification module, which are cascaded in sequence. When there are multiple convolutional attention modules, adjacent convolutional attention modules are cascaded through at least one second convolutional feature extraction module.

[0046] The model processing module extracts the difference features between the first image and the second image based on the image to be processed. These difference features are then used to predict the image recognition result.

[0047] The first convolutional feature extraction module extracts features from the image to be processed, resulting in first feature maps for multiple channels.

[0048] Based on the first feature maps of multiple channels, the correlation between the first feature maps of multiple channels is learned through at least one convolutional attention module to obtain the weight corresponding to the first feature map of each channel. The first feature maps of each channel are weighted using the weights corresponding to the first feature maps of each channel to obtain the second feature map corresponding to the first feature map of each channel.

[0049] The second feature map corresponding to each channel is used as the difference feature. Based on the difference feature, the feature is extracted again through the feature extraction module.

[0050] Based on the features output by the feature re-extraction module, the image recognition result is obtained through the classification module.

[0051] According to another aspect of the embodiments of this application, an electronic device is provided, the electronic device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the method provided in any optional embodiment of this application.

[0052] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the method provided in any optional embodiment of this application.

[0053] According to one aspect of the embodiments of this application, a computer program product is provided, the computer product including a computer program that, when executed by a processor, implements the methods provided in any optional embodiments of this application.

[0054] The beneficial effects of the technical solutions provided in this application are:

[0055] Machine learning can be used to quickly and objectively obtain the recognition results of two images, automatically determining whether there are target differences between them without human intervention. This improves both recognition accuracy and efficiency. Specifically, to more accurately identify whether there are target differences between two images, the method provided in this application, when recognizing two images, can obtain a merged image based on the first and second images. The first image, the second image, and the merged image are then stitched together to obtain the image to be processed. By incorporating more image information, a more accurate image recognition result can be obtained. A trained image processing model is used to extract the difference features between the first and second images, thereby more accurately determining whether the difference between the first and second images is a target difference based on these difference features. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0057] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0058] Figure 2 A schematic diagram illustrating a process for obtaining a difference image, provided in an embodiment of this application;

[0059] Figure 3 This is a schematic diagram illustrating the effect of morphological dilation in an embodiment of this application.

[0060] Figure 4a and Figure 4b This diagram illustrates an original image and a difference image obtained by masking the original image.

[0061] Figure 5 A schematic diagram illustrating a process for obtaining an image to be processed, provided in an embodiment of this application;

[0062] Figure 6 A schematic diagram illustrating a process for obtaining channel weights, provided as an embodiment of this application;

[0063] Figure 7 A schematic diagram of a process for obtaining the weights corresponding to each feature point in a fused feature map, provided in an embodiment of this application;

[0064] Figure 8 A schematic diagram illustrating a process for obtaining a second feature map from a first feature map, provided as an embodiment of this application;

[0065] Figure 9 This is a schematic diagram of the structure of an image processing model provided in one embodiment of this application;

[0066] Figure 10 A schematic diagram of an image processing model provided in another embodiment of this application;

[0067] Figure 11 This is a schematic diagram of the structure of a data processing system in a game scenario according to this application;

[0068] Figure 12 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application;

[0069] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0070] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0071] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”

[0072] Optionally, the data processing method provided in this application embodiment can be implemented based on artificial intelligence (AI) technology. For example, feature extraction of the data to be processed, feature extraction of the data in the training dataset, and the judgment of whether there is a target anomaly between two images input into the model can be achieved through a trained neural network model. AI is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain optimal results. With the research and progress of artificial intelligence technology, it has been widely researched and applied in many fields. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0073] Optionally, the data processing involved in the embodiments of this application can be implemented based on cloud technology. For example, the data computation involved in training the aforementioned neural network model and the data computation involved in processing the data to be processed can be implemented using cloud computing. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to realize data computation, storage, processing, and sharing. Cloud computing refers to the delivery and usage model of IT infrastructure, which means obtaining the required resources in an on-demand and easily scalable manner through the network. With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the driving force of demands such as search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Unlike previous parallel distributed computing, the emergence of cloud computing will, conceptually, drive a revolutionary change in the entire Internet model and enterprise management model.

[0074] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0075] First, let's introduce and explain several terms used in this application:

[0076] 1) Invalid Differences: When generating virtual scenes, applications can determine the rendering parameters of the virtual scene by generating random numbers. Therefore, image frames of the same virtual scene taken at different times will have different rendering effects at the binary level. This difference is called invalid differences. Taking game applications as an example, the dynamic display of campfire, lighting, and smoke effects in games is often based on random number generation. Therefore, for a version of a swimming application, image frames of the same campfire taken at different times will have slight differences at the binary level.

[0077] 2) Effective Differences: When an application updates its version, it may also update some rendering parameters of the virtual scene it displays. When rendering parameters change, the virtual scene will differ before and after the update. Taking a game application as an example, when the game version is updated, the rendering resources of some virtual scenes in the game may change, resulting in changes to the virtual scene at the binary level. This difference is called an effective difference.

[0078] In practical applications, it's rare for two different versions of an application to display a valid difference in a virtual scene; most differences are invalid. In existing technologies, if effects testing requires determining whether the difference between two frames is due to invalid differences caused by random numbers or actual resource modifications, there are two methods:

[0079] Method 1: Based entirely on manual work, the art rendering results of each scene are compared and confirmed.

[0080] Method 2: First, automatically capture image frames from different versions and compare them using a pixel-level binary system to obtain a difference map. Then, manually compare the difference maps.

[0081] Method 1, being entirely manual, has the drawback of easily overlooking subtle differences in animation effects. Furthermore, both methods require manual verification of a large number of invalid differences, resulting in inefficiency and wasted human resources.

[0082] 3) Triq model: A deep neural network model based on ResNet and Transformer Encoder, which can be used for image quality assessment.

[0083] 4) ResNet model: A deep convolutional neural network model based on residual structure, which can be used for image feature extraction.

[0084] 5) Transformer model: A neural network model based on attention mechanism, consisting of two parts: encoder and decoder.

[0085] 6) Attention mechanism: A method that calculates attention features in input information by weighting the inputs according to their contribution.

[0086] 7) Color channels: Each image has one or more color channels. The default number of color channels in an image depends on its color mode. That is, the color mode of an image will determine the number of its color channels. For example, RGB (red, green and blue) images have 3 color channels, CMYK (cyan, magenta, yellow and black) images have 4 channels by default, and grayscale images have 1 channel.

[0087] The image processing methods, apparatuses, electronic devices, computer-readable storage media, and computer program products provided in this application are intended to solve at least one of the technical problems existing in the prior art, such as low recognition efficiency and poor accuracy due to the need for manual confirmation.

[0088] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0089] Figure 1 This diagram illustrates a data processing method according to an embodiment of this application. This method can be executed by any electronic device, such as a user terminal or a server, or through interaction between the user terminal and the server. For example, the data to be processed can be scene images of the same virtual scene in different versions of the same game application. The user terminal can conveniently and quickly identify whether the difference between two scene images is a target difference (i.e., a valid difference) by executing the method provided in this embodiment, and can perform corresponding operations based on the identification results. Alternatively, the method can also be executed by a server. The server can receive two scene images sent by the user terminal or receive a detection command sent by the user terminal. Based on the indication information of the image to be detected carried in the command, the server retrieves the scene image pair to be detected from a specified database. The scene image pair includes scene images of the same virtual scene in different versions of the same application. By executing the method provided in this embodiment, the server identifies whether the difference between the two scene images is a target difference and performs corresponding operations.

[0090] The aforementioned user terminals include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, wearable electronic devices, AR / VR devices, etc. The aforementioned servers can be cloud servers or physical servers; they can be a single server or a server cluster.

[0091] The following is combined Figure 1 The flowchart shown illustrates the data processing method provided in the embodiments of this application. Figure 1 As shown in the figure, the data processing method provided in the embodiments of this application may include the following steps S101 to S103.

[0092] Step S101: Obtain the first image and the second image, wherein the first image and the second image are scene images of the same virtual scene in different versions of the same application.

[0093] This application does not specifically limit the type of application; for example, it can be a game application, a video playback application, etc. The virtual scene in this application can be a simulation environment of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene; this application does not limit the dimension of the virtual scene.

[0094] Taking game applications as an example, the virtual scene can be an environment for game characters to interact. For example, it can be a scene for game characters to fight in the virtual scene. By controlling the actions of the game characters, the two sides can interact in the virtual scene.

[0095] The method for acquiring the first and second images is not limited in this embodiment. For example, the first and second images of the same virtual scene in different versions of the target application can be captured automatically. As an optional solution, the application automatically captures frame images during game runtime and sends the captured images along with the game version information to a preset server for storage. When the detection party needs to compare scene images of different game versions, it sends a comparison request to the server. The comparison request includes the version information of the two game versions specified by the detection party. The server determines the frame image pair of the same virtual scene in the specified version from the stored frame images.

[0096] Step S102: Based on the first image and the second image, obtain the image to be merged, wherein the image to be merged includes at least one of a texture image and a difference image, the texture image includes a first texture image of the first image and a second texture image of the second image, and the difference image characterizes the difference in image content between the first image and the second image.

[0097] Based on this alternative approach, when identifying whether there is a target difference between two scene images, in addition to considering the first and second images, the texture images and / or difference images of the first and second images are also considered. By incorporating more image information, more accurate image recognition results can be obtained.

[0098] Optionally, the images to be merged may include texture and difference images. The texture image refers to the image's texture, which arises from the diversity of physical properties of an object's surface. Different physical properties indicate different grayscale or color information for a specific surface feature, resulting in different texture images for different physical surfaces. Therefore, the texture image can be considered a crucial attribute of the image's inherent information. The first texture image of the first image and the second texture image of the second image can be used to determine whether a target difference exists between the first and second images. Similarly, the difference image reflects the differences between the first and second images; therefore, it can also be used to determine whether a target difference exists between the first and second images.

[0099] It should be noted that in practical applications, the images to be merged may include not only texture images and / or difference images, but also other images that reflect the image information of the first and second images themselves, obtained based on the first and second images.

[0100] The specific methods for acquiring texture images and difference images are not limited in the embodiments of this application. For example, texture images can be acquired using any one or more existing methods for acquiring texture images. The difference image represents the difference in image content between the first image and the second image. Optionally, the difference between the first image and the second image themselves can be used as the difference image; that is, the difference image can be the frame difference image between the first image and the second image, or the difference between the textures of the first image and the second image, or other images obtained based on the first image and the second image that can reflect the difference between the two images.

[0101] As an alternative, the first and second texture images can be obtained based on the Local Binary Pattern (LBP) algorithm. This algorithm has significant advantages such as rotation invariance and grayscale invariance. When using this algorithm to obtain texture images, the values ​​of the relevant parameters can be set according to application requirements. For example, using an LBP operator with a neighborhood radius R = 1 and the number of neighborhood pixels P = 8, i.e., using a circular neighborhood with a radius of 1, the 8 pixels on the boundary of the neighborhood are compared with the center pixel. For a pixel with coordinates (x, y) in the image, the LBP feature of that point (that is, the pixel value of the pixel with coordinates (x, y) in the texture image, i.e., the texture value) can be calculated using the following formula:

[0102]

[0103] The expression for function g is:

[0104]

[0105] r represents the value of f(i) - f(x,y), where f(i) is the pixel value of pixel i in the neighborhood of the center pixel (x,y). If the pixel value of pixel i is greater than the pixel value of the center pixel (x,y), then g(r) is 1; otherwise, g(r) is 0. By statistically analyzing the function g values ​​of the 8 pixels surrounding the center pixel (x,y), the LBP texture value of the center pixel (x,y), i.e., Lbp, can be determined. P,R (x,y).

[0106] The texture image obtained using the LBP algorithm can remove the image background to a certain extent while retaining the main texture details of the foreground object. When comparing the differences between different versions of the same scene image, it can reduce the interference caused by some redundant features for subsequent model training. The first and second images can be single-channel images or multi-channel images (e.g., RGB images). For multi-channel images, texture images can be obtained separately for each color channel, resulting in multiple texture images. Alternatively, texture images can be obtained only from the grayscale images of the first and second images. For example, the texture image corresponding to the first image can be obtained by converting the first image to grayscale. That is, for multi-channel images, the texture image can also be a single image.

[0107] Step S103: Stitch together the first image, the second image, and the image to be merged to obtain the image to be processed.

[0108] After obtaining the above images to be merged, such as the first texture image of the first image, the second image of the second image, the first difference image corresponding to the first image, and the second difference image of the second image, the first image, the second image, and the images to be merged can be stitched together (that is, the images are combined), and the stitched image can be used as the image to be processed and input into the image processing model. Assuming the first image, the second image, and the image to be merged are all W*H in size and each has n color channels, the stitched image to be processed can be represented as W*H*N, where W and H represent the width and height of an image, and N is the number of stitched images, N = m*n, where m is the total number of the first image, the second image, and the image to be merged (this value is based on multiple color channels of an image as one image). For example, if the first image and the second image are both RGB images, then n = 3. Assuming the image to be merged can include the first texture image of the first image (the texture images corresponding to each of the 3 RGB channels), the second texture image of the second image, the first difference image corresponding to the first image (the difference images corresponding to each of the 3 RGB channels), and the second difference image corresponding to the second image, then m = 6. The image to be processed input into the model is 18 images of size W*H.

[0109] Step S104: Input the image to be processed into the trained image processing model, and use the image processing model to process the image to be processed to obtain the image recognition result corresponding to the image to be processed.

[0110] The image processing performed by the above image processing model may include: extracting difference features between a first image and a second image based on the image to be processed, and predicting the image recognition result based on the difference features, wherein the image recognition result characterizes whether there is a target difference between the first image and the second image.

[0111] The target difference can be a specified difference configured according to actual application requirements, such as a difference of a specific type. Optionally, the target difference can refer to a valid difference, that is, a difference caused by changes in the scene resources used to generate the virtual scene, while a difference caused by random numbers in the program code that generates the virtual scene is an invalid difference, that is, a difference caused by random numbers is not a target difference.

[0112] The specific form of the image recognition result is not limited in this application embodiment. Optionally, the output of the above image processing model can be a binary classification output. For example, an output result of 1 indicates that there is a valid difference between the first image and the second image, and an output result of 0 indicates that there is no valid difference between the first image and the second image. Alternatively, the output result can be a probability value in the range of [0, 1], which can be at least one of the probability of having a valid difference or the probability of having an invalid difference. After obtaining the output result of the model, it can be determined whether there is a valid difference based on the probability value and a preset threshold. For example, if the probability of having a valid difference is greater than or equal to the threshold, it is considered that there is a valid difference.

[0113] In practical applications, after obtaining the image recognition results between the first and second images, further processing can be performed on the first and second images based on the image recognition results. For example, corresponding labels can be added to the first and second images based on the image recognition results. These labels can characterize whether there are effective differences between the first and second images, so that candidates can process the image pairs accordingly based on the labels. For example, if it is necessary to detect a large number of image pairs (the two images in an image pair correspond to the same virtual scene) in two versions of an application, after obtaining the image recognition results of these image pairs through the model, the large number of image pairs can be divided into two groups based on the labels of the image pairs: one group consists of image pairs with effective differences, and the other group consists of image pairs without invalid differences. Subsequently, technicians can only review and test the image pairs with effective differences. Since in practical applications, the number of image pairs with truly effective differences in the two versions of an application is small, this method can greatly reduce the amount of data that needs to be processed later. It should be understood that before executing step S103, the image processing model can also be pre-trained. Specifically, the image processing model can be trained in the following way:

[0114] Obtain the training dataset, which includes multiple sample image pairs and a sample label for each sample image pair. The sample label is used to characterize whether the corresponding sample image pair has target differences or not. Each sample image pair includes a first sample scene image and a second sample scene image. The two sample scene images are scene images of the same virtual scene in different versions of the same application.

[0115] The initial neural network model is iteratively trained using multiple sample image pairs and their corresponding sample labels until the training termination condition is met. The neural network model that meets the training termination condition is then used as the trained image processing model.

[0116] First, a certain number of sample image pairs are collected. Each sample image pair may include a first sample scene image and a second sample scene image, as well as sample labels corresponding to these two images. Multiple sample image pairs may include multiple positive sample image pairs and multiple negative sample image pairs. A positive sample image pair refers to an image pair with target differences (that is, the corresponding sample label indicates that the sample image pair has valid differences), that is, there are target differences between the first sample scene image and the second sample scene image in the image pair. A negative sample image pair refers to an image pair with invalid differences (that is, the corresponding sample label indicates that the sample image pair has invalid differences), that is, there are invalid differences between the first sample scene image and the second sample scene image in the image pair.

[0117] This application does not limit the method for obtaining sample image pairs. For example, two images of the same virtual scene in the same version of an application can be captured at different times and used as a negative sample image pair to determine that the scene resources have not changed. Alternatively, two images of the same virtual scene where the scene resources have changed can be captured as a positive sample image pair.

[0118] After obtaining each pair of sample images with sample labels, the initial neural network model can be iteratively trained based on these sample image pairs until the training termination condition is met. The neural network model that meets the training termination condition is then used as the trained image processing model. During model training, the input to the model is each pair of sample images, and the output is the image recognition result corresponding to each pair of sample images, which is the result predicted by the model (prediction result). The training loss can be calculated based on the sample labels (true results) and prediction results for each pair of sample images, and the model parameters can be adjusted based on the training loss. The initial neural network model is not limited in this embodiment and can be selected according to actual needs.

[0119] The image processing method provided in this application can quickly and objectively obtain the recognition results of two images through machine learning. This means it can automatically determine whether there are target differences between two images without human intervention, thus improving both recognition accuracy and efficiency. Specifically, to more accurately identify whether there are target differences between two images, the method provided in this application, when recognizing two images, can obtain a merged image based on the first and second images. The first image, the second image, and the merged image are then stitched together to obtain the image to be processed. By incorporating more image information, a more accurate image recognition result can be obtained. Through a trained image processing model, the difference features between the first and second images are extracted, thereby enabling a more accurate determination of whether the difference between the first and second images is a target difference.

[0120] In an optional embodiment of this application, the images to be merged include difference images, which include a first difference image corresponding to the first image and a second difference image corresponding to the second image. It should be understood that the first difference image and the second difference image are local detail images of the first image and the second image in their respective difference regions.

[0121] The above describes the acquisition of a first difference image and a second difference image based on the first image and the second image, as follows: Figure 2 As shown, it includes:

[0122] Determine the frame difference image between the first image and the second image;

[0123] The frame difference image is binarized, and the resulting binarized image is then subjected to morphological dilation to obtain the processed frame difference image.

[0124] The first image and the processed frame difference image are masked to obtain the first difference image corresponding to the first image. The second image and the processed frame difference image are masked to obtain the second difference image corresponding to the first image.

[0125] Specifically, in this embodiment of the application, the frame difference image between the two images can be obtained by subtracting the gray values ​​of the pixels at the same position in the first image and the second image one by one.

[0126] Image binarization is the process of transforming the grayscale values ​​of pixels in an image to 0 or 255, thus giving the entire image a distinct black and white effect. Specifically, by selecting an appropriate threshold, a first or second image can be converted into a binarized black and white image that still reflects the overall and local features of the image.

[0127] To preserve the complete information of the target in the difference region to a greater extent, this embodiment of the application also requires dilation of the obtained binarized image to expand the difference region. The dilation operation involves convolving the image (or a portion of the image, referred to as A) with a kernel (referred to as B). The kernel can be of any shape and size, and it has a separately defined reference point (called the anchor point). In most cases, the kernel is a small square or disk with a reference point in the center and a solid shape; the kernel can be considered a template or mask. Dilation can enlarge the highlighted areas in the image, and it can also preserve the complete information of the difference between the first and second images to a greater extent, avoiding the loss of difference information.

[0128] As an example, Figure 3 This diagram illustrates one effect of morphological dilation, in which... Figure 3 The left image in the image is a binarized version of the frame difference image, and the right image is the result of morphological dilation of the left image. This is achieved through comparison. Figure 3 As can be seen from the two images, the difference region (white area in the figure) between the first and second images is enlarged through dilation processing, so that the difference information between the first and second images can be preserved as completely as possible, providing better support for obtaining more accurate image recognition results.

[0129] In this embodiment, the binarized image after dilation can be used as a mask. It should be noted that in actual implementation, the morphological dilation process described above can be omitted; that is, the binarized image of the frame difference image can be directly used as the mask.

[0130] Masking refers to recalculating the values ​​of each pixel in an image using a masking operator. The masking operator characterizes the influence of neighboring pixels on the new pixel value, and simultaneously performs a weighted average of the pixels based on the weighting factors in the masking operator. In this embodiment, by performing a masking operation on the first image and the dilated frame difference image, only the overlapping portion between the original image (first image or second image) and the processed frame difference image is retained. That is, the image information retained in the first difference image is the information in the first image that differs from the second image, and the image information retained in the second difference image is the information in the second image that differs from the first image.

[0131] As an example, Figure 4a and Figure 4b This diagram illustrates an original image and a difference image obtained by masking the original image. Figure 4b As shown, the difference image obtained after masking is black except for the difference area in the original image. In other words, only the image information of the difference area is preserved.

[0132] In this embodiment of the application, by acquiring the first difference image and the second image, the image to be processed includes not only the two original images to be processed, but also the local detail images of the difference regions of the two original images. By inputting the image to be processed containing the difference image of the local detail image into the image processing model, the model can better learn the difference features between the first image and the second image, thereby further improving the accuracy of the image recognition results.

[0133] Please see Figure 5 The figure exemplifies a flowchart illustrating a process for obtaining an image to be processed based on a first image and a second image, as provided in an embodiment of this application. As shown, image a and image b represent the first image and the second image, respectively. In this example, both images are RGB three-color channel images; therefore, both the first image and the second image can be represented as a W*H*3 three-dimensional matrix. The image to be merged in this embodiment includes the texture image and difference image corresponding to each of the first and second images. Specifically, as shown... Figure 5As shown, texture features (LBP feature extraction as shown in the figure) can be extracted from each color channel of the first image and the second image respectively to obtain the first texture image (texture a) and the second texture image (texture b) corresponding to each of the three channels. By subtracting the first image and the second image pixel by pixel, a frame difference image is obtained, and morphological dilation is performed on the frame difference image to obtain a mask image. The mask image is then masked with each channel of the first image and the second image respectively to obtain the first difference image (difference a) corresponding to the three channels of the first image and the second difference image (difference b) corresponding to the three channels of the second image respectively. After that, the first image, the second image, the first texture image, the second texture image, the first difference image and the second difference image can be stitched together to obtain the W*H*18 image to be processed as the input of the image processing model.

[0134] Based on the above embodiments, as an optional embodiment, extracting the difference features between the first image and the second image based on the image to be processed may include the following steps S201 to 203.

[0135] Step S201: Extract features from the image to be processed to obtain an initial feature map, which includes first feature maps of multiple channels;

[0136] Step S202: Based on the correlation between the first feature maps of multiple channels, determine the weight corresponding to the first feature map of each channel, and use the weight corresponding to the first feature map of each channel to weight the first feature map of each channel to obtain the second feature map corresponding to the first feature map of each channel.

[0137] Step S203: Based on the second feature map corresponding to each channel, obtain the difference features between the first image and the second image.

[0138] Optionally, features can be extracted from the image to be processed using a convolutional neural network to obtain an initial feature map. This application does not specifically limit the type of convolutional neural network, such as LeNet, AlexNet, VggNet, ResNet, etc.

[0139] For initial feature maps extracted by general feature extraction networks (such as the various convolutional neural networks mentioned above), the connections between feature maps of different channels are somewhat ignored. Taking the convolutional neural networks mentioned above as an example, image convolution uses a convolution kernel to perform template operations within the same channel, without involving the correlation between feature maps of different channels. Therefore, when the first and second images are multi-color channel images, the input to the image processing model is actually a multi-channel matrix composed of multiple images. If the initial feature map is directly used as the difference feature, the feature representation ability of the feature map is not ideal.

[0140] Based on this, in this optional solution of the present application, after obtaining the initial feature map containing the first feature map of multiple channels, the correlation between the feature maps of different channels is further considered (in this embodiment of the application, since the goal of image processing is to obtain the recognition result that can characterize whether there is a target difference between images, the correlation can be understood as the difference between the feature maps of different channels). Based on the correlation between the first feature maps of multiple channels, corresponding weights are assigned to the feature maps of different channels, and the first feature maps of the corresponding channels are weighted by using the weights corresponding to the channels to obtain second feature maps with better feature expression capabilities. Thus, based on each second feature map, better expressive difference features (i.e. difference feature maps) can be obtained, thereby improving the accuracy of image recognition results.

[0141] Since the contribution of the first feature map from different channels to the image recognition result may be different, the scheme of this application takes this into account, assigning weights to the first feature map according to its contribution based on the correlation between the feature maps of different channels. As an example, suppose there are 5 first feature maps, denoted as features... Figure 1 To characteristics Figure 5 If features Figure 1 The differences between the feature maps and the other four feature maps are very small, so theoretically the features... Figure 1 The importance should be relatively low, i.e., the feature Figure 1 The corresponding weights should theoretically be relatively small, if the features Figure 2 The differences between the feature maps and the other four feature maps are quite large, so the feature maps... Figure 2 The corresponding contribution should theoretically be relatively large, and its corresponding weight should also be relatively large.

[0142] Optionally, the image processing model may include a feature extraction module based on an attention mechanism. The input of the feature extraction module may be an initial feature map. The weights corresponding to each first feature map may be determined based on the attention mechanism, and a weighted calculation may be performed to output each second feature map.

[0143] Optionally, after obtaining each second feature map, each second feature map can be used as a difference feature between the first image and the second image, or feature extraction can be performed further based on each second feature map to obtain difference features.

[0144] As an optional embodiment, step S202 above may specifically include:

[0145] Based on the correlation between the first feature maps of multiple channels, the distinguishing features corresponding to the first feature map of each channel are extracted. The distinguishing features corresponding to each channel represent the differences between the first feature map of that channel and the first feature maps of other channels.

[0146] Based on the distinguishing features corresponding to the first feature maps of multiple channels, determine the channel weights corresponding to the first feature map of each channel.

[0147] The first feature map of each channel is weighted by the channel weight corresponding to the first feature map of each channel to obtain the intermediate feature map corresponding to the first feature map of each channel;

[0148] Based on the intermediate feature maps corresponding to each channel, the second feature map corresponding to each channel is determined.

[0149] Since there are differences between the first feature maps of each channel (differences can guarantee correlation), we can extract distinguishing features that characterize the first feature map of each channel relative to the first feature maps of other channels based on the correlation between the first feature maps of multiple channels. For each channel's first feature map, this distinguishing feature reflects the degree of difference between the first feature map and the first feature maps of other channels. Therefore, based on the distinguishing features corresponding to the first feature maps of each channel, we can determine the weight assigned to the first feature map of each channel, i.e., the aforementioned channel weight, and use this weight to weight the first feature map of the corresponding channel. This allows the first feature map of each channel to play its corresponding role according to its importance (i.e., the size of the channel weight), allowing the model to pay more attention to the differences between different images in the channels, thereby improving the accuracy of target difference recognition.

[0150] Optionally, embodiments of this application may employ a feature extraction module based on an intra-channel attention mechanism to determine the channel weights corresponding to the first feature maps of each channel. As an optional example, this feature extraction module may include a feature compression module and a weight calculation module. The feature compression module is used to reduce the amount of data processing.

[0151] The weight calculation module can use a multilayer perceptron (MLP) to extract the discriminative features corresponding to the first feature map of each channel, and based on the discriminative features, determine the channel weights corresponding to the first feature map of each channel through activation function layers. The advantages of MLP are its highly nonlinear global effect and strong adaptive and self-learning capabilities.

[0152] Furthermore, to effectively compute channel attention, the spatial dimension of the input feature map needs to be compressed. A common method for aggregating spatial information is average pooling. Meanwhile, max pooling gathers another important clue: regarding unique object features, attention on finer channels can be inferred. Therefore, in this embodiment, before inputting the first feature map into the MLP, at least one of max pooling and average pooling operations is performed through the feature compression module.

[0153] The pooling processing used in the embodiments of this application may include at least one of max pooling and average pooling. For a first feature map of a channel, max pooling is used to represent the feature map by all feature points with the largest feature values ​​(i.e., the feature values ​​of the feature points). Correspondingly, average pooling is used to represent the feature map by the average of the feature values ​​of all feature points in the first feature map.

[0154] This application embodiment can normalize the distinguishing features corresponding to the first feature maps of multiple channels using a preset activation function, thereby obtaining the channel weights corresponding to the first feature maps of each channel. This application embodiment does not limit the specific type of activation function; for example, it can be a sigmoid function.

[0155] Optionally, in this application embodiment, the intermediate feature map can be directly used as the second feature map, or further feature extraction can be performed on the intermediate feature map to obtain the second feature map. This application embodiment does not make specific limitations.

[0156] Please see Figure 6The figure exemplifies the flowchart illustrating the process of obtaining the channel weights corresponding to the first feature map of each channel in this embodiment. As shown, the first feature map of all channels in this embodiment can be represented by a dimension of W*H*C, where W and H represent the length and width of the image, respectively, and C represents the number of channels. Max pooling and average pooling are performed on the first feature map of each channel to obtain two feature vectors of size 1*1*C. These two feature vectors are then input into an MLP comprising an input layer, a hidden layer, and an output layer. The length in the figure represents the number of neurons in each layer, and the number of neurons in the hidden layer is C / r, where r represents the reduction... The feature maps processed by the two pooling methods (i.e., the 1*1*C features mentioned above) are then processed by an MLP network to obtain the first discriminative feature (Maxpoolingout) corresponding to the max pooling process and the second discriminative feature (Avgpoolingout) corresponding to the average pooling process. Both the first and second discriminative features are 1*1*C dimension feature vectors. Then, the first and second discriminative features can be summed (add), and the summation result can be processed by the sigmoid activation function to obtain the channel weights corresponding to the first feature map. These channel weights are 1*1*C vectors, i.e., C weight values, which are the channel weights corresponding to the first feature maps of the C channels. Multiplying each first feature map by its corresponding channel weight yields C intermediate feature maps.

[0157] Based on the above embodiments, as an optional embodiment, after obtaining the intermediate feature map based on the intra-channel attention mechanism, this application embodiment can further determine the most informative part from the pixel dimension based on other attention mechanisms, such as the spatial attention mechanism, as a supplement to the channel attention.

[0158] Optionally, the above-mentioned determination of the second feature map corresponding to each channel based on the intermediate feature map corresponding to each channel includes:

[0159] The feature values ​​of feature points at the same position in the intermediate feature maps of each channel are fused to obtain a fused feature map.

[0160] Based on the correlation between feature points in the fused feature map, extract the distinguishing features corresponding to each feature point in the fused feature map;

[0161] Based on the distinguishing features corresponding to each feature point in the fused feature map, the weights corresponding to each feature point in the fused feature map are determined.

[0162] By using the weights corresponding to each feature point in the fused feature map, the feature values ​​of feature points at the same position in the first feature map of each channel are weighted to obtain the second feature map corresponding to each channel.

[0163] In this optional solution of the present application, after obtaining the intermediate feature map containing the difference information between different images in different channels, the correlation between the feature values ​​of the same feature points in different channels is further considered (in the embodiments of the present application, since the goal of image processing is to obtain the recognition result that can characterize whether there is a target difference between each pixel of the image, the correlation can be understood as the difference between the same feature points in different channels). Based on the correlation of feature points, corresponding weights are assigned to different feature points, and the first feature map of each channel is weighted by using the weights corresponding to the feature points to obtain a second feature map with better feature expression ability. Thus, based on each second feature map, a difference feature with better expressive power (i.e., difference feature map) can be obtained, thereby improving the accuracy of image recognition results.

[0164] To compute spatial attention, this embodiment of the application fuses feature points at the same position in the feature maps of each channel along the channel axis. Specifically, this fusion is achieved through pooling operations (including at least one of average pooling and max pooling). Then, the feature values ​​after pooling for each feature point are concatenated to generate a valid feature descriptor, thereby obtaining a fused feature map. Taking max pooling as an example, for a pixel (x, y) of the input feature, the current input feature has 5 channels with values ​​of 34, 45, 32, 43, and 33. After max pooling, the feature value f(x, y) of the pixel (x, y) is 45, which is the maximum value of the same pixel in each channel. Average pooling, on the other hand, takes the average value of the same pixel in each channel, which is 37.4. When multiple pooling operations are used, the number of fused feature maps obtained is the same as the number of pooling operations. For example, when max pooling and average pooling are used, two fused feature maps will be obtained.

[0165] This application embodiment can extract the distinguishing features corresponding to each feature point in the fused feature map by performing a convolution operation on the fused feature map. This application embodiment does not impose a specific limitation on the size of the convolution kernel; for example, it can be a 3x3 two-dimensional convolution kernel.

[0166] In this embodiment, a preset activation function can be used to normalize the distinguishing features corresponding to each feature point in the fused feature map, thereby obtaining the weights corresponding to the first feature map of each channel.

[0167] Please see Figure 7The illustration shows a flowchart of obtaining the weights of each feature point in the fused feature map based on the intermediate feature map provided in this application embodiment. As shown in the figure, the intermediate feature maps of multiple channels can be represented as feature vectors of dimension W*H*C. Along the channel axis, max pooling and intermediate pooling are performed on the same feature points in the intermediate feature maps of each channel to obtain two feature vectors of dimension W*H*1. The feature value of each feature point in one feature vector is the maximum feature value of the feature point in the intermediate feature maps of all channels, and the feature value of each feature point in the other feature vector is the average value of the feature point in the intermediate feature maps of all channels. The two feature vectors are concatenated to obtain a fused feature map of dimension W*H*2, that is, two fused feature maps. The fused feature map is convolved with a two-dimensional convolution kernel of a preset size (7*7 in this embodiment) to obtain the distinguishing features corresponding to each feature point in the fused feature map. The distinguishing features corresponding to all feature points can constitute a feature vector of dimension W*H. By processing the W*H dimension feature vector with the sigmoid activation function, we can obtain the W*H*1 dimension weights, that is, W*H weights. Each weight corresponds to a feature point in the first feature map. By multiplying the feature points in the first feature map of each channel by the corresponding weights, we can obtain the second feature map.

[0168] Please see Figure 8The figure illustrates an exemplary flowchart of obtaining a second feature map from a first feature map according to an embodiment of this application. As shown, max pooling and average pooling are performed on the first feature maps of all channels to obtain the max pooling features and average pooling features corresponding to the first feature map of each channel. The max pooling features and average pooling features are input into an MLP to extract the distinguishing features of the max pooling features and the distinguishing features of the average pooling features corresponding to the first feature map of each channel. The result of summing the two distinguishing features is processed with a sigmoid activation function to obtain the channel weights (channel attention) corresponding to the first feature map of each channel. The first feature maps of the corresponding channels are weighted by the channel weights to obtain the intermediate feature maps (featuremapm) corresponding to each channel. Max pooling and average pooling are performed on the feature values ​​of feature points at the same position in the intermediate feature maps of each channel, respectively. The processed results are then fused to obtain a fused feature map. A convolution operation is performed on the fused feature map to extract the distinguishing features corresponding to each feature point in the fused feature map by utilizing the correlation between each feature point in the fused feature map. The distinguishing features corresponding to each feature point in the fused feature map are processed with the sigmoid activation function to obtain the weights corresponding to each feature point in the fused feature map. Using the weights corresponding to each feature point in the fused feature map, the feature values ​​of feature points at the same position in the first feature map of each channel are weighted to obtain the second feature map corresponding to each channel.

[0169] Based on the above embodiments, as an optional embodiment, the difference features include difference feature maps of multiple channels; based on the difference features, the image recognition result is predicted, including:

[0170] For each feature point at the same position in the difference feature maps of multiple channels, the feature values ​​of the feature point in the difference feature maps of multiple channels are concatenated to obtain the feature vector of the feature point.

[0171] Based on the correlation between the feature vectors of each feature point, the weights corresponding to each feature point are determined, and the feature vectors of each feature point are weighted using the weights of each feature point.

[0172] Based on the weighted feature vectors of each feature point, the image recognition result is predicted.

[0173] For example, if the difference feature includes a 3-channel difference feature map, then the feature point in the difference map of each channel corresponds to a feature value in each of the 3 channels. If the 3 feature values ​​are a, b and c, then the feature vector of the feature point is (a, b, c).

[0174] The importance of feature points at different locations to the recognition results is usually different. Therefore, when determining the image recognition result based on the extracted differential feature maps of each channel, the correlation between the feature vectors of each feature point can be used to assign corresponding weights to different feature points. By using the weights corresponding to the feature points, the differential feature maps can be weighted so that the processed differential feature maps have a better feature representation ability and improve the accuracy of the image recognition results.

[0175] Optionally, the determination of the weights of each feature point in the difference feature map can be implemented using a feature extraction network based on an attention mechanism. The specific structure of this feature extraction network is not limited in this embodiment. As an optional solution, the encoder part of a Transformer structure based on a self-attention mechanism can be used. The Transformer is a widely used feature extraction structure in NLP and computer vision, consisting of an encoder and a decoder. Its core is the self-attention mechanism. In this embodiment, the encoder in the Transformer model can determine the weights corresponding to each feature point, and the feature vectors of each feature point can be weighted using these weights. Specifically, the feature vectors of each feature point can be used as input to the encoder. The encoder calculates the weights corresponding to each feature point to obtain a weighted feature vector. Further feature processing can be performed based on the weighted feature vector to obtain the features output by the encoder. Then, the image recognition result can be predicted based on the output features of the encoder. Optionally, the output features of the encoder can be input to a classifier (i.e., a classification module), and the classifier outputs the image recognition result, i.e., the classification result. The network structure of the classifier is not limited in this embodiment. Optionally, the classifier may adopt an MLP head structure.

[0176] Based on the above embodiments, as an optional embodiment, both the first image and the second image are multi-color channel images. The first texture image includes texture images corresponding to each color channel image of the first image, and the second texture image includes texture images corresponding to each color channel image of the second image. That is, the number of texture images included in the first texture image and the second texture image in this application embodiment is also the number of color channels.

[0177] Optionally, a masking operation is performed on the first image and the processed frame difference image to obtain a first difference image corresponding to the first image, including:

[0178] The color channel images of the first image are masked with the processed frame difference image to obtain the first difference image corresponding to each color channel image of the first image.

[0179] The second image and the processed frame difference image are masked to obtain the second difference image corresponding to the second image, including:

[0180] The color channel images of the second image are masked with the processed frame difference image to obtain the second difference image corresponding to each color channel image of the second image.

[0181] In this embodiment, when obtaining the difference image, a masking operation is performed between the color channel images and the frame difference image to ensure that the feature vector dimension of the obtained difference image remains unchanged from that of the original image. This embodiment can use as many images of various dimensions related to the original image as input to the model, increasing the amount of information in the model's input. This facilitates the model in extracting difference features that better express the difference between the first and second images, thereby improving the accuracy of image recognition results.

[0182] Based on the above embodiments, as an optional embodiment, please refer to... Figure 9 The example illustrates a schematic diagram of the structure of an image processing model provided in one embodiment of this application. The image processing model includes a first convolutional feature extraction module, at least one convolutional attention module, a feature re-extraction module based on a self-attention mechanism, and a classification module, which are cascaded in sequence.

[0183] The specific network structure of each module in the image processing model described above is not limited in this embodiment. Optionally, the first convolutional feature extraction module can be a ResNet module, the convolutional attention module can be a CBAM module, the feature re-extraction module based on the self-attention mechanism can be a Transformer Encoder module, and the classification module can be an MLP head module.

[0184] by Figure 9 Taking the image processing model shown above as an example, the above method extracts the difference features between the first image and the second image based on the image to be processed, and predicts the image recognition result based on the difference features, including:

[0185] The first convolutional feature extraction module extracts features from the image to be processed, resulting in first feature maps for multiple channels.

[0186] Based on the first feature maps of multiple channels, the correlation between the first feature maps of multiple channels is learned through at least one convolutional attention module to obtain the weight corresponding to the first feature map of each channel. The first feature maps of each channel are weighted using the weights corresponding to the first feature maps of each channel to obtain the second feature map corresponding to the first feature map of each channel.

[0187] The second feature map corresponding to each channel is used as the difference feature. Based on the difference feature, the feature is extracted again through the feature extraction module.

[0188] Based on the features output by the feature re-extraction module, the image recognition result is obtained through the classification module.

[0189] Based on the above embodiments, as an optional embodiment, when there are multiple convolutional attention modules, adjacent convolutional attention modules are cascaded through at least one second convolutional feature extraction module.

[0190] Please see Figure 10 The illustration shows a schematic diagram of the image processing flow of an image processing model provided in another embodiment of this application. In the related art, the Triq model architecture includes a ResNet module and a Transformer Encoder module. In this embodiment, a CBAM module can be added to the Triq model to obtain the image processing model of this embodiment. Since the existing Triq model is used to evaluate the image quality of a single image and is not suitable for inputting two images, this embodiment can also add a preprocessing module for obtaining the image to be processed before the Triq model or before the ResNet module in the Triq model to obtain a neural network model that can implement the image processing method of this application. The improved neural network model not only differs in the number of input images, but also changes the model's function from obtaining image quality scores to classification and recognition.

[0191] The following is combined Figure 10 The flowchart shown below provides a detailed description of the data processing method provided in the embodiments of this application.

[0192] The scene images (i.e., the first image and the second image) of the same virtual scene in different versions of the same game application are obtained. In this embodiment of the application, the scene images have a width of W and a height of H, and both are three-color channel images. Therefore, each scene image can be represented as a feature vector of W*H*3. The two scene images are input into the preprocessing module, and the texture image and difference image corresponding to the two scene images are extracted by the preprocessing module respectively. The two scene images are then fused together to obtain a W*H*18 dimension image to be processed.

[0193] The convolutional features of the image to be processed are extracted using feature extraction modules C1 and C2 in two cascaded ResNet networks. Figure 10 C5 in the text, as well as C3 and C4 (which are omitted and not labeled), can all be feature extraction modules in the ResNet network.

[0194] It should be noted that ResNet networks have different network structures depending on the number of layers. The more complex the features to be extracted, the deeper the network can extract richer features, but the number of parameters and training time will also be more. In this embodiment, ResNet50 with medium complexity was selected as the backbone network for feature extraction.

[0195] C2 outputs a feature vector (i.e., the first feature map) with dimensions W / 4*H / 4*256. After processing by two layers of convolutional feature extraction modules, the size of the first feature map is reduced to 1 / 4 of the original image. The first CBAM module learns the correlation between different channels of the first feature map output by C2, and explores the differences between different feature maps in space and channels. The CBAM module does not change the dimension of the feature vector, so the output of CBAM (i.e., the second feature map) has the same dimension as the output of C2. The second feature map output by the first CBAM module is further processed by three layers of ResNet modules C3 to C5 for convolution operation. The size of the feature map is further reduced to 1 / 32 of the original image, and the number increases to 2048. C5 inputs the feature vector of W / 32*H / 32*2048 dimensions to the second CBAM module to further learn the correlation between different channels of the feature map output by C5. Through feature projection, some useless features are removed and those discriminative features are retained. In this embodiment, a two-dimensional 32*1 convolution kernel is used to perform convolution with a stride of 1 to obtain a feature vector of W / 32*H / 32*32 dimensions. The feature vector of dimension W / 32*H / 32*32 is subjected to max pooling. The dimension of the pooled feature vector is W / 32 / P*H / 32 / P*32, where P represents the window size of max pooling, which can be 1, 2, or 4. Taking P=2 as an example, the dimension of the pooled feature vector is W / 64*H / 64*32. The pooled feature vector is then flattened, which is equivalent to compressing the feature map of each channel of the pooled feature vector. This flattened feature vector is then fed into the Transformer Encoder as a 1*32 one-dimensional array (i.e., the difference features). This one-dimensional array is mapped to the word embedding dimension required by the Transformer. The Transformer Encoder then extracts features again and outputs a 1*32 feature vector. The feature vector output by the Transformer Encoder is further input into the MLP Head for classification to obtain the image recognition result.

[0196] The method provided in this application can be applied to any scenario that requires identifying whether the rendering resources of a virtual scene have changed, such as a game application identification scenario or a video playback application identification scenario. To better understand and illustrate the method and its effects provided in this application, an optional implementation of the solution provided in this application is described below in conjunction with a specific application scenario. This application scenario is a game scenario.

[0197] Figure 11This invention illustrates a schematic diagram of the structure of a data processing system applicable to this scenario embodiment, as shown below. Figure 11 As shown, the data processing system includes a user terminal, an image server, an image processing server, and a verification platform.

[0198] The user terminal can communicate with the image server via a network. The user terminal can be any player's user terminal. This application embodiment does not limit the game application running on the user terminal; it can be a game application that requires user download and installation, a cloud gaming application, or a game application within a mini-program. When the game application is running, the user terminal uploads game frames and the game application's version information to the image server via the network. When storing game frames, the image server can categorize them by version, with each storage area storing all game frames for one version. Alternatively, it can categorize them by virtual scene, with each storage area storing game frames for the same virtual scene across all game versions.

[0199] The effects tester logs into the verification platform. The platform provides version information for comparison. The tester selects the version information to be compared, and the platform generates a verification request, which is sent to the image processing server. This request includes the version information to be compared. Based on the verification request, the image processing server further sends an image retrieval request to the image server, which also includes the version information to be compared. The image server, based on the image retrieval request, returns image data to the image processing server. This image data can include multiple game frame pairs. Each game frame pair includes game frames from the same virtual scene in the version to be compared, or it can include all game frames from the version to be compared.

[0200] If the image data includes multiple game frame pairs, the image processing server can directly identify the differences between the game frame pairs. If the image data includes all game frames of the version to be compared, the image processing server determines the scene images of the same virtual scene in different versions from the acquired game frames and generates multiple game frame pairs.

[0201] For each pair of game frames, the image processing server acquires the texture image and difference image of that pair, and combines them to obtain the image to be processed. In this embodiment, the game frames are multi-color channel images. Therefore, for the image to be processed, feature extraction is first performed to obtain an initial feature map, which includes first feature maps of multiple channels. Then, the weights corresponding to each first feature map are determined based on a channel attention mechanism, and weighted calculations are performed to output intermediate feature maps. Then, the weights corresponding to each feature point in each intermediate feature map are determined based on a spatial attention mechanism, and weighted calculations are performed to output second feature maps. The second feature maps corresponding to each channel are used as difference features. Based on the difference features, feature re-extraction is performed through the feature re-extraction module. Based on the features output by the feature re-extraction module, the image recognition result is obtained through a classification function.

[0202] The image processing server returns the game frame pairs and recognition results to the verification platform. The verification platform filters out the game frame pairs corresponding to invalid differences, and the special effects testers manually confirm the game frame pairs with valid differences.

[0203] This application provides an image processing apparatus, such as... Figure 12 As shown, the image processing device may include: an image acquisition module 101, an image acquisition module 102 to be merged, a stitching module 103, and a model processing module 104, wherein,

[0204] The image acquisition module 101 is used to acquire a first image and a second image, wherein the first image and the second image are scene images of the same virtual scene in different versions of the same application;

[0205] The image to be merged acquisition module 102 is used to acquire an image to be merged based on a first image and a second image, wherein the image to be merged includes at least one of a texture image and a difference image, the texture image includes a first texture image of the first image and a second texture image of the second image, and the difference image characterizes the difference in image content between the first image and the second image;

[0206] The stitching module 103 is used to stitch together the first image, the second image, and the image to be merged to obtain the image to be processed;

[0207] Model processing module 104 is used to input the image to be processed into the trained image processing model, and to perform the following operations through the image processing model to obtain the image recognition result corresponding to the image to be processed:

[0208] Based on the image to be processed, the difference features between the first image and the second image are extracted. Based on the difference features, the image recognition result is predicted, wherein the image recognition result characterizes whether there is a target difference between the first image and the second image.

[0209] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0210] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of an image processing method, which, compared with related technologies, can achieve the following:

[0211] Machine learning can be used to quickly and objectively obtain the recognition results of two images, automatically determining whether there are target differences between them without human intervention. This improves both recognition accuracy and efficiency. Specifically, to more accurately identify whether there are target differences between two images, the method provided in this application, when recognizing two images, can obtain a merged image based on the first and second images. The first image, the second image, and the merged image are then stitched together to obtain the image to be processed. By incorporating more image information, a more accurate image recognition result can be obtained. A trained image processing model is used to extract the difference features between the first and second images, thereby more accurately determining whether the difference between the first and second images is a target difference based on these difference features.

[0212] Optionally, the images to be merged include difference images, which include a first difference image corresponding to the first image and a second difference image corresponding to the second image;

[0213] The image acquisition module, based on the first and second images, is used to acquire the images to be merged when:

[0214] Determine the frame difference image between the first image and the second image;

[0215] The frame difference image is binarized, and the resulting binarized image is then subjected to morphological dilation to obtain the processed frame difference image.

[0216] The first image and the processed frame difference image are masked to obtain the first difference image corresponding to the first image. The second image and the processed frame difference image are masked to obtain the second difference image corresponding to the first image.

[0217] Optionally, the model processing module, when extracting the difference features between the first image and the second image based on the image to be processed, is used for:

[0218] Feature extraction is performed on the image to be processed to obtain an initial feature map, which includes the first feature map of multiple channels;

[0219] Based on the correlation between the first feature maps of multiple channels, the weight corresponding to the first feature map of each channel is determined, and the first feature maps of each channel are weighted using the weights corresponding to the first feature maps of each channel to obtain the second feature map corresponding to the first feature map of each channel.

[0220] Based on the second feature map corresponding to each channel, the difference features between the first image and the second image are obtained.

[0221] Optionally, the model processing module determines the weight corresponding to the first feature map of each channel based on the correlation between the first feature maps of multiple channels. When weighting the first feature maps of each channel using the weights corresponding to the first feature maps of each channel to obtain the second feature map corresponding to the first feature map of each channel, it is used for:

[0222] Based on the correlation between the first feature maps of multiple channels, the distinguishing features corresponding to the first feature map of each channel are extracted. The distinguishing features corresponding to each channel represent the differences between the first feature map of that channel and the first feature maps of other channels.

[0223] Based on the distinguishing features corresponding to the first feature maps of multiple channels, determine the channel weights corresponding to the first feature map of each channel.

[0224] Based on the distinguishing features corresponding to the first feature maps of multiple channels, determine the channel weights corresponding to the first feature map of each channel.

[0225] The first feature map of each channel is weighted by the channel weight corresponding to the first feature map of each channel to obtain the intermediate feature map corresponding to the first feature map of each channel;

[0226] Based on the intermediate feature maps corresponding to each channel, the second feature map corresponding to each channel is determined.

[0227] Optionally, the model processing module, when determining the second feature map for each channel based on the intermediate feature map corresponding to each channel, uses it for:

[0228] The feature values ​​of feature points at the same position in the intermediate feature maps of each channel are fused to obtain a fused feature map.

[0229] Based on the correlation between feature points in the fused feature map, extract the distinguishing features corresponding to each feature point in the fused feature map;

[0230] Based on the distinguishing features corresponding to each feature point in the fused feature map, the weights corresponding to each feature point in the fused feature map are determined.

[0231] By using the weights corresponding to each feature point in the fused feature map, the feature values ​​of feature points at the same position in the first feature map of each channel are weighted to obtain the second feature map corresponding to each channel.

[0232] Optionally, the difference features include difference feature maps from multiple channels; the model processing module uses these difference features to predict image recognition results.

[0233] For each feature point at the same position in the difference feature maps of multiple channels, the feature values ​​of the feature point in the difference feature maps of multiple channels are concatenated to obtain the feature vector of the feature point.

[0234] Based on the correlation between the feature vectors of each feature point, the weights corresponding to each feature point are determined, and the feature vectors of each feature point are weighted using the weights of each feature point.

[0235] Based on the weighted feature vectors of each feature point, the image recognition result is predicted.

[0236] Optionally, both the first image and the second image are multi-color channel images. The first texture image includes the texture images corresponding to each color channel image of the first image, and the second texture image includes the texture images corresponding to each color channel image of the second image.

[0237] The model processing module performs a masking operation on the first image and the processed frame difference image to obtain the first difference image corresponding to the first image, which is then used for:

[0238] The color channel images of the first image are masked with the processed frame difference image to obtain the first difference image corresponding to each color channel image of the first image.

[0239] Optionally, the image processing model is a classification model, which includes a first convolutional feature extraction module, at least one convolutional attention module, a feature re-extraction module based on a self-attention mechanism, and a classification module, which are cascaded in sequence. When there are multiple convolutional attention modules, adjacent convolutional attention modules are cascaded through at least one second convolutional feature extraction module.

[0240] The model processing module extracts the difference features between the first image and the second image based on the image to be processed. These difference features are then used to predict the image recognition result.

[0241] The first convolutional feature extraction module extracts features from the image to be processed, resulting in first feature maps for multiple channels.

[0242] Based on the first feature maps of multiple channels, the correlation between the first feature maps of multiple channels is learned through at least one convolutional attention module to obtain the weight corresponding to the first feature map of each channel. The first feature maps of each channel are weighted using the weights corresponding to the first feature maps of each channel to obtain the second feature map corresponding to the first feature map of each channel.

[0243] The second feature map corresponding to each channel is used as the difference feature. Based on the difference feature, the feature is extracted again through the feature extraction module.

[0244] Based on the features output by the feature re-extraction module, the image recognition result is obtained through the classification module.

[0245] In one alternative embodiment, an electronic device is provided, such as Figure 13 As shown, Figure 13 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0246] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0247] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0248] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0249] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0250] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.

[0251] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0252] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.

[0253] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0254] The above are only optional implementation methods for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application, without departing from the technical concept of this application, also fall within the protection scope of the embodiments of this application.

Claims

1. An image processing method, characterized by, The method comprises the following steps: acquiring a first image and a second image, wherein the first image and the second image are scene images of a same virtual scene in different versions of a same application; based on the first image and the second image, acquiring a to-be-merged image, wherein the to-be-merged image comprises at least one of a texture image and a difference image, the texture image comprises a first texture image of the first image and a second texture image of the second image, and the difference image represents a difference in image content between the first image and the second image; stitching the first image, the second image and the to-be-merged image to obtain a to-be-processed image; inputting the to-be-processed image into a trained image processing model, and performing the following operations on the to-be-processed image by using the image processing model to obtain an image recognition result corresponding to the to-be-processed image: based on the to-be-processed image, extracting a difference feature between the first image and the second image, and based on the difference feature, predicting the image recognition result, wherein the image recognition result represents whether there is a target difference between the first image and the second image; the target difference is an effective difference or an invalid difference, the effective difference refers to a difference caused by a change in scene resources used to generate a virtual scene, and the invalid difference refers to a difference caused by a random number in program code used to generate a virtual scene.

2. The method of claim 1, wherein, the to-be-merged image comprises the difference image, and the difference image comprises a first difference image corresponding to the first image and a second difference image corresponding to the second image; the acquiring of the to-be-merged image based on the first image and the second image comprises: determining a frame difference image between the first image and the second image; performing binaryzation processing on the frame difference image, and performing morphological dilation processing on the obtained binaryzation image to obtain a processed frame difference image; performing mask operation on the first image and the processed frame difference image to obtain the first difference image corresponding to the first image, and performing mask operation on the second image and the processed frame difference image to obtain the second difference image corresponding to the first image.

3. The method of claim 1, wherein, the extracting of the difference feature between the first image and the second image based on the to-be-processed image comprises: performing feature extraction on the to-be-processed image to obtain an initial feature map, wherein the initial feature map comprises a plurality of channel first feature maps; based on an association relationship between the plurality of channel first feature maps, determining a weight corresponding to each channel first feature map, weighting each channel first feature map by using the weight corresponding to each channel first feature map to obtain a second feature map corresponding to each channel first feature map; and based on the second feature map corresponding to each channel, obtaining the difference feature between the first image and the second image.

4. The method of claim 3, wherein, the determining of the weight corresponding to each channel first feature map based on the association relationship between the plurality of channel first feature maps, the weighting of each channel first feature map by using the weight corresponding to each channel first feature map to obtain the second feature map corresponding to each channel first feature map, comprises: extracting, based on the correlation between the first feature maps of the multiple channels, a distinguishing feature corresponding to each first feature map of each channel, the distinguishing feature corresponding to each first feature map of each channel representing a difference between the first feature map of the channel and the first feature maps of other channels; determining, based on the distinguishing features corresponding to the first feature maps of the multiple channels, a channel weight corresponding to each first feature map of each channel; determining, based on the distinguishing features corresponding to the first feature maps of the multiple channels, a channel weight corresponding to each first feature map of each channel; weighting, based on the channel weights corresponding to the first feature maps of the multiple channels, the first feature maps of the respective channels to obtain intermediate feature maps corresponding to the first feature maps of the multiple channels; determining, based on the intermediate feature maps corresponding to the multiple channels, second feature maps corresponding to the multiple channels.

5. The method of claim 4, wherein, The determining, based on the intermediate feature maps corresponding to the multiple channels, second feature maps corresponding to the multiple channels, comprises: fusing feature values of feature points at the same positions in the intermediate feature maps corresponding to the multiple channels to obtain a fused feature map; extracting, based on the correlation between the feature points in the fused feature map, distinguishing features corresponding to the feature points in the fused feature map; determining, based on the distinguishing features corresponding to the feature points in the fused feature map, weights corresponding to the feature points in the fused feature map; weighting, based on the weights corresponding to the feature points in the fused feature map, the feature values of the feature points at the same positions in the first feature maps of the multiple channels to obtain the second feature maps corresponding to the multiple channels.

6. The method according to any one of claims 1 to 5, characterized in that, The difference features include multiple channel difference feature maps; and the predicting the image recognition result based on the difference features comprises: for each feature point at the same position in the multiple channel difference feature maps, concatenating feature values of the feature point in the multiple channel difference feature maps to obtain a feature vector of the feature point; determining weights corresponding to the feature points based on the correlation between the feature vectors of the feature points, and weighting the feature vectors of the feature points based on the weights of the feature points; predicting the image recognition result based on the weighted feature vectors of the feature points.

7. The method of claim 2, wherein, The first image and the second image are both multi-color channel images, the first texture image includes texture images corresponding to the color channel images of the first image, and the second texture image includes texture images corresponding to the color channel images of the second image. The performing a mask operation on the first image and the processed frame difference image to obtain a first difference image corresponding to the first image comprises: performing a mask operation on each color channel image of the first image and the processed frame difference image to obtain a first difference image corresponding to each color channel image of the first image.

8. The method according to any one of claims 1 to 5, characterized in that, The image processing model is a classification model, and the image processing model comprises, in sequence, a first convolution feature extraction module, at least one convolution attention module, a feature re-extraction module based on a self-attention mechanism, and a classification module, wherein when the at least one convolution attention module is multiple, adjacent convolution attention modules are connected through at least one second convolution feature extraction module. The method comprises the following steps: The first convolution feature extraction module is used to extract features of the to-be-processed image, and a plurality of channel first feature maps are obtained. The at least one convolution attention module is used to learn the correlation between the plurality of channel first feature maps based on the plurality of channel first feature maps, and a weight corresponding to each channel first feature map is obtained. The second feature map corresponding to each channel is obtained by weighting each channel first feature map using the weight corresponding to each channel first feature map. The second feature map corresponding to each channel is used as the difference feature, and the feature re-extraction module is used to re-extract features based on the difference feature.

9. An image processing apparatus characterized by comprising: The classification module is used to obtain the image recognition result based on the features output by the feature re-extraction module. The image acquisition module is used to acquire a first image and a second image, wherein the first image and the second image are scene images of a same virtual scene in different versions of a same application. The to-be-merged image acquisition module is used to acquire a to-be-merged image based on the first image and the second image, wherein the to-be-merged image comprises at least one of a texture image or a difference image, the texture image comprises a first texture image of the first image and a second texture image of the second image, and the difference image represents a difference in image content between the first image and the second image. The splicing module is used to splice the first image, the second image, and the to-be-merged image to obtain a to-be-processed image. The model processing module is used to input the to-be-processed image into a trained image processing model, and the image processing model is used to perform the following operations to obtain an image recognition result corresponding to the to-be-processed image: The difference feature between the first image and the second image is extracted based on the to-be-processed image, and the image recognition result is predicted based on the difference feature, wherein the image recognition result represents whether there is a target difference between the first image and the second image. The target difference is an effective difference or an invalid difference, the effective difference refers to a difference caused by changes in scene resources used to generate a virtual scene, and the invalid difference refers to a difference caused by random numbers in program code used to generate a virtual scene.

10. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, is arranged to perform the method of any one of claims 1 to 9. The processor executes the computer program to implement the steps of the method of any one of claims 1-8.

11. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the steps of the method of any one of claims 1-8.

12. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Video frame image testing method, device and equipment and computer storage medium

    CN112153374A

  • Image difference detection method and device and storage medium

    CN113674220A