Search

CN-115331076-B - Training of game image reconstruction network, reconstruction method, device and storage medium thereof

CN115331076BCN 115331076 BCN115331076 BCN 115331076BCN-115331076-B

Abstract

The invention discloses training of a game image reconstruction network, a reconstruction method, equipment and a storage medium thereof, wherein the method comprises the steps of obtaining content sample image data representing a real scene; the method comprises the steps of selecting sample games belonging to a simulation management class on a mobile platform, obtaining pictures with sample game body styles as style sample image data, generating a countermeasure network training into a game image reconstruction network according to content sample image data and style sample image data, wherein the game image reconstruction network is used for reconstructing image data with sample game body styles. The countermeasure network is generated by training in a non-paired data mode, so that the game image reconstruction network can reconstruct image data to the main body style of the sample game, training efficiency is improved, the main body style of the reconstructed sample game belongs to post-processing, and the workload of the post-processing can be reduced under the condition of the established main body style.

Inventors

  • WANG CHUANPENG
  • LI TENGFEI
  • ZHANG TING

Assignees

  • 上海硬通网络科技有限公司

Dates

Publication Date
20260508
Application Date
20220811

Claims (11)

  1. 1. A training method for a game image reconstruction network, comprising: acquiring content sample image data representing a real scene; screening sample games belonging to the simulation operation class on the mobile platform; acquiring a picture with the style of the sample game main body as style sample image data; training a generated countermeasure network into a game image reconstruction network according to the content sample image data and the style sample image data, wherein the game image reconstruction network is used for reconstructing image data with the style of the sample game main body; wherein the acquiring a picture having the sample game body style as style sample image data includes: acquiring candidate video data recorded when a user controls the sample game; extracting multi-frame image data from the candidate video data as first reference image data; performing a binarization operation on a green component for each pixel point of the first reference image data; if the binarization operation is completed, counting the number of the pixel points with the non-zero green component; counting the duty ratio of the number; if the duty ratio exceeds a preset first threshold value, determining that primary colors of the first reference image data are matched with the main body style of the sample game, and marking the first reference image data as second reference image data; Marking the second reference image data as third reference image data if the second reference image data includes a target object that appears in an operation activity of the sample game; screening sample video data among the candidate video data with reference to the third reference image data; and extracting multi-frame image data from the sample video data as style sample image data.
  2. 2. The method according to claim 1, wherein the extracting multi-frame image data from the candidate video data as the first reference image data includes: Splitting the candidate video data into a plurality of video clips, each video clip having an independent scene; And extracting one frame of image data from each video segment at intervals of a preset time length to serve as first reference image data.
  3. 3. The method of claim 1, wherein marking the second reference image data as third reference image data if the second reference image data includes a target object that is a business occurrence in the sample game, comprising: performing target detection operation on the second reference image data by taking cats and lands as targets to obtain target objects appearing in the sample game; detecting edges for the land; calculating a curvature for the edge; Calculating a degree of overlap between the cat and the land; And if the curvature is greater than or equal to a preset second threshold value and the overlapping degree is greater than or equal to a preset third threshold value, marking the second reference image data as third reference image data.
  4. 4. The method of claim 1, wherein the screening sample video data from the candidate video data with reference to the third reference image data comprises: Marking a time point of the third reference image data on a time axis of the candidate video data; if the interval between two adjacent time points is smaller than or equal to a preset fourth threshold value, connecting the two adjacent time points to obtain a communication area; and extracting video data in the connected area from the candidate video data as sample video data.
  5. 5. The method according to any one of claims 1 to 4, further comprising, after the acquiring a picture having the sample game body style as style sample image data: performing data enhancement processing on the style sample image data, wherein the data enhancement processing includes at least one of: cutting the style sample image data randomly; and randomly blurring the style sample image data.
  6. 6. An image reconstruction method, comprising: loading a game image reconstruction network trained in accordance with the method of any one of claims 1-5; Acquiring original image data to be reconstructed; Inputting the original image data into the game image reconstruction network to reconstruct into candidate image data containing a sample game main body style; and performing post-processing on the candidate image data to obtain target image data.
  7. 7. The method of claim 6, wherein post-processing in the candidate image data to obtain target image data comprises: Extracting portrait image data from the original image data; Calculating original edge information for the original image data; removing the original edge information of the portrait image data to obtain target edge information; Converting the target edge information into a color conforming to the sample game non-body style; if the conversion is completed, superposing the original edge information in the candidate image data; and if the superposition is completed, performing mean shift processing on the candidate image data to obtain target image data.
  8. 8. A method for style reconstruction of video data, comprising: loading a game image reconstruction network trained in accordance with the method of any one of claims 1-5; Acquiring original video data with content of introduction target games, wherein the original video data is provided with multi-frame original image data; Inputting the original image data into the game image reconstruction network to reconstruct into candidate image data containing a sample game main body style; post-processing is carried out on the candidate image data to obtain target image data; And replacing the target image data with the original image data in the original video data to obtain target video data.
  9. 9. The method as recited in claim 8, further comprising: adding advertisement element data related to the target game into the target video data to serve as advertisement video data; And publishing the advertisement video data in a specified channel so as to push the advertisement video data to a client for playing when the client accesses the channel.
  10. 10. An electronic device, the electronic device comprising: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the training method of the game image reconstruction network of any one of claims 1-5 or the image reconstruction method of any one of claims 6-7 or the video reconstruction method of any one of claims 8-9.
  11. 11. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for causing a processor to implement the training method of the game image reconstruction network according to any one of claims 1 to 5 or the image reconstruction method according to any one of claims 6 to 7 or the video reconstruction method according to any one of claims 8 to 9 when executed.

Description

Training of game image reconstruction network, reconstruction method, device and storage medium thereof Technical Field The present invention relates to the field of computer vision, and in particular, to training of a game image reconstruction network, and a reconstruction method, apparatus, and storage medium thereof. Background In scenes such as short videos and advertisements, users can make various different types of video data, and after the original video data is recorded, the video data is usually subjected to post-processing, so that the quality of the video data is improved. Some post-processing is to convert the style of video data to a style of a game due to certain business requirements, while currently, commonly used post-processing is to add filters to the video data, and to convert the video data as a whole to other styles, such as antique, film, sunset, etc. However, the filters are usually adjusted in color values of the pixel points and added with other elements for decoration, so that the effect is single, the style of the game is difficult to realize by using a plurality of filters for superposition, and if the filters are designed according to the style of the game when video data are produced, the threshold for producing the video data is greatly improved, the time consumption for producing the video data is greatly prolonged, and the efficiency for producing the video data is low. Disclosure of Invention The invention provides a training and reconstructing method, equipment and a storage medium of a game image reconstruction network, which are used for solving the problem of how to efficiently realize the style of a game with pictures. According to an aspect of the present invention, there is provided a training method of a game image reconstruction network, including: acquiring content sample image data representing a real scene; screening sample games belonging to the simulation operation class on the mobile platform; acquiring a picture with the style of the sample game main body as style sample image data; Training a countermeasure network into a game image reconstruction network according to the content sample image data and the style sample image data, wherein the game image reconstruction network is used for reconstructing image data with the style of the sample game main body. According to another aspect of the present invention, there is provided an image reconstruction method including: Loading a game image reconstruction network trained in accordance with the method of any of the embodiments of the present invention; Acquiring original image data to be reconstructed; Inputting the original image data into the game image reconstruction network to reconstruct into candidate image data containing a sample game main body style; and performing post-processing on the candidate image data to obtain target image data. According to another aspect of the present invention, there is provided a style reconstruction method of video data, including: Loading a game image reconstruction network trained in accordance with the method of any of the embodiments of the present invention; Acquiring original video data with content of introduction target games, wherein the original video data is provided with multi-frame original image data; Inputting the original image data into the game image reconstruction network to reconstruct into candidate image data containing a sample game main body style; post-processing is carried out on the candidate image data to obtain target image data; And replacing the target image data with the original image data in the original video data to obtain target video data. According to another aspect of the present invention, there is provided an electronic apparatus including: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the training method or the image reconstruction method or the video reconstruction method of the game image reconstruction network according to any of the embodiments of the present invention. According to another aspect of the present invention, there is provided a computer readable storage medium storing a computer program for causing a processor to execute a training method or an image reconstruction method or a video reconstruction method of a game image reconstruction network according to any one of the embodiments of the present invention. In the embodiment, content sample image data representing a real scene is acquired, sample games belonging to a simulation management class on a mobile platform are screened, pictures with sample game body styles are acquired as style sample image data, an countermeasure network is generated and trained into a game image reconstruction network according to the content sample image data and the style sample image data, and the g