Scenic spot image processing method and device, equipment and storage medium

By using an image restoration neural network model to automatically process scenic area images, the efficiency and effectiveness of background element removal in scenic area photos have been solved, achieving automated image restoration.

CN119887548BActive Publication Date: 2026-07-10SHENZHEN CHINO E COMM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN CHINO E COMM CO LTD
Filing Date
2024-11-28
Publication Date
2026-07-10

Smart Images

  • Figure CN119887548B_ABST
    Figure CN119887548B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and particularly relates to a scenic spot image processing method and device, equipment and a storage medium, the method comprising obtaining a to-be-processed scenic spot image, determining a target region in the to-be-processed scenic spot image, removing the target region in the to-be-processed scenic spot image to obtain a removed image; obtaining image attribute information of the to-be-processed scenic spot image, obtaining a similar image corresponding to the removed image according to the image attribute information; determining a target region in the similar image, completing the removed image according to the target region in the similar image to obtain a completed image; inputting the completed image and the image attribute information into a preset image inpainting neural network model to perform image inpainting on the completed image, and obtaining an inpainted image of the to-be-processed scenic spot image, which realizes the elimination of sundries and inpainting of the to-be-processed scenic spot image, and meets the image processing requirements of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and storage medium for processing scenic area images. Background Technology

[0002] With the development of smartphone photography technology and the widespread use of social media, people increasingly desire perfect, undisturbed photos when traveling and capturing landmarks or scenic spots. However, due to large crowds, photos often include unwanted background figures, affecting not only the aesthetics but also the souvenir value of the trip. Therefore, intelligent post-processing of photos has become an urgent need.

[0003] Traditional image editing software like Photoshop offers a certain level of image processing capabilities, including tools such as the clone stamp and healing brush, which can help users remove unwanted elements from photos. However, the entire process requires manual intervention, is time-consuming and labor-intensive, and image editing involves image segmentation and inpainting. In particular, image inpainting techniques are not very effective at repairing and supplementing missing parts of the image after removing unwanted elements. Summary of the Invention

[0004] Based on this, the purpose of the present invention is to provide a method, apparatus, device and storage medium for processing scenic area images. Based on the completed image corresponding to the constructed scenic area image to be processed, an image restoration neural network model is used to realize the removal and restoration of debris in the scenic area image to be processed, thereby meeting the user's image processing needs.

[0005] In a first aspect, embodiments of this application provide a method for processing scenic area images, comprising the following steps:

[0006] Obtain an image of the scenic area to be processed, determine the target region in the image of the scenic area to be processed, remove the target region in the image of the scenic area to be processed, and obtain a removed image.

[0007] Obtain image attribute information of the scenic area image to be processed, and obtain similar images corresponding to the removed images based on the image attribute information;

[0008] Determine the target region in the similar image, and complete the removed image based on the target region in the similar image to obtain the completed image;

[0009] The completed image and image attribute information are input into a preset image restoration neural network model to perform image restoration on the completed image, thereby obtaining the restored image of the scenic area image to be processed.

[0010] Secondly, embodiments of this application provide a processing apparatus for scenic area images, comprising:

[0011] The image removal module is used to obtain a scenic area image to be processed, determine the target region in the scenic area image to be processed, remove the target region in the scenic area image to be processed, and obtain a removed image.

[0012] The image retrieval module is used to obtain image attribute information of the scenic area image to be processed, and to obtain similar images corresponding to the removed image based on the image attribute information.

[0013] An image completion module is used to determine the target region in the similar image, and to complete the removed image based on the target region in the similar image to obtain a completed image;

[0014] The image restoration module is used to input the completed image and image attribute information into a preset image restoration neural network model to perform image restoration on the completed image and obtain the restored image of the scenic spot image to be processed.

[0015] Thirdly, embodiments of this application provide a computer device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, it implements the steps of the scenic area image processing method as described in the first aspect.

[0016] Fourthly, embodiments of this application provide a storage medium storing a computer program that, when executed by a processor, implements the steps of the scenic area image processing method described in the first aspect.

[0017] In this application embodiment, a method, apparatus, device, and storage medium for processing scenic area images are provided. Based on the completed image corresponding to the scenic area image to be processed, an image inpainting neural network model is used to realize the removal and repair of debris in the scenic area image to be processed, thereby meeting the user's image processing needs.

[0018] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description

[0019] Figure 1 A schematic flowchart illustrating a method for processing scenic area images according to an embodiment of this application;

[0020] Figure 2 This is a flowchart illustrating step S2 of a method for processing scenic area images provided in one embodiment of this application.

[0021] Figure 3This is a flowchart illustrating step S4 of a method for processing scenic area images according to an embodiment of this application.

[0022] Figure 4 A flowchart illustrating step S5 of a method for processing scenic area images provided in another embodiment of this application;

[0023] Figure 5 A flowchart illustrating step S55 of a method for processing scenic area images provided in another embodiment of this application;

[0024] Figure 6 A schematic diagram of the structure of a scenic area image processing apparatus provided in one embodiment of this application;

[0025] Figure 7 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. Detailed Implementation

[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0027] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0028] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0029] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for processing scenic area images according to an embodiment of this application. The method includes the following steps:

[0030] S1: Obtain the scenic area image to be processed, determine the target region in the scenic area image to be processed, remove the target region in the scenic area image to be processed, and obtain the removed image.

[0031] The entity executing the scenic area image processing method is a processing device (hereinafter referred to as the processing device). In an optional embodiment, the processing device may be a computer device, a server, or a server cluster composed of multiple computer devices.

[0032] In this embodiment, the processing device can obtain the scenic area image to be processed input by the user, or it can obtain the scenic area image to be processed sent by the shooting terminal through a data transmission connection. The shooting terminal can be a device with shooting function such as a mobile phone, tablet or interactive flat panel.

[0033] The processing device identifies the target region in the scenic area image to be processed and removes the target region to obtain a removed image. Specifically, the processing device responds to an image removal command issued by the user. The image removal command can be any tactile command, such as a voice control command: "Remove background people and vehicles from the image." The image removal command can also be generated by the user triggering a control in a preset editing interface and inputting information associated with the target region into the control. The processing device parses the image removal command, converting the information associated with the target region in the command into image segmentation prompts, such as "Segment the image semantically, where background people and vehicles are segmented by category, with people and vehicles marked using different segmentation lines," thus determining the target region in the scenic area image to be processed. In an optional embodiment, the processing device can allow the user to manually select the segmented images to be removed, either by category or individually, to determine the target region in the scenic area image to be processed.

[0034] The processing device removes the target region from the image of the scenic area to be processed based on the image of the scenic area to be processed, the target region, and a preset image segmentation model, thereby obtaining a removed image.

[0035] S2: Obtain the image attribute information of the scenic area image to be processed, and obtain the similar image corresponding to the image to be removed based on the image attribute information.

[0036] In this embodiment, the processing device can obtain image attribute information of the scenic area image to be processed sent by the shooting terminal, and obtain similar images corresponding to the rejected images based on the image attribute information.

[0037] Specifically, the image attribute information is the environmental information of the scenic area image to be processed, which is synchronously recorded by the shooting terminal through a sensor device or a public API interface when the shooting terminal shoots the scenic area image to be processed, as the basis for rapid similarity retrieval. The image attribute information includes location information, time period information, weather information, and building angle information.

[0038] Please see Figure 2 , Figure 2 The flowchart of step S2 in the method for processing scenic area images provided in one embodiment of this application is shown below, including steps S21 to S22:

[0039] S21: Based on the main building image information in the image attribute information, obtain several candidate scenic area images and the image attribute information of the candidate scenic area images.

[0040] In this embodiment, the processing device retrieves images from a preset image database based on the main building image information in the image attribute information, and obtains several images that match the main building image information as candidate scenic area images. The device then obtains several candidate scenic area images and their image attribute information. The image database is pre-established and includes images of buildings taken from different locations, time periods, weather conditions, and angles at several scenic spots.

[0041] S22: Based on the location information, time period information, weather information, and building angle information in the image attribute information, a similarity calculation method is used to obtain the similarity between the removed image and several candidate scenic area images. The candidate scenic area image with the highest similarity is taken as the similar image, and the similar image corresponding to the removed image is obtained.

[0042] In this embodiment, the processing device uses a similarity calculation method based on the location information, time period information, weather information, and building angle information in the image attribute information to obtain the similarity between the rejected image and several candidate scenic area images. The candidate scenic area image with the highest similarity is selected as the similar image, thus obtaining the similar image corresponding to the rejected image.

[0043] Specifically, based on the location information, the processing device can use a Euclidean distance calculation method to obtain the Euclidean distance between the removed image and several candidate scenic area images, and multiply the Euclidean distance with a preset location weight parameter to obtain the location similarity; based on the time period information, the processing device can use a Euclidean distance calculation method to obtain the time-step-based Euclidean distance between the removed image and several candidate scenic area images, and multiply the time-step-based Euclidean distance with a preset time weight parameter to obtain the time similarity; based on the weather information, the processing device can use a Jaccard similarity calculation method to construct the removal image. The processing device generates a set of weather elements for the removed image and several candidate scenic area images, the weather element set including several types of weather elements. The weather similarity is obtained by calculating the ratio of the intersection size to the union size of the weather element sets of the removed image and several candidate scenic area images. Based on the building angle information, the processing device can use the cosine similarity calculation method to obtain the building angle similarity between the removed image and several candidate scenic area images. The processing device accumulates the positional similarity, temporal similarity, weather similarity, and building angle similarity between the removed image and the same candidate scenic area image to obtain the similarity between the removed image and several candidate scenic area images.

[0044] S3: Determine the target region in the similar image, and complete the removed image based on the target region in the similar image to obtain the completed image.

[0045] In this embodiment, the processing device can rotate and adjust the similar image by the same proportion, and overlap the rotated and adjusted image with the culled image to determine the target region in the similar image. Based on the target region in the similar image, the image of the target region is replaced with the corresponding position in the culled image to complete the culled image and obtain the completed image.

[0046] S4: Input the completed image and image attribute information into a preset image restoration neural network model to perform image restoration on the completed image and obtain the restored image of the scenic spot image to be processed.

[0047] Since the completed image is obtained by image replacement, in this embodiment, the processing device inputs the completed image and image attribute information into a preset image restoration neural network model to perform image restoration on the completed image and obtain the restored image of the scenic area to be processed. This overcomes the problem that the completed image may have unnatural effects on the edges of the corresponding areas of the image replacement, and improves the effect of removing and restoring the scenic area image to be processed.

[0048] Please see Figure 3 , Figure 3 The flowchart of step S4 in the method for processing scenic area images provided in one embodiment of this application is shown below, including steps S41 to S42, as follows:

[0049] S41: Determine the repair zone region of the completed image based on the edge line of the target region in the completed image.

[0050] In this embodiment, the processing device determines the repair zone region of the completed image based on the edge line of the target region in the completed image and the annular zone regions formed by extending different distances inward and outward from the edge line of the target region in the completed image.

[0051] S42: Based on the image attribute information, perform virtual and enhanced diffusion processing on the restoration zone area of ​​the completed image to obtain the restored image of the scenic area image to be processed.

[0052] The image restoration neural network model is a pre-trained diffusion model that can generate images based on image attribute information.

[0053] In this embodiment, the processing device obtains a generated image corresponding to the repair zone region of the completed image based on the image attribute information and the image repair neural network model. The generated image is then stitched together with the corresponding position of the completed image to obtain a stitched image. The stitched image is then subjected to virtual and enhanced diffusion processing to repair the edge of the target region of the completed image, thereby obtaining the repaired image of the scenic area image to be processed.

[0054] In an optional embodiment, step S5 is further included: training the image inpainting neural network model. See also... Figure 4 , Figure 4 A flowchart illustrating step S5 of a scenic area image processing method provided in another embodiment of this application includes steps S51 to S55, as detailed below:

[0055] S51: Obtain a training image set and a verification image set, extract several verification images from the verification image set, input the several verification images into the image restoration neural network model to be trained for random image mask overlay processing, and obtain mask images corresponding to the several verification images.

[0056] In this embodiment, the processing device obtains a training image set and a validation image set, which are two non-overlapping databases. The training image set is used for the unsupervised training process of the artificial neural network model's image generation, while the validation image set is used to converge and verify the image generation effect of the artificial neural network model and to perform supervised fine-tuning of the model. The training image set includes several training images, and the validation image set includes several validation images.

[0057] The processing device extracts several verification images from the verification image set, inputs the several verification images into the image restoration neural network model to be trained for random image mask overlay processing, and obtains mask images corresponding to the several verification images.

[0058] S52: Perform scenic area image retrieval based on several mask images and a training image set, and extract several training images corresponding to the mask images from the training image set as similar images corresponding to the mask images.

[0059] In this embodiment, the processing device uses a similarity calculation method to perform scenic area image retrieval based on several mask images and a training image set. Several training images corresponding to the mask images are extracted from the training image set as similar images corresponding to the mask images. For specific embodiments, please refer to step S22, which will not be repeated here.

[0060] S53: Based on the mask regions in several mask images, identify the mask regions in similar images corresponding to the mask images, and complete the mask regions in the similar images with the corresponding mask regions in the mask images to obtain the completed images corresponding to several verification images.

[0061] In this embodiment, the processing device identifies the mask region in a similar image corresponding to the mask image based on the mask region in a plurality of mask images, and completes the mask region in the corresponding mask image by filling in the mask region in the similar image to obtain a plurality of completed images corresponding to the verification images. For specific embodiments, please refer to step S3, which will not be repeated here.

[0062] S54: Obtain image attribute information of several verification images, input the completed images and image attribute information corresponding to several verification images into the image restoration neural network model to be trained for image restoration, and obtain the restored images corresponding to several verification images.

[0063] In this embodiment, the processing device obtains image attribute information of several verification images, inputs the completed images and image attribute information corresponding to the several verification images into the image restoration neural network model to be trained for image restoration, and obtains the restored images corresponding to the several verification images. For specific embodiments, please refer to steps S41 to S42, which will not be repeated here.

[0064] S55: Train the image restoration neural network model to be trained based on a plurality of the verification images, the corresponding restoration images, and the discriminator of the image restoration neural network model to be trained.

[0065] In this embodiment, the processing device inputs several verification images and corresponding repair images into the discriminator of the image repair neural network model to be trained, and trains the image repair neural network model.

[0066] The image inpainting neural network model to be trained includes a global discriminator and a local discriminator. See also... Figure 5 , Figure 5 A flowchart illustrating step S55 of a scenic area image processing method provided in another embodiment of this application includes steps S551 to S552, as detailed below:

[0067] S551: According to the global discriminator, global feature extraction is performed on several verification images and corresponding repair images to obtain global features of several verification images and corresponding repair images; according to the local discriminator, local feature extraction is performed on the repair band regions of several verification images and corresponding repair images to obtain local features of several verification images and corresponding repair images.

[0068] In this embodiment, the processing device performs global feature extraction on several verification images and corresponding repair images based on the global discriminator to obtain global features of several verification images and corresponding repair images. Specifically, the global discriminator includes several convolutional layers and fully connected layers. Using the several convolutional layers, the entire regions of several verification images and corresponding repair images are respectively processed by convolution with a kernel of K*K and a stride of S*S to obtain the first convolutional features of several verification images and corresponding repair images. Using the fully connected layers, the first convolutional features of several verification images and corresponding repair images are fully connected to obtain global features of several verification images and corresponding repair images. This extracts the global feature distribution of several verification images and corresponding repair images to determine whether the repaired image conforms to the feature pattern of the real image and to evaluate the consistency, fluency, and authenticity of the overall image structure.

[0069] The processing device extracts local features from the repaired areas of several verification images and corresponding repaired images based on the local discriminator, obtaining local features of the verification images and corresponding repaired images. Specifically, the global discriminator includes several convolutional layers and fully connected layers. The convolutional layers perform K*K kernel and S*S stride convolution processing on the repaired areas of several verification images and corresponding repaired images to obtain second convolutional features. The fully connected layers then perform fully connected processing on the second convolutional features of the verification images and corresponding repaired images to obtain local features of the verification images and corresponding repaired images. This captures the texture changes, edge clarity, and detail authenticity of the verification images and corresponding repaired images, determining whether the texture of the repaired area of ​​the repaired image is consistent with the surrounding area, whether the edges are clear and natural, and whether the details are rich and realistic.

[0070] S552: Calculate the loss based on the global features of several verification images and corresponding repair images to obtain a global loss value; calculate the loss based on the local features of several verification images and corresponding repair images to obtain a local loss value; and train the image repair neural network model to be trained based on the global loss value and the local loss value.

[0071] In this embodiment, the processing device performs loss calculation based on the global features of several verification images and corresponding repair images to obtain a global loss value, performs loss calculation based on the local features of several verification images and corresponding repair images to obtain a local loss value, and trains the image repair neural network model to be trained based on the global loss value and the local loss value.

[0072] Specifically, the processing device obtains evaluation values ​​corresponding to the global features and local features of several verification images and corresponding repair images based on the global and local features of those verification images and corresponding repair images. Specifically, for the evaluation values ​​corresponding to the global features, the processing device can use algorithms such as mean square error (MSE), peak signal-to-noise ratio (PSNR), and structural similarity index (SSIM) to calculate them. For the evaluation values ​​corresponding to the local features, the processing device can use algorithms such as L1 / L2, texture feature analysis algorithm, and local structural similarity index (Local SSIM) to calculate them.

[0073] The processing device employs an adversarial learning method. Based on the evaluation values ​​of global features and local features of several verification images and corresponding repair images, it calculates adversarial loss values ​​corresponding to global and local features, respectively, which are used as the global and local loss values. These global and local loss values ​​are accumulated, and then multiplied by preset hyperparameters. The product results are summed to obtain the total loss value. Based on the total loss value, the image repair neural network model is trained, achieving the removal and repair of clutter in the scenic area images. This solves the problem of texture repetition or unnaturalness in large-area or complex textures caused by peripheral padding technology, and also addresses the inaccuracy of images generated by deep learning models, meeting users' image processing needs and enhancing the user experience.

[0074] Please refer to Figure 6 , Figure 6 This is a schematic diagram of a scenic area image processing device according to an embodiment of this application. The device can be implemented entirely or partially through software, hardware, or a combination of both. The device 6 includes:

[0075] Image removal module 61 is used to obtain a scenic area image to be processed, determine the target area in the scenic area image to be processed, remove the target area in the scenic area image to be processed, and obtain a removed image.

[0076] Image retrieval module 62 is used to obtain image attribute information of the removed image and obtain similar images corresponding to the removed image based on the image attribute information;

[0077] Image completion module 63 is used to determine the target region in the similar image, and complete the removed image according to the target region in the similar image to obtain a completed image;

[0078] The image restoration module 64 is used to input the completed image into a preset image restoration neural network model to perform image restoration on the completed image and obtain the restored image of the scenic spot image to be processed.

[0079] In this embodiment, an image removal module obtains a scenic area image to be processed, identifies target regions within the image, and removes these target regions to obtain a removed image. An image retrieval module obtains image attribute information of the removed image and, based on this information, retrieves similar images corresponding to the removed image. An image completion module identifies target regions within the similar images and, based on these target regions, completes the removed image to obtain a completed image. An image restoration module inputs the completed image into a preset image restoration neural network model to perform image restoration, resulting in a restored image of the scenic area image to be processed. Based on the constructed completed image corresponding to the scenic area image to be processed, and using the image restoration neural network model, the removal and restoration of clutter in the scenic area image to be processed is achieved, meeting the user's image processing needs and enhancing the user experience.

[0080] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. The computer device 7 includes: a processor 71, a memory 72, and a computer program 73 stored in the memory 72 and executable on the processor 71. The computer device can store multiple instructions, which are adapted to be loaded and executed by the processor 71. Figures 1 to 5 The method steps shown can be found in the following document for detailed execution process. Figures 1 to 5 The specific details shown will not be repeated here.

[0081] The processor 71 may include one or more processing cores. The processor 71 connects to various parts of the server using various interfaces and lines, and executes various functions and processes data of the scenic area image processing device 6 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 72, and by calling data stored in the memory 72. Optionally, the processor 71 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 71 may integrate one or a combination of several of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required to be displayed on the touch screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 71 and may be implemented as a separate chip.

[0082] The memory 72 may include random access memory (RAM) or read-only memory. Optionally, the memory 72 may include a non-transitory computer-readable storage medium. The memory 72 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 72 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 72 may also be at least one storage device located remotely from the aforementioned processor 71.

[0083] This application embodiment also provides a storage medium that can store multiple instructions, which are adapted to be loaded and executed by a processor as described above. Figures 1 to 5 The method steps shown can be found in the following document for detailed execution process. Figures 1 to 5 The specific details shown will not be repeated here.

[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0085] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0086] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the algorithm. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0087] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

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

[0089] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0090] If the integrated module / unit is implemented as 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, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms.

[0091] This invention is not limited to the above-described embodiments. If any modifications or variations to this invention do not depart from the spirit and scope of this invention, and if such modifications and variations fall within the scope of the claims and equivalent technologies of this invention, then this invention also intends to include such modifications and variations.

Claims

1. A method for processing scenic area images, characterized in that, Includes the following steps: Obtain an image of the scenic area to be processed, determine the target region in the image of the scenic area to be processed, remove the target region in the image of the scenic area to be processed, and obtain a removed image. Obtain image attribute information of the scenic area image to be processed, and obtain similar images corresponding to the removed images based on the image attribute information; Determine the target region in the similar image, and complete the removed image based on the target region in the similar image to obtain the completed image; The completed image and image attribute information are input into a preset image restoration neural network model to perform image restoration on the completed image, thereby obtaining the restored image of the scenic area image to be processed. The steps include: The repair zone region of the completed image is determined based on the edge line of the target region in the completed image; Based on the image attribute information and the image restoration neural network model, a generated image corresponding to the restoration zone region of the completed image is obtained. The generated image is then stitched onto the corresponding position of the completed image to obtain a stitched image. The stitched image is then subjected to virtual and enhanced diffusion processing to restore the edges of the target region of the completed image, thereby obtaining the restored image of the scenic area image to be processed.

2. The method for processing scenic area images according to claim 1, characterized in that: The image attribute information includes location information, time period information, weather information, and building information, wherein the building information includes main building image information and building angle information; The step of obtaining similar images corresponding to the removed images based on the image attribute information includes the following steps: Based on the main building image information in the image attribute information, several candidate scenic area images and the image attribute information of the candidate scenic area images are obtained; Based on the location information, time period information, weather information, and building angle information in the image attribute information, a similarity calculation method is used to obtain the similarity between the removed image and several candidate scenic area images. The candidate scenic area image with the highest similarity is selected as the similar image, and the similar image corresponding to the removed image is obtained.

3. The method for processing scenic area images according to claim 1, characterized in that, It also includes the step of training the image restoration neural network model; The training of the image restoration neural network model includes the following steps: A training image set and a verification image set are obtained. Several verification images are extracted from the verification image set. The several verification images are input into the image restoration neural network model to be trained for random image mask overlay processing to obtain mask images corresponding to the several verification images. The training image set includes several training images, and the verification image set includes several verification images. Scenic spot image retrieval is performed based on several mask images and a training image set. Several training images corresponding to the mask images are extracted from the training image set as similar images corresponding to the mask images. Based on the mask regions in several mask images, the mask regions in similar images corresponding to the mask images are identified, and the mask regions in the similar images are used to complete the mask regions in the corresponding mask images to obtain the completed images corresponding to several verification images. Image attribute information of several verification images is obtained, and the completed images and image attribute information corresponding to several verification images are input into the image restoration neural network model to be trained for image restoration to obtain restored images corresponding to several verification images. The image restoration neural network model to be trained is trained based on a number of verification images, corresponding restoration images, and a discriminator of the image restoration neural network model to be trained.

4. The method for processing scenic area images according to claim 3, characterized in that: The image restoration neural network model to be trained includes a global discriminator and a local discriminator; The step of inputting several verification images and their corresponding repair images into the discriminator of the image repair neural network model to be trained, and training the image repair neural network model to be trained, includes the following steps: According to the global discriminator, global features are extracted from several verification images and corresponding repair images to obtain global features of several verification images and corresponding repair images; according to the local discriminator, local features are extracted from the repair band regions of several verification images and corresponding repair images to obtain local features of several verification images and corresponding repair images. Loss is calculated based on the global features of several verification images and corresponding repair images to obtain a global loss value. Loss is also calculated based on the local features of several verification images and corresponding repair images to obtain a local loss value. The image repair neural network model to be trained is then trained based on the global loss value and the local loss value.

5. A device for processing scenic area images, characterized in that, include: The image removal module is used to obtain a scenic area image to be processed, determine the target region in the scenic area image to be processed, remove the target region in the scenic area image to be processed, and obtain a removed image. The image retrieval module is used to obtain image attribute information of the scenic area image to be processed, and to obtain similar images corresponding to the removed image based on the image attribute information. An image completion module is used to determine the target region in the similar image, and to complete the removed image based on the target region in the similar image to obtain a completed image; The image restoration module is used to input the completed image and image attribute information into a preset image restoration neural network model to perform image restoration on the completed image and obtain the restored image of the scenic spot image to be processed, including the following steps: The repair zone region of the completed image is determined based on the edge line of the target region in the completed image; Based on the image attribute information and the image restoration neural network model, a generated image corresponding to the restoration zone region of the completed image is obtained. The generated image is then stitched onto the corresponding position of the completed image to obtain a stitched image. The stitched image is then subjected to virtual and enhanced diffusion processing to restore the edges of the target region of the completed image, thereby obtaining the restored image of the scenic area image to be processed.

6. A computer device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor; the computer program, when executed by the processor, implements the steps of the method for processing scenic area images as described in any one of claims 1 to 4.

7. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the scenic area image processing method as described in any one of claims 1 to 4.