Image processing method and storage medium
By using a contrastive learning network to convert images into target vectors and generate parameters, the problem of low efficiency in occluded image removal is solved, achieving efficient removal of occlusions in images, especially haze and smoke, while maintaining image quality.
Patent Information
- Application Number
- CN202111644493.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2041-12-29
AI Technical Summary
Existing techniques are inefficient in removing occluded images, struggle to effectively model the complex distribution of occluded images, and fail to obtain accurate prior or effective simulation training data.
A contrastive learning approach is adopted. By acquiring the target image, converting it into a target vector, and generating target parameters, occluded images are removed. The contrastive learning network dynamically adapts to different test images, and a contrastive loss function is designed to enhance the learning ability.
It improves the efficiency of image removal from occlusion, effectively removing complex haze and smoke occlusion while preserving the image's color and structure.
Smart Images

Figure CN114494090B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, and in particular, to an image processing method and a storage medium. BACKGROUND
[0002] At present, when removing the occluded image in the image, it is often only considered how to utilize the prior constraint to reconstruct the result, or how to learn to reconstruct the clean image through a large amount of simulation data. Since the distribution of the occluded image is relatively complex, it is difficult to model it well, and it is impossible to obtain accurate prior or effective simulation training data, so there is a technical problem of low efficiency in removing the occluded image from the image.
[0003] At present, no effective solution has been proposed for the above problems. SUMMARY
[0004] The embodiments of the present application provide an image processing method and a storage medium to at least solve the technical problem of low efficiency in removing the occluded image from the image.
[0005] According to an aspect of the embodiments of the present application, an image processing method is provided, comprising: obtaining a target image, wherein the target image comprises a first image of a target object and a second image to be removed which overlaps the first image; converting the target image into a target vector, wherein the target vector is used to represent the second image; generating a target parameter of the target image based on the target vector, and removing the second image from the target image based on the target parameter to obtain the first image.
[0006] According to an aspect of the embodiments of the present application, another image processing method is also provided, comprising: in response to an input instruction acting on an operation interface, inputting a target image, wherein the target image comprises a first image of a target object and a second image to be removed which overlaps the first image; in response to an image removal instruction acting on the operation interface, displaying the first image on the operation interface, wherein the first image is obtained by removing the second image from the target image based on a target parameter of the target image, and the target parameter is obtained based on a target vector used to represent the second image, and the target vector is obtained by converting the target image.
[0007] According to an aspect of the embodiments of the present application, another image processing method is also provided, comprising: performing image acquisition on a region where a target vegetation is located to obtain a target image, wherein the target image comprises an image of the target vegetation and a fog image to be removed which overlaps the image of the target vegetation; converting the target image into a target vector, wherein the target vector is used to represent the fog image; generating a target parameter of the target image based on the target vector, and removing the fog image from the target image based on the target parameter to obtain the image of the target vegetation.
[0008] According to another aspect of the embodiments of the present application, an image processing apparatus is provided, which comprises: a first obtaining unit configured to obtain a target image, wherein the target image comprises a first image of a target object and a second image to be removed and overlapped with the first image; a first converting unit configured to convert the target image into a target vector, wherein the target vector is used to represent the second image; and a first generating unit configured to generate a target parameter of the target image based on the target vector, and remove the second image from the target image based on the target parameter to obtain the first image.
[0009] According to another aspect of the embodiments of the present application, another image processing apparatus is also provided from the human-computer interaction side, which comprises: an input unit configured to input a target image in response to an input instruction acting on an operation interface, wherein the target image comprises a first image of a target object and a second image to be removed and overlapped with the first image; and a display unit configured to display the first image on the operation interface in response to an image removing instruction acting on the operation interface, wherein the first image is obtained by removing the second image from the target image based on a target parameter of the target image, and the target parameter is obtained based on a target vector used to represent the second image, and the target vector is converted from the target image.
[0010] According to another aspect of the embodiments of the present application, another image processing apparatus is also provided from the application scene of fog removal processing of remote sensing images, which comprises: an acquisition unit configured to acquire an image of a target region where target vegetation is located to obtain a target image, wherein the target image comprises an image of the target vegetation and a fog image to be removed and overlapped with the image of the target vegetation; a second converting unit configured to convert the target image into a target vector, wherein the target vector is used to represent the fog image; and a second generating unit configured to generate a target parameter of the target image based on the target vector, and remove the fog image from the target image based on the target parameter to obtain the image of the target vegetation.
[0011] The embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium comprises a stored program, wherein the program, when executed by a processor, controls a device where the computer readable storage medium is located to perform the image processing method of the embodiments of the present application.
[0012] The embodiments of the present application also provide a processor. The processor is used to execute a program, wherein the program, when executed, performs the image processing method of the embodiments of the present application.
[0013] The embodiment of the present application also provides an image processing system, which can comprise: a processor; a memory connected with the processor, used for providing the processor with instructions for processing the following processing steps: acquiring a target image, wherein the target image comprises a first image of a target object and a second image to be removed and overlapping with the first image; converting the target image into a target vector, wherein the target vector is used for representing the second image; generating a target parameter of the target image based on the target vector, and removing the second image from the target image based on the target parameter to obtain the first image.
[0014] In the embodiment of the present application, the contrast learning is adopted, the target image is acquired, the target image comprises a first image of a target object and a second image to be removed and overlapping with the first image, the target image is converted into a target vector, the target vector is used for representing the second image, a target parameter of the target image is generated based on the target vector, and the second image is removed from the target image based on the target parameter to obtain the first image, that is, in the present application, the target vector is determined based on the image with the occlusion image, the target vector is used for representing the occlusion image in the image, the target parameter for the target image is generated based on the target vector, and the occlusion image is removed from the target image based on the target parameter, the efficiency of removing the occlusion image from the image is improved, the technical problem of low efficiency of removing the occlusion image from the image is solved, and the technical effect of improving the efficiency of removing the occlusion image from the image is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0015] The drawings described herein are used to provide further understanding of the present application, form a part of the present application, and the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0016] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an image processing method according to an embodiment of the present disclosure;
[0017] Figure 2 is a flowchart of an image processing method according to an embodiment of the present application;
[0018] Figure 3 is a flowchart of an image processing method provided from the human-computer interaction side according to an embodiment of the present application;
[0019] Figure 4 is a flowchart of a data processing method provided from the scene of fog removal of a dynamic remote sensing image according to an embodiment of the present application;
[0020] Figure 5 is a schematic diagram of a dynamic remote sensing image fog removal contrast perception learning method according to an embodiment of the present disclosure;
[0021] Figure 6 is a schematic diagram of a visualization of a processing result of a fog representation network according to an embodiment of the present disclosure;
[0022] Figure 7 is a schematic diagram of a method for defogging according to an embodiment of the present disclosure;
[0023] Figure 8 is a schematic diagram of a comparison simulation experiment result of image defogging effects according to an embodiment of the present disclosure;
[0024] Figure 9 is a schematic diagram of a comparison of real image defogging effects according to an embodiment of the present disclosure;
[0025] Figure 10 is a schematic diagram of an image processing device according to an embodiment of the present disclosure;
[0026] Figure 11 is a schematic diagram of an image processing device provided from a human-computer interaction side according to an embodiment of the present disclosure;
[0027] Figure 12 is a schematic diagram of an image processing device provided from a scene of defogging processing of remote sensing images according to an embodiment of the present disclosure;
[0028] Figure 13 is a structural block diagram of a computer terminal according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to make the personnel in the art better understand the present application scheme, the technical scheme in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the person skilled in the art without creative labor should belong to the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] First, some of the nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
[0032] The defogging algorithm mainly includes image enhancement, image restoration and convolutional neural network. In the present application, the contrast learning method is used to model the characteristics of different fog, and then the clean image is reconstructed from the foggy image.
[0033] Contrast learning is an unsupervised learning method, which is used to learn the general features of a data set by learning which data points are similar or different without labels.
[0034] Dynamic parameters are parameters that can be expressed by an expression.
[0035] Embodiment 1
[0036] According to the embodiments of the present application, a method for image processing is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.
[0037] The method provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing the image processing method is shown. As shown in Figure 1 The computer terminal 10 (or mobile device 10) can include one or more processors 102 (the processor 102 can include but is not limited to a microprocessor MCU or a programmable logic device FPGA processing device), a memory 104 for storing data, and a transmission device 106 for communication function. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can include more or less components than those shown in Figure 1 or have a different configuration than Figure 1 shown.
[0038] It should be noted that the one or more processors 102 and / or other data processing circuitry described above can be generally referred to herein as "data processing circuitry". The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuitry can be a single standalone processing module, or incorporated in whole or in part within any one of the other elements of the computer terminal 10 (or mobile device). As referred to in the embodiments of the present application, the data processing circuitry functions as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.
[0039] The memory 104 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the image processing method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e. implements the image processing method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module which is used to communicate with the Internet in a wireless manner.
[0041] The display can be, for example, a touch screen type liquid crystal display (LCD) which can enable a user to interact with the user interface of the computer terminal 10 (or mobile device).
[0042] It should be noted that in some alternative embodiments, the above-mentioned Figure 1 The computer device (or mobile device) shown can include hardware elements (including circuitry), software elements (including computer code stored on a computer readable medium), or a combination of both hardware and software elements. It should be noted that in some embodiments, the functions of the computer device (or mobile device) can be implemented using a processor-based system that includes one or more processors programmed according to the teachings of the present application. Figure 1is merely one instance of a particular, concrete example and is intended to show the types of components that can be present in the above-described computer device (or mobile device).
[0043] Figure 2 is a flowchart of an image processing method according to an embodiment of the present application. As shown in Figure 2 the image processing method can include the following steps:
[0044] In step S202, a target image is acquired, wherein the target image includes a first image of a target object and a second image to be removed which overlaps the first image.
[0045] In the technical solution provided by the above step S202 of the present application, the target image is acquired, for example, due to fog, cloud, smoke and the like, the quality of the remote sensing image is low, by acquiring the remote sensing image containing fog, a clean remote sensing image is further reconstructed.
[0046] In the above embodiment, the target image can be a test image, for example, a synthesized uniform fog image, a synthesized non-uniform fog image and a real fog-containing image.
[0047] In this embodiment, the first image can be a clean image, and the second image is an occlusion image, for example, in a remote sensing image of Beijing containing cloud and fog, the first image can be a clean remote sensing image of Beijing without cloud and fog, and the second image can be an image of cloud and fog occluding the first image.
[0048] In step S204, the target image is converted into a target vector, wherein the target vector is used to represent the second image.
[0049] In the technical solution provided by the above step S204 of the present application, the target image is converted into a target vector, for example, by mapping the test image into a representation space to obtain a target vector, and using the target vector to represent an image containing cloud, fog, smoke and the like.
[0050] In the above embodiment, the test image can be mapped into a representation space based on a fog representation network, and then a fog representation vector is obtained.
[0051] In this embodiment, converting the target image into a target vector includes displaying target flag information corresponding to the target vector on an operation interface, for example, displaying the color and number of the fog representation vector on the operation interface.
[0052] In step S206, a target parameter of the target image is generated based on the target vector, and the second image is removed from the target image based on the target parameter to obtain the first image.
[0053] In the technical solution provided in the step S206 of the present application, the target parameter of the target image is generated based on the target vector, and the second image is removed from the target image based on the target parameter to obtain the first image. For example, after the representation network based on the fog maps the test image into the representation space to obtain the representation vector of the fog, the network parameter related to the specific test image is generated through the representation vector, and the image containing the fog is removed from the target image based on the network parameter to obtain the first image, wherein the representation vector of the fog is the target vector.
[0054] In the above embodiment, the target parameter is the network parameter in the contrast learning network. Optionally, the target parameter can be a fog-aware parameter.
[0055] In this embodiment, the second target model is updated based on the target parameter, wherein the second target model is used to remove the sub-image in the second input image, and then the second image is removed from the target image based on the updated second target model to obtain the first image. For example, the Haze-aware RS Image Dehazing Network is updated based on the network parameter in the contrast learning network, and the image containing the fog is removed from the test image based on the updated Haze-aware RS Image Dehazing Network to obtain the clean image.
[0056] Through the steps S202 to S206 of the present application, the target image is obtained, wherein the target image includes the first image of the target object and the second image to be removed which overlaps the first image. The target image is converted into a target vector, wherein the target vector is used to represent the second image. The target parameter of the target image is generated based on the target vector, and the second image is removed from the target image based on the target parameter to obtain the first image. That is, in the present application, the target vector is determined based on the image with the occlusion image to represent the occlusion image in the image. The target parameter for the target image is generated using the target vector, and the occlusion image is removed from the target image based on the target parameter, which improves the efficiency of removing the occlusion image from the image, thereby solving the technical problem of low efficiency of removing the occlusion image from the image and achieving the technical effect of improving the efficiency of removing the occlusion image from the image.
[0057] The above method of this embodiment will be further introduced below.
[0058] As an optional implementation, in the step S204, converting the target image into a target vector includes: mapping the target image based on a first target model to obtain the target vector, wherein the first target model is used to represent the mapping relationship between different first input images and vectors of images to be removed in the first input images.
[0059] In the above embodiment, the target image is mapped based on the first target model to obtain a target vector, for example, the fog image is mapped to a representation space through a network, so that the characteristics of the fog in the image can be represented by the encoding vector, thereby realizing the conversion of the target image into the target vector.
[0060] In this embodiment, the first target model can be a fog representation network.
[0061] In this embodiment, the first target model can be obtained by training a contrast learning network based on the first image sample, wherein the contrast learning network can be a contrast learning framework of Swapping Assignments between multiple Views (SwAV for short).
[0062] In this embodiment, the method can include displaying target label information corresponding to the target vector on the operation interface, for example, displaying the color and number of the representation vector of the fog on the operation interface, which is not limited here.
[0063] As an optional implementation, the target image is mapped based on the first target model to obtain a target vector, and the method further includes training a contrast learning model based on the first image sample to obtain the first target model, wherein the first image sample at least includes a real or simulated first target image sample, and an image sample obtained by removing a second target image sample from the first target image sample.
[0064] In the above embodiment, the first target model is obtained by training a contrast learning model based on the first image sample, for example, a large number of clean images, and simulated and real fog-containing images are used to train the SwAV contrast learning framework during the training process.
[0065] In this embodiment, optionally, the first image sample can include clean images, simulated and real fog-containing images.
[0066] As an optional implementation, the target image is mapped based on the first target model to obtain a target vector, and the method further includes: displaying identification information of vectors corresponding to different first input images on an operation interface to obtain a plurality of identification information; in response to a first selection operation instruction acting on the operation interface, selecting a first sub-region from a target region, and determining target identification information corresponding to the image of the first sub-region in the plurality of identification information, wherein the image corresponding to the target region includes different first input images; displaying the target identification information at a target position of the operation interface; and / or in response to a zoom operation instruction acting on the operation interface, performing a zoom operation on the target identification information, and displaying the zoomed target identification information on the operation interface.
[0067] In this embodiment, the target identification information corresponding to the target vector is displayed on the operation interface, for example, the color and / or number of the representative vector of the fog is displayed on the operation interface.
[0068] In this embodiment, the first sub-region can be selected from the target region in response to the first selection operation instruction acting on the operation interface, and the target identification information corresponding to the image of the first sub-region is determined from the plurality of identification information. The image corresponding to the target region can include different first input images, for example, the target region includes a plurality of fog images, the user selects the first sub-region in the target region on the operation interface to form a first selection operation instruction signal, and the system determines the target number corresponding to the image of the first sub-region from the plurality of numbers in response to the signal.
[0069] In this embodiment, the target identification information can be displayed at the target position of the operation interface, for example, the number and / or color corresponding to the target vector representing the fog image is displayed in the square region at the upper right corner of the operation interface.
[0070] In this embodiment, the target identification information can be scaled in response to the scaling operation instruction acting on the operation interface, and the scaled target identification information is displayed on the operation interface. For example, after learning the vectors of different regions of the image, the corresponding color and / or number of the vector can be displayed, and the user can select a part of the region of the image to perform local zoom-in or zoom-out operation on the image in the region to form a scaling operation instruction signal. The system responds to the signal to perform the scaling operation of the user and displays the result of the operation on the operation interface.
[0071] As an optional implementation, after the identification information of the vectors corresponding to the different first input images is displayed on the operation interface to obtain a plurality of identification information, the method further includes: selecting a second sub-region in the region corresponding to the target image in response to a second selection operation instruction acting on the operation interface; and determining the image corresponding to the second sub-region as a second image.
[0072] In this embodiment, the second sub-region can be selected in the region corresponding to the target image in response to the second selection operation instruction acting on the operation interface, and the image corresponding to the second sub-region is determined as a second image. For example, the second selection operation instruction is to select a local region in a fog image for dehazing to form a second selection operation instruction signal, and the system responds to the signal to perform dehazing processing on the selected local region in the fog image, so as to determine the image of the local region as a fog image.
[0073] As an optional implementation, the method further comprises: selecting a first target index from the plurality of target indexes in response to a third selection operation instruction acting on the operation interface, wherein each target index is used to represent a degree of removing the second image from the target image; and removing the second image from the target image based on the target parameter to obtain the first image, comprising: removing the second image from the target image based on the target parameter and the first target index to obtain the first image.
[0074] In this embodiment, the first target index can be selected from the plurality of target indexes in response to a third selection operation instruction acting on the operation interface, wherein each target index is used to represent a degree of removing the second image from the target image, for example, the user can select a light fog removal degree value for fog removal processing of the image to form a third selection operation instruction signal, and the system responds to the signal to perform an operation of selecting light fog removal from the plurality of fog removal degree values.
[0075] In this embodiment, the target index can be a fog removal degree value, such as light fog removal, heavy fog removal, and general fog removal, etc., which is not limited herein.
[0076] In this embodiment, removing the second image from the target image based on the target parameter to obtain the first image can comprise: removing the second image from the target image based on the target parameter and the first target index to obtain the first image, for example, based on the perception parameter of fog in the learning network and the user-selected fog removal degree value, the system performs fog removal processing on the image to obtain a clean image.
[0077] In this embodiment, the method can comprise: performing image processing of different degrees for the user-selected fog removal degree value, for example, when performing fog removal processing on a heavy fog obstruction area, two fog removal operations can be performed.
[0078] As an optional implementation, step S206, removing the second image from the target image based on the target parameter to obtain the first image, comprises: updating the second target model based on the target parameter, wherein the second target model is used to remove the sub-image in the second input image; and removing the second image from the target image based on the updated second target model to obtain the first image.
[0079] In the above embodiment, the second target model is updated based on the target parameter, for example, the second target model is updated based on the perception parameter of fog in the learning network.
[0080] In the above embodiment, optionally, the second target model is a fog perception remote sensing image fog removal network.
[0081] In the above embodiment, the second image is removed from the target image based on the updated second target model to obtain the first image, for example, the foggy image is removed from the test image based on the updated fog-aware remote sensing image dehazing network to obtain a clean image.
[0082] As an optional implementation, updating the second target model based on the target parameter comprises: determining a loss function based on the second image sample and the target vector, wherein the second image sample at least comprises a real third target image sample; and training the second target model based on the loss function.
[0083] In the above embodiment, the loss function is determined based on the second image sample and the target vector, wherein the second image sample at least comprises a real third target image sample, for example, in order to enhance the learning ability of the learning network in the training process, a contrast loss is also designed, and the loss function can also enable the learning network to introduce a large amount of real data as training samples.
[0084] In this embodiment, the second image sample can be a real foggy image.
[0085] In this embodiment, optionally, before determining the loss function based on the second image sample and the target vector, a contrast loss is constructed to enhance the learning ability of the network model, and the expression can be as follows:
[0086]
[0087]
[0088] In this embodiment, optionally, in order to introduce real data into the training process well, an additional flag is added to the loss to determine whether the data is real data or simulated data, and the final loss function expression can be as follows:
[0089]
[0090] In this embodiment, the second target model is trained based on the loss function, for example, the loss function is trained through a large number of sample set data in an unsupervised learning manner, and then the fog-aware remote sensing image dehazing network is obtained.
[0091] As an optional implementation, updating the second target model based on the target parameter comprises: updating the parameters of the convolution layer of the second target model based on the target parameter.
[0092] In the above embodiment, the parameters of the convolution layer of the second target model are updated based on the target parameter, for example, the parameters of the fog-aware convolution layer of the fog-aware remote sensing image dehazing network are updated based on the fog-aware parameters in the learning network.
[0093] In this embodiment, the parameters of the convolutional layer refer to the parameters possessed by the convolutional layer function in the transmission layer in deep learning, including activation and transmission, etc.
[0094] As an optional implementation, the second target model is updated based on the target parameters, and the method further includes: obtaining adjustment information on the operation interface, wherein the adjustment information includes information for representing the accuracy of the first image; and adjusting the updated second target model based on the adjustment information.
[0095] In the above embodiment, the adjustment information is obtained on the operation interface, and the adjustment information includes information for representing the accuracy of the first image. For example, before updating the second target model, information for representing the accuracy of the test image can be obtained on the operation interface. When the difference between the input feature and the output feature is within a certain threshold range, it is determined that the obtained test image is accurate, otherwise, corresponding adjustment is performed based on the adjustment information.
[0096] In this embodiment, the updated second target model is adjusted based on the adjustment information. For example, according to the adjustment information of whether the difference between the input feature and the output feature on the operation interface is within a predetermined threshold range, corresponding adjustment is performed, and then the haze-aware remote sensing image dehazing network is updated.
[0097] In this embodiment, the adjustment information can be obtained by a loss function. Through the loss function, the input feature of the test image of the input network and the output feature of the reconstructed clean image are within a certain threshold range.
[0098] As an optional implementation, in step S204, the target image is converted into a target vector, and the method further includes: displaying target identification information corresponding to the target vector on the operation interface.
[0099] In the above embodiment, the target identification information corresponding to the target vector is displayed on the operation interface. For example, the number and color corresponding to the representation vector of the image of the fog are displayed on the operation interface.
[0100] As an optional implementation, in step S202, the number of target images is multiple, and the method further includes: displaying the first image corresponding to each target image according to the area corresponding to each target image on the operation interface, to obtain multiple first images.
[0101] In the above embodiment, the first image corresponding to each target image is displayed on the operation interface according to the region corresponding to each target image, and a plurality of first images are obtained. For example, in the image processing system, in response to an instruction on the operation interface, the region corresponding to a plurality of test images and the test images corresponding thereto are displayed on the operation interface, so as to display the clean remote sensing image of the region that is intended to be understood.
[0102] As an optional implementation, the first image corresponding to each target image is displayed on the operation interface according to the region corresponding to each target image, and a plurality of first images are obtained. The method further includes: in response to a fourth selection operation instruction acting on the plurality of first images, selecting a to-be-edited image in the plurality of first images; in response to an editing operation instruction acting on the to-be-edited image, performing an editing operation on the to-be-edited image to obtain an editing result, and displaying the editing result on the operation interface.
[0103] In the above embodiment, in response to the fourth selection operation instruction acting on the plurality of first images, the to-be-edited image is selected in the plurality of first images. For example, on the operation interface, a plurality of test images can be selected for editing operations such as deletion and comparison.
[0104] In the embodiment, in response to the editing operation instruction acting on the to-be-edited image, the editing operation is performed on the to-be-edited image to obtain an editing result, and the editing result is displayed on the operation interface. For example, after obtaining the remote sensing image of the target region that is intended to be understood on the operation interface, all remote sensing images on the current interface are selected and an operation of uniformly marking the remote sensing images is performed, and then the uniform marking result of the plurality of remote sensing images is displayed on the operation interface.
[0105] In the embodiment of the present disclosure, the target vector is obtained by mapping the target image based on the first target model; the second target model is updated based on the target parameter; the second image is removed from the target image based on the updated second target model to obtain the first image; the target identification information corresponding to the target vector is displayed on the operation interface; and the first image corresponding to each target image is displayed on the operation interface according to the region corresponding to each target image to obtain a plurality of first images. That is, in the present application, the target vector is determined based on the image with the occlusion image to represent the occlusion image in the image, the target parameter for the target image is generated using the target vector, and the occlusion image is removed from the target image based on the target parameter, thereby improving the efficiency of removing the occlusion image from the image, solving the technical problem of low efficiency of removing the occlusion image from the image, and achieving the technical effect of improving the efficiency of removing the occlusion image from the image.
[0106] The embodiment of the present application also provides another image processing method from the human-computer interaction side.
[0107] Figure 3is a flowchart of an image processing method provided from a human-computer interaction side according to an embodiment of the present application. As shown in Figure 3 the method can include the following steps:
[0108] In step S302, a target image is input in response to an input instruction acting on the operation interface, wherein the target image includes a first image of a target object and a second image to be removed which overlaps the first image.
[0109] In the technical solution provided by the above step S302 of the present application, the target image is input in response to the input instruction acting on the operation interface, for example, a test image containing fog is input on the operation interface, and the test image containing fog is input in response to the input instruction acting on the operation interface.
[0110] In step S304, the first image is displayed on the operation interface in response to an image removal instruction acting on the operation interface, wherein the first image is obtained by removing the second image from the target image based on a target parameter of the target image, the target parameter is obtained based on a target vector used to represent the second image, and the target vector is converted from the target image.
[0111] In the technical solution provided by the above step S304 of the present application, the first image is displayed on the operation interface in response to the image removal instruction acting on the operation interface, for example, an image removal instruction of fog is input on the operation interface, then the image of the fog is removed from the test image containing fog based on the fog perception parameter of the image of the fog in the learning network, so as to obtain a clean image.
[0112] In the embodiments of the present disclosure, by inputting the target image in response to the input instruction acting on the operation interface, and displaying the first image on the operation interface in response to the image removal instruction acting on the operation interface, the purpose of removing the occlusion image in the image is achieved, and the technical problem of low efficiency of removing the occlusion image from the image is solved, and the technical effect of improving the efficiency of removing the occlusion image from the image is achieved.
[0113] The embodiments of the present application also provide another data processing method from the scene of removing fog from dynamic remote sensing images.
[0114] Figure 4 is a flowchart of a data processing method provided from the scene of removing fog from dynamic remote sensing images according to an embodiment of the present application. As shown in Figure 4 the method can include the following steps:
[0115] In step S402, an image of a target vegetation is collected to obtain a target image, wherein the target image includes an image of the target vegetation and a fog image to be removed which overlaps the image of the target vegetation.
[0116] In the technical solution provided in the step S402 of the present application, the image of the area where the target vegetation is located can be collected to obtain a target image, wherein the target image can include the image of the target vegetation and the fog image to be removed which overlaps the image of the target vegetation. For example, in the defogging of an agricultural scene, an unmanned aerial vehicle can be used to capture the image of a certain vegetation coverage area, and the image includes the image of the vegetation and the fog image to be removed which overlaps the image of the vegetation.
[0117] In step S404, the target image is converted into a target vector, wherein the target vector is used to represent the fog image.
[0118] In the technical solution provided in the step S404 of the present application, the target image is converted into a target vector. For example, the fog-containing remote sensing image of Beijing can be mapped into a representation space by using the fog representation network to obtain a target vector, and the target vector is used to represent the fog-containing image.
[0119] In the above embodiment, the fog-containing remote sensing image of Beijing can be mapped into a representation space by using the fog representation network, and then a fog representation vector is obtained.
[0120] In this embodiment, converting the target image into a target vector includes displaying the target sign information corresponding to the target vector on an operation interface. For example, the color and number of the fog representation vector are displayed on the operation interface.
[0121] In step S406, a target parameter of the target image is generated based on the target vector, and the fog image is removed from the target image based on the target parameter to obtain the image of the target vegetation.
[0122] In the technical solution provided in the step S406 of the present application, a target parameter of the target image is generated based on the target vector, and the fog image is removed from the target image based on the target parameter to obtain the image of the target vegetation. For example, the target image can be a test image, which can be a fog-containing vegetation image. After the test image is mapped into a representation space by using the fog representation network, a fog representation vector is obtained. The network parameter related to the specific test image is generated by using the fog representation vector, and the fog-containing image is removed from the target image based on the network parameter to obtain a clean vegetation image.
[0123] In the above embodiment, the target parameter can be a network parameter in a contrast learning network. Alternatively, the target parameter can be a fog-aware parameter.
[0124] In this embodiment, optionally, the second target model is updated based on the target parameter, the second target model is used to remove the sub-image in the second input image, and then the second image is removed from the target image based on the updated second target model to obtain the first image. For example, the network parameters in the contrast learning network are updated to obtain the fog-aware remote sensing image dehazing network, the fog image is removed from the test vegetation image based on the updated fog-aware remote sensing image dehazing network, and the clean vegetation image is obtained.
[0125] As an optional implementation, the method can further include determining the growth state of the target vegetation based on the image of the target vegetation.
[0126] In this embodiment, the growth state of the target vegetation can be determined based on the image of the target vegetation. For example, the target vegetation is a newly cultivated birch forest, and the growth and health state of the vegetation can be determined by observing the color of the image.
[0127] In this embodiment, the determination of the growth state of the target vegetation can be made by a vegetation researcher according to actual conditions, such as the color, growth height, and density of the vegetation, without limitation.
[0128] As an optional implementation, the method of determining the growth state of the target vegetation based on the image of the target vegetation can further include determining strategy data based on the growth state of the target vegetation, wherein the strategy data is used to represent the management strategy for the target vegetation.
[0129] In this embodiment, the strategy data can be determined based on the growth state of the target vegetation, and the strategy data is used to represent the management strategy for the target vegetation. For example, in spring and autumn, birch trees are prone to be harmed by powdery mildew, and the harm is more severe for 1-year-old or 2-year-old saplings, which is manifested as yellowing and wilting of leaves and premature defoliation. The researcher can formulate a control strategy according to the growth state and form strategy data in the system.
[0130] In the embodiments of the present disclosure, the target image is obtained, wherein the target image includes an image of a target area and a fog image to be removed which overlaps the image of the target area; the target image is converted into a target vector, wherein the target vector is used to represent the fog image; a target parameter of the target image is generated based on the target vector, and the fog image is removed from the target image based on the target parameter to obtain the image of the target area. That is, the target vector is determined based on the image with the occlusion image, to represent the occlusion image in the image, the target parameter for the target image is generated by using the target vector, and the occlusion image is removed from the target image based on the target parameter, thereby improving the efficiency of removing the occlusion image from the image, solving the technical problem of low efficiency of removing the occlusion image from the image, and achieving the technical effect of improving the efficiency of removing the occlusion image from the image.
[0131] Embodiment 2
[0132] The preferred implementation of the above method of this embodiment is further described below.
[0133] In the related art, in the process of defogging, only how to utilize prior constraints to reconstruct results is often considered, or how to reconstruct clean images is learned through a large amount of simulation data. However, since the distribution of fog in remote sensing images is relatively complex, it is difficult to model it well, so it is impossible to obtain accurate prior or effective simulation training data to improve the reconstruction results. To solve this problem, the present application proposes a method of dynamic remote sensing image defogging contrast perception learning.
[0134] Figure 5 is a schematic diagram of a method of dynamic remote sensing image defogging contrast perception learning according to an embodiment of the present disclosure, as Figure 5 shown, real fog images (Real Hazy), synthetic uniform fog images (Synthetic Uniform Haze) and synthetic non-uniform fog images (Synthetic Non-uniform Haze) can be used as input target images, the fog images are mapped into a representation space through a fog feature learning network (Haze Characteristic Learning Network), the fog representation code (Haze Representation Code) represents the characteristics of the fog in the image, and then a fog-aware parameter generator (Haze-aware Parameter Generator) is used to generate fog-aware parameters (Haze-aware Parameters) for specific images to dynamically adapt to different test images. A contrast loss (Contrastive Loss) is also designed to enhance the learning ability of the fog feature learning network. Finally, through the processing of the fog-aware remote sensing image defogging network (Haze-aware RS image Dehazing Network), clean restored images (Restored Images) corresponding to the input target images are output.
[0135] The characteristics of different fogs are modeled in a contrast learning manner, and then a network is further designed according to the learned characteristics of the fogs. Specifically, in the present application, a fog map is mapped into a representation space through a network, so that the characteristics of the fog in the image can be represented by an encoding vector. Subsequently, parameters for a specific test image are further generated by the encoding, so that the learning network can be dynamically adapted to different test images. In addition, a contrast loss is designed in the present application to enhance the learning ability of the network during training. The loss function can also introduce a large amount of real data for training, greatly enhancing the generalization ability of the dynamic remote sensing image dehazing contrast perception learning method.
[0136] Figure 6 is a schematic diagram of the processing result of a fog representation network according to an embodiment of the present disclosure after visualization, as Figure 6 In the dynamic remote sensing image dehazing contrast perception learning method, a fog representation network is first trained in a contrast learning manner, the characteristics of the fog are extracted through the network, and a dehazing method is constructed based on the learned characteristics, and then the training of the fog representation network is completed through the SwAV contrast learning framework. A large number of clean images, as well as simulated and real fog-containing images, are used for training during the training process. Because SwAV is a clustering-based contrast learning model, it is not necessary to define negative samples during the training process. Therefore, during the training, the samples can be roughly classified, and then two samples in each category are sent into the network for training. Finally, the color and number of the fog representation vector are displayed on the operation interface.
[0137] The diagram can well reflect that the representation learning network can well learn the differences in the images, which will help to well remove different fogs.
[0138] Figure 7 is a schematic diagram of a method for implementing dehazing, as Figure 7As shown, the haze-aware parameter generator processes the haze representation into haze-aware parameters through a plurality of unsqueeze operations, a full connect layer, and a 3D unsqueeze operation, the supervised attention module with haze-aware parameters improves the defogging effect by updating the parameters of the haze-aware convolution layer, the hazy RS image is processed to obtain a restored RS image, the haze-aware convolution layer continues to extract the features of the haze in the restored RS image to obtain attention maps, and the input features are processed to obtain output features.
[0139] After obtaining the trained representation network, a test image can be mapped into the representation space, so that the features of the test image can be represented by a representation vector. Based on this, the present application proposes to generate network parameters related to the specific test image by the representation vector, so that the network model can be dynamically adapted to different test images, and the generalization ability of the dynamic remote sensing image defogging contrast perception learning method is greatly enhanced.
[0140] In addition, the present application also constructs a contrast loss to enhance the learning ability of the network model, which can be represented as follows:
[0141]
[0142]
[0143] In order to introduce the real data into the training process well, the present application proposes to add an additional flag in the loss to judge whether the data is real data or simulated data, and the final loss function is as follows:
[0144]
[0145] Figure 8 is a schematic diagram of an image defogging effect contrast simulation experiment result according to an embodiment of the present disclosure, as Figure 8As shown, the fog removal methods are in turn: method one (AECR), method two (MCBDN), method three (PSD), method four (MPRnet), method five (MCNN), method six (RsDehazeNet), and the method of the present application (Ours), and the fog removal effect diagrams are in turn: fog image (Haze Image), method one, method two, method three, method four, method five, method six, and the method of the present application.
[0146] The experimental results of the method of dynamic remote sensing image fog removal contrast perception learning on the Sentinel 2 dataset are shown, and it can be seen that the method in the present application has obvious advantages compared to the contrast method, and from the image results, it can be seen that the method in the present application not only can effectively remove the fog in the image, but also can retain the color and structure of the image.
[0147] Figure 9 is a schematic diagram of real image fog removal effect contrast according to an embodiment of the present disclosure, as Figure 9 As shown, the fog removal effect diagrams are in turn: fog image, method one, method two, method three, method four, method five, method six, and the method of the present application. The effect diagram reflects the fog removal effect of multiple methods on real images, and it can be seen that multiple contrast methods not only cannot remove the fog in the image when facing a more complex fog-containing image, but also erase the original structure of the image. The method of dynamic remote sensing image fog removal contrast perception learning in the present application can effectively reconstruct the original color and structure of the image.
[0148] In the embodiment of the present disclosure, by mapping the fog image into the table space through the representation network, the characteristics of the fog in the image can be represented by the encoding vector. Then, the parameters for the specific test image are generated by the encoding, so that the learning network in the present application can dynamically adapt to different test images. In addition, a contrast loss function is designed to enhance the learning ability of the learning network during the training process. The loss function enables the learning network to introduce a large amount of real data for training, which greatly enhances the generalization ability of the method of dynamic remote sensing image fog removal contrast perception learning. That is, the occlusion image is a fog image, the target vector is determined based on the fog-containing image to represent the fog in the image, the target parameters for the target image are generated using the target vector, and the occlusion image is removed from the target image based on the target parameters, thereby improving the efficiency of removing the occlusion image from the image, thereby solving the technical problem of low efficiency of removing the occlusion image from the image, and achieving the technical effect of improving the efficiency of removing the occlusion image from the image.
[0149] Embodiment 3
[0150] According to the embodiments of the present application, a method for implementing the above Figure 2An image processing apparatus of the image processing method.
[0151] Figure 10 Fig. 1 is a schematic diagram of an image processing apparatus according to an embodiment of the present application. As shown in the figure, the image processing apparatus 100 can include a first acquisition unit 101, a first conversion unit 102, and a first generation unit 103. Figure 10
[0152] The first acquisition unit 101 is configured to acquire a target image, wherein the target image includes a first image of a target object and a second image to be removed which overlaps the first image.
[0153] The first conversion unit 102 is configured to convert the target image into a target vector, wherein the target vector is used to represent the second image.
[0154] The first generation unit 103 is configured to generate a target parameter of the target image based on the target vector, and remove the second image from the target image based on the target parameter to obtain the first image.
[0155] It should be noted that the above-mentioned first acquisition unit 101, first conversion unit 102, and first reconstruction segmentation unit 103 correspond to steps S202 to S206 in Embodiment 1, and the three units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above-mentioned embodiment one. It should be noted that the above-mentioned units as part of the apparatus can run in the computer terminal 10 provided in Embodiment 1.
[0156] Optionally, the first acquisition unit 101 includes a first acquisition submodule, wherein the first acquisition submodule includes a first acquisition submodule first subunit and a first acquisition submodule second subunit. The first acquisition submodule displays the first image corresponding to each target image according to the area corresponding to each target image on an operation interface to obtain a plurality of first images; the first acquisition submodule first subunit is configured to select an image to be edited from the plurality of first images in response to a fourth selection operation instruction acting on the plurality of first images; and the first acquisition submodule second subunit is configured to perform an editing operation on the image to be edited in response to an editing operation instruction acting on the image to be edited to obtain an editing result and display the editing result on the operation interface.
[0157] Optionally, the first conversion unit 102 comprises a first conversion module, wherein the first conversion module comprises a first conversion subunit, a first display subunit, a first selection subunit, a second display subunit, and a first scaling subunit. The first conversion module is configured to map the target image based on a first target model to obtain a target vector, wherein the first target model is used to represent a mapping relationship between different first input images and vectors of images to be removed in the first input images. The first conversion subunit is configured to train a contrast learning model based on first image samples to obtain the first target model, wherein the first image samples at least include real or simulated first target image samples and image samples after a second target image sample is removed from the first target image samples. The first display subunit is configured to display identification information of vectors corresponding to different first input images on an operation interface to obtain a plurality of identification information. The first selection subunit is configured to select a first sub-region from a target region in response to a first selection operation instruction acting on the operation interface, and determine target identification information corresponding to an image of the first sub-region in the plurality of identification information, wherein the image corresponding to the target region includes different first input images. The second display subunit is configured to display the target identification information at a target position of the operation interface. The first scaling subunit is configured to perform a scaling operation on the target identification information in response to a scaling operation instruction acting on the operation interface, and display the scaled target identification information on the operation interface.
[0158] Optionally, the first conversion unit 102 further comprises a second selection subunit, a first determination subunit, a third selection subunit, and a first removal subunit. The second selection subunit is configured to select a second sub-region in a region corresponding to the target image in response to a second selection operation instruction acting on the operation interface. The first determination subunit is configured to determine an image corresponding to the second sub-region as a second image. The third selection subunit is configured to select a first target index from a plurality of target indexes in response to a third selection operation instruction acting on the operation interface, wherein each target index is used to represent a degree of removing the second image from the target image. The first removal subunit is configured to remove the second image from the target image based on a target parameter to obtain a first image, comprising: removing the second image from the target image based on the target parameter and the first target index to obtain the first image.
[0159] Optionally, the first generation unit 103 comprises a first generation submodule and a second generation submodule, wherein the first generation submodule comprises a first generation submodule first subunit, a first generation submodule second subunit, a first generation submodule third subunit, a first generation submodule fourth subunit, and a first generation submodule fifth subunit. The first generation submodule is configured to update a second target model based on a target parameter, wherein the second target model is used to remove a sub-image in a second input image. The second generation submodule is configured to remove the second image from the target image based on the updated second target model to obtain a first image. The first generation submodule first subunit is configured to determine a loss function based on a second image sample and a target vector, wherein the second image sample at least comprises a real third target image sample. The first generation submodule second subunit is configured to train the second target model based on the loss function. The first generation submodule third subunit is configured to update parameters of a convolutional layer of the second target model based on the target parameter. The first generation submodule fourth subunit is configured to obtain adjustment information on an operation interface, wherein the adjustment information comprises information used to represent an accuracy degree of the first image. The first generation submodule fifth subunit is configured to adjust the updated second target model based on the adjustment information.
[0160] In this embodiment, the target image is obtained by the first acquisition unit 101, wherein the target image comprises a first image of a target object and a second image to be removed which overlaps the first image. The target image is converted into a target vector by the first conversion unit 102, wherein the target vector is used to represent the second image. The target parameter of the target image is generated based on the target vector by the first generation unit 103, and the second image is removed from the target image based on the target parameter to obtain the first image. That is, the target vector is determined based on the image with the occlusion image, to represent the occlusion image in the image. The target parameter for the target image is generated by using the target vector. The occlusion image is removed from the target image based on the target parameter, which improves the efficiency of removing the occlusion image from the image, thereby solving the technical problem of low efficiency of removing the occlusion image from the image, and achieving the technical effect of improving the efficiency of removing the occlusion image from the image.
[0161] According to the embodiments of the present application, an image processing device for implementing the image processing method is also provided. Figure 3 as shown in the image processing method.
[0162] Figure 11 is a schematic diagram of an image processing device provided from the human-computer interaction side according to the embodiments of the present disclosure. As shown in the image processing device 110 can comprise an input unit 111 and a display unit 112. Figure 11
[0163] The input unit 110 is configured to input a target image in response to an input instruction acting on the operation interface, wherein the target image comprises a first image of a target object and a second image to be removed and overlapping with the first image;
[0164] The display unit 112 is configured to display the first image on the operation interface in response to an image removal instruction acting on the operation interface, wherein the first image is obtained by removing the second image from the target image based on a target parameter of the target image, and the target parameter is obtained based on a target vector used to represent the second image, and the target vector is converted from the target image.
[0165] It should be noted that the input unit 111 and the display unit 112 correspond to steps S302 to S304 in Embodiment 3, and the two units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above embodiment. It should be noted that the above units can run in the computer terminal 10 provided in Embodiment 1 as part of the device.
[0166] According to the embodiments of the present application, a data processing device for implementing the above-mentioned Figure 4 image processing method is also provided.
[0167] Figure 12 is a schematic diagram of an image processing device provided according to the fog removal processing of an agricultural remote sensing image. As Figure 12 shown, the image processing device 120 can include an acquisition unit 121, a second conversion unit 122, and a second generation unit 123.
[0168] The acquisition unit 121 is configured to perform image acquisition on a region where a target vegetation is located to obtain a target image, wherein the target image comprises an image of the target vegetation and a fog image to be removed and overlapping with the image of the target vegetation;
[0169] The second conversion unit 122 is configured to convert the target image into a target vector, wherein the target vector is used to represent the fog image.
[0170] The second generation unit 123 is configured to generate a target parameter of the target image based on the target vector, and remove the fog image from the target image based on the target parameter to obtain the image of the target vegetation.
[0171] Optionally, the device can further include a second determination sub-unit, wherein the second determination sub-unit includes a first determination sub-module. The second determination sub-unit is configured to determine a growth state of the target vegetation based on the image of the target vegetation, and the first determination sub-module is configured to determine strategy data based on the growth state of the target vegetation, wherein the strategy data is used to represent a management strategy for the target vegetation.
[0172] It should be noted that the above acquisition unit 121, the second conversion unit 122 and the second segmentation unit 123 correspond to steps S402 to S406 in Embodiment 2, and the three units have the same instances and application scenarios as the corresponding steps, but are not limited to the above-mentioned embodiment one. It should be noted that the above-mentioned units can be run in the computer terminal 10 provided in Embodiment 1 as part of the device.
[0173] Embodiment 4
[0174] Embodiments of the present application can provide an image processing system, which can include a computer terminal, and the computer terminal can be any one of the computer terminal devices in the computer terminal group. Alternatively, in the present embodiment, the above-mentioned computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0175] Alternatively, in the present embodiment, the above-mentioned computer terminal can be located in at least one network device of a plurality of network devices of a computer network.
[0176] In the present embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the vulnerability detection method of the application program: obtaining a target image, wherein the target image includes a first image of a target object and a second image to be removed which overlaps the first image; converting the target image into a target vector, wherein the target vector is used to represent the second image; generating a target parameter of the target image based on the target vector, and removing the second image from the target image based on the target parameter to obtain the first image.
[0177] Alternatively, Figure 13 is a structural block diagram of a computer terminal according to an embodiment of the present application. As shown in Figure 13 , the computer terminal A can include one or more (only one is shown in the figure): processor 1302, memory 1304, and transmission device 1306.
[0178] The memory can be used to store software programs and modules, such as program instructions / modules corresponding to the image processing method and device in the embodiments of the present application. The processor executes various function applications and image processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned image processing method. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, which can be connected to the computer terminal A through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The memory can be used to store software programs and modules, such as program instructions / modules corresponding to the image processing method and device in the embodiments of the present application. The processor executes various function applications and image processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned image processing method. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, which can be connected to the computer terminal A through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0179] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining a target image, wherein the target image includes a first image of a target object and a second image to be removed which overlaps the first image; converting the target image into a target vector, wherein the target vector is used to represent the second image; generating a target parameter of the target image based on the target vector, and removing the second image from the target image based on the target parameter to obtain the first image.
[0180] Optionally, the above-mentioned processor can further execute program codes of the following steps: mapping the target image based on a first target model to obtain a target vector, wherein the first target model is used to represent a mapping relationship between different first input images and vectors of images to be removed in the first input images.
[0181] Optionally, the above-mentioned processor can further execute program codes of the following steps: training a contrast learning model based on first image samples to obtain a first target model, wherein the first image samples at least include real or simulated first target image samples, and image samples after removing second target image samples from the first target image samples.
[0182] Optionally, the processor can further execute program codes of the following steps: displaying, on the operation interface, identification information of the vectors corresponding to the different first input images to obtain a plurality of identification information; selecting a first sub-region from the target region in response to a first selection operation instruction acting on the operation interface, and determining target identification information corresponding to an image of the first sub-region from the plurality of identification information, wherein the image corresponding to the target region includes different first input images; displaying the target identification information at a target position of the operation interface; and / or performing a zoom operation on the target identification information in response to a zoom operation instruction acting on the operation interface, and displaying the zoomed target identification information on the operation interface.
[0183] Optionally, the processor can further execute program codes of the following steps: selecting a second sub-region from the region corresponding to the target image in response to a second selection operation instruction acting on the operation interface; and determining an image corresponding to the second sub-region as a second image.
[0184] Optionally, the processor can further execute program codes of the following steps: selecting a first target indicator from a plurality of target indicators in response to a third selection operation instruction acting on the operation interface, wherein each target indicator is used to indicate a degree of removing the second image from the target image; and removing the second image from the target image based on the target parameter to obtain a first image, including: removing the second image from the target image based on the target parameter and the first target indicator to obtain the first image.
[0185] Optionally, the processor can further execute program codes of the following steps: updating the second target model based on the target parameter, wherein the second target model is used to remove a sub-image in the second input image; and removing the second image from the target image based on the updated second target model to obtain the first image.
[0186] Optionally, the processor can further execute program codes of the following steps: determining a loss function based on the second image sample and the target vector, wherein the second image sample includes at least a real third target image sample; and training the second target model based on the loss function.
[0187] Optionally, the processor can further execute program codes of the following steps: updating parameters of a convolution layer of the second target model based on the target parameter.
[0188] Optionally, the processor can further execute program codes of the following steps: obtaining adjustment information on the operation interface, wherein the adjustment information includes information used to represent an accuracy degree of the first image; and adjusting the updated second target model based on the adjustment information.
[0189] Optionally, the processor can further execute program codes of the following steps: displaying target identification information corresponding to the target vector on the operation interface.
[0190] Optionally, the processor can further execute program codes of the following steps: displaying the first image corresponding to each target image on the operation interface according to the region corresponding to each target image, to obtain a plurality of first images.
[0191] Optionally, the processor can further execute program codes of the following steps: selecting the image to be edited from the plurality of first images in response to the fourth selection operation instruction acting on the plurality of first images; performing editing operation on the image to be edited in response to the editing operation instruction acting on the image to be edited, to obtain an editing result, and displaying the editing result on the operation interface.
[0192] As an optional example, the processor can further execute program codes of the following steps: inputting the target image in response to the input instruction acting on the operation interface, wherein the target image includes the first image of the target object and the second image to be removed which overlaps the first image; displaying the first image on the operation interface in response to the image removal instruction acting on the operation interface, wherein the first image is obtained by removing the second image from the target image based on the target parameter of the target image, and the target parameter is obtained based on the target vector representing the second image, and the target vector is converted from the target image.
[0193] As an optional example, the processor can further execute program codes of the following steps: image acquisition on the region where the target vegetation is located to obtain a target image, wherein the target image includes the image of the target vegetation and the fog image to be removed which overlaps the image of the target vegetation; converting the target image into a target vector, wherein the target vector is used to represent the fog image; generating the target parameter of the target image based on the target vector, and removing the fog image from the target image based on the target parameter to obtain the image of the target vegetation.
[0194] Optionally, the processor can further execute program codes of the following steps: determining the growth state of the target vegetation based on the image of the target vegetation.
[0195] Optionally, the processor can further execute program codes of the following steps: determining the strategy data based on the growth state of the target vegetation, wherein the strategy data is used to represent the management strategy of the target vegetation.
[0196] The embodiment of the present application provides a scheme for image processing. The scheme comprises the following steps: obtaining a target image, wherein the target image comprises a first image of a target object and a second image to be removed and overlapping with the first image; converting the target image into a target vector, wherein the target vector is used for representing the second image; generating a target parameter of the target image based on the target vector, and removing the second image from the target image based on the target parameter to obtain the first image. The scheme can efficiently remove the occluded image in the image, thereby solving the technical problem of low efficiency of removing the occluded image from the image, and improving the efficiency of removing the occluded image from the image.
[0197] Those skilled in the art can understand that, Figure 13 The structure shown in the figure is only schematic, and the computer terminal A can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a mobile Internet device (MID), a PAD, etc. Figure 13 The present application is not limited to the structure of the computer terminal A. For example, the computer terminal A can further comprise more or less components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 13 The present application is not limited to the structure of the computer terminal A. For example, the computer terminal A can further comprise more or less components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 13 The present application is not limited to the structure of the computer terminal A. For example, the computer terminal A can further comprise more or less components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure.
[0198] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by programs instructing the hardware related to the terminal device, and the programs can be stored in a computer readable storage medium, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0199] Embodiment 5
[0200] The embodiment of the present application further provides a storage medium. Optionally, in the embodiment, the storage medium can be used to save the program code executed by the image processing method provided in the embodiment 1.
[0201] Optionally, in the embodiment, the storage medium can be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0202] Optionally, in the embodiment, the storage medium is configured to store program code for performing the following steps: obtaining a target image, wherein the target image comprises a first image of a target object and a second image to be removed which overlaps the first image; converting the target image into a target vector, wherein the target vector is used to represent the second image; generating a target parameter of the target image based on the target vector, and removing the second image from the target image based on the target parameter to obtain the first image.
[0203] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: mapping the target image based on a first target model to obtain a target vector, wherein the first target model is used to represent a mapping relationship between different first input images and vectors of images to be removed in the first input images.
[0204] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: training a contrast learning model based on first image samples to obtain the first target model, wherein the first image samples at least include real or simulated first target image samples, and image samples after the second target image samples are removed from the first target image samples.
[0205] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: displaying identification information of vectors corresponding to different first input images on an operation interface to obtain a plurality of identification information; selecting a first sub-region from a target region in response to a first selection operation instruction acting on the operation interface, and determining target identification information corresponding to an image of the first sub-region in the plurality of identification information, wherein the image corresponding to the target region includes different first input images; displaying the target identification information at a target position of the operation interface; and / or performing a zoom operation on the target identification information in response to a zoom operation instruction acting on the operation interface, and displaying the target identification information after zooming on the operation interface.
[0206] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: selecting a second sub-region from a region corresponding to the target image in response to a second selection operation instruction acting on the operation interface; and determining an image corresponding to the second sub-region as the second image.
[0207] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: selecting a first target indicator from a plurality of target indicators in response to a third selection operation instruction acting on the operation interface, wherein each target indicator is used to represent a degree of removing the second image from the target image; and removing the second image from the target image based on the target parameter and the first target indicator to obtain the first image.
[0208] Optionally, the computer readable storage medium is further arranged to store program code for performing the following step: updating the second target model based on the target parameter, wherein the second target model is used to remove the sub-image in the second input image; and removing the second image from the target image based on the updated second target model to obtain the first image.
[0209] Optionally, the computer readable storage medium is further arranged to store program code for performing the following step: determining a loss function based on the second image sample and the target vector, wherein the second image sample at least includes a real third target image sample; and training the second target model based on the loss function.
[0210] Optionally, the computer readable storage medium is further arranged to store program code for performing the following step: updating the parameters of the convolutional layer of the second target model based on the target parameter.
[0211] Optionally, the computer readable storage medium is further arranged to store program code for performing the following step: obtaining adjustment information on the operation interface, wherein the adjustment information includes information for representing the accuracy of the first image; and adjusting the updated second target model based on the adjustment information.
[0212] Optionally, the computer readable storage medium is further arranged to store program code for performing the following step: displaying the target identification information corresponding to the target vector on the operation interface.
[0213] Optionally, the computer readable storage medium is further arranged to store program code for performing the following step: displaying the first image corresponding to each target image according to the area corresponding to each target image on the operation interface to obtain a plurality of first images.
[0214] Optionally, the computer readable storage medium is further arranged to store program code for performing the following step: selecting an image to be edited from the plurality of first images in response to a fourth selection operation instruction acting on the plurality of first images; and performing editing operation on the image to be edited in response to an editing operation instruction acting on the image to be edited to obtain an editing result and display the editing result on the operation interface.
[0215] As an optional example, the computer readable storage medium is further configured to store program code for performing the following steps: in response to an input instruction acting on the operation interface, inputting a target image, wherein the target image comprises a first image of a target object and a second image to be removed which overlaps the first image; and in response to an image removal instruction acting on the operation interface, displaying the first image on the operation interface, wherein the first image is obtained by removing the second image from the target image based on a target parameter of the target image, and the target parameter is obtained based on a target vector representing the second image, and the target vector is converted from the target image.
[0216] As an optional example, the computer readable storage medium is further configured to store program code for performing the following steps: performing image acquisition on a region where target vegetation is located to obtain a target image, wherein the target image comprises an image of the target vegetation and a fog image to be removed which overlaps the image of the target region; converting the target image into a target vector, wherein the target vector is used to represent the fog image; generating a target parameter of the target image based on the target vector, and removing the fog image from the target image based on the target parameter to obtain the image of the target vegetation.
[0217] Optionally, the processor can further execute program code for performing the following steps: determining a growth state of the target vegetation based on the image of the target vegetation.
[0218] Optionally, the processor can further execute program code for performing the following steps: determining strategy data based on the growth state of the target vegetation, wherein the strategy data is used to represent a management strategy for the target vegetation.
[0219] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0220] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0221] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other ways. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between units or modules, which can be electrical or other forms.
[0222] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0223] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0224] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and various program code storage media.
[0225] The above is only the preferred embodiment of the present application, it should be noted that for those skilled in the art, without departing from the principles of the present application, can make a number of improvements and refinements, these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. An image processing method, characterized by, The method comprises: obtaining a target image, wherein the target image comprises a first image of a target object and a second image to be removed which overlaps the first image; converting the target image into a target vector, wherein the target vector is a representation vector corresponding to an occluded object in the second image, and the representation vector is used to represent a characteristic corresponding to the occluded object; generating a target parameter of the target image based on the target vector, and removing the second image from the target image based on the target parameter to obtain the first image; wherein removing the second image from the target image based on the target parameter to obtain the first image comprises: updating a second target model based on the target parameter, wherein the target parameter is used to represent a fog perception parameter corresponding to the occluded object; and removing the second image from the target image based on the updated second target model to obtain the first image; The method further comprises: displaying identification information of the target vector corresponding to different target images on an operation interface, wherein the identification information is used to represent a color and / or a number corresponding to the representation vector; and performing corresponding operations on the identification information in response to a selection operation instruction and / or a zoom operation instruction on the operation interface; The conversion of the target image into the target vector comprises: mapping the target image based on a first target model to obtain the target vector, wherein the first target model is used to represent a mapping relationship between different first input images and vectors of images to be removed in the first input images.
2. The method of claim 1, wherein, The method further comprises: training a contrast learning model based on first image samples to obtain the first target model, wherein the first image samples at least include real or simulated first target image samples and image samples after removing second target image samples from the first target image samples.
3. The method of claim 1, wherein, The displaying of the identification information of the target vector corresponding to different target images on the operation interface comprises: displaying identification information of the vectors corresponding to different first input images on an operation interface to obtain a plurality of the identification information; The performing of corresponding operations on the identification information in response to a selection operation instruction on the operation interface comprises: selecting a first sub-region from a target region in response to a first selection operation instruction on the operation interface, and determining target identification information corresponding to an image of the first sub-region from the plurality of the identification information, wherein the image corresponding to the target region comprises different first input images; displaying the target identification information at a target position of the operation interface; and / or The performing of corresponding operations on the identification information in response to a zoom operation instruction on the operation interface comprises: performing zooming operation on the target identification information in response to the zoom operation instruction on the operation interface, and displaying the target identification information after zooming on the operation interface.
4. The method of claim 3, wherein, The method further comprises: selecting a second sub-region from a region corresponding to the target image in response to a second selection operation instruction on the operation interface; The second sub-region corresponding image is determined as the second image.
5. The method of claim 3, wherein, The method further comprises: in response to a third selection operation instruction acting on the operation interface, selecting a first target indicator from a plurality of target indicators, wherein each target indicator is used to indicate a degree of removing the second image from the target image; The method further comprises: in response to a third selection operation instruction acting on the operation interface, selecting a first target indicator from a plurality of target indicators, wherein each target indicator is used to indicate a degree of removing the second image from the target image; 6. The method of claim 1, wherein, The second target model is used to remove a sub-image in a second input image.
7. The method of claim 1, wherein, The target image is a plurality of target images, and the method further comprises: The method further comprises:
8. The method of claim 7, wherein, In response to a fourth selection operation instruction acting on the plurality of first images, selecting a to-be-edited image from the plurality of first images; In response to an editing operation instruction acting on the to-be-edited image, performing an editing operation on the to-be-edited image to obtain an editing result, and displaying the editing result on the operation interface. The method further comprises:
9. An image processing method characterized by, In response to an input instruction acting on the operation interface, inputting a target image, wherein the target image includes a first image of a target object and a second image to be removed that overlaps the first image; In response to an image removal instruction acting on the operation interface, displaying the first image on the operation interface, wherein the first image is obtained by removing the second image from the target image based on an updated second target model; the updated second target model is obtained based on an updated target parameter, the target parameter is obtained based on a target vector, the target parameter is used to represent a fog perception parameter corresponding to an occluded object in the second image, the target vector is obtained by mapping the target image based on a first target model, and is a representation vector corresponding to the occluded object, the representation vector is used to represent a characteristic corresponding to the occluded object, and the first target model is used to represent a mapping relationship between different first input images and vectors of images to be removed in the first input images; The method further comprises: displaying identification information of the target vector corresponding to different target images on the operation interface, wherein the identification information is used to represent a color and / or a number corresponding to the representation vector; and in response to a selection operation instruction and / or a zoom operation instruction acting on the operation interface, performing a corresponding operation on the identification information. The method further comprises:
10. An image processing method characterized by, Collecting an image of a region where a target vegetation is located to obtain a target image, wherein the target image includes an image of the target vegetation and a fog image to be removed that overlaps the image of the target vegetation; convert the target image into a target vector, wherein the target vector is used to represent a representation vector corresponding to the fog in the fog image, and the representation vector is used to represent a characteristic corresponding to the fog; generate a target parameter of the target image based on the target vector, and remove the fog image from the target image based on the target parameter to obtain an image of the target vegetation; wherein removing the fog image from the target image based on the target parameter to obtain an image of the target vegetation comprises: updating a second target model based on the target parameter, wherein the target parameter is used to represent a fog perception parameter corresponding to the fog; and removing the fog image from the target image based on the updated second target model to obtain an image of the target vegetation; wherein the method further comprises: displaying identification information of the target vector corresponding to different target images on an operation interface, wherein the identification information is used to represent a color and / or a number corresponding to the representation vector; and performing a corresponding operation on the identification information in response to a selection operation instruction and / or a zoom operation instruction on the operation interface; wherein converting the target image into a target vector comprises: mapping the target image based on a first target model to obtain the target vector, wherein the first target model is used to represent a mapping relationship between different first input images and vectors of images to be removed in the first input images.
11. The method of claim 10, wherein, The method further comprises: determining a growth state of the target vegetation based on the image of the target vegetation.
12. The method of claim 11, wherein, The method further comprises: determining strategy data based on the growth state of the target vegetation, wherein the strategy data is used to represent a management strategy for the target vegetation.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium comprises a stored program, wherein when the program is run by a processor, the computer-readable storage medium controls a device on which the computer-readable storage medium is located to execute the method of any one of claims 1 to 10.
Citation Information
Patent Citations
Image defogging method and equipment thereof
CN106033597A
Real-time image processing method and device
CN106485682A
Image defogging method and device, electronic equipment and medium
CN111369472A
Plant nutrient automatic separation method and device based on image processing, and electronic equipment
CN111783946A