WO2023202570A1 - Image processing method and processing apparatus, electronic device and readable storage medium - Google Patents

Image processing method and processing apparatus, electronic device and readable storage medium Download PDF

Info

Publication number
WO2023202570A1
WO2023202570A1 PCT/CN2023/088947 CN2023088947W WO2023202570A1 WO 2023202570 A1 WO2023202570 A1 WO 2023202570A1 CN 2023088947 W CN2023088947 W CN 2023088947W WO 2023202570 A1 WO2023202570 A1 WO 2023202570A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
area
target area
information
processing
Prior art date
Application number
PCT/CN2023/088947
Other languages
French (fr)
Chinese (zh)
Inventor
任帅
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2023202570A1 publication Critical patent/WO2023202570A1/en

Links

Classifications

    • G06T3/04
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • This application belongs to the field of image processing technology, and specifically relates to an image processing method and processing device, electronic equipment and readable storage media.
  • Processing methods in related technologies such as erasing specific areas through image restoration, only use the texture information of the erased area, resulting in poor erasure effects and leaving obvious repair traces on the picture. If you use deep learning to process pictures, you can reduce repair traces, but it is easy to erase other areas in the picture that are similar to specific areas, and the processing effect is not good.
  • the purpose of the embodiments of the present application is to provide an image processing method and processing device, electronic equipment and readable storage medium, which can solve the problem of poor processing effect of erasing image content in related technologies.
  • embodiments of the present application provide an image processing method, including:
  • the image information of the preset area in the first image is erased to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area includes the target area;
  • a processed target image is generated based on the area image and the first image.
  • an image processing device including:
  • a positioning module used to locate the target area in the first image and obtain the position information of the target area
  • the erasing module is used to erase the image information of the preset area in the first image through the image processing model to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area includes target area;
  • An interception module configured to intercept an area image corresponding to the target area in the second image based on the location information
  • a processing module configured to generate a processed target image based on the area image and the first image.
  • embodiments of the present application provide an electronic device, including a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor.
  • the program or instructions are executed by the processor, the method of the first aspect is implemented. step.
  • embodiments of the present application provide a readable storage medium that stores a program or instructions, and when the program or instructions are executed by a processor, the steps of the method in the first aspect are implemented.
  • inventions of the present application provide a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the steps of the method in the first aspect. .
  • embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
  • an embodiment of the present application provides an image processing device, including the device being configured to perform the method described in the first aspect.
  • the image area that needs to be processed is first positioned and the location information is recorded. Then, image processing is performed on the first image as a whole through the adversarial model.
  • the image processing steps are based on image recognition technology and deep learning technology.
  • the model automatically identifies the parts that need to be processed, and based on the global information of the first image, the parts that need to be processed are Erase the preset area and keep the image of the erased preset area consistent with the overall image.
  • the area image at the same position is intercepted, and the area image is combined with the original first image. , that is, only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image retains the consistency of the overall image and the content of the target area that needs to be processed. Erasing is performed while ensuring that other similar areas in the image will not be erased by mistake, which improves the processing efficiency when erasing specific content in the image.
  • Figure 1 shows one of the flowcharts of an image processing method according to an embodiment of the present application
  • Figure 2 shows one of the schematic diagrams of an image processing method according to an embodiment of the present application
  • Figure 3 shows the second schematic diagram of the image processing method according to the embodiment of the present application.
  • Figure 4 shows the third schematic diagram of the image processing method according to the embodiment of the present application.
  • Figure 5 shows a schematic structural diagram of an image processing model according to an embodiment of the present application
  • Figure 6 shows the second flowchart of the image processing method according to the embodiment of the present application.
  • Figure 7 shows a structural block diagram of an image processing device according to an embodiment of the present application.
  • Figure 8 shows a structural block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first,”"second,” etc. are distinguished
  • the object is usually A category does not limit the number of objects.
  • the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • Figure 1 shows one of the flowcharts of the image processing method according to the embodiment of the present application. As shown in Figure 1, the method includes:
  • Step 102 locate the target area in the first image and obtain the location information of the target area
  • Step 104 Erase the image information of the preset area in the first image through the image processing model to obtain the erased second image;
  • step 104 the size of the second image is the same as the first image, and the preset area includes the target area;
  • Step 106 According to the position information, intercept the area image corresponding to the target area in the second image;
  • Step 108 Generate a processed target image based on the area image and the first image.
  • the text area in the image can be Position and record the location information corresponding to the area.
  • the location information may be coordinate information.
  • the original image of the first image is input into the preset image processing model.
  • the image processing model can perform the first image processing according to the type of information that the user needs to erase. Automatically identify the target information to be erased in an image, and process the entire first image based on the global information of the target image.
  • Figure 2 shows one of the schematic diagrams of an image processing method according to an embodiment of the present application.
  • the first image 200 includes text information 202, and the user needs to erase the text information 202.
  • OCR Optical Character Recognition
  • the area where the text information 202 is located in the first image 200 is marked, that is, the target area.
  • Domain 204 simultaneously records the coordinate information of the target area 204, thereby recording the location information of the target area 204.
  • the first image is input to a preset image processing model.
  • the image processing model can automatically identify the image information content that the user wants to erase, such as text information, and erase it based on the global information of the target image, including color information, pixel information, etc.
  • FIG 3 shows the second schematic diagram of the image processing method according to the embodiment of the present application.
  • the image processing model processes the entire first image 300 and processes several pre-images that are identified as containing text. All areas are erased.
  • the image processing model performs erasure processing on both preset areas.
  • the first preset area 302 contains the text information that the user needs to erase, and the second preset area 304 contains Because the characteristics of the QR code information and text information are close, the QR code information is mistakenly recognized as text and erased.
  • the image processing model outputs the second image, according to the identified position information of the target area, in the second image, the corresponding area image is intercepted according to the same coordinates, and the area image is intercepted according to the coordinates of the target area. , superimposed on the original image of the first image, thereby covering the target area of the first image, thereby generating the target image.
  • Figure 4 shows the third schematic diagram of the image processing method according to the embodiment of the present application. As shown in Figure 4, on the target image 400, the text information in the target area 402 is erased, while the QR code 404 is retained.
  • the embodiment of the present application intercepts the area image at the same position in the second image erased by the image processing model, and combines the area image with the original first image, that is, Only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image has the content of the target area that needs to be processed while retaining the coordination of the overall image. Erase, while ensuring that other similar areas in the image will not be erased by mistake, improving the processing efficiency when erasing specific content in the image.
  • generating a processed target image based on the area image and the first image includes: covering the area image on the target area according to the position information to obtain the target image.
  • the intercepted regional image processed by the image processing model is overlaid on the original first image according to the coordinate information of the target area, so that the image content in the target area is completely replaced by area image, so that in the replaced target image, only the area that needs to be erased is replaced by the processed image, and the content of the target area that needs to be processed is erased while retaining the consistency of the overall image. It also ensures that other similar areas in the image will not be erased by mistake, which improves the processing efficiency when erasing specific content in the image.
  • the method before erasing the image information of the preset area in the first image, the method further includes:
  • the second training image is an image obtained by removing preset image information from the first training image
  • Erase the image information of the preset area in the first image including:
  • a preset adversarial model is trained to obtain a trained image processing model. Specifically, first, a first image is collected, and the first image is manually processed to generate a second image. The first image is an original image, and the second image is a second image obtained by erasing preset areas such as text content through image editing or image modification software.
  • a preset generative adversarial network is trained to perform end-to-end erasing of text in the entire image.
  • the specific method is to build a network model.
  • the unet network structure is used.
  • the image is first down-sampled to obtain the image semantic information, and then the image is up-sampled and restored to the original size to obtain the image output.
  • the unet a U-shaped network for dense prediction segmentation
  • a layer of lightweight unet results are added for further processing to obtain the final processing result.
  • the discriminant network includes a dual-scale network.
  • the first scale network includes several cascaded convolutions, in which the step size of the convolution can be set to 1.
  • the pooling layer is not introduced to ensure The image resolution is not reduced.
  • the input of the second layer of scale network is obtained by downsampling the output of the first layer network twice.
  • the ground truth of the dual-scale network is obtained from the erased image and the image that is downsampled twice as much as the erased image.
  • the output result of the generation network is input to the discriminant network, and the difference between the currently generated erased image and the original annotated erased image (i.e., the second image) is judged through the discriminant network, and is used as the reverse loss (loss) Propagate the optimized network parameters and finally obtain the optimized network structure.
  • FIG. 5 shows a schematic structural diagram of an image processing model according to an embodiment of the present application.
  • the image processing model 500 includes a 2-layer unet network structure, that is, a first network 502 and a second network 504.
  • the first image 506 to be processed is input into the first network 502, and the specific information therein is processed through the first network 502. Erase.
  • the processed third image 508 is obtained.
  • the third image 508 is down-sampled to obtain a fourth image 510 with reduced resolution, thereby obtaining the image semantic definition.
  • the fourth image 510 obtained by down-sampling is used as the second image.
  • layer network that is, the input of the second network 504.
  • the fifth image 512 output by the second network 504 is upsampled and restored to its original size to obtain the final second image 514.
  • the content contained in the first image is the content that the user needs to erase. If the user needs to erase the text information in the image, the first image contains the text information. If the user needs to erase the face, the first image contains face information.
  • This application trains the image recognition model so that the image recognition model can The concentrated image content is erased, and the corresponding content area in the first image is erased, so that the erased image can maintain the coordination of the overall image and improve image processing efficiency.
  • the target area is a character image area
  • locating the target area in the first image includes:
  • the target area specifically includes a character image area, that is to say, the user needs to erase the character area in the first image.
  • OCR optical character recognition
  • the first image is first preprocessed.
  • a denoising algorithm is used to remove noise on the first image.
  • the text or characters are obtained through the OCR detection algorithm, and the coordinate information is located.
  • the OCR detection algorithm can obtain character detection frames in various scenarios such as horizontal, vertical, and curved.
  • a four-point coordinate frame can be used to represent them; while for curved irregular character detection frames, an eight-point coordinate frame can be used. If there is no text information or character information in the current picture, an empty character coordinate box will be returned.
  • the character detection frame is marked with coordinate information, and the coordinate information refers to the coordinates of the character detection frame in the first image.
  • the target area is located in the first image through the coordinate information of the character detection frame, so that after the second image is obtained through the image processing model, the processed area image is overlaid on the target area according to the coordinate information, so that the generated In the target image, it not only ensures the coordination of the overall image, but also effectively erases the content of the target area that needs to be processed. It also ensures that other similar areas in the image will not be mistakenly erased, which improves the efficiency of erasing specific areas in the image. content processing efficiency.
  • Figure 6 shows the second flowchart of the image processing method according to the embodiment of the present application. As shown in Figure 6, the method includes:
  • Step 602 Perform text positioning on the original image and record the text coordinate information in the original image
  • step 602 the image is first preprocessed, and a denoising algorithm is used to reduce the noise on the image. Remove. Then train the OCR detection model and obtain text positioning information through the OCR detection algorithm.
  • the OCR detection algorithm can obtain text detection frames in various scenarios such as horizontal, vertical, and curved. Horizontal and vertical text boxes are represented by a four-point coordinate frame, while curved text boxes are represented by an eight-point coordinate frame. If there is no text information in the current picture, an empty text coordinate box will be returned.
  • Step 604 Collect paired data and train a generative adversarial network to perform text erasure
  • step 604 pairs of ⁇ original pictures, text-erased pictures> are collected, and model training is performed using a generative adversarial method to obtain an image processing model.
  • the original image is first collected, and the corresponding text-erased image is obtained through PS, thereby obtaining a pair of ⁇ original image, text-erased image>.
  • a generative adversarial network is trained to perform end-to-end erasure of entire image text.
  • the specific method is to build a network model.
  • the unet network structure is used.
  • the image is first down-sampled to obtain image semantic information, and then the image is up-sampled. Restore the original size to obtain the image output.
  • a layer of lightweight unet is added after the unet structure for further processing to obtain the final processing result.
  • the discriminant network consists of a dual-scale network.
  • the first scale network consists of several convolution cascades.
  • the step size of the convolution is set to 1.
  • the pooling layer is not introduced to ensure the resolution of the image. does not decrease, then add a layer of the same scale network after the first scale network, but the input of the second layer of scale network is obtained by downsampling twice the output of the first layer of network.
  • the ground truth of the dual-scale network is obtained from the erased image and the image that is downsampled twice as much as the erased image.
  • the output result of the generation network is input into the discriminant network to determine the difference between the currently generated erased image and the original annotated erased image, and is used as loss backpropagation to optimize the network parameters, and finally the optimized network structure is obtained.
  • Step 606 Use the optimized model to infer the original image to obtain the erased image result
  • step 606 the optimized generative adversarial model is used to infer the original image to obtain the erased image result.
  • the specific method is to input the original image into the trained model.
  • the discriminator needs to be removed and only the generator is retained. That is, the output image obtained after passing through the generator is the wiped Image result after division.
  • Step 608 Map the obtained text coordinate information to the erased picture, and crop out the erased area where the text coordinates are located;
  • step 608 map the text coordinate information obtained in the step to the obtained erased picture result, and cut out the erased area where the text coordinates are located; considering that some areas that are very similar to text, such as fences and textures, , flowers, grass, etc. are easily erased as text. Therefore, in order to ensure that this information is not mistakenly scrawled, it is necessary to map the text coordinate information recorded from the original image to the acquired erased image. Because the coordinates are non-rectangular frames, it is necessary to Set a mask image as large as the input image. The mask image is originally pure black. Set the area where the coordinate box is located to white to get the erased area where the text coordinates that need to be cropped are located.
  • Step 610 Paste the erased area back to the original image to obtain the final text-erased image.
  • step 610 the cropped erasure area is pasted back to the original image to obtain the final text erasure image.
  • the specific method is to obtain the mask image corresponding to the text area that needs to be erased. At this time, you only need to paste the erased area corresponding to the pure white area in the mask image back to the original image, so that you can get the final result.
  • the required text is erased from the picture, thus avoiding the accidental painting of areas that are very similar to the text.
  • an image processing device is provided.
  • Figure 7 shows a structural block diagram of the image processing device according to an embodiment of the present application. As shown in Figure 7, the image processing device 700 includes:
  • Positioning module 702 is used to locate the target area in the first image and obtain the location information of the target area
  • the erasing module 704 is used to erase the image information of the preset area in the first image through the image processing model to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area Include target areas;
  • the interception module 706 is used to intercept the area image corresponding to the target area in the second image according to the location information
  • the processing module 708 is used to generate a processed target image according to the area image and the first image.
  • the embodiment of the present application intercepts the area image at the same position in the second image erased by the image processing model, and combines the area image with the original first image, that is, Only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image has the content of the target area that needs to be processed while retaining the coordination of the overall image. Erase, while ensuring that other similar areas in the image will not be erased by mistake, improving the processing efficiency when erasing specific content in the image.
  • the image processing device further includes: a covering module, configured to overlay the area image on the target area according to the location information to obtain the target image.
  • the embodiment of the present application also overlays the intercepted regional image processed by the image processing model on the original first image according to the coordinate information of the target area, thereby making the image content in the target area , completely replaced by a regional image, so that in the replaced target image, only the area that needs to be erased is replaced by the processed image. While retaining the consistency of the overall image, the target area that needs to be processed is improved. The content is erased while ensuring that other similar areas in the image will not be accidentally erased, which improves the processing efficiency when erasing specific content in the image.
  • the processing device further includes:
  • An acquisition module configured to acquire a first training image and a second training image, where the second training image is an image obtained by removing preset image information from the first training image;
  • a training module used to train a preset model through the first training image and the second training image to obtain a trained image processing model, where the image processing model includes a first network and a second network;
  • the erasing module is also used to erase the first image through the first network to obtain the processed third image;
  • the sampling module is used to downsample the third image to obtain the fourth image
  • the erasing module is also used to erase the fourth image through the second network to obtain the processed fifth image
  • the sampling module is also used to upsample the fifth image to obtain the second image.
  • This application trains the image recognition model so that the image recognition model can The concentrated image content is erased, and the corresponding content area in the first image is erased, so that the erased image can maintain the coordination of the overall image and improve image processing efficiency.
  • the target area is a character image area
  • the processing device further includes:
  • a recognition module configured to perform optical character recognition on the first image and obtain a character detection frame in the first image
  • the positioning module is also used to locate the target area in the first image based on the coordinate information of the character detection frame.
  • the embodiment of the present application locates the target area in the first image, so that after the second image is obtained through the image processing model, the processed area image is overlaid on the target area according to the coordinate information, so that in the generated target image, It not only ensures the coordination of the overall image, but also effectively erases the content of the target area that needs to be processed. It also ensures that other similar areas in the image will not be mistakenly erased, improving the processing when erasing specific content in the image. efficiency.
  • the image processing device in the embodiment of the present application may be an electronic device or a component in the electronic device, such as an integrated circuit or a chip.
  • the electronic device may be a terminal or other devices other than the terminal.
  • the electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile internet device (Mobile Internet Device, MID), or augmented reality (AR)/virtual reality (VR).
  • the image processing device in the embodiment of the present application may be a device with an operating system.
  • the operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
  • the image processing device provided by the embodiments of the present application can implement various processes implemented by the above method embodiments. To avoid duplication, they will not be described again here.
  • the embodiment of the present application also provides an electronic device.
  • Figure 8 shows a structural block diagram of the electronic device according to the embodiment of the present application.
  • the electronic device 800 includes a processor 802, a memory 804, and a storage device 800.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 900 includes but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, processor 910 and other components .
  • the electronic device 900 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the processor 910 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions.
  • the structure of the electronic device shown in Figure 9 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
  • the processor 910 is used to locate the target area in the first image and obtain the location information of the target area;
  • the image information of the preset area in the first image is erased to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area includes the target area;
  • a processed target image is generated based on the area image and the first image.
  • the embodiment of the present application intercepts the area image at the same position in the second image erased by the image processing model, and combines the area image with the original first image, that is, Only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image retains the consistency of the overall image. In this case, the content of the target area that needs to be processed is erased, while ensuring that other similar areas in the image will not be erased by mistake, which improves the processing efficiency when erasing specific content in the image.
  • the processor 910 is also configured to overlay the area image on the target area according to the location information to obtain the target image.
  • the embodiment of the present application also overlays the intercepted regional image processed by the image processing model on the original first image according to the coordinate information of the target area, thereby making the image content in the target area , completely replaced by a regional image, so that in the replaced target image, only the area that needs to be erased is replaced by the processed image. While retaining the consistency of the overall image, the target area that needs to be processed is improved. The content is erased while ensuring that other similar areas in the image will not be accidentally erased, which improves the processing efficiency when erasing specific content in the image.
  • the processor 910 is also configured to obtain a first training image and a second training image, where the second training image is image data obtained after erasing a preset area in the first training image;
  • Erase the image information of the preset area in the first image including:
  • This application trains the image recognition model, so that the image recognition model can erase the corresponding content area in the first image according to the image content in the training set, and can make the erased image maintain the coordination of the overall image. , improve image processing efficiency.
  • the target area is a character image area
  • the processor 910 is further configured to perform optical character recognition on the first image, and obtain a character detection frame in the first image;
  • the embodiment of the present application locates the target area in the first image, so as to obtain the target area through the image processing model. After arriving at the second image, based on the coordinate information, the processed area image is overlaid on the target area, so that the generated target image not only ensures the coordination of the overall image, but also adjusts the content of the target area that needs to be processed. In order to effectively erase, it also ensures that other similar areas in the image will not be accidentally erased, and improves the processing efficiency when erasing specific content in the image.
  • the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042.
  • the graphics processor 9041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras).
  • the display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072 .
  • Touch panel 9071 also known as touch screen.
  • the touch panel 9071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 9072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
  • Memory 909 can be used to store software programs as well as various data.
  • the memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc.
  • memory 909 may include volatile memory or nonvolatile memory, or memory 909 may include both volatile and nonvolatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and Direct Rambus RAM (DRRAM).
  • Memory 909 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
  • the processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 910.
  • Embodiments of the present application also provide a readable storage medium.
  • Programs or instructions are stored on the readable storage medium.
  • the program or instructions are executed by a processor, each process of the above method embodiments is implemented and the same technology can be achieved. The effect will not be described here to avoid repetition.
  • the processor is the processor in the electronic device described in the above embodiment.
  • the readable storage media includes computer-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc.
  • An embodiment of the present application further provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement various processes of the above method embodiments. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
  • chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
  • Embodiments of the present application provide a computer program product.
  • the program product is stored in a storage medium.
  • the program product is executed by at least one processor to implement the processes of the above method embodiments and can achieve the same technical effect. To avoid repetition, we will not go into details here.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
  • the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

Abstract

An image processing method and processing apparatus, an electronic device, and a readable storage medium. The image processing method comprises: positioning a target region in a first image to obtain position information of the target region (102); erasing image information of a preset region in the first image to obtain a second image after the erasing (104), the size of the second image being the same as that of the first image, and the preset region comprising the target region; according to the position information, clipping from the second image a region image corresponding to the target region (106); and, according to the region image and the first image, generating a target image after the processing (108).

Description

图像处理方法和处理装置、电子设备和可读存储介质Image processing methods and processing devices, electronic equipment and readable storage media
相关申请的交叉引用Cross-references to related applications
本申请要求在2022年04月21日提交中国专利局、申请号为202210420012.4、名称为“图像处理方法和处理装置、电子设备和可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on April 21, 2022, with application number 202210420012.4 and titled "Image processing method and processing device, electronic equipment and readable storage medium", and its entire content has been approved This reference is incorporated into this application.
技术领域Technical field
本申请属于图像处理技术领域,具体涉及一种图像处理方法和处理装置、电子设备和可读存储介质。This application belongs to the field of image processing technology, and specifically relates to an image processing method and processing device, electronic equipment and readable storage media.
背景技术Background technique
在相关技术中,用户有时会有对图片中的特定内容进行抹除或隐藏的需求,如抹除图片中的文字。In related technologies, users sometimes have a need to erase or hide specific content in a picture, such as erasing text in a picture.
相关技术中的处理方法,如通过图像修复的方式抹除特定的区域,其只利用了抹除区域的纹理信息,导致抹除效果差,会在图片上留下明显的修复痕迹。而如果使用深度学习的方式处理图片,能够减少修复痕迹,但是容易将图片中其他与特定区域内容相近的区域一并抹除,处理效果不好。Processing methods in related technologies, such as erasing specific areas through image restoration, only use the texture information of the erased area, resulting in poor erasure effects and leaving obvious repair traces on the picture. If you use deep learning to process pictures, you can reduce repair traces, but it is easy to erase other areas in the picture that are similar to specific areas, and the processing effect is not good.
发明内容Contents of the invention
本申请实施例的目的是提供一种图像处理方法和处理装置、电子设备和可读存储介质,能够解决相关技术中抹除图像内容处理效果不好的问题。The purpose of the embodiments of the present application is to provide an image processing method and processing device, electronic equipment and readable storage medium, which can solve the problem of poor processing effect of erasing image content in related technologies.
第一方面,本申请实施例提供了一种图像处理方法,包括:In a first aspect, embodiments of the present application provide an image processing method, including:
在第一图像中定位目标区域,得到目标区域的位置信息;Locate the target area in the first image and obtain the location information of the target area;
通过图像处理模型,擦除第一图像中预设区域的图像信息,得到擦除后的第二图像,其中,第二图像的尺寸与第一图像相同,预设区域包括目标区域;Through the image processing model, the image information of the preset area in the first image is erased to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area includes the target area;
根据位置信息,在第二图像中截取与目标区域对应的区域图像;According to the position information, intercept an area image corresponding to the target area in the second image;
根据区域图像和第一图像,生成处理后的目标图像。 A processed target image is generated based on the area image and the first image.
第二方面,本申请实施例提供了一种图像处理装置,包括:In a second aspect, embodiments of the present application provide an image processing device, including:
定位模块,用于在第一图像中定位目标区域,得到目标区域的位置信息;A positioning module, used to locate the target area in the first image and obtain the position information of the target area;
擦除模块,用于通过图像处理模型,擦除第一图像中预设区域的图像信息,得到擦除后的第二图像,其中,第二图像的尺寸与第一图像相同,预设区域包括目标区域;The erasing module is used to erase the image information of the preset area in the first image through the image processing model to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area includes target area;
截取模块,用于根据位置信息,在第二图像中截取与目标区域对应的区域图像;An interception module, configured to intercept an area image corresponding to the target area in the second image based on the location information;
处理模块,用于根据区域图像和第一图像,生成处理后的目标图像。A processing module, configured to generate a processed target image based on the area image and the first image.
第三方面,本申请实施例提供了一种电子设备,包括处理器和存储器,存储器存储可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, including a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, the method of the first aspect is implemented. step.
第四方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储程序或指令,该程序或指令被处理器执行时实现如第一方面的方法的步骤。In a fourth aspect, embodiments of the present application provide a readable storage medium that stores a program or instructions, and when the program or instructions are executed by a processor, the steps of the method in the first aspect are implemented.
第五方面,本申请实施例提供了一种芯片,该芯片包括处理器和通信接口,该通信接口和该处理器耦合,该处理器用于运行程序或指令,实现如第一方面的方法的步骤。In a fifth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the steps of the method in the first aspect. .
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
第七方面,本申请实施例提供了一种图像处理装置,包括所述装置被配置成用于执行如第一方面所述的方法。In a seventh aspect, an embodiment of the present application provides an image processing device, including the device being configured to perform the method described in the first aspect.
在本申请实施例中,首先对需要处理的图像区域进行定位,并记录位置信息。然后,通过对抗模型,对第一图像整体进行图像处理,该图像处理的步骤基于图像识别技术和深度学习技术,模型通过自动识别需要处理的部分,并根据第一图像的全局信息,对需要处理的预设区域进行擦除,保持擦除后的预设区域的图像,与整体图像保持协调一致。 In this embodiment of the present application, the image area that needs to be processed is first positioned and the location information is recorded. Then, image processing is performed on the first image as a whole through the adversarial model. The image processing steps are based on image recognition technology and deep learning technology. The model automatically identifies the parts that need to be processed, and based on the global information of the first image, the parts that need to be processed are Erase the preset area and keep the image of the erased preset area consistent with the overall image.
在擦除完成后,根据标记好的目标区域的位置信息,在通过图像处理模型擦除后的第二图像中,截取相同位置的区域图像,并将该区域图像与原始的第一图像进行结合,即只选取第二图像中,用户需要消除的部分,来对原始图像进行处理,因此,最终得到的目标图像,在保留了整体图像的协调一致的情况下,对需要处理的目标区域的内容进行了擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。After the erasure is completed, according to the position information of the marked target area, in the second image erased by the image processing model, the area image at the same position is intercepted, and the area image is combined with the original first image. , that is, only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image retains the consistency of the overall image and the content of the target area that needs to be processed. Erasing is performed while ensuring that other similar areas in the image will not be erased by mistake, which improves the processing efficiency when erasing specific content in the image.
附图说明Description of the drawings
图1示出了根据本申请实施例的图像处理方法的流程图之一;Figure 1 shows one of the flowcharts of an image processing method according to an embodiment of the present application;
图2示出了根据本申请实施例的图像处理方法的示意图之一;Figure 2 shows one of the schematic diagrams of an image processing method according to an embodiment of the present application;
图3示出了根据本申请实施例的图像处理方法的示意图之二;Figure 3 shows the second schematic diagram of the image processing method according to the embodiment of the present application;
图4示出了根据本申请实施例的图像处理方法的示意图之三;Figure 4 shows the third schematic diagram of the image processing method according to the embodiment of the present application;
图5示出了根据本申请实施例的图像处理模型的结构示意图;Figure 5 shows a schematic structural diagram of an image processing model according to an embodiment of the present application;
图6示出了根据本申请实施例的图像处理方法的流程图之二;Figure 6 shows the second flowchart of the image processing method according to the embodiment of the present application;
图7示出了根据本申请实施例的图像处理装置的结构框图;Figure 7 shows a structural block diagram of an image processing device according to an embodiment of the present application;
图8示出了根据本申请实施例的电子设备的结构框图;Figure 8 shows a structural block diagram of an electronic device according to an embodiment of the present application;
图9为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
具体实施例Specific embodiments
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为 一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first,""second," etc. are distinguished The object is usually A category does not limit the number of objects. For example, the first object can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的图像处理方法和处理装置、电子设备和可读存储介质进行详细地说明。The image processing method and processing device, electronic equipment and readable storage medium provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.
在本申请的一些实施例中,提供了一种图像处理方法,图1示出了根据本申请实施例的图像处理方法的流程图之一,如图1所示,方法包括:In some embodiments of the present application, an image processing method is provided. Figure 1 shows one of the flowcharts of the image processing method according to the embodiment of the present application. As shown in Figure 1, the method includes:
步骤102,在第一图像中定位目标区域,得到目标区域的位置信息;Step 102, locate the target area in the first image and obtain the location information of the target area;
步骤104,通过图像处理模型,擦除第一图像中预设区域的图像信息,得到擦除后的第二图像;Step 104: Erase the image information of the preset area in the first image through the image processing model to obtain the erased second image;
在步骤104中,第二图像的尺寸与第一图像相同,预设区域包括目标区域;In step 104, the size of the second image is the same as the first image, and the preset area includes the target area;
步骤106,根据位置信息,在第二图像中截取与目标区域对应的区域图像;Step 106: According to the position information, intercept the area image corresponding to the target area in the second image;
步骤108,根据区域图像和第一图像,生成处理后的目标图像。Step 108: Generate a processed target image based on the area image and the first image.
在本申请实施例中,当用户希望对图像中的特定内容进行隐藏或抹除时,如用户希望隐藏图像中的文字内容时,首先,可以通过如文字识别算法等,对图像中的文字区域进行定位,并记录该区域对应的位置信息。其中,位置信息可以是坐标信息。In the embodiment of the present application, when the user wants to hide or erase specific content in the image, for example, when the user wants to hide the text content in the image, first, the text area in the image can be Position and record the location information corresponding to the area. The location information may be coordinate information.
在得到需要擦除的目标区域的位置信息后,将第一图像的原图整体输入到预设的图像处理模型中,具体地,该图像处理模型能够根据用户需要擦除的信息种类,在第一图像中自动识别出包含所要擦除的目标信息,并根据目标图像的全局信息,对第一图像的整体进行处理。After obtaining the position information of the target area that needs to be erased, the original image of the first image is input into the preset image processing model. Specifically, the image processing model can perform the first image processing according to the type of information that the user needs to erase. Automatically identify the target information to be erased in an image, and process the entire first image based on the global information of the target image.
具体地,图2示出了根据本申请实施例的图像处理方法的示意图之一,如图2所示,第一图像200中包括文字信息202,用户需要对文字信息202进行擦除。首先,通过如光学字符识别(Optical Character Recognition,OCR)等手段,在第一图像200中,标注出文字信息202所在的区域,也即目标区 域204,同时记录目标区域204的坐标信息,从而记录目标区域204的位置信息。Specifically, Figure 2 shows one of the schematic diagrams of an image processing method according to an embodiment of the present application. As shown in Figure 2, the first image 200 includes text information 202, and the user needs to erase the text information 202. First, by means such as Optical Character Recognition (OCR), the area where the text information 202 is located in the first image 200 is marked, that is, the target area. Domain 204 simultaneously records the coordinate information of the target area 204, thereby recording the location information of the target area 204.
在得到目标区域的位置信息后,将第一图像输入至预设的图像处理模型。图像处理模型能够自动识别出用户所要擦除的图像信息内容,如文字信息,并基于目标图像的全局信息,包括色彩信息、像素信息等进行擦除。After obtaining the position information of the target area, the first image is input to a preset image processing model. The image processing model can automatically identify the image information content that the user wants to erase, such as text information, and erase it based on the global information of the target image, including color information, pixel information, etc.
图3示出了根据本申请实施例的图像处理方法的示意图之二,如图3所示,图像处理模型对第一图像300的整体进行处理,并将其中被识别为包含文字的若干个预设区域均进行抹除处理。如图3所示,图像处理模型对2个预设区域均进行了抹除处理,其中,第一预设区域302中包含了用户需要擦除的文字信息,而第二预设区域304中包含了二维码信息,由于二维码信息和文字信息的特征接近,导致该二维码信息被误识别为文字而被擦除。Figure 3 shows the second schematic diagram of the image processing method according to the embodiment of the present application. As shown in Figure 3, the image processing model processes the entire first image 300 and processes several pre-images that are identified as containing text. All areas are erased. As shown in Figure 3, the image processing model performs erasure processing on both preset areas. The first preset area 302 contains the text information that the user needs to erase, and the second preset area 304 contains Because the characteristics of the QR code information and text information are close, the QR code information is mistakenly recognized as text and erased.
进一步地,在图像处理模型输出第二图像之后,根据识别出的目标区域的位置信息,在第二图像中,根据相同的坐标,截取出对应的区域图像,将该区域图像按照目标区域的坐标,叠加至第一图像的原图上,从而覆盖第一图像的目标区域,从而生成目标图像。Further, after the image processing model outputs the second image, according to the identified position information of the target area, in the second image, the corresponding area image is intercepted according to the same coordinates, and the area image is intercepted according to the coordinates of the target area. , superimposed on the original image of the first image, thereby covering the target area of the first image, thereby generating the target image.
图4示出了根据本申请实施例的图像处理方法的示意图之三,如图4所示,目标图像400上,目标区域402中的文字信息被抹除,而二维码404得以保留。Figure 4 shows the third schematic diagram of the image processing method according to the embodiment of the present application. As shown in Figure 4, on the target image 400, the text information in the target area 402 is erased, while the QR code 404 is retained.
本申请实施例根据标记好的目标区域的位置信息,在通过图像处理模型擦除后的第二图像中,截取相同位置的区域图像,并将该区域图像与原始的第一图像进行结合,即只选取第二图像中,用户需要消除的部分,来对原始图像进行处理,因此,最终得到的目标图像,在保留了整体图像的协调一致的情况下,对需要处理的目标区域的内容进行了擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。According to the position information of the marked target area, the embodiment of the present application intercepts the area image at the same position in the second image erased by the image processing model, and combines the area image with the original first image, that is, Only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image has the content of the target area that needs to be processed while retaining the coordination of the overall image. Erase, while ensuring that other similar areas in the image will not be erased by mistake, improving the processing efficiency when erasing specific content in the image.
在本申请的一些实施例中,根据区域图像和第一图像,生成处理后的目标图像,包括:根据位置信息,将区域图像覆盖于目标区域,得到目标图像。In some embodiments of the present application, generating a processed target image based on the area image and the first image includes: covering the area image on the target area according to the position information to obtain the target image.
在本申请实施例中,在通过图像处理模型,得到第二图像后,根据目标 区域的位置信息,如坐标信息,在第二图像中截取出于目标区域位置相对应的区域图像。In the embodiment of this application, after obtaining the second image through the image processing model, according to the target The location information of the area, such as the coordinate information, is intercepted from the second image, and the area image corresponding to the position of the target area is intercepted.
在得到区域图像后,同样根据目标区域的坐标信息,将截取得到的,通过图像处理模型处理后的区域图像,覆盖到原始的第一图像上,从而使目标区域内的图像内容,完全替换为区域图像,从而使替换后的目标图像中,仅有需要擦除的区域被处理后的图像所替代,在保留了整体图像的协调一致的情况下,对需要处理的目标区域的内容进行了擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。After obtaining the regional image, the intercepted regional image processed by the image processing model is overlaid on the original first image according to the coordinate information of the target area, so that the image content in the target area is completely replaced by area image, so that in the replaced target image, only the area that needs to be erased is replaced by the processed image, and the content of the target area that needs to be processed is erased while retaining the consistency of the overall image. It also ensures that other similar areas in the image will not be erased by mistake, which improves the processing efficiency when erasing specific content in the image.
在本申请的一些实施例中,在擦除第一图像中预设区域的图像信息之前,方法还包括:In some embodiments of the present application, before erasing the image information of the preset area in the first image, the method further includes:
获取第一训练图像和第二训练图像,其中,第二训练图像是在第一训练图像中,去除预设图像信息后得到的图像;Obtaining a first training image and a second training image, wherein the second training image is an image obtained by removing preset image information from the first training image;
通过第一训练图像和第二训练图像,训练预设模型,得到训练后的图像处理模型,图像处理模型包括第一网络和第二网络;Train the preset model through the first training image and the second training image to obtain a trained image processing model, where the image processing model includes a first network and a second network;
擦除第一图像中预设区域的图像信息,包括:Erase the image information of the preset area in the first image, including:
通过第一网络对第一图像进行擦除处理,得到处理后的第三图像;Perform erasure processing on the first image through the first network to obtain a processed third image;
对第三图像进行下采样处理,得到第四图像;Perform downsampling on the third image to obtain the fourth image;
通过第二网络对第四图像进行擦除处理,得到处理后的第五图像;Perform erasure processing on the fourth image through the second network to obtain the processed fifth image;
对第五图像进行上采样处理,得到第二图像。Perform upsampling processing on the fifth image to obtain the second image.
在本申请实施例中,对预设的对抗模型进行训练,从而得到训练好的图像处理模型。具体地,首先采集收集第一图像,并对第一图像进行手动处理,生成第二图像。其中,第一图像是原始图像,第二图像是通过图像编辑或图像修改等软件,对文字内容等预设区域进行擦除后,得到的第二图像。In this embodiment of the present application, a preset adversarial model is trained to obtain a trained image processing model. Specifically, first, a first image is collected, and the first image is manually processed to generate a second image. The first image is an original image, and the second image is a second image obtained by erasing preset areas such as text content through image editing or image modification software.
根据第一图像和第二图像,作为训练集,训练预设的生成对抗网络,用来进行端到端整图文字的擦除。具体做法是搭建网络模型,对于生成网络采用unet的网络结构,先对图像进行下采样获取图像语义信息,再对图像上采样恢复到原始尺寸以获取图像输出,考虑到对于复杂场景经过一次模型的优 化并不能得到好的结果,因此在unet(一种稠密预测分割的U型网络)结构后,再接一层轻量化后的unet结果做进一步的处理,得到最终的处理结果。Based on the first image and the second image, used as a training set, a preset generative adversarial network is trained to perform end-to-end erasing of text in the entire image. The specific method is to build a network model. For the generation network, the unet network structure is used. The image is first down-sampled to obtain the image semantic information, and then the image is up-sampled and restored to the original size to obtain the image output. Considering that complex scenes are processed once by the model, excellent The result is not good, so after the unet (a U-shaped network for dense prediction segmentation) structure, a layer of lightweight unet results are added for further processing to obtain the final processing result.
进一步地,构建判别网络,判别网络包括一个双尺度的网络,其中第一个尺度网络包括几个级联的卷积,其中卷积的步长可以设置为1,并不引入池化层,保证图片的分辨率不下降。Further, a discriminant network is constructed. The discriminant network includes a dual-scale network. The first scale network includes several cascaded convolutions, in which the step size of the convolution can be set to 1. The pooling layer is not introduced to ensure The image resolution is not reduced.
之后在第一个尺度网络后,再加一层相同的尺度网络,但是第二层尺度网络的输入是第一层网络的输出下采样一倍之后得到。双尺度网络的真值(ground truth)分别由擦除后的图片,和擦除后图片下采样一倍的图片得到。Then, after the first scale network, another layer of the same scale network is added, but the input of the second layer of scale network is obtained by downsampling the output of the first layer network twice. The ground truth of the dual-scale network is obtained from the erased image and the image that is downsampled twice as much as the erased image.
将生成网络输出结果输入到判别网络,通过判别网络判断当前生成的擦除后的图片,和原始标注的擦除图片(也即第二图像)之间的差异,并作为损失(loss)反向传播优化网络参数,最终得到经过优化后的网络结构。The output result of the generation network is input to the discriminant network, and the difference between the currently generated erased image and the original annotated erased image (i.e., the second image) is judged through the discriminant network, and is used as the reverse loss (loss) Propagate the optimized network parameters and finally obtain the optimized network structure.
在这个优化后的网络结构中,去除判别网络后得到的模型,即上述图像处理模型。图5示出了根据本申请实施例的图像处理模型的结构示意图,如图5所以,图像处理模型500包括的2层unet网络结构,即第一网络502和第二网络504。In this optimized network structure, the model obtained after removing the discriminant network is the above-mentioned image processing model. Figure 5 shows a schematic structural diagram of an image processing model according to an embodiment of the present application. As shown in Figure 5, the image processing model 500 includes a 2-layer unet network structure, that is, a first network 502 and a second network 504.
在通过图像处理模型500,对第一图像506中的特定内容进行擦除时,首先,将待处理的第一图像506输入至第一网络502中,通过第一网络502对其中的特定信息进行擦除。When erasing specific content in the first image 506 through the image processing model 500, first, the first image 506 to be processed is input into the first network 502, and the specific information therein is processed through the first network 502. Erase.
擦除后得到处理后的第三图像508,对第三图像508进行下采样处理,得到分辨率降低的第四图像510,从而获取图像语义定义,将下采样得到的第四图像510作为第二层网络,也即第二网络504的输入。After erasing, the processed third image 508 is obtained. The third image 508 is down-sampled to obtain a fourth image 510 with reduced resolution, thereby obtaining the image semantic definition. The fourth image 510 obtained by down-sampling is used as the second image. layer network, that is, the input of the second network 504.
最终第二网络504输出的第五图像512,经过上采样恢复为原始尺寸后得到最终的第二图像514。Finally, the fifth image 512 output by the second network 504 is upsampled and restored to its original size to obtain the final second image 514.
能够理解的是,第一图像中包含的内容,即用户需要擦除的内容。如用户需要擦除图像中的文字信息,则第一图像中包含文字信息。如用户需要擦除人脸,则第一图像中包含人脸信息。It can be understood that the content contained in the first image is the content that the user needs to erase. If the user needs to erase the text information in the image, the first image contains the text information. If the user needs to erase the face, the first image contains face information.
本申请通过对图像识别模型进行训练,从而使图像识别模型能够根据训 练集中的图像内容,对第一图像中对应的内容区域进行擦除,并能够使擦除后的图像保持整体图像的协调一致,提高图像处理效率。This application trains the image recognition model so that the image recognition model can The concentrated image content is erased, and the corresponding content area in the first image is erased, so that the erased image can maintain the coordination of the overall image and improve image processing efficiency.
在本申请的一些实施例中,目标区域为字符图像区域,在第一图像中定位目标区域,包括:In some embodiments of the present application, the target area is a character image area, and locating the target area in the first image includes:
对第一图像进行光学字符识别,在第一图像中获取字符检测框;Perform optical character recognition on the first image and obtain a character detection frame in the first image;
根据字符检测框的坐标信息,在第一图像中定位目标区域。Locate the target area in the first image according to the coordinate information of the character detection frame.
在本申请实施例中,目标区域具体包括字符图像区域,也就是说,用户需要对第一图像中的字符区域进行擦除。具体地,首先对第一图像进行光学字符(OCR)识别,从而在第一图像中,检测出字符所在位置,同时根据这些字符的位置,形成为字符检测框。In this embodiment of the present application, the target area specifically includes a character image area, that is to say, the user needs to erase the character area in the first image. Specifically, optical character recognition (OCR) is first performed on the first image, so that the positions of characters in the first image are detected, and at the same time, character detection frames are formed based on the positions of these characters.
具体地,首先对第一图像进行预处理,在一些实施例中,采用去噪算法,将第一图像上的噪声去除。之后,根据训练好的OCR检测模型,并通过OCR检测算法获取到文本或字符,并定位坐标信息,该OCR检测算法可以获取到水平、垂直、弯曲等各种场景下的字符检测框。Specifically, the first image is first preprocessed. In some embodiments, a denoising algorithm is used to remove noise on the first image. After that, according to the trained OCR detection model, the text or characters are obtained through the OCR detection algorithm, and the coordinate information is located. The OCR detection algorithm can obtain character detection frames in various scenarios such as horizontal, vertical, and curved.
对于水平、垂直的规则字符检测框,可以采用四点坐标框来表示;而对于弯曲的不规则字符检测框,则可以采用八点坐标框表示。若当前图片中没有文字信息或字符信息,则返回空的字符坐标框。For horizontal and vertical regular character detection frames, a four-point coordinate frame can be used to represent them; while for curved irregular character detection frames, an eight-point coordinate frame can be used. If there is no text information or character information in the current picture, an empty character coordinate box will be returned.
该字符检测框标注有坐标信息,该坐标信息指的是字符检测框在第一图像中的坐标。通过字符检测框的坐标信息,在第一图像中定位目标区域,从而在通过图像处理模型得到第二图像后,根据该坐标信息,将处理后的区域图像覆盖到目标区域上,从而使生成的目标图像中,既保证了整体图像的协调一致,又对需要处理的目标区域的内容进行了有效擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。The character detection frame is marked with coordinate information, and the coordinate information refers to the coordinates of the character detection frame in the first image. The target area is located in the first image through the coordinate information of the character detection frame, so that after the second image is obtained through the image processing model, the processed area image is overlaid on the target area according to the coordinate information, so that the generated In the target image, it not only ensures the coordination of the overall image, but also effectively erases the content of the target area that needs to be processed. It also ensures that other similar areas in the image will not be mistakenly erased, which improves the efficiency of erasing specific areas in the image. content processing efficiency.
在本申请的一些实施例中,图6示出了根据本申请实施例的图像处理方法的流程图之二,如图6所示,方法包括:In some embodiments of the present application, Figure 6 shows the second flowchart of the image processing method according to the embodiment of the present application. As shown in Figure 6, the method includes:
步骤602,对原始图片进行文本定位,记录原始图片中的文字坐标信息;Step 602: Perform text positioning on the original image and record the text coordinate information in the original image;
在步骤602中,首先对图像进行预处理,采用去噪算法将图像上的噪声 去除。之后训练ocr检测模型,并通过ocr检测算法获取到文本定位信息,该ocr检测算法可以获取到水平、垂直、弯曲等各种场景下的文本检测框。对于水平、垂直文本框采用四点坐标框来表示,而对于弯曲文本框则采用八点坐标框表示。若当前图片中没有文字信息,则返回空的文本坐标框。In step 602, the image is first preprocessed, and a denoising algorithm is used to reduce the noise on the image. Remove. Then train the OCR detection model and obtain text positioning information through the OCR detection algorithm. The OCR detection algorithm can obtain text detection frames in various scenarios such as horizontal, vertical, and curved. Horizontal and vertical text boxes are represented by a four-point coordinate frame, while curved text boxes are represented by an eight-point coordinate frame. If there is no text information in the current picture, an empty text coordinate box will be returned.
步骤604,采集成对数据,训练生成对抗网络用来进行文字擦除;Step 604: Collect paired data and train a generative adversarial network to perform text erasure;
在步骤604中,采集成对的<原始图片,文字擦除图片>,并采用生成对抗方式进行模型训练,得到图片处理模型。In step 604, pairs of <original pictures, text-erased pictures> are collected, and model training is performed using a generative adversarial method to obtain an image processing model.
具体地,首先采集获取到原始图片,并通过PS获取到对应的文字擦除图片,从而获取到成对的<原始图片,文字擦除图片>。Specifically, the original image is first collected, and the corresponding text-erased image is obtained through PS, thereby obtaining a pair of <original image, text-erased image>.
之后训练一个生成对抗网络用来进行端到端整图文字的擦除;具体做法是搭建网络模型,对于生成网络采用unet的网络结构,先对图像进行下采样获取图像语义信息,再对图像上采样恢复到原始尺寸以获取图像输出,考虑到对于复杂场景经过一次模型的优化并不能得到好的结果,因此在unet结构后面再接一层轻量化后的unet做进一步的处理得到最终的处理结果。构建判别网络,判别网络由一个双尺度的网络组成,其中第一个尺度网络由几个卷积级联组成,卷积的步长设置为1,并不引入池化层,保证图片的分辨率不下降,之后在第一个尺度网络后面再加一层相同的尺度网络,但是第二层尺度网络的输入是第一层网络的输出下采样一倍得到。双尺度网络的ground truth分别由擦除后的图片以及擦除后图片下采样一倍的图片得到。Afterwards, a generative adversarial network is trained to perform end-to-end erasure of entire image text. The specific method is to build a network model. For the generative network, the unet network structure is used. The image is first down-sampled to obtain image semantic information, and then the image is up-sampled. Restore the original size to obtain the image output. Considering that good results cannot be obtained through one-time model optimization for complex scenes, a layer of lightweight unet is added after the unet structure for further processing to obtain the final processing result. Construct a discriminant network. The discriminant network consists of a dual-scale network. The first scale network consists of several convolution cascades. The step size of the convolution is set to 1. The pooling layer is not introduced to ensure the resolution of the image. does not decrease, then add a layer of the same scale network after the first scale network, but the input of the second layer of scale network is obtained by downsampling twice the output of the first layer of network. The ground truth of the dual-scale network is obtained from the erased image and the image that is downsampled twice as much as the erased image.
将生成网络输出结果输入到判别网络判断当前生成的擦除后的图片和原始标注的擦除图片之间的差异,并作为loss反向传播优化网络参数,最终得到经过优化后的网络结构。The output result of the generation network is input into the discriminant network to determine the difference between the currently generated erased image and the original annotated erased image, and is used as loss backpropagation to optimize the network parameters, and finally the optimized network structure is obtained.
步骤606,采用优化后的模型对原始图片进行推理得到擦除后的图片结果;Step 606: Use the optimized model to infer the original image to obtain the erased image result;
在步骤606中,采用优化后的生成对抗模型对原始图片进行推理得到擦除后的图片结果,具体做法是将原始图片输入经过训练后的模型,这时需要将判别器去除,只保留生成器即可,经过生成器后得到的输出图即为经过擦 除后的图片结果。In step 606, the optimized generative adversarial model is used to infer the original image to obtain the erased image result. The specific method is to input the original image into the trained model. At this time, the discriminator needs to be removed and only the generator is retained. That is, the output image obtained after passing through the generator is the wiped Image result after division.
步骤608,将获取到的文字坐标信息映射到擦除后的图片上,从中裁剪出文本坐标所在的擦除区域;Step 608: Map the obtained text coordinate information to the erased picture, and crop out the erased area where the text coordinates are located;
在步骤608中,将步获取到的文字坐标信息映射到获取的擦除后的图片结果上,并从中裁剪出文本坐标所在的擦除区域;考虑到有些和文字很相似的区域比如栅栏、纹路、花草等容易被当做文字擦除,因此为了保证这些信息不被误涂,需要将从原始图片记录到的文字坐标信息映射至经获取到的擦除图片上,因为坐标是非矩形框,因此需要设置一个和输入图片一样大的掩码图片,掩码图片原始为纯黑,将坐标框所在区域置为白色,即可得到需要裁剪出的文本坐标所在的擦除区域。In step 608, map the text coordinate information obtained in the step to the obtained erased picture result, and cut out the erased area where the text coordinates are located; considering that some areas that are very similar to text, such as fences and textures, , flowers, grass, etc. are easily erased as text. Therefore, in order to ensure that this information is not mistakenly scrawled, it is necessary to map the text coordinate information recorded from the original image to the acquired erased image. Because the coordinates are non-rectangular frames, it is necessary to Set a mask image as large as the input image. The mask image is originally pure black. Set the area where the coordinate box is located to white to get the erased area where the text coordinates that need to be cropped are located.
步骤610,将擦除区域贴回到原图,得到最终的文字擦除图片。Step 610: Paste the erased area back to the original image to obtain the final text-erased image.
在步骤610中,将裁剪出来的擦除区域贴回到原图,即可得到最终的文字擦除图片。In step 610, the cropped erasure area is pasted back to the original image to obtain the final text erasure image.
具体做法是在已经得到需要擦除文字区域所对应的掩码图片,这时只需要将掩码图片中的纯白区域对应的擦除区域贴回到原图即可,这样就能得到最后所需要的文字擦除图片,从而避免了和文字很相似区域的误涂。The specific method is to obtain the mask image corresponding to the text area that needs to be erased. At this time, you only need to paste the erased area corresponding to the pure white area in the mask image back to the original image, so that you can get the final result. The required text is erased from the picture, thus avoiding the accidental painting of areas that are very similar to the text.
在本申请的一些实施例中,提供了一种图像处理装置,图7示出了根据本申请实施例的图像处理装置的结构框图,如图7所示,图像处理装置700包括:In some embodiments of the present application, an image processing device is provided. Figure 7 shows a structural block diagram of the image processing device according to an embodiment of the present application. As shown in Figure 7, the image processing device 700 includes:
定位模块702,用于在第一图像中定位目标区域,得到目标区域的位置信息;Positioning module 702 is used to locate the target area in the first image and obtain the location information of the target area;
擦除模块704,用于通过图像处理模型,擦除第一图像中预设区域的图像信息,得到擦除后的第二图像,其中,第二图像的尺寸与第一图像相同,预设区域包括目标区域;The erasing module 704 is used to erase the image information of the preset area in the first image through the image processing model to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area Include target areas;
截取模块706,用于根据位置信息,在第二图像中截取与目标区域对应的区域图像;The interception module 706 is used to intercept the area image corresponding to the target area in the second image according to the location information;
处理模块708,用于根据区域图像和第一图像,生成处理后的目标图像。 The processing module 708 is used to generate a processed target image according to the area image and the first image.
本申请实施例根据标记好的目标区域的位置信息,在通过图像处理模型擦除后的第二图像中,截取相同位置的区域图像,并将该区域图像与原始的第一图像进行结合,即只选取第二图像中,用户需要消除的部分,来对原始图像进行处理,因此,最终得到的目标图像,在保留了整体图像的协调一致的情况下,对需要处理的目标区域的内容进行了擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。According to the position information of the marked target area, the embodiment of the present application intercepts the area image at the same position in the second image erased by the image processing model, and combines the area image with the original first image, that is, Only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image has the content of the target area that needs to be processed while retaining the coordination of the overall image. Erase, while ensuring that other similar areas in the image will not be erased by mistake, improving the processing efficiency when erasing specific content in the image.
在本申请的一些实施例中,图像处理装置还包括:覆盖模块,用于根据位置信息,将区域图像覆盖于目标区域,得到目标图像。In some embodiments of the present application, the image processing device further includes: a covering module, configured to overlay the area image on the target area according to the location information to obtain the target image.
本申请实施例在得到区域图像后,同样根据目标区域的坐标信息,将截取得到的,通过图像处理模型处理后的区域图像,覆盖到原始的第一图像上,从而使目标区域内的图像内容,完全替换为区域图像,从而使替换后的目标图像中,仅有需要擦除的区域被处理后的图像所替代,在保留了整体图像的协调一致的情况下,对需要处理的目标区域的内容进行了擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。After obtaining the regional image, the embodiment of the present application also overlays the intercepted regional image processed by the image processing model on the original first image according to the coordinate information of the target area, thereby making the image content in the target area , completely replaced by a regional image, so that in the replaced target image, only the area that needs to be erased is replaced by the processed image. While retaining the consistency of the overall image, the target area that needs to be processed is improved. The content is erased while ensuring that other similar areas in the image will not be accidentally erased, which improves the processing efficiency when erasing specific content in the image.
在本申请的一些实施例中,处理装置还包括:In some embodiments of the present application, the processing device further includes:
获取模块,用于获取第一训练图像和第二训练图像,其中,第二训练图像是在第一训练图像中,去除预设图像信息后得到的图像;An acquisition module, configured to acquire a first training image and a second training image, where the second training image is an image obtained by removing preset image information from the first training image;
训练模块,用于通过第一训练图像和第二训练图像,训练预设模型,得到训练后的图像处理模型,图像处理模型包括第一网络和第二网络;A training module used to train a preset model through the first training image and the second training image to obtain a trained image processing model, where the image processing model includes a first network and a second network;
擦除模块,还用于通过第一网络对第一图像进行擦除处理,得到处理后的第三图像;The erasing module is also used to erase the first image through the first network to obtain the processed third image;
采样模块,用于对第三图像进行下采样处理,得到第四图像;The sampling module is used to downsample the third image to obtain the fourth image;
擦除模块,还用于通过第二网络对第四图像进行擦除处理,得到处理后的第五图像;The erasing module is also used to erase the fourth image through the second network to obtain the processed fifth image;
采样模块,还用于对第五图像进行上采样处理,得到第二图像。The sampling module is also used to upsample the fifth image to obtain the second image.
本申请通过对图像识别模型进行训练,从而使图像识别模型能够根据训 练集中的图像内容,对第一图像中对应的内容区域进行擦除,并能够使擦除后的图像保持整体图像的协调一致,提高图像处理效率。This application trains the image recognition model so that the image recognition model can The concentrated image content is erased, and the corresponding content area in the first image is erased, so that the erased image can maintain the coordination of the overall image and improve image processing efficiency.
在本申请的一些实施例中,目标区域为字符图像区域,处理装置还包括:In some embodiments of the present application, the target area is a character image area, and the processing device further includes:
识别模块,用于对第一图像进行光学字符识别,在第一图像中获取字符检测框;A recognition module, configured to perform optical character recognition on the first image and obtain a character detection frame in the first image;
定位模块,还用于根据字符检测框的坐标信息,在第一图像中定位目标区域。The positioning module is also used to locate the target area in the first image based on the coordinate information of the character detection frame.
本申请实施例在第一图像中定位目标区域,从而在通过图像处理模型得到第二图像后,根据该坐标信息,将处理后的区域图像覆盖到目标区域上,从而使生成的目标图像中,既保证了整体图像的协调一致,又对需要处理的目标区域的内容进行了有效擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。The embodiment of the present application locates the target area in the first image, so that after the second image is obtained through the image processing model, the processed area image is overlaid on the target area according to the coordinate information, so that in the generated target image, It not only ensures the coordination of the overall image, but also effectively erases the content of the target area that needs to be processed. It also ensures that other similar areas in the image will not be mistakenly erased, improving the processing when erasing specific content in the image. efficiency.
本申请实施例中的图像处理装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The image processing device in the embodiment of the present application may be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than the terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile internet device (Mobile Internet Device, MID), or augmented reality (AR)/virtual reality (VR). ) equipment, robots, wearable devices, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (personal digital assistants, PDA), etc., and can also be servers, network attached storage (Network Attached Storage), NAS), personal computer (PC), television (TV), teller machine or self-service machine, etc., the embodiments of this application are not specifically limited.
本申请实施例中的图像处理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The image processing device in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
本申请实施例提供的图像处理装置能够实现上述方法实施例实现的各个过程,为避免重复,这里不再赘述。 The image processing device provided by the embodiments of the present application can implement various processes implemented by the above method embodiments. To avoid duplication, they will not be described again here.
可选地,本申请实施例还提供一种电子设备,图8示出了根据本申请实施例的电子设备的结构框图,如图8所示,电子设备800包括处理器802,存储器804,存储在存储器804上并可在所述处理器802上运行的程序或指令,该程序或指令被处理器802执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, the embodiment of the present application also provides an electronic device. Figure 8 shows a structural block diagram of the electronic device according to the embodiment of the present application. As shown in Figure 8, the electronic device 800 includes a processor 802, a memory 804, and a storage device 800. Programs or instructions on the memory 804 that can be run on the processor 802, when executed by the processor 802, implement the various processes of the above method embodiments, and can achieve the same technical effect. To avoid duplication, I won’t go into details here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图9为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备900包括但不限于:射频单元901、网络模块902、音频输出单元903、输入单元904、传感器905、显示单元906、用户输入单元907、接口单元908、存储器909以及处理器910等部件。The electronic device 900 includes but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, processor 910 and other components .
本领域技术人员可以理解,电子设备900还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器910逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图9中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 900 may also include a power supply (such as a battery) that supplies power to various components. The power supply may be logically connected to the processor 910 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions. The structure of the electronic device shown in Figure 9 does not constitute a limitation on the electronic device. The electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
其中,处理器910用于在第一图像中定位目标区域,得到目标区域的位置信息;Wherein, the processor 910 is used to locate the target area in the first image and obtain the location information of the target area;
通过图像处理模型,擦除第一图像中预设区域的图像信息,得到擦除后的第二图像,其中,第二图像的尺寸与第一图像相同,预设区域包括目标区域;Through the image processing model, the image information of the preset area in the first image is erased to obtain an erased second image, where the size of the second image is the same as the first image, and the preset area includes the target area;
根据位置信息,在第二图像中截取与目标区域对应的区域图像;According to the position information, intercept an area image corresponding to the target area in the second image;
根据区域图像和第一图像,生成处理后的目标图像。A processed target image is generated based on the area image and the first image.
本申请实施例根据标记好的目标区域的位置信息,在通过图像处理模型擦除后的第二图像中,截取相同位置的区域图像,并将该区域图像与原始的第一图像进行结合,即只选取第二图像中,用户需要消除的部分,来对原始图像进行处理,因此,最终得到的目标图像,在保留了整体图像的协调一致 的情况下,对需要处理的目标区域的内容进行了擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。According to the position information of the marked target area, the embodiment of the present application intercepts the area image at the same position in the second image erased by the image processing model, and combines the area image with the original first image, that is, Only the parts of the second image that the user needs to eliminate are selected to process the original image. Therefore, the final target image retains the consistency of the overall image. In this case, the content of the target area that needs to be processed is erased, while ensuring that other similar areas in the image will not be erased by mistake, which improves the processing efficiency when erasing specific content in the image.
可选地,处理器910还用于根据位置信息,将区域图像覆盖于目标区域,得到目标图像。Optionally, the processor 910 is also configured to overlay the area image on the target area according to the location information to obtain the target image.
本申请实施例在得到区域图像后,同样根据目标区域的坐标信息,将截取得到的,通过图像处理模型处理后的区域图像,覆盖到原始的第一图像上,从而使目标区域内的图像内容,完全替换为区域图像,从而使替换后的目标图像中,仅有需要擦除的区域被处理后的图像所替代,在保留了整体图像的协调一致的情况下,对需要处理的目标区域的内容进行了擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。After obtaining the regional image, the embodiment of the present application also overlays the intercepted regional image processed by the image processing model on the original first image according to the coordinate information of the target area, thereby making the image content in the target area , completely replaced by a regional image, so that in the replaced target image, only the area that needs to be erased is replaced by the processed image. While retaining the consistency of the overall image, the target area that needs to be processed is improved. The content is erased while ensuring that other similar areas in the image will not be accidentally erased, which improves the processing efficiency when erasing specific content in the image.
可选地,处理器910还用于获取第一训练图像和第二训练图像,其中,第二训练图像是擦除第一训练图像中的预设区域后得到的图像数据;Optionally, the processor 910 is also configured to obtain a first training image and a second training image, where the second training image is image data obtained after erasing a preset area in the first training image;
通过第一训练图像和第二训练图像,训练预设模型,得到训练后的图像处理模型,图像处理模型包括第一网络和第二网络;Train the preset model through the first training image and the second training image to obtain a trained image processing model, where the image processing model includes a first network and a second network;
擦除第一图像中预设区域的图像信息,包括:Erase the image information of the preset area in the first image, including:
通过第一网络对第一图像进行擦除处理,得到处理后的第三图像;Perform erasure processing on the first image through the first network to obtain a processed third image;
对第三图像进行下采样处理,得到第四图像;Perform downsampling on the third image to obtain the fourth image;
通过第二网络对第四图像进行擦除处理,得到处理后的第五图像;Perform erasure processing on the fourth image through the second network to obtain the processed fifth image;
对第五图像进行上采样处理,得到第二图像。Perform upsampling processing on the fifth image to obtain the second image.
本申请通过对图像识别模型进行训练,从而使图像识别模型能够根据训练集中的图像内容,对第一图像中对应的内容区域进行擦除,并能够使擦除后的图像保持整体图像的协调一致,提高图像处理效率。This application trains the image recognition model, so that the image recognition model can erase the corresponding content area in the first image according to the image content in the training set, and can make the erased image maintain the coordination of the overall image. , improve image processing efficiency.
可选地,目标区域为字符图像区域,处理器910还用于对第一图像进行光学字符识别,在第一图像中获取字符检测框;Optionally, the target area is a character image area, and the processor 910 is further configured to perform optical character recognition on the first image, and obtain a character detection frame in the first image;
根据字符检测框的坐标信息,在第一图像中定位目标区域。Locate the target area in the first image according to the coordinate information of the character detection frame.
本申请实施例在第一图像中定位目标区域,从而在通过图像处理模型得 到第二图像后,根据该坐标信息,将处理后的区域图像覆盖到目标区域上,从而使生成的目标图像中,既保证了整体图像的协调一致,又对需要处理的目标区域的内容进行了有效擦除,同时保证图像中的其他相似区域不会被误擦除,提高了抹除图像中特定内容时的处理效率。The embodiment of the present application locates the target area in the first image, so as to obtain the target area through the image processing model. After arriving at the second image, based on the coordinate information, the processed area image is overlaid on the target area, so that the generated target image not only ensures the coordination of the overall image, but also adjusts the content of the target area that needs to be processed. In order to effectively erase, it also ensures that other similar areas in the image will not be accidentally erased, and improves the processing efficiency when erasing specific content in the image.
应理解的是,本申请实施例中,输入单元904可以包括图形处理器(Graphics Processing Unit,GPU)9041和麦克风9042,图形处理器9041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元906可包括显示面板9061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板9061。用户输入单元907包括触控面板9071以及其他输入设备9072中的至少一种。触控面板9071,也称为触摸屏。触控面板9071可包括触摸检测装置和触摸控制器两个部分。其他输入设备9072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042. The graphics processor 9041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras). The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072 . Touch panel 9071, also known as touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
存储器909可用于存储软件程序以及各种数据。存储器909可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器909可以包括易失性存储器或非易失性存储器,或者,存储器909可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM, SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器909包括但不限于这些和任意其它适合类型的存储器。Memory 909 can be used to store software programs as well as various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc. Additionally, memory 909 may include volatile memory or nonvolatile memory, or memory 909 may include both volatile and nonvolatile memory. Among them, the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and Direct Rambus RAM (DRRAM). Memory 909 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
处理器910可包括一个或多个处理单元;可选的,处理器910集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器910中。The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 910.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the above method embodiments is implemented and the same technology can be achieved. The effect will not be described here to avoid repetition.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage media includes computer-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement various processes of the above method embodiments. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application provide a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement the processes of the above method embodiments and can achieve the same technical effect. To avoid repetition, we will not go into details here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的 情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. without further restrictions In this case, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (13)

  1. 一种图像处理方法,其中,包括:An image processing method, including:
    在第一图像中定位目标区域,得到所述目标区域的位置信息;Locate the target area in the first image and obtain the location information of the target area;
    擦除所述第一图像中预设区域的图像信息,得到擦除后的第二图像,其中,所述第二图像的尺寸与所述第一图像的尺寸相同,所述预设区域包括所述目标区域;Erase the image information of the preset area in the first image to obtain an erased second image, wherein the size of the second image is the same as the size of the first image, and the preset area includes the Describe the target area;
    根据所述位置信息,在所述第二图像中截取与所述目标区域对应的区域图像;According to the position information, intercept an area image corresponding to the target area in the second image;
    根据所述区域图像和所述第一图像,生成处理后的目标图像。A processed target image is generated based on the area image and the first image.
  2. 根据权利要求1所述的图像处理方法,其中,所述根据所述区域图像和所述第一图像,生成处理后的目标图像,包括:The image processing method according to claim 1, wherein generating the processed target image according to the area image and the first image includes:
    根据所述位置信息,将所述区域图像覆盖于所述目标区域,得到所述目标图像。According to the position information, the area image is overlaid on the target area to obtain the target image.
  3. 根据权利要求1所述的图像处理方法,其中,在所述擦除所述第一图像中预设区域的图像信息之前,所述方法还包括:The image processing method according to claim 1, wherein before erasing the image information of the preset area in the first image, the method further includes:
    获取第一训练图像和第二训练图像,其中,所述第一训练图像中包含预设图像信息,所述第二训练图像是在所述第一训练图像中,去除所述预设图像信息后得到的图像;Obtain a first training image and a second training image, wherein the first training image contains preset image information, and the second training image is obtained after removing the preset image information from the first training image. the resulting image;
    通过所述第一训练图像和所述第二训练图像,训练预设模型,得到训练后的图像处理模型,所述图像处理模型包括第一网络和第二网络;Train a preset model through the first training image and the second training image to obtain a trained image processing model, where the image processing model includes a first network and a second network;
    所述擦除所述第一图像中预设区域的图像信息,包括:The erasing of the image information of the preset area in the first image includes:
    通过所述第一网络对所述第一图像进行擦除处理,得到处理后的第三图像;Perform erasure processing on the first image through the first network to obtain a processed third image;
    对所述第三图像进行下采样处理,得到第四图像;Perform downsampling processing on the third image to obtain a fourth image;
    通过所述第二网络对所述第四图像进行擦除处理,得到处理后的第五图像;Perform erasure processing on the fourth image through the second network to obtain a processed fifth image;
    对所述第五图像进行上采样处理,得到所述第二图像。 Perform upsampling processing on the fifth image to obtain the second image.
  4. 根据权利要求1至3中任一项所述的图像处理方法,其中,所述目标区域为字符图像区域,所述在第一图像中定位目标区域,包括:The image processing method according to any one of claims 1 to 3, wherein the target area is a character image area, and locating the target area in the first image includes:
    对所述第一图像进行光学字符识别,在所述第一图像中获取字符检测框;Perform optical character recognition on the first image, and obtain a character detection frame in the first image;
    根据所述字符检测框的坐标信息,在所述第一图像中定位所述目标区域。The target area is located in the first image according to the coordinate information of the character detection frame.
  5. 一种图像处理装置,其中,包括:An image processing device, which includes:
    定位模块,用于在第一图像中定位目标区域,得到所述目标区域的位置信息;A positioning module, used to locate the target area in the first image and obtain the position information of the target area;
    擦除模块,用于擦除所述第一图像中预设区域的图像信息,得到擦除后的第二图像,其中,所述第二图像的尺寸与所述第一图像的尺寸相同,所述预设区域包括所述目标区域;An erasing module, configured to erase the image information of the preset area in the first image to obtain an erased second image, wherein the size of the second image is the same as the size of the first image, so The preset area includes the target area;
    截取模块,用于根据所述位置信息,在所述第二图像中截取与所述目标区域对应的区域图像;An interception module, configured to intercept an area image corresponding to the target area in the second image according to the location information;
    处理模块,用于根据所述区域图像和所述第一图像,生成处理后的目标图像。A processing module, configured to generate a processed target image according to the area image and the first image.
  6. 根据权利要求5所述的图像处理装置,其中,还包括:The image processing device according to claim 5, further comprising:
    覆盖模块,用于根据所述位置信息,将所述区域图像覆盖于所述目标区域,得到所述目标图像。A covering module, configured to cover the area image on the target area according to the location information to obtain the target image.
  7. 根据权利要求5所述的图像处理装置,其中,还包括:The image processing device according to claim 5, further comprising:
    获取模块,用于获取第一训练图像和第二训练图像,其中,所述第二训练图像是擦除所述第一训练图像中的所述预设区域后得到的图像数据;An acquisition module, configured to acquire a first training image and a second training image, wherein the second training image is image data obtained after erasing the preset area in the first training image;
    训练模块,用于通过所述第一训练图像和所述第二训练图像,训练预设模型,得到训练后的所述图像处理模型,所述图像处理模型包括第一网络和第二网络;A training module, configured to train a preset model through the first training image and the second training image to obtain the trained image processing model, where the image processing model includes a first network and a second network;
    所述擦除模块,还用于通过所述第一网络对所述第一图像进行擦除处理,得到处理后的第三图像; The erasing module is also configured to perform erasing processing on the first image through the first network to obtain a processed third image;
    采样模块,用于对所述第三图像进行下采样处理,得到第四图像;A sampling module, used to perform downsampling processing on the third image to obtain a fourth image;
    所述擦除模块,还用于通过所述第二网络对所述第四图像进行擦除处理,得到处理后的第五图像;The erasing module is also configured to perform erasing processing on the fourth image through the second network to obtain a processed fifth image;
    所述采样模块,还用于对所述第五图像进行上采样处理,得到所述第二图像。The sampling module is also used to perform upsampling processing on the fifth image to obtain the second image.
  8. 根据权利要求5至7中任一项所述的图像处理装置,其中,所述目标区域为字符图像区域,所述处理装置还包括:The image processing device according to any one of claims 5 to 7, wherein the target area is a character image area, and the processing device further includes:
    识别模块,用于对所述第一图像进行光学字符识别,在所述第一图像中获取字符检测框;A recognition module, configured to perform optical character recognition on the first image and obtain a character detection frame in the first image;
    所述定位模块,还用于根据所述字符检测框的坐标信息,在所述第一图像中定位所述目标区域。The positioning module is also used to position the target area in the first image according to the coordinate information of the character detection frame.
  9. 一种电子设备,其中,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至4中任一项所述的图像处理方法的步骤。An electronic device, which includes a processor and a memory, the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the implementation of claims 1 to 4 is achieved. The steps of the image processing method described in any one of the above.
  10. 一种可读存储介质,其中,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至4中任一项所述的图像处理方法的步骤。A readable storage medium, wherein a program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a processor, the steps of the image processing method according to any one of claims 1 to 4 are implemented. .
  11. 一种芯片,其中,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-4任一项所述的图像处理方法的步骤。A chip, wherein the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in any one of claims 1-4 Image processing method steps.
  12. 一种计算机程序产品,其中,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1-4任一项所述的图像处理方法的步骤。A computer program product, wherein the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the image processing method according to any one of claims 1-4 A step of.
  13. 一种图像处理装置,其中,所述装置被配置成用于执行如权利要求1-4任一项所述的图像处理方法。 An image processing device, wherein the device is configured to perform the image processing method according to any one of claims 1-4.
PCT/CN2023/088947 2022-04-21 2023-04-18 Image processing method and processing apparatus, electronic device and readable storage medium WO2023202570A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210420012.4 2022-04-21
CN202210420012.4A CN114792285A (en) 2022-04-21 2022-04-21 Image processing method and processing device, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
WO2023202570A1 true WO2023202570A1 (en) 2023-10-26

Family

ID=82461312

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/088947 WO2023202570A1 (en) 2022-04-21 2023-04-18 Image processing method and processing apparatus, electronic device and readable storage medium

Country Status (2)

Country Link
CN (1) CN114792285A (en)
WO (1) WO2023202570A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114792285A (en) * 2022-04-21 2022-07-26 维沃移动通信有限公司 Image processing method and processing device, electronic device and readable storage medium
CN115797783A (en) * 2023-02-01 2023-03-14 北京有竹居网络技术有限公司 Method and device for generating barrier-free information, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805789A (en) * 2018-05-29 2018-11-13 厦门市美亚柏科信息股份有限公司 A kind of method, apparatus, equipment and readable medium removing watermark based on confrontation neural network
CN109035147A (en) * 2018-08-10 2018-12-18 Oppo广东移动通信有限公司 Image processing method and device, electronic device, storage medium and computer equipment
CN110163194A (en) * 2019-05-08 2019-08-23 腾讯科技(深圳)有限公司 A kind of image processing method, device and storage medium
CN111260757A (en) * 2018-12-03 2020-06-09 马上消费金融股份有限公司 Image processing method and device and terminal equipment
WO2021129466A1 (en) * 2019-12-26 2021-07-01 Oppo广东移动通信有限公司 Watermark detection method, device, terminal and storage medium
CN113538273A (en) * 2021-07-13 2021-10-22 荣耀终端有限公司 Image processing method and image processing apparatus
CN114049280A (en) * 2021-11-25 2022-02-15 广州华多网络科技有限公司 Image erasing and repairing method and device, equipment, medium and product thereof
CN114792285A (en) * 2022-04-21 2022-07-26 维沃移动通信有限公司 Image processing method and processing device, electronic device and readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805789A (en) * 2018-05-29 2018-11-13 厦门市美亚柏科信息股份有限公司 A kind of method, apparatus, equipment and readable medium removing watermark based on confrontation neural network
CN109035147A (en) * 2018-08-10 2018-12-18 Oppo广东移动通信有限公司 Image processing method and device, electronic device, storage medium and computer equipment
CN111260757A (en) * 2018-12-03 2020-06-09 马上消费金融股份有限公司 Image processing method and device and terminal equipment
CN110163194A (en) * 2019-05-08 2019-08-23 腾讯科技(深圳)有限公司 A kind of image processing method, device and storage medium
WO2021129466A1 (en) * 2019-12-26 2021-07-01 Oppo广东移动通信有限公司 Watermark detection method, device, terminal and storage medium
CN113538273A (en) * 2021-07-13 2021-10-22 荣耀终端有限公司 Image processing method and image processing apparatus
CN114049280A (en) * 2021-11-25 2022-02-15 广州华多网络科技有限公司 Image erasing and repairing method and device, equipment, medium and product thereof
CN114792285A (en) * 2022-04-21 2022-07-26 维沃移动通信有限公司 Image processing method and processing device, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN114792285A (en) 2022-07-26

Similar Documents

Publication Publication Date Title
WO2023202570A1 (en) Image processing method and processing apparatus, electronic device and readable storage medium
US9912874B2 (en) Real-time visual effects for a live camera view
US10593023B2 (en) Deep-learning-based automatic skin retouching
US9020183B2 (en) Tagging images with labels
US10678410B2 (en) Browser-based image processing
US10346032B2 (en) Controlling display object on display screen
WO2019109900A1 (en) Video editing method and device and intelligent mobile terminal
CN110633116A (en) Screenshot processing method and device
CN103327246A (en) Multimedia shooting processing method, device and intelligent terminal
US11003467B2 (en) Visual history for content state changes
WO2016018682A1 (en) Processing image to identify object for insertion into document
CN115437736A (en) Method and device for recording notes
KR101947553B1 (en) Apparatus and Method for video edit based on object
US11481940B2 (en) Structural facial modifications in images
CN107872730A (en) The acquisition methods and device of a kind of insertion content in video
CN114363521B (en) Image processing method and device and electronic equipment
WO2024055194A1 (en) Virtual object generation method, and codec training method and apparatus thereof
US20230326094A1 (en) Integrating overlaid content into displayed data via graphics processing circuitry and processing circuitry using a computing memory and an operating system memory
CN116033094A (en) Video editing method and device
CN115240260A (en) Image processing method and device
CN117631932A (en) Screenshot method and device, electronic equipment and computer readable storage medium
CN116975337A (en) Image searching method, device, electronic equipment and readable storage medium
CN117149019A (en) File editing method, terminal, electronic device and storage medium
CN117788316A (en) Image processing method, apparatus, electronic device, medium, and computer program product
CN116795250A (en) Label processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23791225

Country of ref document: EP

Kind code of ref document: A1