Object detection method and related device

By determining the detection area related to the virtual object in the image to be detected and determining the target area according to the appearance color similarity, the problem of dependence on continuous multi-frames in the prior art is solved, and efficient and general object detection is achieved.

CN120259615APending Publication Date: 2025-07-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410008743.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-03
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, the object detection method based on the dynamic traceability model needs to rely on continuous multi-frame pictures, which is difficult to apply to separate, non-continuous frame scenes, and takes a long time.

Method used

By obtaining the appearance color of the virtual object and the image to be detected, the detection area related to the size of the virtual object is determined, and the target area is determined based on the similarity between the pixel color and the appearance color, the dependence on continuous multi-frame images is avoided.

Benefits of technology

It realizes efficient object detection in separate, non-continuous frame scenarios, saves detection time and improves detection universality and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259615A_ABST
    Figure CN120259615A_ABST
Patent Text Reader

Abstract

The invention discloses an object detection method and a related device, a detection area is determined in a to-be-detected image, a target area is determined from the detection area, the detection space is reduced, and time consumption is saved. The similarity between the pixel color in the target area and the appearance color meets the similarity condition, and the appearance color is used for indicating the color of the rendering abnormity appearance of the virtual object, so that the target area can represent the area where the rendering abnormity possibly exists in the virtual object. Object detection can be correspondingly carried out in the target area to determine whether the target area comprises the virtual object with the rendering abnormity or not. Obviously, an object detection mode realized based on the characteristics of the virtual object is provided, dependence on continuous multi-frame images is not needed, the method can be well applied to a scene with independent and discontinuous frames, the universality is higher, and compared with a mode of carrying out object detection through a dynamic traceability model, the method does not need to train a corresponding dynamic traceability model, and time consumption can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technologies, and in particular, to an object detection method and related devices. Background Art

[0002] In visual displays, a screen can be used to show users the content to be presented. For example, in game visual displays, the screen can be a game screen. Usually, an object can be shown on the screen, and this object can be the main carrier for transmitting information to users. For example, in a game screen, the object can be controlled by the user to experience the game world.

[0003] In practical applications, the objects shown on the screen are usually virtual objects, and rendering is required during the display. For example, rendering materials such as the clothing and accessories of virtual objects. However, there may be some rendering problems (such as rendering lags, missing materials, etc.), resulting in rendering anomalies in the finally presented objects, which will greatly affect the user experience. Therefore, object detection is usually performed on the screen to determine whether there are rendering anomalies in the objects on the screen for timely repair, etc.

[0004] In related technologies, a dynamic tracing method is adopted for object detection. Specifically, a dynamic tracing model can be trained, and the dynamic tracing model is used to first determine the area where the object is located in the screen, and then determine the dynamics of the object in multiple consecutive frames of the screen to judge whether there are rendering anomaly problems. This method requires relying on multiple consecutive frames of the screen for object detection. In actual applications, some scenarios can only provide individual and non - consecutive screen frames. For such scenarios, the related technology based on dynamic tracing is difficult to apply, has application limitations, and requires training a corresponding dynamic tracing model, which is time - consuming. Summary of the Invention

[0005] To solve the above - mentioned technical problems, this application provides an object detection method and related devices, which do not require training a corresponding dynamic tracing model, can save time, and have higher generality.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] On the one hand, the embodiments of this application provide an object detection method, and the method includes:

[0008] Obtain the appearance color of a virtual object and an image to be detected. The image to be detected is determined according to the display screen for displaying the virtual object, and the appearance color is used to indicate the color of the rendering - abnormal appearance of the virtual object;

[0009] Determine a detection area in the image to be detected, where the size of the detection area is related to the size of the virtual object, and the size of the detection area is larger than the size of the virtual object;

[0010] Determine a target area from the detection area according to the similarity between the pixel colors in the detection area and the appearance color, where the similarity corresponding to the pixel colors in the target area meets the similarity condition;

[0011] Perform object detection in the target area to determine whether the target area includes the virtual object with rendering anomalies.

[0012] In another aspect, an object detection device is provided in an embodiment of the present application. The device includes an acquisition unit, a determination unit, and a detection unit:

[0013] The acquisition unit is configured to acquire the appearance color of the virtual object and the image to be detected. The image to be detected is determined according to the display screen for displaying the virtual object, and the appearance color is used to indicate the color of the rendering anomaly appearance of the virtual object;

[0014] The determination unit is configured to determine a detection area in the image to be detected, where the size of the detection area is related to the size of the virtual object, and the size of the detection area is larger than the size of the virtual object;

[0015] The determination unit is further configured to determine a target area from the detection area according to the similarity between the pixel colors in the detection area and the appearance color, where the similarity corresponding to the pixel colors in the target area meets the similarity condition;

[0016] The detection unit is configured to perform object detection in the target area to determine whether the target area includes the virtual object with rendering anomalies.

[0017] In another aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory:

[0018] The memory is used to store a computer program and transmit the computer program to the processor;

[0019] The processor is configured to execute the method described in any of the foregoing aspects according to the instructions in the computer program.

[0020] In another aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store a computer program. When the computer program is run on a computer device, the computer device is caused to execute the method described in any of the foregoing aspects.

[0021] On the other hand, an embodiment of the present application provides a computer program product, including a computer program which, when running on a computer device, causes the computer device to execute the method described in any of the foregoing aspects.

[0022] As can be seen from the above technical solutions, for a to-be-detected image determined according to a display screen showing a virtual object, a detection region can be determined in the to-be-detected image. Subsequently, processing can be performed based on the detection region with a smaller range, reducing the detection space, which is beneficial for saving time. Moreover, the size of the detection region is larger than the size of the virtual object, ensuring that the detection region can enclose the virtual object, which is beneficial for guaranteeing the accuracy of subsequent object detection. In addition, the size of the detection region is related to the size of the virtual object, making the size of the detection region dynamic and flexibly applicable to different virtual objects, with higher versatility. Then, a target region can be determined from the detection region, and the similarity between the pixel color and the appearance color in the target region meets the similarity condition. Since the appearance color can be used to indicate the color of the abnormal appearance of the virtual object being rendered, the target region can represent the region where the virtual object may have an abnormal rendering. Based on this, the search space can be further reduced according to the appearance color, which is beneficial for saving time. Correspondingly, object detection can be performed in the target region to determine whether the target region includes a virtual object with an abnormal rendering. It can be seen that an object detection method based on the characteristics of the virtual object (including size and appearance color) is provided, which does not need to rely on consecutive frames of images and can be well applied to individual, non-consecutive frame scenarios. Moreover, compared with the method of performing object detection through a dynamic traceback model, there is no need to train a corresponding dynamic traceback model, which can save time. In addition, for consecutive frame scenarios, each frame of image can be used as the to-be-detected image described above to achieve object detection, which is also applicable and has higher versatility. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0024] Figure 1 It is a schematic diagram of a game screen provided by an embodiment of the present application;

[0025] Figure 2 It is a schematic diagram of an application scenario of an object detection method provided by an embodiment of the present application;

[0026] Figure 3 It is a flowchart of an object detection method provided by an embodiment of the present application;

[0027] Figure 4 Schematic diagram of an activatable area provided by an embodiment of the present application;

[0028] Figure 5 Another schematic diagram of an activatable area provided by an embodiment of the present application;

[0029] Figure 6 Schematic diagram of a direction and a direction operator provided by an embodiment of the present application;

[0030] Figure 7 Schematic diagram of the configuration result of a direction operator provided by an embodiment of the present application;

[0031] Figure 8 Schematic diagram of a process for determining a detector provided by an embodiment of the present application;

[0032] Figure 9 Schematic diagram of the framework of an object detection method provided by an embodiment of the present application;

[0033] Figure 10 Structural diagram of an object detection device provided by an embodiment of the present application;

[0034] Figure 11 Structural diagram of a terminal provided by an embodiment of the present application;

[0035] Figure 12 Structural diagram of a server provided by an embodiment of the present application. Detailed implementation manners

[0036] The embodiments of the present application will be described below with reference to the accompanying drawings.

[0037] In practical applications, when using a screen to display content to be shown to a user, an object may be shown on the screen. The object may be the main carrier for transmitting information to the user. Generally, the object may be a virtual object. A virtual object may refer to a virtualized object with a certain form. The virtual object can move in a virtual scene and can interact with scene elements (such as wild monsters) in the virtual scene, etc. The user can control the virtual object to move in the virtual scene and control the virtual object to interact with the scene elements, etc., so as to obtain a richer experience. Among them, the virtual scene may be a virtual environment displayed (or provided) when an application program runs on a terminal. For example, it may be a simulation environment constructed based on the real world, or a semi-simulated and semi-fictional environment, or a purely fictional environment. The presentation form of the virtual scene may be any one of two-dimensional, 2.5D, and three-dimensional. The present application does not make any limitation thereto.

[0038] For ease of understanding, taking the game screen as an example, the game screen can display a virtual scene, where virtual objects have their own shapes in the virtual scene and occupy a part of the space in the virtual scene. For example, a certain frame of the game screen can be referred to Figure 1 as shown in Figure 1 In the example, this frame of the screen can include virtual objects, scene elements such as wild monsters, as well as skill controls, movement controls, etc. Generally, when displaying virtual objects in the screen, rendering is required. For example, rendering elements such as the clothing and accessories of virtual objects. However, there may be some rendering problems (such as rendering lags, missing materials, etc.), resulting in rendering anomalies in the finally displayed virtual objects, which will greatly affect the user experience. For example, Figure 1 In the example, a virtual object with a rendering anomaly is shown, specifically, it can be a rendering problem of missing virtual prop materials. For ease of understanding, an example of a virtual object with normal rendering is shown in the upper left corner of Figure 1 using a dashed box. Obviously, this rendering problem will affect the user's release of skills to fight against wild monsters, etc., greatly affecting the user experience.

[0039] Therefore, object detection is usually performed on the screen to determine whether there are rendering anomalies in the objects in the screen for timely repair, etc. In related technologies, a dynamic tracing method is used for object detection. Specifically, a dynamic tracing model can be trained, and the dynamic tracing model is used to first determine the area where the object is located in the screen, and then determine the dynamics of the object in multiple consecutive frames of the screen to judge whether there is a problem of rendering anomaly. In practical applications, dynamic tracing can be implemented based on algorithms such as frame difference method and MEANSHIFT tracing detection algorithm. In practical applications, multiple consecutive frames of the screen have frame dependency, and the dynamic tracing method has a good detection effect for dynamic scenes with tracing requirements.

[0040] However, this method adopted in related technologies requires relying on multiple consecutive frames of the screen for object detection. In practical applications, some scenes can only provide separate and non - consecutive frames of the screen. For such scenes, the method based on dynamic tracing in related technologies is difficult to apply and has application limitations. In practical applications, such a scene that provides separate and non - consecutive frames of the screen can be called a static scene. There is a need for object detection in the static scene, but usually there is no need to trace the object. For this type of static scene without tracing requirements, the dynamic tracing method is difficult to apply and requires training a corresponding dynamic tracing model, which is time - consuming.

[0041] To this end, the embodiments of the present application provide an object detection method and related devices. For a to-be-detected image determined according to a display screen showing a virtual object, a detection region whose size is related to the size of the to-be-detected object is determined from the to-be-detected image, and a target region whose similarity between the pixel color and the appearance color of the to-be-detected object meets a similarity condition is determined from the detection region. Among them, the appearance color can be used to indicate the color of the abnormal appearance of the virtual object rendered. Therefore, the target region can represent the region where the virtual object may have an abnormal rendering. Based on this, object detection can be performed in the target region to determine whether there is a virtual object with an abnormal rendering in the target region. It can be seen that the detection space can be reduced based on the characteristics of the virtual object (including size and appearance color), which is beneficial to saving time-consuming, and does not need to rely on consecutive frames of images, and can be well applied to individual and non-consecutive frame scenarios. And compared with the method of object detection through a dynamic trace model, there is no need to train the corresponding dynamic trace model, which can save time-consuming. In addition, for a scenario of consecutive frames, each frame of image can be used as the aforementioned to-be-detected image to implement object detection, which is also applicable and has higher versatility.

[0042] The object detection method provided by the embodiments of the present application can be implemented by a computer device, which can be a terminal or a server. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal includes but is not limited to smart phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, which are not limited in this application. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, audio and video, assisted driving, etc. The embodiments of the present application can be specifically applied to various object detection scenarios, for example, virtual object detection scenarios in virtual scenarios, etc.

[0043] It should be noted that in the specific implementation of the present application, the process of object detection may involve relevant data such as user information. When the above embodiments of the present application are applied to specific products or technologies, the user's separate consent or permission is required, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0044] The data processing method provided by the embodiments of this application may involve artificial intelligence technology. Artificial Intelligence (AI) uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, including theories, methods, technologies, and application systems for perceiving the environment, acquiring knowledge, and using knowledge to obtain optimal results. Among them, artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level and software-level technologies. Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, autonomous driving, and intelligent transportation. For example, in the embodiments of this application, machine learning can be used to train the model of the initial classifier to obtain a detector, which is convenient for using the detector to perform object detection and improve the efficiency of object detection.

[0045] Figure 2 FIG. shows an application scenario diagram of the object detection method provided by the embodiments of this application. In Figure 2 the shown scenario, the server 200 is taken as an example of the aforementioned computer device for illustration:

[0046] For the to-be-detected image determined according to the display screen showing the virtual object, where the display screen can be Figure 1 the game screen in the example. Correspondingly, the to-be-detected image can refer to a frame of the game screen, that is, it can be Figure 1 the frame shown.

[0047] When object detection is required, the server 200 can determine the detection area in the to-be-detected image. Subsequently, processing can be performed based on the smaller detection area, reducing the detection space and facilitating time savings. The detection space can refer to the image area that needs to be processed during the image processing process, also known as the search space. For example, the detection space when determining the detection area can be the entire to-be-detected image. After the detection area is determined, the detection space for subsequent steps can be the detection area, which is smaller than the entire to-be-detected image. Moreover, the size of the detection area is larger than the size of the virtual object, ensuring that the detection area can enclose the virtual object and facilitating the accuracy of subsequent object detection. And the size of the detection area is related to the size of the virtual object, making the size of the detection area dynamic and flexibly applicable to different virtual objects, with higher versatility. It should be noted that in Figure 2 the example, the detection area is only an example, and this application makes no limitations in this regard.

[0048] Next, the server 200 can determine a target area from the detection area, where the similarity between the pixel color and the appearance color in the target area meets the similarity condition. Among them, the appearance color can be used to indicate the color of the abnormal appearance rendered by the virtual object. Therefore, the target area can represent the area where the virtual object may have abnormal rendering. Based on this, further reducing the search space according to the appearance color is beneficial to saving time consumption.

[0049] In practical applications, a virtual object may have multiple sets of different costumes, which makes there be multiple types of fashion colors (Role Skin Color, RSC) under normal rendering conditions. The fashion color can be the color of the costume worn by the virtual object. When rendering and displaying the virtual object, it needs to be rendered according to the fashion color. For the same type of abnormal rendering situation, different types of abnormal appearance will be presented under different fashion colors. In addition, for different types of abnormal rendering situations, different types of abnormal appearance will also be presented. These reasons will result in the existence of multiple types of appearance colors. Correspondingly, the appearance color can include the colors corresponding to multiple types of abnormal appearance.

[0050] For example, in Figure 2 the example, the color of the normal appearance and the colors corresponding to six types of abnormal appearance are shown. Among them, both 1 and 2 in the appearance color can represent the abnormal appearance caused by the lack of virtual prop materials. 3 in the appearance color can represent the abnormal appearance caused by the lack of hair elements. 4 in the appearance color can represent the abnormal appearance caused by the lack of body model elements. Both 5 and 6 in the appearance color can represent the abnormal appearance of the costume color. It can be understood that Figure 2 this is only an example and is not subject to any limitation. In Figure 2 the example, the similarity between the pixel color in the detection area and 1 in the appearance color meets the similarity condition. Therefore, the target area as shown in Figure 2 can be determined from the detection area based on the similarity with the appearance color. It should be noted that different abnormal rendering problems will show different abnormal appearance. For example, the outlines shown are different, and the corresponding determined target areas may also be different. This application does not make any limitation on this. In Figure 2 the example, the target area is only an example and is not subject to any limitation.

[0051] Finally, the server 200 may perform object detection in the target area to determine whether the target area includes virtual objects with rendering anomalies. It can be seen that an object detection method based on the characteristics of virtual objects (including size and appearance color) is provided, which can reduce the detection space, save time, and does not rely on consecutive frames of images, being well applicable to individual and non-consecutive frame scenarios. Moreover, compared with the object detection method using a dynamic tracing model, there is no need to train a corresponding dynamic tracing model, saving time. In addition, for consecutive frame scenarios, each frame of image can be used as the aforementioned image to be detected, thereby realizing object detection, which is also applicable and has higher generality.

[0052] Figure 3 The following is a flowchart of an object detection method provided by an embodiment of the present application, taking the server as an example of the aforementioned computer device. The method includes S301 - S304:

[0053] S301: Obtain the appearance color of the virtual object and the image to be detected.

[0054] When object detection is required, the server may obtain the appearance color of the virtual object and the image to be detected. Herein, the image to be detected may refer to the image for which object detection is required, and the image to be detected may be determined according to the display screen showing the virtual object. The display screen may be, for example, the aforementioned game screen, and the virtual object may be an active object in the game screen. The user (game player) may control the virtual object to move to experience the game world.

[0055] Among them, the appearance color of the virtual object may be used to indicate the color of the rendering anomaly appearance of the virtual object. It should be noted that the present application does not make any limitations on the setting of the appearance color. In practical applications, there are various types of rendering anomaly situations. Correspondingly, the appearance color may include the colors corresponding to multiple types of rendering anomaly appearances. For example, in Figure 2 the example, the colors of six different rendering anomaly appearances are shown. It can be understood that in practical applications, the appearance color may also include the colors of other types of rendering anomaly appearances.

[0056] S302: Determine the detection area in the image to be detected.

[0057] For the image to be detected, the server can determine the detection area in the image to be detected. Subsequently, processing can be performed based on the smaller detection area, reducing the detection space, which is beneficial for saving time. Moreover, the size of the detection area is larger than the size of the virtual object, ensuring that the detection area can enclose the virtual object and facilitating the guarantee of the accuracy of subsequent object detection. In addition, the size of the detection area is related to the size of the virtual object, making the size of the detection area dynamic and flexibly applicable to different virtual objects, with higher versatility.

[0058] It should be noted that this application does not make any limitations on the setting of the size of the detection area. For the sake of easy understanding, the embodiments of this application provide the following method as an example:

[0059] In practical applications, in addition to the virtual object, the display screen may also include other elements. Taking the display screen as a game screen as an example, in addition to the virtual object, it may also include various elements such as wild monsters, maps, grasslands, treasure chests, etc. Similar to the virtual object, these elements also have their own shapes in the display screen and will occupy a part of the space in the display screen. In order to minimize the detection space to the greatest extent while ensuring the accuracy of object detection, in a possible implementation manner, the shape of the detection area can be set as a rectangle, and this rectangle can be the circumscribed rectangle of the virtual object, thereby achieving the purpose of enclosing the virtual object and being the rectangle with the smallest size that can enclose the virtual object. Based on this, while ensuring the accuracy of object detection, the detection space is minimized to the greatest extent, saving time.

[0060] It should also be noted that this application does not make any limitations on the method of determining the detection area. For the sake of easy understanding, the embodiments of this application provide the following method as an example:

[0061] In some scenarios, the virtual object can move within the movable area in the display screen. Generally, the size of the movable area is larger than the size of the virtual object. In this way, the user (such as a game player) can control the virtual object to move within the movable area to obtain a richer experience. Therefore, in a possible implementation manner, the detection area can be determined based on the movable area. In specific implementation, the server can obtain the movable area of the virtual object in the display screen. The movable area can refer to the area where the virtual object can appear in the display screen. Correspondingly, the other areas in the display screen except the movable area can be considered as the immovable areas of the virtual object, specifically referring to the areas where the virtual object cannot appear. Then, the server can determine the detection area within the movable area corresponding to the image to be detected. Based on this, the detection area can be determined within the movable area without paying attention to the immovable areas, which can also be regarded as a way to reduce the detection space, facilitating saving time and improving detection efficiency.

[0062] It should be noted that the present application does not make any limitations on the method for determining the movable area. In different scenarios, the size of the movable area of the virtual object in the display screen is different, so the movable area can be determined based on the specific scenario. For the convenience of understanding, the embodiments of the present application provide the following examples:

[0063] For example, refer to Figure 4 As shown, an example of a movable area is shown. Correspondingly, the virtual object can be controlled to move within the movable area by moving the control, so that the virtual object can appear at different positions in the display screen. For example, in some three-dimensional game scenarios, the image to be detected determined based on the game screen can be Figure 4 such an example.

[0064] Another example, refer to Figure 5 As shown, another example of a movable area is shown. In the Figure 5 example, the position of the virtual object in the display screen can be considered relatively fixed. When the virtual object is controlled to move by moving the control, what actually moves can be the background in the display screen (that is, other elements except the virtual object). Therefore, visually, it appears that the position of the virtual object has not changed. For example, in some two-dimensional or 2.5-dimensional horizontal game scenarios, the image to be detected determined based on the game screen can be Figure 5 such an example.

[0065] S303: Determine the target area from the detection area according to the similarity between the pixel color and the appearance color in the detection area.

[0066] After determining the detection area, the server can determine the target area from the detection area according to the similarity between the pixel color and the appearance color in the detection area. Among them, the similarity corresponding to the pixel color in the target area satisfies the similarity condition, and the similarity condition can be used to judge whether the similarity between the pixel color and the appearance color in the detection area meets the requirements. The determined target area can be used to represent the area where the virtual object may have rendering anomalies. For example, the target area can be referred to Figure 2 as shown in the example. It should be noted that the present application does not make any limitations on the setting of the similarity condition. In practical applications, in different scenarios, the manifestation form of the similarity can be different, and correspondingly, different similarity conditions can be set. In one way, the similarity can be in the form of a numerical value, and the similarity condition can be a threshold in the form of a numerical value. For example, the similarity condition can be that the similarity is greater than 95%.

[0067] Since the appearance color can be used to indicate the color of the abnormal appearance of the virtual object during rendering, the target area can represent the area where the virtual object may have abnormal rendering. Based on this, further reducing the search space according to the appearance color helps save time-consuming.

[0068] It should be noted that this application does not make any restrictions on how to determine the target area. In practical applications, the appearance color can refer to the color of the abnormal appearance during rendering. For different types of abnormal appearance during rendering, the visual manifestations of the corresponding colors may also be different, specifically manifested as different pixel color values of the appearance color. In addition, a virtual object may have multiple sets of different clothing, and the colors of different clothing may vary greatly. For the same type of abnormal appearance during rendering, the appearance colors presented on different clothing may also be different. Therefore, in one possible implementation, the method for determining the target area can be flexibly selected based on the situation of the appearance color. For the convenience of understanding, the embodiments of this application provide the following methods as examples:

[0069] In some scenarios, the clothing color of the virtual object can be relatively single. For example, the color of a set of clothing corresponding to the original skin of the virtual object mainly includes two colors, black and gray. Another example is that the model color of the virtual object is usually a single skin color. If all clothing elements are lost during rendering, it will also present an abnormal appearance during rendering. For this situation, the difference in the pixel color values of the appearance color is relatively small. Correspondingly, the target area can be directly determined from the detection area based on the appearance color. Specifically, during implementation, if it is determined that the difference in the pixel color values of the appearance color is less than or equal to the difference threshold, it indicates that the fashion color of the virtual object is relatively single. At this time, the server can determine the color threshold according to the appearance color. The difference threshold can be set according to the actual situation. For example, different forms of difference thresholds can be set according to different forms of pixel color values. For example, the difference threshold can be a numerical form such as 20. The color threshold can be used to distinguish the appearance color from the non-appearance color. For example, the color threshold can be a specific pixel color value (for example, it can be a numerical form such as 183). Then, the server can screen out the pixel points whose pixel color values meet the color threshold from the pixel points in the detection area. For a certain pixel point, if the pixel color value meets the color threshold, it indicates that the pixel color of this pixel point is close to the appearance color, and it can be considered that this pixel point is a pixel point on the virtual object, that is, the pixel color value of this pixel point is close to the pixel color value of the appearance color. Correspondingly, the target area can be determined based on the screened pixel points. Based on this, by setting the color threshold, the pixel points whose pixel color values meet the color threshold can be quickly screened out from the detection area, and the target area can be obtained. For the situation where the color is relatively single, a simpler method for determining the target area is provided, which helps save time-consuming.

[0070] For better understanding, in the way of determining the target area based on the color threshold, the embodiments of the present application further provide the following specific implementation manners as examples:

[0071] In practical applications, the process of determining the target area based on the color threshold is also a process of image segmentation. In one possible implementation manner, during segmentation, the pixel color value of each pixel point can be compared with the color threshold. During this process, the color threshold can be subtracted from the pixel color value of each pixel point, and it can be verified whether the result is negative or positive. For example, those with a positive result can be considered to meet the color threshold and can be filtered out. If the result of a pixel point is negative because the color threshold is greater than the pixel color value of the pixel point or the pixel point is not in the expected target area, binary complement can be used to make the pixel point in the target area. In the final calculation, an AND gate can be used to compare the most significant bit of each pixel point. If the most significant bit is 1, the pixel point can be left unprocessed. Based on this, an implementation manner of determining the target area based on the color threshold is provided.

[0072] In some other scenarios, the clothing colors of virtual objects can also be relatively rich and colorful. For example, the colors of another set of clothing corresponding to the active skin of the virtual object can include various colors such as red, orange, black, pink, blue, etc. In this case, the differences in the pixel color values of the appearance colors are usually relatively large. For this situation, the target area can be determined according to the color distribution. Specifically, during implementation, if it is determined that the difference in the pixel color values of the appearance colors is greater than the difference threshold, it indicates that the fashion colors of the virtual object are relatively rich and colorful. At this time, the server can determine the color distribution of the appearance colors and the color distribution formed by the pixel colors in the detection area. Among them, the color distribution of the appearance colors can be used to represent the distribution of the pixel color values of the colors with abnormal rendered appearances, and the color distribution of the detection area can represent the distribution of the pixel color values of the pixel points in the detection area. Then, the server can determine the target area from the detection area according to the distribution similarity between the color distribution in the detection area and the color distribution of the appearance colors. Correspondingly, the distribution similarity corresponding to the color distribution in the target area meets the similarity condition. For example, in Figure 2 the example, based on the color distribution, the background part with a significant difference from the appearance color of the virtual object can be removed from the detection area, and the target area with a similarity in color distribution to the appearance color that meets the similarity condition can be filtered out. Based on this, the target area can be determined by comparing the similarities between the color distributions. For the case of relatively rich and colorful colors, it is applicable to various different situations of abnormal rendering and has higher generality.

[0073] It can be seen that the object detection method provided in this application, which is implemented based on the characteristics of virtual objects (including size and appearance color), can reduce the detection space and is beneficial to saving time. In practical applications, in addition to virtual objects, the display screen may also include elements such as maps and grass. The colors, textures, etc. of these elements will make the background color relatively rich, which will affect the distinguishability between the appearance color and the background color, and also affect the size of the target area determined from the detection area, thereby affecting the reduction of the detection space. That is to say, the degree of reduction of the detection space is related to factors such as the size of the virtual object and the distinguishability between the appearance color and the background color. In different scenarios, the degree of reduction that can be obtained may also be different.

[0074] To better quantify the degree of reduction of the detection space, the embodiments of this application provide the following methods as implementation examples for quantifying the degree of reduction of the detection space:

[0075] In practical applications, the target area is screened based on the appearance color. Whether it is the image to be detected, the detection area, or the target area, they can all be composed of a series of pixel points. With different sizes, it can be considered that the number of pixel points included is different. Therefore, in one possible implementation, the ratio of the number of pixel points in the target area to the number of pixel points in the image to be detected can be used as an optimization parameter to more intuitively quantify the degree of reduction of the detection space. For a given image to be detected, the number of pixel points in the image to be detected is fixed. Then, the fewer the number of pixel points in the target area, the smaller the size of the target area, and the smaller the detection space for subsequent object detection, indicating that the degree of reduction of the detection space is greater.

[0076] It can be understood that the target area is screened from the detection area and satisfies the similarity condition with the appearance color. Specifically, pixel points that meet the similarity condition can be screened from the detection area, and then the target area can be determined. Therefore, in one possible implementation, the aforementioned optimization parameter can be determined in the following manner:

[0077]

[0078] In the above formula, P can represent the optimization parameter, and the optimization parameter can be a numerical form such as a percentage. RSC can represent the fashion color, specifically referring to the aforementioned appearance color. j can refer to the pixel points in the detection area, can represent the number of pixel points in the detection area whose pixel colors are the same as the appearance color. IP can refer to the pixel colors of the pixel points in the image to be detected, and i can refer to the pixel points in the image to be detected, can represent the total number of pixel points in the image to be detected.

[0079] In practical applications, for a given image to be detected, The value is a known fixed value. Based on the above formula, by counting the number of pixel points, the degree of reduction of the detection space can be more intuitively quantified.

[0080] Generally, the size of the image to be detected can be rectangular, for example, it can be denoted as W*H. In some scenarios, for the sake of simplicity of identification, the detection area can also be represented by this rectangular shape, for example, it can be denoted as w*h. In the process of reducing the detection space, in essence, it is to select the area that may include virtual objects from the image to be detected and ignore other areas. In practical applications, the selected detection area can be called the Region Of Interest (ROI), and the other areas ignored can be called the Region-Of-Non-Interest (RONI). In the process of determining the ROI, the main purpose is to ignore the image background that does not contain virtual objects.

[0081] If the detection area is w*h, it can be considered that the distances from this detection area to the four sides of the image to be detected are t, b, l, and r respectively. In practical applications, these lengths may be related to the resolution of the actual image to be detected and the possible position layout of virtual objects in the specific scenario. For example, in Figure 5 In the game scenario shown, the position layout of virtual objects is basically unchanged. For such a scenario with a fixed position layout, the mapping relationship can be specified during initialization, and based on this mapping relationship, the corresponding values of t, b, l, and r in this scenario can be determined. Based on this, through the specified t, b, l, r and the size W*H of the image to be detected, the range of w*h can be directly determined, so as to quickly determine the detection area, which is more simple and fast.

[0082] S304: Perform object detection in the target area to determine whether there is a virtual object with rendering anomalies in the target area.

[0083] The target area can represent the area where virtual objects may have rendering anomalies. After determining the target area, the server can perform object detection in the target area to determine whether there is a virtual object with rendering anomalies in the target area. Based on this, the object detection is completed.

[0084] It should be noted that this application does not make any limitations on how to perform object detection. For the sake of easy understanding, the embodiments of this application provide the following method as an example:

[0085] In practical applications, the shapes corresponding to different objects usually vary. Therefore, in one possible implementation, it is possible to determine whether a virtual object with a rendering anomaly is included based on the shape. Specifically, the server can determine the object contour image of the pending object included in the target area. The pending object can refer to the object included in the target area, and the object contour image can be used to represent the shape of the pending object. In practical applications, not all of the pending objects included in the target area may be related to the virtual object. Therefore, after determining the object contour image, object detection can be performed based on the shape to determine whether it is a virtual object, which can also be considered as verifying whether the determined target area includes a virtual object. Specifically, the server can perform object detection based on the object contour image to determine whether the pending object included in the target area is a virtual object with a rendering anomaly. Based on this, by first determining the object contour image to determine the shape of the pending object, and then performing object detection to determine whether it is a virtual object, an object detection method based on shape judgment is provided, which is simpler.

[0086] It can be understood that the similarity between the pixel color in the target area and the appearance color (i.e., the color of the rendering anomaly appearance) satisfies the similarity condition. Therefore, during object detection, if it is determined that the shape of the pending object identified by the object contour image matches the shape of the virtual object under the rendering anomaly appearance, it can be considered that the pending object is a virtual object and is a virtual object with a rendering anomaly. Thus, the detection space can be reduced based on the appearance color, and object detection can be performed relying on the shape. It can be seen that the features of different dimensions of the virtual object are used in different stages, which is more flexible and conducive to saving time.

[0087] It should be noted that this application does not make any restrictions on how to determine the object contour image. For the sake of understanding, the following method is provided as an example in the embodiments of this application:

[0088] In practical applications, the main purpose of determining the object contour image is to determine the object contour (i.e., the external shape) of the object to be determined. After determining the object contour, the area enclosed by the object contour is the object contour image. Therefore, in a possible implementation manner, the object contour can be determined first, so as to determine the object contour image. In practical applications, the target area includes multiple pixel points, and the pixel color values corresponding to different pixel points may be different. Generally, from the perspective of the intensity change of the pixel color, the intensity change of the pixel points located on the object contour is more significant. Therefore, when determining the object contour, the pixel points on the object contour can be screened by determining the intensity change of the pixel color, so as to determine the object contour. In practical applications, the gradient at a pixel point can represent the intensity change of the pixel color at that pixel point. Therefore, the pixel points on the object contour can be screened based on the gradient. Among them, the gradient is a vector with a direction and an intensity (i.e., magnitude). Correspondingly, the gradient at pixel point A can represent the intensity change of the pixel color starting from pixel point A along the direction of the gradient. For example, along direction 1, the pixel points are distributed as pixel point A and pixel point B, then the intensity of the gradient can represent the intensity change of the pixel color from pixel point A to pixel point B; another example, along direction 2, the pixel points are distributed as pixel point A and pixel point C, then the intensity of the gradient can represent the intensity change of the pixel color from pixel point A to pixel point C.

[0089] In most cases, the object contour is irregular. Therefore, in order to improve the accuracy of the object contour, for any pixel point, the intensity changes of the pixel colors in multiple directions can be comprehensively considered to determine the gradient of the pixel point. In specific implementation, the server can determine the gradients corresponding to each pixel point in the target area in multiple directions according to multiple direction operators. Among them, the multiple direction operators correspond to the multiple directions one by one, and the gradient of the pixel point in the target direction can be used to indicate the intensity change of the pixel color starting from the pixel point along the target direction, and the target direction is any one of the multiple directions. Based on this, the intensity changes of the pixel colors along different directions at a pixel point can be determined.

[0090] Furthermore, based on the intensity, it can be determined which gradient among the gradients corresponding to multiple directions can better represent the gradient at this pixel point. In specific implementation, the gradient with the maximum intensity among the gradients corresponding to the pixel point in multiple directions can be determined as the target gradient of the pixel point. The target gradient can be used to represent that the intensity change of the pixel color is the most significant in the direction corresponding to the target gradient at the pixel point. Finally, the server can determine the object contour based on the pixel points whose target gradient intensity is greater than the intensity threshold, and determine the area identified by the object contour as the object contour image. The intensity threshold can refer to the gradient intensity limit value for distinguishing whether it is a pixel point on the edge, and can be specifically set according to the actual situation. For example, since the manifestation forms of the pixel colors in the target area are different, the values of the target gradients of the same pixel point may vary, so the corresponding gradient threshold can be set based on the manifestation form of the pixel color.

[0091] Based on this, by determining the object contour, the object contour image is determined. And when determining the object contour, multiple direction operators are introduced, so as to comprehensively consider the intensity change situations of the pixel colors of the pixel point in different directions, making the determined target gradient better able to accurately represent the intensity change situation at this pixel point, thereby improving the accuracy of the object contour, that is, the accuracy of the object contour image can be improved, which is beneficial to subsequent object detection.

[0092] Among them, the direction operator can be a pre-configured template. Regarding the specific configuration method of multiple direction operators, this application does not make any limitation. Since multiple direction operators correspond to multiple directions one by one, in a possible implementation, after setting multiple directions, the corresponding direction operator can be configured for each direction, so as to realize the configuration of multiple direction operators. For the sake of easy understanding, the following method is provided as an example for multiple directions in the embodiments of this application:

[0093] In a possible implementation, multiple directions can include the horizontal direction, the vertical direction, and the oblique direction. Among them, the horizontal direction and the vertical direction can be perpendicular to each other, and the oblique direction can form an acute angle with the horizontal direction and the vertical direction. For example, taking the rectangular coordinate system as an example, the horizontal direction can be the horizontal axis direction, the vertical direction can be the vertical axis direction, and correspondingly, the oblique direction can refer to the direction that intersects the horizontal axis and the vertical axis at the origin of the rectangular coordinate system. After determining multiple directions, the corresponding direction operators can be configured.

[0094] For better understanding, taking the example that multiple directions can include eight directions, for example, eight directions constructed based on the above rectangular coordinate system, eight direction operators can be correspondingly configured. For the sake of easy understanding, for eight directions and eight direction operators, the embodiments of this application provide the following as Figure 6 the schematic diagram shown:

[0095] Among them, multiple directions may include eight directions. Correspondingly, the direction operators may include eight direction operators. Specifically, Figure 6 in the example, direction 1 and direction 5 may correspond to the aforementioned vertical direction, direction 3 and direction 7 may correspond to the aforementioned horizontal direction, and direction 2 and direction 6, as well as direction 4 and direction 8, may correspond to the aforementioned oblique direction. In Figure 6 the example, direction 1 and direction 3 may be in a vertical relationship, and the included angle therebetween may be 90 degrees. The included angle between direction 2 and direction 1 may be 45 degrees, and the included angle between direction 2 and direction 5 may be 135 degrees. The included angles between other directions are similar. Correspondingly, the direction operators may include Figure 6 the eight direction operators shown, which correspond one by one to the eight directions, and specifically may include direction operator 1, direction operator 2, direction operator 3, direction operator 4, direction operator 5, direction operator 6, direction operator 7, and direction operator 8.

[0096] Generally, the above process of determining the object contour may also be referred to as the process of determining the edge based on edge detection. In practical applications, the Sobel edge detection algorithm may be used to determine the object contour. Correspondingly, the aforementioned eight direction operators may also be Sobel direction operators. For the convenience of understanding, the present application also provides a Figure 7 schematic diagram of the configuration result of the Sobel direction operator as shown, where G1 to G8 respectively correspond to the aforementioned direction operator 1 to direction operator 8.

[0097] In practical applications, in the process of using the direction operator to determine the gradients corresponding to each pixel point in each direction, the direction operator is convolved with the pixel point. Correspondingly, the direction operator may also be referred to as a convolution factor, specifically as shown in Figure 7 . For the convolution result in each direction, the L2 norm may be used to calculate the magnitude of the gradient, that is, the intensity of the gradient. Among them, the L2 norm is also called the Euclidean norm, and may be the square root of the sum of the squares of the vector elements, and may be specifically represented by the following formula:

[0098] G(x,y) = sqrt(Gx(x,y) 2 + Gy(x,y) 2 )

[0099] In the above formula, sqrt can represent the square root. In this application, the result calculated based on the L2 norm can refer to the intensity of the gradient. That is, in the above formula, the coordinates (x, y) can represent the coordinates of a pixel point, G(x, y) can represent the intensity of the gradient corresponding to the pixel point in a certain direction, and Gx(x, y) and Gy(x, y) can respectively represent the convolution results that are perpendicular to each other. Specifically, with the direction corresponding to G(x, y) as a reference, the directions corresponding to Gx(x, y) and Gy(x, y) are perpendicular to each other. Gx(x, y) can represent the convolution result of the coordinates (x, y) in the direction corresponding to Gx(x, y), and Gy(x, y) can represent the convolution result of the coordinates (x, y) in the direction corresponding to Gy(x, y). For example, if the direction corresponding to G(x, y) is Figure 6 Direction 1 in the example, then the direction corresponding to Gx(x, y) can be Figure 6 Direction 8 in the example, and the direction corresponding to Gy(x, y) can be Figure 6 Direction 2 in the example. Direction 8 and direction 2 are perpendicular to each other. Correspondingly, Gx(x, y) can represent the convolution result of the coordinates (x, y) in direction 8, and Gy(x, y) can represent the convolution result of the coordinates (x, y) in direction 2. Another example, if the direction corresponding to G(x, y) is Figure 6 Direction 4 in the example, then the direction corresponding to Gx(x, y) can be Figure 6 Direction 3 in the example, and the direction corresponding to Gy(x, y) can be Figure 6 Direction 5 in the example. Direction 3 and direction 5 are perpendicular to each other. Correspondingly, Gx(x, y) can represent the convolution result of the coordinates (x, y) in direction 3, and Gy(x, y) can represent the convolution result of the coordinates (x, y) in direction 5. Among them, the convolution result in a certain direction can be obtained by convolving the direction operator in that direction with the coordinates of the pixel point.

[0100] Correspondingly, the intensities of the gradients corresponding to the eight directions can be obtained, which can be denoted as G1(x, y), G2(x, y), …, G8(x, y). Correspondingly, the target gradient can be determined by the following formula:

[0101] G0(x, y) = max{G1(x, y), G2(x, y), …, G8(x, y)}

[0102] In the above formula, G0(x, y) can represent the target gradient corresponding to the pixel point with coordinates (x, y). That is, the target gradient can be the gradient corresponding to the maximum intensity among all gradients. Taking the eight directions in the example as an example, the target gradient is the gradient corresponding to the maximum intensity among the gradients of the pixel point with coordinates (x, y) in the eight directions. In the direction corresponding to the target gradient, the intensity change of the pixel color is the most significant.

[0103] In practical applications, the pixel colors of each pixel point in the image to be detected can be in the form of the red-green-blue (RGB) color space. Correspondingly, the pixel colors of each pixel point in the target area are also in the RGB form. To facilitate the determination of the object contour, color space conversion can also be performed first to convert the RGB color space into a color space in the form of an optimized color video signal (YCbCr). Based on this, a method combining the Sobel edge detection algorithm with the YCbCr color space is provided. Through the conversion of the color space, it is beneficial to the complexity of the image, thereby reducing the calculation amount. At the same time, the visual information in the image can be retained, thus ensuring accuracy. Generally, grayscale images are more conducive to edge extraction because in grayscale images, the gray level change of pixel points on the edge is more significant compared to other non-edge pixel points, so it is beneficial to edge extraction and more accurate edges can be extracted. Therefore, in a possible implementation, before determining the object contour, the image corresponding to the target area can also be converted into a grayscale image, and then the object contour can be determined from it, which is beneficial to determining a more accurate object contour.

[0104] In the YCbCr color space, Y can represent luminance, and Cb and Cr can represent chrominance. Specifically, Cr reflects the difference between the red part in RGB and the luminance value of RGB, and Cb reflects the difference between the blue part in RGB and the luminance value of RGB. When performing color space conversion, the chrominance distance value of the image to be converted (such as the image to be detected mentioned above or the image corresponding to the target area mentioned above) can be obtained first. The chrominance distance value helps to illustrate the intensity of the image. Subsequently, the values of Cr and Cb can be determined and displayed in a chart. After completing this process for all pixel points, the color space conversion can be achieved.

[0105] It can be understood that the accuracy of the object contour will affect the accuracy of the object detection result. In practical applications, there may be a situation where the intensity of the target gradient of several pixel points all meets the intensity threshold, resulting in multiple pixel points being on the object contour, causing the obtained object contour to be thicker. Therefore, in a possible implementation, edge thinning can also be performed to facilitate the determination of a more accurate object contour.

[0106] In specific implementation, the server can determine the initial contour based on the pixel points whose intensity of the target gradient is greater than the intensity threshold, and determine the contour width at the target position based on the pixel points distributed in the direction perpendicular to the contour direction at the target position along the contour direction of the initial contour, wherein the target position is any position on the initial contour, and the pixel points distributed in the direction perpendicular to the contour direction at the target position can be considered as the pixel points on the edge of the target position, and the greater the number, the thicker the edge here. Then, among the pixel points constituting the contour width, the pixel points whose intensity of the target gradient meets the contour pixel point condition are retained, and the pixel points whose intensity of the target gradient does not meet the contour pixel point condition are removed, wherein the contour pixel point condition can be used to determine whether the pixel point should be located on the edge, and the pixel points that meet the contour pixel point condition can refer to the pixel points that should be located on the edge, and the pixel points that do not meet the contour pixel point condition can refer to the pixel points that should not be located on the edge, that is, the pixel points that are mistakenly regarded as the pixel points on the edge. Finally, the object contour can be determined based on the retained pixel points. Based on this, the pixel points that are mistakenly regarded as the edge can be removed to achieve edge refinement and obtain a more accurate object contour.

[0107] It should be noted that the present application does not impose any limitation on the setting of the contour pixel point conditions. For ease of understanding, the present application provides the following methods as examples:

[0108] The intensity of the target gradient of the pixels constituting the width of the contour all meets the intensity threshold, and in practice, only the position of the maximum value should be the real edge, that is, the pixel corresponding to the maximum value of the intensity of the target gradient should be the pixel that should actually be located on the edge. Therefore, the contour pixel condition can be set to the maximum intensity of the target gradient among the pixels constituting the width of the contour. In practical applications, this method can also be called a non-maximum suppression method. For a better understanding, an example is given in which three pixels constitute the width of the contour at a certain target position. The coordinates of the three pixels can be expressed as (x, y), (x′, y′) and (x″, y″), respectively. In specific implementation, the method for determining whether to retain or eliminate can be determined by the following formula:

[0109]

[0110] In the above formula, G′0(x,y) can represent the intensity of the final gradient corresponding to the pixel point with coordinates (x,y). If the intensity of the target gradient of the pixel point is greater than the intensity of the target gradient of the other two pixels, the intensity of the final gradient is the same as the intensity of the target gradient. Otherwise, the intensity of the final gradient of the pixel point is 0.

[0111] After determining the final gradient, for the pixel points with the intensity of the final gradient being 0, they are the pixel points to be removed as described above. For the pixel points with the intensity of the final gradient remaining unchanged, they are the pixel points to be retained as described above. Based on this, edge thinning is implemented to obtain a more accurate object contour.

[0112] Through the above embodiments, the method for determining the object contour is illustrated by examples. After determining the object contour, the object contour image can be determined for subsequent object detection. It should be noted that this application does not make any limitation on how to perform object detection based on the object contour image. For better understanding, the following method is provided as an example in the embodiments of this application:

[0113] To reduce the computational complexity, in a possible implementation, the object contour image can be first scaled down and then object detection can be performed based on the scaled-down image, thereby reducing the computational complexity during the object detection process. In specific implementation, the server can scale down the object contour image to a target image based on an image scaling factor. Here, the image scaling factor can refer to the parameter for image scaling, which is used to reflect the size ratio of image scaling. A target pixel point in the target image corresponds to a target pixel region in the object contour image, and the number of pixel points in the target pixel region can be determined according to the image scaling factor. Correspondingly, object detection can be performed based on the target image to determine whether the pending object included in the target region is a virtual object with rendering anomalies. Based on this, the computational complexity is reduced through image scaling.

[0114] Since the object contour is the most important information during object detection, to ensure the accuracy of object detection based on the scaled-down target image, it is necessary to ensure that the object contour remains as unchanged as possible during the image scaling process, that is, the object contour can be accurately retained in the target image. Since the pixel color values of the pixel points on the object contour are more prominent, when mapping the multiple pixel points included in the target pixel region to a target pixel point in the target image, the maximum pixel color value can be taken as the pixel color value of this target pixel point, so that when the target pixel region includes pixel points on the object contour, the pixel color values of the pixel points on the object contour can be retained, and in the scaled-down target image, it can still be the scaled-down object contour. That is, the pixel color value of the target pixel point is the maximum pixel color value in the target pixel region. Based on this, by taking the maximum pixel color value as the pixel color value of the scaled-down pixel point, the edge can be better retained, which is beneficial to ensuring the accuracy of object detection.

[0115] In practical applications, this method can not only reduce the image size but also better preserve the edges. If the object contour in the reduced target image is still accurate, the area formed by the object contour can still represent the area with the same appearance color. Based on this, this method can also be called a way to reduce the image size and select the image area with the same appearance color without losing data, which is beneficial to reducing the computational load and ensuring the accuracy of object detection.

[0116] It should be noted that this application does not make any limitations on the setting method of the image reduction factor and the method of how to reduce the image. It can be understood that when the setting of the image reduction factor is different, the method of reducing the image may be different. For the sake of understanding, the following method is provided as an example in the embodiments of this application:

[0117] In a possible implementation, the image reduction factor may include a reduction factor in the horizontal direction (which can be denoted as N) and a reduction factor in the vertical direction (which can be denoted as M). The reduction factor N in the horizontal direction can be used to indicate that each pixel point is reduced to 1 / N of its original size in the horizontal direction, and the reduction factor M in the vertical direction can be used to indicate that each pixel point is reduced to 1 / M of its original size in the vertical direction. That is, the image reduction factor can represent the size ratio of image reduction. For example, if N = 2 and M = 2, then each pixel point will be reduced to 1 / 2 of its original size in both the horizontal and vertical directions. Correspondingly, the number of pixel points in the aforementioned target pixel area can be 4, that is, 4 pixel points are mapped to one pixel point in the target image. Regarding the settings of N and M, this application does not make any limitations. For example, N and M can be set according to the expected size ratio of image reduction. It can be understood that the value ranges of N and M are related to the size of the object contour image (i.e., the image before reduction), and can be determined according to the actual situation.

[0118] In practical applications, a rectangular frame identified by N and M can be constructed based on the image reduction factor. The rectangular frame identifies the aforementioned target pixel area. Based on this, dynamic search can be performed by analyzing the rectangular frame to achieve the purpose of image reduction. Specifically, it can be determined by the following formula:

[0119] I′(i,j) = max(I(NMi + k, NMj + l))

[0120] In the above formula, N can represent the reduction factor in the horizontal direction, M can represent the reduction factor in the vertical direction, I can represent the object contour image (i.e., the image before reduction), I′ can represent the target image (i.e., the image after reduction), (i,j) can represent the coordinates of the target pixel point, k and l can represent the coordinates of the pixel points in the target pixel area, and max can represent the method of taking the maximum pixel color value as described above.

[0121] It is understandable that the value ranges of k and l are related to the size of the object contour image. Specifically, when the position of the target pixel region in the object contour image is different, the value ranges of k and l will be different. Based on the above formula, dynamic search can be performed in the object contour image based on the rectangle identified by N and M, so as to determine the position of the target pixel region corresponding to the pixel point (i, j), thereby facilitating the determination of the pixel color value corresponding to the pixel point (i, j), achieving the purpose of image reduction and retaining the edge by taking the maximum pixel color value.

[0122] In order to improve the efficiency of object detection, in another possible implementation, object detection can also be performed through a pre-trained detector. Specifically, during implementation, based on the object contour image, object detection can be performed through a pre-trained detector, and it is output whether the pending object included in the target region is a virtual object with rendering anomalies. Among them, the detector can be obtained through model training. The process of using the detector for object detection is a detection method combining artificial intelligence technology, which is beneficial to improving the detection efficiency of object detection.

[0123] Among them, the detector can be determined in the following manner:

[0124] First, a training sample set can be obtained. The training sample set can include positive sample images and negative sample images. Among them, the positive sample images can include virtual objects with rendering anomalies, and the sample labels of the positive sample images can indicate that the positive sample images include virtual objects. The sample labels of the negative sample images can indicate that the negative sample images do not include virtual objects. Then, the initial classifier can be trained using the training sample set until the initial classifier meets the convergence condition, and a pending classifier is obtained. Among them, the convergence condition can be used to determine whether the training effect of the initial classifier meets the requirements. When the convergence condition is met, it can be considered that the initial classifier at this time already has a good object detection effect, so the initial classifier at this time can be used as the pending classifier.

[0125] To improve the accuracy of object detection, the classifier to be determined can also be tested to evaluate the accuracy of object detection of the classifier to be determined. During specific implementation, a test sample set constructed based on negative sample images can be used to test the classifier to be determined. If the detection result of the classifier to be determined for the test sample set meets the end training condition, the classifier to be determined can be determined as a detector. Among them, the end training condition can be used to judge whether the object detection effect of the classifier to be determined is accurate enough. If the end training condition is met, it indicates that the classifier to be determined has the accuracy of object detection that meets the expectation. Therefore, the model training can be ended, and the aforementioned detector can be obtained accordingly. In practical applications, if the end training condition is not met, it indicates that the accuracy of object detection of the classifier to be determined does not meet the expectation. At this time, iterative optimization is still required. Specifically, the sample images whose detection results indicate detection errors (i.e., different from the sample labels of the sample images) can be re-added to the training sample set, and the classifier to be determined can be used as the aforementioned initial classifier to continue the model training to achieve the purpose of iterative optimization until the end training condition is met.

[0126] Since the test is performed using negative sample images, this test method can evaluate the detection accuracy of the classifier to be determined for negative sample images that do not include virtual objects. For negative sample images, if it can be accurately detected that they do not include virtual objects, then when performing object detection on the object contour images subsequently, it can be avoided that objects that do not include virtual objects are misdetected as including virtual objects, thereby ensuring the detection accuracy of objects detected as including virtual objects during the actual application stage. In this way, if there are other processing steps after object detection, it is beneficial to improve the efficiency. For example, subsequently, manual review can be combined to determine what type of rendering anomaly it is. Another example is that clustering can be performed to determine the type of rendering anomaly with a high occurrence probability for timely repair, etc.

[0127] For better understanding, the embodiments of the present application provide a Figure 8 flow schematic diagram for determining a detector as shown below. Specifically:

[0128] First, a training sample set can be input (see S801 for reference). For the positive sample images and negative sample images in the training sample set, the Histogram of Oriented Gradient (HOG) features can be extracted using the initial classifier (see S802 for reference). The HOG features can be used to represent the object contour of the objects included in the sample images. Then, the initial classifier can be trained using a Support Vector Machine (SVM) (see S803 for reference) until the aforementioned convergence condition is met, and a classifier to be determined can be obtained (see S804 for reference).

[0129] Next, the classifier to be determined can be tested (see S805 for details). Specifically, object detection can be performed on the test sample set using the classifier to be determined. If the detection result does not meet the aforementioned end training condition, then the aforementioned S802 is re-executed for iterative optimization until the end training condition is met, and a detector is obtained (see S806 for details).

[0130] In practical applications, based on the method for determining a detector introduced in the above example, the object detection method provided in this application can also be referred to as an object detection method based on the combination of HOG features and SVM. In practical applications, the steps of object detection can be performed independently. For example, the detector obtained by pre-training the detector can be used as a separate module. When there is a need for object detection, the method provided in this application can be used to determine the object contour image from the image to be detected, achieving image segmentation. The result of image segmentation is the obtained object contour image. Then, the detector can be accessed for object detection. That is to say, this application can be used as an independent, offline detection solution and can be accessed for use in various object detection scenarios to achieve the automation of object detection.

[0131] It can be seen from the above technical solutions that for the image to be detected determined according to the display screen showing the virtual object, a detection area can be determined in the image to be detected. Subsequently, processing can be performed based on the detection area with a smaller range, reducing the detection space, which is beneficial to saving time. Moreover, the size of the detection area is larger than the size of the virtual object, ensuring that the detection area can frame the virtual object, which is beneficial to ensuring the accuracy of subsequent object detection. In addition, the size of the detection area is related to the size of the virtual object, making the size of the detection area dynamic and applicable flexibly to different virtual objects, with higher versatility. Next, a target area can be determined from the detection area, and the similarity between the pixel color and the appearance color in the target area meets the similarity condition. Since the appearance color can be used to indicate the color of the abnormal appearance of the virtual object being rendered, the target area can represent the area where the virtual object may have an abnormal rendering. Based on this, the search space can be further reduced according to the appearance color, which is beneficial to saving time. Correspondingly, object detection can be performed in the target area to determine whether there is a virtual object with an abnormal rendering in the target area. It can be seen that an object detection method based on the characteristics of the virtual object (including size and appearance color) is provided, which does not need to rely on consecutive frames of images and can be well applied to individual, non-consecutive frame scenarios. Moreover, compared with the method of object detection through a dynamic tracing model, there is no need to train the corresponding dynamic tracing model, which can save time. In addition, for consecutive frame scenarios, each frame of image can be used as the aforementioned image to be detected to achieve object detection, which is also applicable and has higher versatility.

[0132] In addition to the object detection method based on the dynamic traceability model, a template matching-based object detection method is also provided in the related art. Its basic principle is to compare the template image with the image to be detected to find the most similar position to determine whether the image to be detected includes a virtual object. However, this method relies on the template image. Compared with this method, the present application no longer needs to rely on the template image and is applicable to any image to be detected, with higher versatility.

[0133] Through the above embodiments, the object detection method provided by the present application has been described in detail. For better understanding, the embodiments of the present application also provide a Figure 9 framework schematic diagram of the object detection method as shown below. Specifically:

[0134] In practical applications, factors such as noise, brightness, background, pose changes, and occlusion in the image will all affect the accuracy of image detection. To avoid these problems from affecting the accuracy of object detection in the present application and to increase the complexity of object detection, for the image to be detected, before performing the aforementioned S202, image preprocessing can be performed first. Based on the image preprocessing, the quality of the image to be detected can be improved and noise can be reduced, which is beneficial to improving the accuracy of object detection. Specifically, the image preprocessing steps can include resolution reduction, bilateral filtering, and histogram equalization. Based on this, noise can be removed from the image to be detected to prepare for the next stage. For example, if the size of the image to be detected is 640x480, the size can be reduced by 4 times through resolution reduction to reduce the input dimension of the image to be detected. Then, through bilateral filtering, the noise points in the image to be detected can be removed while retaining the visual information in the image to be detected. Finally, histogram equalization can be used to enhance the contrast of the image to be detected for subsequent processing.

[0135] The image to be detected after completing the image preprocessing is input to the next stage, that is, the detection space reduction stage. Specifically, the detection space can be reduced through image segmentation (i.e., the aforementioned process of determining the target area), and the object contour can be determined by determining the edges, clarifying the shape of the object to be determined, which can be considered as a further reduction of the detection space. In addition, based on morphological opening operations, hole noise can be eliminated to improve the accuracy of the object contour image. Specifically, it can be to use a closing morphological method to eliminate the extremely small objects included in the target area while maintaining the shape and size of the larger objects in the target area, and image grayscale conversion, binarization, etc. can also be combined to obtain the final object contour image.

[0136] The object contour image obtained after shrinking the detection space is input to the next stage, i.e., the object detection stage. Specifically, object detection can be performed based on the object contour image to achieve classification and filtering. For example, it can be filtering out the to-be-detected images with rendering anomalies, that is, determining the to-be-detected images including virtual objects with rendering anomalies based on object detection, so as to perform subsequent processing, such as repairing the rendering anomalies and performing compliance checks on the situations of rendering anomalies, etc.

[0137] It should be noted that based on the implementation manners provided in the above aspects of the present application, further combinations can be made to provide more implementation manners.

[0138] Based on Figure 3 Corresponding to the object detection method provided in the embodiment, the embodiment of the present application further provides an object detection device 1000, and the object detection device 1000 includes an acquisition unit 1001, a determination unit 1002, and a detection unit 1003:

[0139] The acquisition unit 1001 is configured to acquire the appearance color of the virtual object and the to-be-detected image, where the to-be-detected image is determined according to the display screen showing the virtual object, and the appearance color is used to indicate the color of the rendering anomaly appearance of the virtual object;

[0140] The determination unit 1002 is configured to determine a detection area in the to-be-detected image, where the size of the detection area is related to the size of the virtual object, and the size of the detection area is larger than the size of the virtual object;

[0141] The determination unit 1002 is further configured to determine a target area from the detection area according to the similarity between the pixel color in the detection area and the appearance color, and the similarity corresponding to the pixel color in the target area satisfies the similarity condition;

[0142] The detection unit 1003 is configured to perform object detection in the target area to determine whether the target area includes the virtual object with rendering anomalies.

[0143] In a possible implementation manner, the determination unit is further configured to:

[0144] If it is determined that the difference in the pixel color values of the appearance color is less than or equal to the difference threshold, determine a color threshold according to the appearance color;

[0145] Screen out the pixel points whose pixel color values satisfy the color threshold from the pixel points in the detection area, and determine the target area based on the screened pixel points.

[0146] In a possible implementation manner, the determination unit is further configured to:

[0147] If it is determined that the difference in pixel color values of the appearance color is greater than the difference threshold, determine the color distribution of the appearance color, and determine the color distribution formed by the pixel colors in the detection area;

[0148] Determine the target area from the detection area according to the distribution similarity between the color distribution in the detection area and the color distribution of the appearance color, and the distribution similarity corresponding to the color distribution in the target area satisfies the similarity condition.

[0149] In a possible implementation manner, the determining unit is further configured to:

[0150] Obtain the movable area of the virtual object in the display screen;

[0151] Determine the detection area within the movable area corresponding to the image to be detected.

[0152] In a possible implementation manner, the detecting unit is further configured to:

[0153] Determine the object contour image of the pending object included in the target area;

[0154] Perform object detection based on the object contour image to determine whether the pending object included in the target area is the virtual object with rendering anomalies.

[0155] In a possible implementation manner, the determining unit is further configured to:

[0156] Determine the gradients corresponding to each pixel point in the target area in multiple directions according to multiple direction operators, the multiple direction operators correspond to the multiple directions one by one, and the gradient of the pixel point in the target direction is used to indicate the intensity change of the pixel color along the target direction, and the target direction is any one of the multiple directions;

[0157] Determine the gradient with the maximum intensity among the gradients corresponding to the pixel point in the multiple directions as the target gradient of the pixel point;

[0158] Determine the object contour according to the pixel points whose intensity of the target gradient is greater than the intensity threshold, and determine the area identified by the object contour as the object contour image.

[0159] In a possible implementation manner, the multiple directions include the horizontal direction, the vertical direction, and the oblique direction.

[0160] In a possible implementation manner, the determining unit is further configured to:

[0161] Determine an initial contour based on pixel points whose intensity of the target gradient is greater than the intensity threshold;

[0162] Determine the contour width at the target position along the contour direction of the initial contour based on pixel points distributed in a direction perpendicular to the contour direction at the target position, the target position being any position on the initial contour;

[0163] Among the pixel points constituting the contour width, the pixel points whose intensity of the target gradient meets the contour pixel point condition are retained, and the pixel points whose intensity of the target gradient does not meet the contour pixel point condition are eliminated;

[0164] The object contour is determined based on the retained pixels.

[0165] In a possible implementation, the detection unit is further used for:

[0166] The object contour image is reduced to a target image based on an image reduction factor, wherein a target pixel point in the target image corresponds to a target pixel area in the object contour image, the number of pixels in the target pixel area is determined according to the image reduction factor, and the pixel color value of the target pixel point is the maximum pixel color value in the target pixel area;

[0167] Object detection is performed based on the target image to determine whether the to-be-determined object included in the target area is the virtual object with rendering abnormality.

[0168] In a possible implementation, the detection unit is further used for:

[0169] Based on the object contour image, perform object detection by using a pre-trained detector, and output whether the to-be-determined object included in the target area is the virtual object with rendering abnormality;

[0170] Wherein, the detector is determined by:

[0171] Acquire a training sample set, the training sample set comprising a positive sample image and a negative sample image, the positive sample image comprising the virtual object with rendering anomaly, a sample label of the positive sample image indicating that the positive sample image comprises the virtual object, and a sample label of the negative sample image indicating that the negative sample image does not comprise the virtual object;

[0172] Performing model training on the initial classifier using the training sample set until the initial classifier meets the convergence condition, thereby obtaining a pending classifier;

[0173] Testing the undetermined classifier using a test sample set constructed according to the negative sample image;

[0174] If the detection result of the to-be-determined classifier for the test sample set meets the end training condition, determine the to-be-determined classifier as the detector.

[0175] In a possible implementation manner, the appearance color includes colors corresponding to multiple types of rendering abnormal appearances.

[0176] It can be seen from the above technical solution that for the to-be-detected image determined according to the display screen showing the virtual object, a detection area can be determined in the to-be-detected image. Subsequently, processing can be performed based on the detection area with a smaller range, reducing the detection space, which is beneficial to saving time. Moreover, the size of the detection area is larger than the size of the virtual object, ensuring that the detection area can frame the virtual object, which is beneficial to ensuring the accuracy of subsequent object detection. In addition, the size of the detection area is related to the size of the virtual object, making the size of the detection area dynamic and applicable flexibly to different virtual objects, with higher versatility. Then, a target area can be determined from the detection area, and the similarity between the pixel color in the target area and the appearance color meets the similarity condition. Since the appearance color can be used to indicate the color of the rendering abnormal appearance of the virtual object, the target area can represent the area where the virtual object may have a rendering abnormality. Based on this, the search space can be further reduced according to the appearance color, which is beneficial to saving time. Correspondingly, object detection can be performed in the target area to determine whether there is a virtual object with a rendering abnormality in the target area. It can be seen that an object detection method based on the characteristics of the virtual object (including size and appearance color) is provided, which does not need to rely on consecutive multi-frame images and can be well applied to a single, non-consecutive frame scenario. Moreover, compared with the method of object detection through a dynamic traceback model, there is no need to train the corresponding dynamic traceback model, which can save time. In addition, for a consecutive frame scenario, each frame image can be used as the aforementioned to-be-detected image to achieve object detection, which is also applicable and has higher versatility.

[0177] The embodiment of the present application further provides a computer device, and this computer device can be a terminal. Taking the terminal as a smart phone as an example:

[0178] Figure 11 Shown is a block diagram of a part of the structure of the smart phone provided by the embodiment of the present application. Refer to Figure 11, the smart phone includes components such as a Radio Frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a Wi-Fi module 1170, a processor 1180, and a power supply 1190. The input unit 1130 may include a touch panel 1131 and other input devices 1132. The display unit 1140 may include a display panel 1141. The audio circuit 1160 may include a speaker 1161 and a microphone 1162. Those skilled in the art can understand that Figure 11 the structure of the smart phone shown in does not limit the smart phone, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0179] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functional applications and data processing of the smart phone by running the software programs and modules stored in the memory 1120. The memory 1120 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the smart phone (such as audio data, phone book, etc.). In addition, the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0180] The processor 1180 is the control center of the smart phone, connects various parts of the entire smart phone using various interfaces and lines, and executes various functions of the smart phone and processes data by running or executing the software programs and / or modules stored in the memory 1120, and calling the data stored in the memory 1120. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1180.

[0181] In this embodiment, the steps executed by the processor 1180 in the smart phone can be based on Figure 11 the structure shown.

[0182] The computer device provided in the embodiment of the present application may also be a server. Please refer to Figure 12 shown, Figure 12The structure diagram of server 1200 provided by the embodiment of the present application. Server 1200 may vary greatly due to different configurations or performances, and may include one or more processors, such as central processing units (CPUs) 1222, and a memory 1232, and one or more storage media 1230 (such as one or more mass storage devices) for storing application programs 1242 or data 1244. Among them, the memory 1232 and the storage media 1230 may be transient storage or persistent storage. The program stored in the storage media 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 1222 may be configured to communicate with the storage media 1230 and execute a series of instruction operations in the storage media 1230 on the server 1200.

[0183] Server 1200 may further include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input / output interfaces 1258, and / or one or more operating systems 1241, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM and so on.

[0184] In this embodiment, the central processing unit 1222 in the server 1200 may perform the following steps:

[0185] Obtain the appearance color of the virtual object and the image to be detected. The image to be detected is determined according to the display screen for displaying the virtual object, and the appearance color is used to indicate the color of the abnormally rendered appearance of the virtual object;

[0186] Determine a detection area in the image to be detected. The size of the detection area is related to the size of the virtual object, and the size of the detection area is larger than the size of the virtual object;

[0187] Determine a target area from the detection area according to the similarity between the pixel colors in the detection area and the appearance color. The similarity corresponding to the pixel colors in the target area meets the similarity condition;

[0188] Perform object detection in the target area to determine whether the target area includes the virtual object with abnormal rendering.

[0189] According to an aspect of the present application, there is provided a computer-readable storage medium for storing a computer program, which, when run on a computer device, causes the computer device to execute the object detection method described in each of the foregoing embodiments.

[0190] According to an aspect of the present application, there is provided a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the computer device to execute the methods provided in various alternative implementations of the foregoing embodiments.

[0191] The descriptions of the processes or structures corresponding to the foregoing various drawings each have their own emphases. For parts not detailed in a certain process or structure, reference may be made to the relevant descriptions of other processes or structures.

[0192] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the foregoing drawings are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data may be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0193] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical, or other forms.

[0194] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0195] In addition, in each embodiment of the present application, each functional unit may be integrated into a processing unit, may exist physically as individual units, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0196] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the related technology, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which may be a computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs, and other various media that can store program codes.

[0197] As described above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present application.

Claims

1. An object detection method, characterized in that, The method includes: Obtaining the appearance color of the virtual object and the image to be detected, where the image to be detected is determined according to the display screen showing the virtual object, and the appearance color is used to indicate the color of the abnormally rendered appearance of the virtual object; Determining a detection area in the image to be detected, where the size of the detection area is related to the size of the virtual object, and the size of the detection area is larger than the size of the virtual object; Determining a target area from the detection area according to the similarity between the pixel colors in the detection area and the appearance color, where the similarity corresponding to the pixel colors in the target area meets the similarity condition; Performing object detection in the target area to determine whether the target area includes the virtual object with abnormal rendering.

2. The method according to claim 1, wherein The determining a target area from the detection area according to the similarity between the pixel colors in the detection area and the appearance color includes: If it is determined that the difference in the pixel color values of the appearance color is less than or equal to the difference threshold, determining a color threshold according to the appearance color; Screening out the pixel points whose pixel color values meet the color threshold from the pixel points in the detection area, and determining the target area based on the screened pixel points.

3. The method according to claim 1, wherein The determining a target area from the detection area according to the similarity between the pixel colors in the detection area and the appearance color includes: If it is determined that the difference in the pixel color values of the appearance color is greater than the difference threshold, determining the color distribution of the appearance color and determining the color distribution formed by the pixel colors in the detection area; Determining the target area from the detection area according to the distribution similarity between the color distribution in the detection area and the color distribution of the appearance color, where the distribution similarity corresponding to the color distribution in the target area meets the similarity condition.

4. The method according to claim 1, wherein The determining a detection area in the image to be detected includes: Obtaining the movable area of the virtual object in the display screen; Determining the detection area within the movable area corresponding to the image to be detected.

5. The method according to claim 1, wherein The performing object detection in the target area to determine whether the target area includes the virtual object with abnormal rendering includes: Determining the object contour image of the pending object included in the target area; Performing object detection based on the object contour image to determine whether the pending object included in the target area is the virtual object with abnormal rendering.

6. The method according to claim 5, wherein The determining the object contour image of the pending object included in the target area includes: Determining the gradients corresponding to each pixel point in the target area in multiple directions according to multiple direction operators, where the multiple direction operators correspond to the multiple directions one by one, and the gradient of the pixel point in the target direction is used to indicate the intensity change of the pixel color along the target direction, and the target direction is any one of the multiple directions; Determining the target gradient of the pixel point as the gradient with the maximum intensity among the gradients corresponding to the pixel point in the multiple directions; The object contour is determined according to the pixel points whose intensity of the target gradient is greater than an intensity threshold, and the area identified by the object contour is determined as the object contour image.

7. The method according to claim 6, wherein The multiple directions include a horizontal direction, a vertical direction and a diagonal direction.

8. The method according to claim 6, wherein The step of determining the object contour according to the pixel points whose intensity of the target gradient is greater than an intensity threshold comprises: Determine an initial contour based on pixel points whose intensity of the target gradient is greater than the intensity threshold; Determine the contour width at the target position along the contour direction of the initial contour based on pixel points distributed in a direction perpendicular to the contour direction at the target position, the target position being any position on the initial contour; Among the pixel points constituting the contour width, the pixel points whose intensity of the target gradient meets the contour pixel point condition are retained, and the pixel points whose intensity of the target gradient does not meet the contour pixel point condition are eliminated; The object contour is determined based on the retained pixels.

9. The method according to claim 5, wherein The performing object detection based on the object contour image to determine whether the to-be-determined object included in the target area is the virtual object with rendering abnormality includes: The object contour image is reduced to a target image based on an image reduction factor, wherein a target pixel point in the target image corresponds to a target pixel area in the object contour image, the number of pixels in the target pixel area is determined according to the image reduction factor, and the pixel color value of the target pixel point is the maximum pixel color value in the target pixel area; Object detection is performed based on the target image to determine whether the to-be-determined object included in the target area is the virtual object with rendering abnormality.

10. The method according to claim 5, characterized in that The performing object detection based on the object contour image to determine whether the to-be-determined object included in the target area is the virtual object with rendering abnormality includes: Based on the object contour image, perform object detection by using a pre-trained detector, and output whether the to-be-determined object included in the target area is the virtual object with rendering abnormality; Wherein, the detector is determined by: Acquire a training sample set, the training sample set comprising a positive sample image and a negative sample image, the positive sample image comprising the virtual object with rendering anomaly, a sample label of the positive sample image indicating that the positive sample image comprises the virtual object, and a sample label of the negative sample image indicating that the negative sample image does not comprise the virtual object; Performing model training on the initial classifier using the training sample set until the initial classifier meets the convergence condition, thereby obtaining a pending classifier; Testing the undetermined classifier using a test sample set constructed according to the negative sample image; If the detection result of the pending classifier on the test sample set meets the training end condition, the pending classifier is determined as the detector.

11. According to the method described in any one of claims 1-10, characterized in that, The appearance color includes colors corresponding to multiple types of rendering abnormal appearances.

12. An object detection device, characterized in that, The device comprises an acquisition unit, a determination unit and a detection unit: The obtaining unit is configured to obtain the appearance color of the virtual object and the image to be detected, where the image to be detected is determined according to the display screen for displaying the virtual object, and the appearance color is used to indicate the color of the abnormally rendered appearance of the virtual object; The determining unit is configured to determine a detection area in the image to be detected, where the size of the detection area is related to the size of the virtual object, and the size of the detection area is larger than the size of the virtual object; The determining unit is further configured to determine a target area from the detection area according to the similarity between the pixel color in the detection area and the appearance color, where the similarity corresponding to the pixel color in the target area satisfies the similarity condition; The detecting unit is configured to perform object detection in the target area to determine whether the target area includes the virtual object with abnormal rendering.

13. A computer device, characterized in that, The computer device includes a processor and a memory: The memory is configured to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1-11 based on the instructions in the computer program.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium is configured to store a computer program, and when the computer program is run on a computer device, the computer device is caused to execute the method according to any one of claims 1-11.

15. A computer program product, comprising a computer program, characterized in that, When it runs on a computer device, the computer device is caused to execute the method according to any one of claims 1-11.