Virtual resource rendering effect detection method and device, equipment and readable storage medium
By acquiring the test image and reference image of virtual resources and performing similarity analysis using semantic and visual features, the problem of long rendering effect detection cycle and unsatisfactory results in the existing technology is solved, and faster and more accurate rendering effect detection is achieved.
Patent Information
- Application Number
- CN202510905917.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-24
AI Technical Summary
Current technologies rely on manual adjustments by users and screenshot comparisons to detect the rendering effects of client resources, which results in long detection cycles and unsatisfactory results.
By acquiring the test image and reference image of the virtual resource, similarity analysis is performed using semantic and visual features, including the calculation of semantic similarity and visual similarity. The rendering effect detection result is determined by combining the CLIP model and various visual feature extraction methods.
It improves the accuracy and efficiency of rendering effect detection, reduces errors caused by environmental interference and noise, and achieves faster and more accurate rendering effect detection.
Smart Images

Figure CN120833501A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a rendering effect detection method and device of virtual resource, equipment and readable storage medium. BACKGROUND
[0002] The rendering effect of the client resource is detected, which can effectively avoid the abnormal data in the game, thereby improving the game experience of the user.
[0003] However, the rendering effect of the client resource is currently detected mainly by relying on the user to manually adjust the in-game resource, and determining the rendering effect of the in-game resource by comparing screenshots. However, such detection method has long detection period and unsatisfactory detection effect. SUMMARY
[0004] Therefore, it is necessary to provide a rendering effect detection method and device of virtual resource, equipment and readable storage medium aiming at the above technical problems, which aims to provide a rendering effect detection method and device of virtual resource.
[0005] In a first aspect, the present application provides a rendering effect detection method of virtual resource, comprising:
[0006] obtaining a to-be-tested image of a virtual resource, and determining a reference image of the virtual resource;
[0007] determining semantic similarity of the to-be-tested image and the reference image in semantic dimension based on semantic features of the to-be-tested image and the reference image;
[0008] determining visual similarity of the to-be-tested image and the reference image in visual dimension based on visual features of the to-be-tested image and the reference image;
[0009] determining a rendering effect detection result of the virtual resource based on the semantic similarity and the visual similarity.
[0010] In a second aspect, the present application provides a rendering effect detection device of virtual resource, comprising:
[0011] a collection module, configured to obtain a to-be-tested image of a virtual resource, and determine a reference image of the virtual resource;
[0012] a first comparison module, configured to determine semantic similarity of the to-be-tested image and the reference image in semantic dimension based on semantic features of the to-be-tested image and the reference image;
[0013] a second comparison module, configured to determine visual similarity of the to-be-tested image and the reference image in visual dimension based on visual features of the to-be-tested image and the reference image;
[0014] detecting a rendering effect detection result of the virtual resource based on the semantic similarity and the visual similarity.
[0015] In a third aspect, the present application provides a computer device, which comprises:
[0016] one or more processors;
[0017] a memory; and
[0018] one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the virtual resource rendering effect detection method provided above.
[0019] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program. The computer program is loaded by a processor to execute the virtual resource rendering effect detection method provided above.
[0020] In a fifth aspect, the present application provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the virtual resource rendering effect detection method provided above.
[0021] The virtual resource rendering effect detection method provided by the embodiments of the present application can accurately determine the rendering effect detection result of the virtual resource in different dimensions by obtaining the to-be-tested image and the corresponding reference image of the virtual resource, and then analyzing the semantic similarity in the semantic dimension and the visual similarity in the visual dimension based on the to-be-tested image and the reference image, thereby improving the rendering effect detection effect of the virtual resource. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative effort based on these drawings.
[0023] Figure 1 A step flowchart of a virtual resource rendering effect detection method provided by the embodiments of the present application;
[0024] Figure 2a An effect diagram of a filtered image provided by the embodiments of the present application;
[0025] Figure 2b An effect schematic view of a processed image according to an embodiment of the present application is provided.
[0026] Figure 2c An effect schematic view of a foreground extracted image according to an embodiment of the present application is provided.
[0027] Figure 3 A step flow schematic view of determining semantic similarity according to an embodiment of the present application is provided.
[0028] Figure 4 A step flow schematic view of determining semantic similarity according to another embodiment of the present application is provided.
[0029] Figure 5 A visual similarity on a color gamut distribution according to an embodiment of the present application is provided.
[0030] Figure 6 A visual similarity on a texture detail according to an embodiment of the present application is provided.
[0031] Figure 7 A visual similarity on a geometric structure according to an embodiment of the present application is provided.
[0032] Figure 8 A visual similarity on a pixel level according to an embodiment of the present application is provided.
[0033] Figure 9 A structure schematic view of a virtual resource rendering effect detection device according to an embodiment of the present application is provided.
[0034] Figure 10 A structure schematic view of a computer device according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0036] In the description of the present application, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.
[0037] In the description of the present application, the word "for example" is used to indicate "serving as an example, instance, or illustration". Any embodiment described as "for example" in this application is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to practice the present application as claimed. In the following description, details are set forth in order to provide a thorough understanding of the present application. It will be apparent to one ordinarily skilled in the art that the present application can be practiced without using these specific details. In other instances, well-known structures and processes have not been elaborated in order not to obscure the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
[0038] In order to facilitate the understanding of the rendering effect detection method, device, equipment and readable storage medium of virtual resources provided by the embodiments of the present application, the following will specifically describe the related application scenarios of the rendering effect detection method of virtual resources provided by the present application. Among them, the rendering effect detection method of virtual resources provided by the present application is usually used to detect the rendering effect of resources that need to be rendered in the application. For example, taking a common game application as an example, these virtual resources include but are not limited to character models, scene models, building models and skin models in the game application, etc. Any resource that needs to be rendered in the application running stage and depends on the rendering engine for rendering to be displayed in the application interface can be regarded as the virtual resource that needs to be rendered by the rendering effect detection of the present application. And among them, due to the performance difference of the client device, there may be real-time rendering effect deviation anomalies in the application running stage, for example, when the Shader (shader) parameter deviates by 0.1 level, the character material highlight reflection intensity often produces 17% visual difference.
[0039] And at present, the rendering effect of the client resource is mainly detected by relying on the user to manually adjust the in-game resource, and the rendering effect of the in-game resource is determined by comparing the screenshots, for example, the rendering effect is detected by comparing the color distribution or pixel point value between the client screenshot and the standard image provided in advance. However, this detection in a single dimension may often lose important information of the image, resulting in the problem that the rendering effect detection result is not ideal.
[0040] And in order to solve the above technical problems, the present application provides a rendering effect detection method of virtual resources, which aims to obtain the to-be-tested image and the reference image of the virtual resources, and capture the difference between the high-level semantics and the low-level image texture of these images, thereby effectively improving the detection effect of the rendering effect of the virtual resources. The following will be specifically described.
[0041] Please refer to Figure 1 ,Figure 1 A step flow diagram of a rendering effect detection method of a virtual resource provided by an embodiment of the present application is shown in detail, and specifically includes steps S110-S140:
[0042] S110, obtaining a to-be-tested image of a virtual resource, and determining a reference image of the virtual resource.
[0043] In the embodiment of the present application, the to-be-tested image of the virtual resource generally refers to an interface image provided on the running client. Specifically, for the sake of understanding, taking a game application as an example, it can be that during the game running stage, a game screen containing a virtual resource on the client is collected, for example, through a screenshot instruction input by a user during the game running process on the client, or through calling an SDK (Software Development Kit) installed on the client to collect the game screen. The virtual resource is usually displayed in the game screen, for example, the rendering effect of a character model, so that the to-be-tested image contains the real-time rendering effect of the virtual resource.
[0044] The reference image of the rendering resource generally refers to a standard rendering effect image used for comparison with the real-time rendering effect of the virtual resource. Specifically, considering that the version update of the application may change the application data, thereby affecting the rendering effect of the virtual resource, therefore, in some possible implementation schemes, the reference image of the virtual resource can also be collected from the interface of the client of the running historical version of the application. That is, in an embodiment, the obtaining of the to-be-tested image of the virtual resource and the determination of the reference image of the virtual resource include:
[0045] collecting an interface containing the virtual resource on the client of the running target application to obtain the to-be-tested image of the virtual resource, and determining a reference image of the virtual resource, wherein the reference image includes a historical interface containing the virtual resource on the client of the historical version of the target application.
[0046] Further, considering that the game screen on the client is often disturbed by external environmental light sources, thereby affecting the rendering effect detection of the resource, therefore, in some embodiments of the present application, the data collection of the to-be-tested image can be performed in a single light source scene on the client, and the data consistency of parameters such as intensity, color temperature and direction is ensured through strict standardization of light source parameters, so as to eliminate environmental interference. After the collection of the client is completed, the data can be synchronized to the specified server point by point through the adb transmission protocol, the CRC32 check and data block mechanism are adopted in the transmission process to guarantee the integrity of the data, and the version snapshot is established to realize the historical data tracing.
[0047] Of course, in order to further improve the detection result of the subsequent rendering effect, in some embodiments of the present application, the collected image can also be preprocessed to eliminate external environmental interference. That is, in some embodiments of the present application, the rendering effect detection method of the virtual resource comprises:
[0048] The collected interface containing the virtual resource is preprocessed to obtain a to-be-tested image of the virtual resource, and the historical interface is preprocessed to obtain a reference image of the virtual resource.
[0049] Specifically, in some embodiments, the preprocessing includes at least one of noise reduction processing, mask processing, foreground extraction processing, morphological optimization, and cropping processing.
[0050] Specifically, in order to facilitate the understanding of the above, the preprocessing process provided above will be described below.
[0051] In some embodiments of the present application, noise reduction processing of the image can be achieved by an image filter to filter out noise points that may exist in the image, thereby avoiding the problem of inaccurate rendering results caused by noise point interference.
[0052] In some embodiments of the present application, the picture can also be mapped to different color spaces based on actual needs, for example, from the default RGB color space to the HSV color space. Specifically, the image in the converted HSV color space will be more suitable for color detection.
[0053] In some embodiments of the present application, mask processing includes:
[0054] The HSV threshold range of green is set, for example, the minimum threshold range in the HSV color space is [40, 40, 40], that is, the minimum value of HSV, and the maximum threshold range is [80, 255, 255], that is, the maximum value of HSV;
[0055] Then all the pixel points in the green range are marked as white (255), and the rest are marked as black to obtain mask data for data extraction.
[0056] Of course, the threshold range provided above covers the common green background, but the range may need to be adjusted according to the light and color deviation in the actual scene, for example, the HSV value of the target green is measured using a tool. For example, in one possible implementation scheme, the adjusted HSV range, for example, the value range of H is modified to 50-70, can effectively reduce the overlap of background color and foreground color (such as dark green hair), thereby reducing the probability of false deletion.
[0057] In some embodiments of the present application, foreground extraction processing includes:
[0058] Take the inverse of the mask, when the green background is black (0), and the foreground character is white (255), then use the mask to extract the original picture, only keep the foreground area (non-green part), and make the background black.
[0059] In some embodiments of the present application, the morphological optimization includes:
[0060] Smooth the mask edge by opening and closing operations to avoid background residues or missing of the character area.
[0061] In some embodiments of the present application, the cropping processing includes:
[0062] Locate the foreground coordinates: find the position of all non-zero pixels in the mask (i.e. the foreground area).
[0063] Calculate the minimum enclosing rectangle: get the coordinates and width and height (x, y, w, h) of the foreground area.
[0064] Crop the image: cut the foreground character from the original picture according to the rectangle coordinates to get the preprocessed image.
[0065] Of course, it should be noted that the above-mentioned cropping processing is generally applicable to single-resource scenes, but may fail for complex scenes (such as multiple resources or background interference), so in some embodiments, the cropping processing result often needs to be checked.
[0066] The preprocessing method provided by the present application can be realized based on the OPENCV (a cross-platform computer vision and machine learning software library) platform, and the embodiments of the present application will not be repeated here.
[0067] Specifically, in order to understand the above preprocessing process, please refer to Figure 2a , Figure 2a An effect diagram of an image filtered by the embodiment of the present application is provided. Please refer to Figure 2b , Figure 2b An effect diagram of an image cropped by the embodiment of the present application is provided. Please refer to Figure 2c , Figure 2c An effect diagram of an image after foreground extraction provided by the embodiment of the present application.
[0068] And through the image preprocessing operation provided by the foregoing embodiments, such as separating the background color by color space conversion, generating a binary mask based on a preset threshold to strip the background, and combining morphological operation and contour extraction algorithm to accurately crop the character image with transparent background, it is ensured that the subsequent core rendering content of the resource can be focused, so that more accurate rendering effect detection is realized. The specific implementation process of the rendering effect detection will be described below.
[0069] S120, determine semantic similarity of the to-be-tested image and the reference image in a semantic dimension based on semantic features of the to-be-tested image and the reference image.
[0070] Different from the scheme in the related art which is based only on features of an image itself, such as through color distribution or through pixel-by-pixel comparison, in some embodiments of the present application, semantic features of a to-be-tested image are fully utilized to achieve similarity detection in a semantic dimension.
[0071] Specifically, in some embodiments, semantic feature extraction of an image can rely on CLIP (Contrastive Language-Image Pre-Training), which, through contrastive learning, associates semantics of an image with semantics of text, thereby realizing intelligent understanding and generation across modalities, that is, an image encoder in a CLIP model can realize semantic encoding of an image. Specifically, in some embodiments, please refer to Figure 3 , Figure 3 A step flow diagram for determining semantic similarity provided by an embodiment of the present application, specifically, includes steps S310-S330:
[0072] S310, encode the to-be-tested image through an image encoder in a CLIP model to obtain first semantic encoding features.
[0073] S320, encode the reference image through the image encoder in the CLIP model to obtain second semantic encoding features.
[0074] In some embodiments of the present application, by inputting the to-be-tested image and the reference image into the image encoder of the CLIP model respectively, the image encoder can realize semantic feature extraction of the to-be-tested image and the reference image based on learned features, thereby extracting the first semantic encoding features of the to-be-tested image and the second semantic encoding features of the reference image respectively. Specifically, in some embodiments, the first semantic encoding features and the second semantic encoding features can be 512-dimensional feature vectors.
[0075] Specifically, in some embodiments, the to-be-tested image and the reference image can also be preprocessed before being encoded by the image encoder.
[0076] For example, in one embodiment, the image can be cropped through center cropping to adjust the image size to 224x224.
[0077] In addition, the mean and standard deviation specified by CLIP can also be used to normalize the image information.
[0078] S330 : Determine the semantic similarity between the image to be tested and the reference image in a semantic dimension according to the similarity between the first semantic coding feature and the second semantic coding feature.
[0079] In an embodiment of the present application, by calculating the similarity between the first semantic encoding feature and the second semantic encoding feature, for example using cosine similarity, the resulting similarity calculation result can be used as the semantic similarity between the test image and the reference image in the semantic dimension. Specifically, the semantic similarity value range is generally between [-1, 1], with the closer to 1, the greater the semantic similarity.
[0080] In addition, in order to better detect the semantic similarity of the images to be tested, in some embodiments of the present application, the detection effect of semantic similarity can also be improved by using the resource description text corresponding to the virtual resource. Specifically, the resource description text can be a description of the substantial content of the resource in terms of form or other dimensions. For example, the resource description text may include: "a kitten with yellow stripes on its back", "a house with three floors and eight windows", etc. Of course, the resource description text provided above is only an exemplary description. In fact, the resource description text can also include more text content describing the resource, which will not be repeated in the embodiments of the present application.
[0081] On this basis, in some embodiments of this application, please refer to Figure 4 , Figure 4 Another flowchart of determining semantic similarity provided in an embodiment of the present application includes steps S410 to S420:
[0082] S410, encoding the resource description text corresponding to the virtual resource by using the text encoder in the CLIP model to obtain a third semantic encoding feature;
[0083] S420: Determine the semantic similarity between the image to be tested and the reference image in a semantic dimension based on a first similarity between the first semantic coding feature and the second semantic coding feature, and a second similarity between the first semantic coding feature and the third semantic coding feature.
[0084] In some embodiments of the present application, similar to the aforementioned encoding of images to obtain language encoding features, in embodiments of the present application, the resource description text corresponding to the virtual resource can be encoded by the text encoder in the CLIP model to obtain a third semantic encoding feature.
[0085] On this basis, the similarity between the to-be-tested image and the resource description text of the to-be-tested image can be determined based on the cosine similarity between the first semantic coding feature and the third semantic coding feature, so as to determine whether the to-be-tested image is related to the resource description text of the to-be-tested image. On this basis, the first similarity between the first semantic coding feature and the second semantic coding feature and the second similarity between the first semantic coding feature and the third semantic coding feature can be combined to comprehensively determine the semantic similarity between the to-be-tested image and the reference image in the semantic dimension. For example, in an embodiment, the first similarity and the second similarity can be weighted based on a weighting coefficient to determine the semantic similarity between the to-be-tested image and the reference image in the semantic dimension. Specifically, in an embodiment, the weights of the first similarity and the second similarity can be determined based on the image content of the to-be-tested image. For example, when the to-be-tested image is mainly based on color information and is difficult to describe through the resource description text, the weight of the first similarity can be increased and the weight of the second similarity can be reduced. Conversely, when the to-be-tested image is mainly based on content information such as resource geometry that is easy to describe through the resource description text, the weight of the first similarity can be reduced and the weight of the second similarity can be increased.
[0086] Of course, any of the semantic recognition modes provided by the embodiments of the present application is feasible, and the embodiments of the present application are not limited herein.
[0087] S130, determining a visual similarity between the to-be-tested image and the reference image in a visual dimension based on the visual features of the to-be-tested image and the reference image.
[0088] On the basis of the foregoing determination of the similarity between the to-be-tested image and the reference image through semantic features, in some embodiments of the present application, the visual similarity between the to-be-tested image and the reference image in the visual dimension can be further determined based on the visual features between the to-be-tested image and the reference image. Specifically, the visual similarity between the to-be-tested image and the reference image in the visual dimension can be measured in multiple dimensions, which will be described in detail below.
[0089] In some embodiments of the present application, the visual similarity between the to-be-tested image and the reference image in the visual dimension at least includes a first visual similarity between the to-be-tested image and the reference image in the color gamut distribution, a second visual similarity between the to-be-tested image and the reference image in the texture details, a third visual similarity between the to-be-tested image and the reference image in the geometric structure, and a fourth visual similarity between the to-be-tested image and the reference image in the pixel points.
[0090] For example, in an embodiment, the participants are required to Figure 5 , Figure 5The method for determining the visual similarity on the color gamut distribution provided in the embodiment of the present application specifically comprises the following steps:
[0091] S510, converting the to-be-tested image into a first target to-be-tested image in the HSV color space, and converting the reference image into a first target reference image in the HSV color space.
[0092] In the embodiment of the present application, since the HSV color space decomposes colors into three components of hue, saturation and lightness, this decomposition is more in line with the intuitive perception of humans to colors. The hue represents the type of color, the saturation represents the purity of color, and the lightness represents the brightness of color, which makes the HSV color space more intuitive and efficient in processing color information. Therefore, the image can be converted into the HSV color space for subsequent color gamut analysis and processing.
[0093] S520, determining a first normalized histogram of the first target to-be-tested image and a second normalized histogram of the first target reference image based on the value distribution of each pixel point in the first target to-be-tested image and the first target reference image in the first channel and the second channel.
[0094] Specifically, in the embodiment of the present application, the hue channel and the saturation channel are divided into several intervals, so as to determine the value distribution of each pixel point in each interval in each channel in the first target to-be-tested image and the first target reference image, and represent the value distribution of each interval in the form of a histogram, and then perform normalization processing to obtain the normalized histogram of different images. In the normalized histogram, the number of pixel points f(m, n) in the mth interval in the first channel (such as the hue channel) and the nth interval in the second channel (such as the saturation channel) is recorded. The maximum value of m is the number of intervals divided in the hue channel, and the maximum value of n is the number of intervals divided in the saturation channel.
[0095] In particular, in the embodiment of the present application, the hue channel can be divided into 16 intervals, and the saturation channel can be divided into 8 intervals, that is, 16x8 binning is adopted, a total of 108 intervals can be divided, and the number of pixel points in each interval is recorded to obtain the first normalized histogram with a sequence length of 108. Compared with the traditional 8x8 or 32x32 binning, the optimal balance between calculation efficiency and discrimination is achieved, and the misjudgment rate of similar color systems is reduced by 23%.
[0096] S530, determining the first visual similarity of the to-be-tested image and the reference image on the color gamut distribution based on the Bhattacharyya distance between the first normalized histogram and the second normalized histogram.
[0097] In the embodiment of the present application, the Bhattacharyya distance between the histograms of different images can be calculated as the visual similarity of the to-be-tested image and the reference image in the color gamut distribution, so as to determine the detection result of the subsequent rendering effect.
[0098] For example, in one embodiment, referring to Figure 6 , Figure 6 A visual similarity in texture details is provided in the embodiment of the present application, and specifically includes the following steps:
[0099] S610, the to-be-tested image is converted into a second target to-be-tested image in the YUV color space, and the reference image is converted into a second target reference image in the YUV color space.
[0100] In the embodiment of the present application, unlike the color gamut distribution detection of the image, the image is detected in the YUV color space, so that more features of the image in the texture details can be extracted.
[0101] S620, a plurality of to-be-tested feature images of the second target to-be-tested image at a plurality of levels are extracted by a pre-trained model, and a plurality of reference feature images of the second target reference image at the plurality of levels are extracted by the pre-trained model.
[0102] Specifically, in the embodiment of the present application, as one possible implementation, the feature images of the image at a plurality of feature scales can be obtained by multi-level feature extraction. Specifically, the pre-trained model can be an AlexNet backbone pre-trained model.
[0103] Of course, before the image is feature-extracted by the model, the image can be normalized, and the channel values in each color channel are mapped from [0, 255] to the range of [-1, 1] for processing.
[0104] S630, the feature similarity of the second target to-be-tested image and the second target reference image at each level is determined based on the plurality of to-be-tested feature images and the plurality of reference feature images.
[0105] In the embodiment of the present application, the cosine similarity of the to-be-tested feature image and the reference feature image is calculated, so that the feature similarity of the second target to-be-tested image and the second target reference image at each level can be obtained.
[0106] S640, according to the resource type of the virtual resource, the feature similarity of the second target to-be-tested image and the second target reference image at each level is weighted, so as to obtain the second visual similarity of the to-be-tested image and the reference image in the texture details.
[0107] In the embodiments of the present application, the second visual similarity in texture details between the to-be-tested image and the reference image in the YUV color space can be determined by sequentially weighting the feature similarity of the second target to-be-tested image and the second target reference image at each level. The weight of each level can be based on the resource type of the virtual resource, for example, the virtual resource is more inclined to show the overall or details of the resource.
[0108] For example, in another embodiment, please refer to Figure 7 , Figure 7 A method for determining the visual similarity in geometry provided by the embodiments of the present application specifically includes the following steps:
[0109] S710, extracting a first feature point in the to-be-tested image and a second feature point in the reference image.
[0110] In the embodiments of the present application, the feature point in the image can be extracted by a feature point detection algorithm, for example, by using SIFT (Scale-Invariant Feature Transform).
[0111] S720, for each first feature point, performing a nearest neighbor matching on the first feature point and the second feature point to determine at least two second feature points matched with the first feature point.
[0112] In the embodiments of the present application, at least two second feature points matched with the first feature point can be determined by using FLANN (Fast Library for Approximate Nearest Neighbors) to match the feature points, for example, KNN (K-Nearest Neighbors) matching. Specifically, in some embodiments, the parameters of FLANN, such as the tree parameter, can be set to 5, and the checks parameter can be set to 50, so that 5 random k-d trees are used for searching in the FLANN algorithm, and when searching, each node checks at most 50 candidate points, thereby effectively controlling the accuracy and speed of the search to improve the quality of the detected feature points.
[0113] S730, determining a target feature point from the first feature point based on the distance ratio between the first feature point and the at least two second feature points.
[0114] In the embodiments of the present application, the matched feature points can be further screened by using RANSAC (Random Sample Consensus) to obtain high-quality matching points. Specifically, the feature points with a distance ratio between the first feature point and the at least two second feature points less than a certain preset threshold can be selected as the screened high-quality feature points.
[0115] In S740, a transformation matrix of the to-be-tested image and the reference image is determined based on the first feature point and the second feature point, and a matching feature point pair with a matching error less than a preset threshold is identified through the transformation matrix.
[0116] In the embodiments of the present application, the transformation matrix of the to-be-tested image and the reference image can be determined based on the first feature point and the second feature point through homographic matrix calculation, so that the image is processed through the transformation matrix to identify the matching feature point pair of the to-be-tested image and the reference image with a matching error less than a preset threshold. Specifically, in some embodiments, the threshold here can be selected as 0.7 to ensure the quality of the screened matching feature point pair.
[0117] In S750, a third visual similarity in geometry between the to-be-tested image and the reference image is determined based on the first quantity of the target feature points and the second quantity of the matching feature point pairs.
[0118] In the embodiments of the present application, the quantity ratio of the first quantity to the second quantity can be used as the third visual similarity in geometry between the to-be-tested image and the reference image. Through the combination of the above parameters, the final F1 score (an index used to measure the accuracy of a binary classification model, which is a harmonic mean of the precision and recall of the model, and takes into account the precision and recall of the classification model) is improved by 17%.
[0119] For example, in another embodiment, please refer to Figure 8 , Figure 8 A method for determining the visual similarity at the pixel point level is provided in the embodiments of the present application, which specifically includes the following steps:
[0120] In S810, the to-be-tested image is converted into a first grayscale image, and the reference image is converted into a second grayscale image.
[0121] In the embodiments of the present application, by converting the image into a grayscale image, the calculation of the visual similarity of the image at the pixel point level can be realized.
[0122] In S820, pixel statistical values of the first grayscale image and the second grayscale image are calculated based on the pixel values of the respective pixel points in the first grayscale image and the second grayscale image.
[0123] In the embodiments of the present application, the pixel statistical value includes at least one of mean value, standard deviation, covariance, mean square error and peak signal-to-noise ratio.
[0124] S830, determining a fourth visual similarity of the to-be-tested image and the reference image at a pixel point based on the difference of the pixel statistical values of the first gray image and the second gray image.
[0125] Of course, in some embodiments of the present application, the visual similarity can be obtained by weighting the visual similarity in the above-mentioned multiple dimensions, so that the visual perception system is fused in multiple dimensions to improve the detection effect of the visual similarity. That is, in an embodiment, the rendering effect detection method of the virtual resource comprises:
[0126] weighting the first visual similarity, the second visual similarity, the third visual similarity and the fourth visual similarity based on the weight coefficient corresponding to the image scene type of the to-be-tested image, to obtain the visual similarity of the to-be-tested image and the reference image in the visual dimension.
[0127] Specifically, in some embodiments, the weight coefficient corresponding to the image scene type of the to-be-tested image can be realized by a weight distribution model trained in advance based on 100,000 sets of scene annotation data, that is, in an embodiment, the rendering effect detection method of the virtual resource further comprises:
[0128] training a weight distribution model based on sample image data pre-annotated with scene type labels; and
[0129] inputting the to-be-tested image into the weight distribution model to obtain the weight coefficient corresponding to the image scene type of the to-be-tested image.
[0130] S140, determining the rendering effect detection result of the virtual resource based on the semantic similarity and the visual similarity.
[0131] The rendering effect detection method of the virtual resource provided in the embodiments of the present application acquires the to-be-tested image of the virtual resource and the corresponding reference image, and then analyzes the semantic similarity in the semantic dimension and the visual similarity in the visual dimension based on the to-be-tested image and the reference image, to accurately determine the rendering effect detection result of the virtual resource in different dimensions, thereby improving the rendering effect detection effect of the virtual resource.
[0132] In order to better implement the rendering effect detection method of the virtual resource provided in the embodiments of the present application, on the basis of the rendering effect detection method of the virtual resource provided in the embodiments of the present application, a rendering effect detection device of a virtual resource is further provided in the embodiments of the present application, which comprises:Figure 9 The rendering effect detection apparatus of a virtual resource includes:
[0133] The acquisition module 910 is configured to acquire a to-be-tested image of a virtual resource and determine a reference image of the virtual resource.
[0134] The first comparison module 920 is configured to determine semantic similarity of the to-be-tested image and the reference image in a semantic dimension based on semantic features of the to-be-tested image and the reference image.
[0135] The second comparison module 930 is configured to determine visual similarity of the to-be-tested image and the reference image in a visual dimension based on visual features of the to-be-tested image and the reference image.
[0136] The detection module 940 is configured to determine a rendering effect detection result of the virtual resource based on the semantic similarity and the visual similarity.
[0137] In some embodiments of the present application, the visual similarity of the to-be-tested image and the reference image in the visual dimension includes at least first visual similarity of the to-be-tested image and the reference image in color gamut distribution, second visual similarity of the to-be-tested image and the reference image in texture details, third visual similarity of the to-be-tested image and the reference image in geometric structure, and fourth visual similarity of the to-be-tested image and the reference image in pixel points.
[0138] In some embodiments of the present application, the second comparison module 930 is further configured to convert the to-be-tested image into a first target to-be-tested image in an HSV color space, and convert the reference image into a first target reference image in the HSV color space.
[0139] Based on value distribution of each pixel point in the first target to-be-tested image and the first target reference image in a first channel and a second channel, a first normalized histogram of the first target to-be-tested image and a second normalized histogram of the first target reference image are determined.
[0140] Based on Bhattacharyya distance between the first normalized histogram and the second normalized histogram, the first visual similarity of the to-be-tested image and the reference image in the color gamut distribution is determined.
[0141] In some embodiments of the present application, the second comparison module 930 is further configured to convert the to-be-tested image into a second target to-be-tested image in an RGB color space, and convert the reference image into a second target reference image in the RGB color space.
[0142] extracting, by a pre-trained model, a plurality of feature images of the second target image to be tested at a plurality of levels, and extracting, by the pre-trained model, a plurality of reference feature images of the second target reference image at the plurality of levels;
[0143] determining feature similarities between the second target image to be tested and the second target reference image at each level based on the plurality of feature images and the plurality of reference feature images;
[0144] weighting the feature similarities between the second target image to be tested and the second target reference image at each level according to a resource type of the virtual resource, to obtain a second visual similarity between the image to be tested and the reference image in terms of texture details.
[0145] In some embodiments of the present application, the second comparison module 930 is further configured to extract a first feature point in the image to be tested and a second feature point in the reference image;
[0146] For each first feature point, performing a nearest neighbor matching on the first feature point and the second feature point to determine at least two second feature points matched with the first feature point;
[0147] determining a target feature point from the first feature point based on a distance ratio between the first feature point and the at least two second feature points;
[0148] determining a transformation matrix of the image to be tested and the reference image based on the first feature point and the second feature point, and identifying a matched feature point pair with a matching error less than a preset threshold value through the transformation matrix;
[0149] determining a third visual similarity between the image to be tested and the reference image in terms of geometric structure based on a first number of the target feature points and a second number of the matched feature point pairs.
[0150] In some embodiments of the present application, the second comparison module 930 is further configured to convert the image to be tested into a first grayscale image and convert the reference image into a second grayscale image;
[0151] calculating pixel statistical values of the first grayscale image and the second grayscale image based on pixel values of each pixel point in the first grayscale image and the second grayscale image; the pixel statistical values include at least one of a mean value, a standard deviation, a covariance, a mean square error, and a peak signal-to-noise ratio;
[0152] determining a fourth visual similarity between the image to be tested and the reference image in terms of pixel points based on a difference between the pixel statistical values of the first grayscale image and the second grayscale image.
[0153] In some embodiments of the present application, the second comparison module 930 is further configured to weight the first visual similarity, the second visual similarity, the third visual similarity and the fourth visual similarity based on a weight coefficient corresponding to the image scene type of the to-be-tested image, to obtain a visual similarity of the to-be-tested image and the reference image in a visual dimension.
[0154] In some embodiments of the present application, the second comparison module 930 is further configured to train a weight distribution model based on sample image data pre-labeled with scene type labels; and
[0155] input the to-be-tested image into the weight distribution model to obtain a weight coefficient corresponding to the image scene type of the to-be-tested image.
[0156] In some embodiments of the present application, the first comparison module 920 is further configured to encode the to-be-tested image through an image encoder in the CLIP model to obtain a first semantic encoding feature;
[0157] encode the reference image through the image encoder in the CLIP model to obtain a second semantic encoding feature;
[0158] determine a semantic similarity of the to-be-tested image and the reference image in a semantic dimension according to a similarity of the first semantic encoding feature and the second semantic encoding feature.
[0159] In some embodiments of the present application, the first comparison module 920 is further configured to encode the resource description text corresponding to the virtual resource through a text encoder in the CLIP model to obtain a third semantic encoding feature;
[0160] determine a semantic similarity of the to-be-tested image and the reference image in a semantic dimension based on a first similarity of the first semantic encoding feature and the second semantic encoding feature, and a second similarity of the first semantic encoding feature and the third semantic encoding feature.
[0161] In some embodiments of the present application, the collection module 910 is further configured to collect an interface containing the virtual resource on a client running a target application to obtain a to-be-tested image of the virtual resource, and determine a reference image of the virtual resource, the reference image including a historical interface containing the virtual resource on a client running a historical version of the target application.
[0162] In some embodiments of the present application, the collection module 910 is further configured to pre-process the collected interface containing the virtual resource to obtain a to-be-tested image of the virtual resource, and pre-process the historical interface to obtain a reference image of the virtual resource.
[0163] The preprocessing includes at least one of noise reduction processing, mask processing, foreground extraction processing, morphological optimization, and cropping processing.
[0164] The specific limitations of the virtual resource rendering effect detection apparatus can refer to the limitations of the virtual resource rendering effect detection method described above, which will not be repeated here. Each module in the virtual resource rendering effect detection apparatus described above can be realized by software, hardware, and combinations thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0165] In the embodiments of the present application, the to-be-tested image and the corresponding reference image of the virtual resource are obtained, and then the semantic similarity in the semantic dimension and the visual similarity in the visual dimension are analyzed based on the to-be-tested image and the reference image, so as to accurately determine the rendering effect detection result of the virtual resource in different dimensions, thereby improving the rendering effect detection effect of the virtual resource.
[0166] In some embodiments of the present application, the virtual resource rendering effect detection apparatus can be realized in the form of a computer program, which can run on a computer device as shown in Figure 10 The memory of the computer device can store various program modules constituting the virtual resource rendering effect detection apparatus, such as the acquisition module 910, the first comparison module 920, the second comparison module 930, and the detection module 940 as shown in Figure 9 The computer program constituted by various program modules enables the processor to execute the steps in the virtual resource rendering effect detection method of each embodiment of the present application described in the specification.
[0167] For example, Figure 10 The computer device as shown in Figure 9The display module 810 in the rendering effect detection of the virtual resource performs step S110. The computer device can perform step S120 through the first comparison module 920. The computer device can perform step S130 through the second comparison module 930, and the like. The computer device includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with external computer devices through network connection. The computer program is executed by the processor to implement a rendering effect detection method of a virtual resource.
[0168] Those skilled in the art can understand that, Figure 10 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0169] In some embodiments of the present application, a computer device is provided, including one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the following steps:
[0170] Obtaining a to-be-tested image of a virtual resource, and determining a reference image of the virtual resource;
[0171] Based on the semantic features of the to-be-tested image and the reference image, determining a semantic similarity of the to-be-tested image and the reference image in a semantic dimension;
[0172] Based on the visual features of the to-be-tested image and the reference image, determining a visual similarity of the to-be-tested image and the reference image in a visual dimension;
[0173] Based on the semantic similarity and the visual similarity, determining a rendering effect detection result of the virtual resource.
[0174] In some embodiments of the present application, when the processor executes the computer program, the following steps are also implemented: converting the to-be-tested image into a first target to-be-tested image in an HSV color space, and converting the reference image into a first target reference image in the HSV color space;
[0175] determine a first normalized histogram of the first target test image and a second normalized histogram of the first target reference image based on value distribution of each pixel in the first target test image and the first target reference image in the first channel and the second channel;
[0176] determine a first visual similarity of the test image and the reference image in color gamut distribution based on Bhattacharyya distance between the first normalized histogram and the second normalized histogram.
[0177] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: converting the test image into a second target test image in an RGB color space, and converting the reference image into a second target reference image in the RGB color space;
[0178] extracting a plurality of test feature images of the second target test image at a plurality of levels by a pre-trained model, and extracting a plurality of reference feature images of the second target reference image at the plurality of levels by the pre-trained model;
[0179] determining feature similarity of the second target test image and the second target reference image at each level based on the plurality of test feature images and the plurality of reference feature images;
[0180] weighting the feature similarity of the second target test image and the second target reference image at each level according to the resource type of the virtual resource, to obtain a second visual similarity of the test image and the reference image in texture details.
[0181] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: extracting a first feature point in the test image, and extracting a second feature point in the reference image;
[0182] performing a nearest neighbor matching on the first feature point and the second feature point for each of the first feature points, to determine at least two second feature points matched with the first feature point;
[0183] determining a target feature point from the first feature point based on a distance ratio between the first feature point and the at least two second feature points;
[0184] determining a transformation matrix of the test image and the reference image based on the first feature point and the second feature point, and identifying a matched feature point pair with a matching error less than a preset threshold through the transformation matrix;
[0185] determine a third visual similarity between the to-be-tested image and the reference image in a geometric structure based on the first number of the target feature points and the second number of the matched feature point pairs.
[0186] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: converting the to-be-tested image into a first grayscale image, and converting the reference image into a second grayscale image;
[0187] calculating pixel statistical values of the first grayscale image and the second grayscale image based on pixel values of each pixel point in the first grayscale image and the second grayscale image; the pixel statistical values include at least one of mean value, standard deviation, covariance, mean square error, and peak signal-to-noise ratio;
[0188] determining a fourth visual similarity between the to-be-tested image and the reference image in a pixel point based on differences in the pixel statistical values of the first grayscale image and the second grayscale image.
[0189] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: weighting the first visual similarity, the second visual similarity, the third visual similarity, and the fourth visual similarity based on a weight coefficient corresponding to an image scene type of the to-be-tested image, to obtain a visual similarity between the to-be-tested image and the reference image in a visual dimension.
[0190] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: training a weight distribution model based on sample image data pre-labeled with scene type labels; and
[0191] inputting the to-be-tested image into the weight distribution model to obtain a weight coefficient corresponding to an image scene type of the to-be-tested image.
[0192] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: encoding the to-be-tested image through an image encoder in the CLIP model to obtain first semantic encoding features;
[0193] encoding the reference image through the image encoder in the CLIP model to obtain second semantic encoding features;
[0194] determining a semantic similarity between the to-be-tested image and the reference image in a semantic dimension according to a similarity between the first semantic encoding features and the second semantic encoding features.
[0195] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: encoding the resource description text corresponding to the virtual resource by a text encoder in the CLIP model to obtain third semantic encoding features;
[0196] Based on the first similarity between the first semantic encoding features and the second semantic encoding features, and the second similarity between the first semantic encoding features and the third semantic encoding features, the semantic similarity of the to-be-tested image and the reference image in the semantic dimension is determined.
[0197] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: collecting an interface containing the virtual resource on a client running a target application to obtain a to-be-tested image of the virtual resource, and determining a reference image of the virtual resource, the reference image including a historical interface containing the virtual resource on a client running a historical version of the target application.
[0198] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: preprocessing the collected interface containing the virtual resource to obtain the to-be-tested image of the virtual resource, and preprocessing the historical interface to obtain the reference image of the virtual resource;
[0199] The preprocessing includes at least one of noise reduction processing, mask processing, foreground extraction processing, morphological optimization, and cropping processing.
[0200] In some embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is loaded by a processor to make the processor execute the following steps:
[0201] A to-be-tested image of a virtual resource is obtained, and a reference image of the virtual resource is determined;
[0202] Based on the semantic features of the to-be-tested image and the reference image, a semantic similarity of the to-be-tested image and the reference image in a semantic dimension is determined;
[0203] Based on the visual features of the to-be-tested image and the reference image, a visual similarity of the to-be-tested image and the reference image in a visual dimension is determined;
[0204] Based on the semantic similarity and the visual similarity, a virtual resource rendering effect detection result is determined.
[0205] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: converting the to-be-tested image into a first target to-be-tested image in an HSV color space, and converting the reference image into a first target reference image in the HSV color space;
[0206] Based on the value distribution of each pixel point in the first target to-be-tested image and the first target reference image in the first channel and the second channel, a first normalized histogram of the first target to-be-tested image and a second normalized histogram of the first target reference image are determined.
[0207] Based on the Bhattacharyya distance between the first normalized histogram and the second normalized histogram, a first visual similarity of the to-be-tested image and the reference image in the color gamut distribution is determined.
[0208] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: converting the to-be-tested image into a second target to-be-tested image in a YUV color space, and converting the reference image into a second target reference image in the YUV color space;
[0209] extracting a plurality of to-be-tested feature images of the second target to-be-tested image at a plurality of levels by a pre-trained model, and extracting a plurality of reference feature images of the second target reference image at the plurality of levels by the pre-trained model;
[0210] Based on the plurality of to-be-tested feature images and the plurality of reference feature images, a feature similarity of the second target to-be-tested image and the second target reference image at each level is determined.
[0211] According to the resource type of the virtual resource, the feature similarity of the second target to-be-tested image and the second target reference image at each level is weighted to obtain a second visual similarity of the to-be-tested image and the reference image in texture details.
[0212] In some embodiments of the present application, the processor, when executing the computer program, further implements the following steps: extracting a first feature point in the to-be-tested image, and extracting a second feature point in the reference image;
[0213] For each of the first feature points, the first feature point and the second feature point are subjected to a nearest neighbor matching to determine at least two second feature points matched with the first feature point.
[0214] Based on the distance ratio between the first feature point and the at least two second feature points, a target feature point is determined from the first feature point.
[0215] determine a transformation matrix of the to-be-tested image and the reference image based on the first feature points and the second feature points, and identify a matching feature point pair with a matching error less than a preset threshold through the transformation matrix;
[0216] determine a third visual similarity in geometry between the to-be-tested image and the reference image based on a first number of the target feature points and a second number of the matching feature point pairs.
[0217] In some embodiments of the present application, the processor further implements the following steps when executing the computer program: converting the to-be-tested image into a first grayscale image, and converting the reference image into a second grayscale image;
[0218] calculating pixel statistical values of the first grayscale image and the second grayscale image based on pixel values of each pixel point in the first grayscale image and the second grayscale image; the pixel statistical values include at least one of mean value, standard deviation, covariance, mean square error, and peak signal-to-noise ratio;
[0219] determining a fourth visual similarity in pixel points between the to-be-tested image and the reference image based on differences in the pixel statistical values of the first grayscale image and the second grayscale image.
[0220] In some embodiments of the present application, the processor further implements the following steps when executing the computer program: weighting the first visual similarity, the second visual similarity, the third visual similarity, and the fourth visual similarity based on a weight coefficient corresponding to an image scene type of the to-be-tested image, to obtain a visual similarity in visual dimension between the to-be-tested image and the reference image.
[0221] In some embodiments of the present application, the processor further implements the following steps when executing the computer program: training a weight allocation model based on sample image data pre-labeled with scene type labels; and
[0222] inputting the to-be-tested image into the weight allocation model to obtain a weight coefficient corresponding to an image scene type of the to-be-tested image.
[0223] In some embodiments of the present application, the processor further implements the following steps when executing the computer program: encoding the to-be-tested image through an image encoder in the CLIP model to obtain first semantic encoding features;
[0224] encoding the reference image through the image encoder in the CLIP model to obtain second semantic encoding features;
[0225] According to the similarity between the first semantic coding feature and the second semantic coding feature, a semantic similarity of the to-be-tested image and the reference image in a semantic dimension is determined.
[0226] In some embodiments of the present application, when the processor executes the computer program, the following steps are also implemented: encoding the resource description text corresponding to the virtual resource by a text encoder in the CLIP model to obtain a third semantic coding feature;
[0227] Based on the first similarity between the first semantic coding feature and the second semantic coding feature, and the second similarity between the first semantic coding feature and the third semantic coding feature, a semantic similarity of the to-be-tested image and the reference image in a semantic dimension is determined.
[0228] In some embodiments of the present application, when the processor executes the computer program, the following steps are also implemented: collecting an interface containing the virtual resource on a client running the target application to obtain a to-be-tested image of the virtual resource, and determining a reference image of the virtual resource, the reference image including a historical interface containing the virtual resource on a client running a historical version of the target application.
[0229] In some embodiments of the present application, when the processor executes the computer program, the following steps are also implemented: preprocessing the collected interface containing the virtual resource to obtain the to-be-tested image of the virtual resource, and preprocessing the historical interface to obtain the reference image of the virtual resource;
[0230] Preprocessing includes at least one of noise reduction processing, mask processing, foreground extraction processing, morphological optimization, and cropping processing.
[0231] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. The volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0232] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0233] The above provides a detailed introduction to the virtual resource rendering effect detection method, device, computer device and storage medium provided by the embodiments of the present application. The principle and implementation mode of the present application are described in this paper, and the above embodiment is only used to help understand the method and core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as the limitation of the present application.
Claims
1. A method for detecting rendering effects of virtual resources, characterized in that: The method comprises: acquiring a to-be-tested image of a virtual resource and determining a reference image of the virtual resource; determining semantic similarity of the to-be-tested image and the reference image in a semantic dimension based on semantic features of the to-be-tested image and the reference image; determining visual similarity of the to-be-tested image and the reference image in a visual dimension based on visual features of the to-be-tested image and the reference image; determining a rendering effect detection result of the virtual resource based on the semantic similarity and the visual similarity.
2. The method of claim 1, wherein, The visual similarity of the to-be-tested image and the reference image in the visual dimension at least comprises first visual similarity of the to-be-tested image and the reference image in color gamut distribution, second visual similarity of the to-be-tested image and the reference image in texture details, third visual similarity of the to-be-tested image and the reference image in geometric structure, and fourth visual similarity of the to-be-tested image and the reference image in pixel points.
3. The method of claim 2, wherein, The first visual similarity of the to-be-tested image and the reference image in color gamut distribution is obtained by the following steps: converting the to-be-tested image into a first target to-be-tested image in an HSV color space, and converting the reference image into a first target reference image in the HSV color space; determining a first normalized histogram of the first target to-be-tested image and a second normalized histogram of the first target reference image based on value distribution of each pixel point in the first target to-be-tested image and the first target reference image in a first channel and a second channel; determining the first visual similarity of the to-be-tested image and the reference image in color gamut distribution based on Bhattacharyya distance between the first normalized histogram and the second normalized histogram.
4. The method of claim 2, wherein, The second visual similarity of the to-be-tested image and the reference image in texture details is obtained by the following steps: converting the to-be-tested image into a second target to-be-tested image in a YUV color space, and converting the reference image into a second target reference image in the YUV color space; extracting a plurality of to-be-tested feature images of the second target to-be-tested image at a plurality of levels by a pre-trained model, and extracting a plurality of reference feature images of the second target reference image at the plurality of levels by the pre-trained model; determining feature similarity of the second target to-be-tested image and the second target reference image at each level based on the plurality of to-be-tested feature images and the plurality of reference feature images; weighting the feature similarity of the second target to-be-tested image and the second target reference image at each level according to a resource type of the virtual resource, to obtain the second visual similarity of the to-be-tested image and the reference image in texture details.
5. The method of claim 2, wherein, The third visual similarity of the to-be-tested image and the reference image in geometric structure is obtained by the following steps: extracting a first feature point in the to-be-tested image and a second feature point in the reference image; for each first feature point, performing near neighbor matching on the first feature point and the second feature point to determine at least two second feature points matched with the first feature point; determine a target feature point from the first feature points based on a distance ratio between the first feature point and the at least two second feature points; determine a transformation matrix of the to-be-tested image and the reference image based on the first feature point and the second feature point, and identify a matching feature point pair with a matching error less than a preset threshold through the transformation matrix; determine a third visual similarity in a geometric structure of the to-be-tested image and the reference image based on a first number of the target feature points and a second number of the matching feature point pairs.
6. The method of claim 2, wherein, The fourth visual similarity of the to-be-tested image and the reference image in pixel points is obtained through the following steps: convert the to-be-tested image into a first gray image, and convert the reference image into a second gray image; calculate pixel statistical values of the first gray image and the second gray image based on pixel values of each pixel point in the first gray image and the second gray image; The pixel statistical values include at least one of mean value, standard deviation, covariance, mean square error and peak signal-to-noise ratio. determine the fourth visual similarity of the to-be-tested image and the reference image in pixel points based on the difference of the pixel statistical values of the first gray image and the second gray image.
7. The method of claim 2, wherein, The method further comprises: weight the first visual similarity, the second visual similarity, the third visual similarity and the fourth visual similarity based on a weight coefficient corresponding to the image scene type of the to-be-tested image, to obtain a visual similarity of the to-be-tested image and the reference image in a visual dimension.
8. The method of claim 7, wherein, The method further comprises: train a weight distribution model based on sample image data pre-labeled with scene type labels; and input the to-be-tested image into the weight distribution model to obtain a weight coefficient corresponding to the image scene type of the to-be-tested image.
9. The method of claim 1, wherein, The determining of the semantic similarity of the to-be-tested image and the reference image in a semantic dimension based on the semantic features of the to-be-tested image and the reference image comprises: encoding the to-be-tested image through an image encoder in a CLIP model to obtain a first semantic encoding feature; encoding the reference image through the image encoder in the CLIP model to obtain a second semantic encoding feature; determining the semantic similarity of the to-be-tested image and the reference image in a semantic dimension according to the similarity of the first semantic encoding feature and the second semantic encoding feature.
10. The method of claim 9, wherein, The method further comprises: encoding a resource description text corresponding to the virtual resource through a text encoder in the CLIP model to obtain a third semantic encoding feature; The determining of the semantic similarity of the to-be-tested image and the reference image in a semantic dimension according to the similarity of the first semantic encoding feature and the second semantic encoding feature comprises: determining the semantic similarity of the to-be-tested image and the reference image in a semantic dimension based on a first similarity of the first semantic encoding feature and the second semantic encoding feature, and a second similarity of the first semantic encoding feature and the third semantic encoding feature.
11. The method according to any one of claims 1 to 10, characterized in that, The method comprises: The method further comprises:
12. The method of claim 11, wherein, The method further comprises: The method further comprises: The method further comprises:
13. A device for detecting rendering effects of virtual resources, characterized in that: The method further comprises: The method further comprises: The computer device comprises: one or more processors; a memory; and 14. A computer device, comprising: one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the virtual resource rendering effect detection method of any one of claims 1 to 12. A computer program is stored thereon, and the computer program is loaded by a processor to execute the virtual resource rendering effect detection method of any one of claims 1 to 12. 15. A computer readable storage medium, characterized in that,