CN114078213A - Farmland contour detection method and device based on generation of confrontation network - Google Patents

Farmland contour detection method and device based on generation of confrontation network Download PDF

Info

Publication number
CN114078213A
CN114078213A CN202111393495.5A CN202111393495A CN114078213A CN 114078213 A CN114078213 A CN 114078213A CN 202111393495 A CN202111393495 A CN 202111393495A CN 114078213 A CN114078213 A CN 114078213A
Authority
CN
China
Prior art keywords
remote sensing
farmland
sensing image
target
detection result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111393495.5A
Other languages
Chinese (zh)
Inventor
颜秋宇
王宇翔
余永安
胡辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aerospace Hongtu Information Technology Co Ltd
Original Assignee
Aerospace Hongtu Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aerospace Hongtu Information Technology Co Ltd filed Critical Aerospace Hongtu Information Technology Co Ltd
Priority to CN202111393495.5A priority Critical patent/CN114078213A/en
Publication of CN114078213A publication Critical patent/CN114078213A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a farmland contour detection method and a farmland contour detection device based on a generation countermeasure network, which relate to the technical field of image processing and comprise the following steps: obtaining a sample remote sensing image, and labeling a target pixel in the sample remote sensing image to obtain a target remote sensing image; training a generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model; after a remote sensing image to be detected is obtained, inputting the remote sensing image to be detected into a target to generate a confrontation network model, and obtaining an initial farmland contour detection result; processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected; the target farmland contour detection result is determined based on the initial farmland contour detection result and the image boundary strength result, and the technical problems of low detection efficiency and low accuracy of the conventional farmland contour detection method are solved.

Description

Farmland contour detection method and device based on generation of confrontation network
Technical Field
The invention relates to the technical field of image processing, in particular to a farmland contour detection method and device based on a generation countermeasure network.
Background
In recent years, a deep learning network is widely applied to farmland contour detection tasks, and compared with other methods, the deep learning method can better learn and extract context features at different levels based on spatial information. However, deep learning models including full convolutional neural networks theoretically require a large number of training samples to learn a general model, and this problem may adversely affect the classification result. In the field of remote sensing, because training images have a large amount of information and rich geographic information, especially contour line information, marking all training images is neither practical nor time-consuming.
In the related patents and papers, farmland contour detection generally only uses a convolutional neural network for image segmentation, and the method needs a large number of high-quality training samples, so that the effect of the convolutional neural network is not ideal under the condition of limited samples.
No effective solution has been proposed to the above problems.
Disclosure of Invention
In view of the above, the present invention provides a farmland contour detection method and apparatus based on a generation countermeasure network, so as to alleviate the technical problems of low detection efficiency and accuracy of the existing farmland contour detection method.
In a first aspect, an embodiment of the present invention provides a farmland contour detection method based on a generation countermeasure network, including: obtaining a sample remote sensing image, and labeling a target pixel in the sample remote sensing image to obtain a target remote sensing image, wherein the target pixel is a pixel which represents a farmland contour in the sample remote sensing image; training a generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model; after a remote sensing image to be detected is obtained, inputting the remote sensing image to be detected into the target to generate a confrontation network model, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected; processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected; and determining a target farmland contour detection result based on the initial farmland contour detection result and the image boundary strength result.
Further, the generating the antagonistic network model comprises: the generator and the discriminator are used for training the generation countermeasure network model by utilizing the target remote sensing image to obtain a target generation countermeasure network model, and the generator and the discriminator comprise: a first input step of inputting the target remote sensing image into the generator to obtain edge information of the target remote sensing image; a second input step of inputting the edge information into the discriminator to obtain a sub-farmland contour detection result; calculating the antagonism loss between the generator and the discriminator based on the edge information, the sub-farmland contour detection result and a preset loss function; if the antagonistic loss does not converge in a preset range, updating the generator and the discriminator based on the antagonistic loss to obtain an intermediate generator and an intermediate discriminator, determining the intermediate generator as the generator, determining the intermediate discriminator as the discriminator, repeatedly executing the first input step, the second input step and the calculation step until the antagonistic loss converges in the preset range, and constructing the target generation antagonistic network model based on the corresponding intermediate generator and intermediate discriminator when the antagonistic loss converges in the preset range.
Further, processing the remote sensing image to be detected by using a watershed transform algorithm to obtain an image boundary intensity result of the remote sensing image to be detected, comprising: classifying pixels in the remote sensing image to be detected by using the watershed transformation algorithm to obtain a classification result; and determining the classification result as an image boundary strength result of the remote sensing image to be detected.
Further, determining a target farmland contour detection result based on the initial farmland contour detection result and the image boundary strength result, including: connecting the farmland contours in the initial farmland contour detection result to obtain a first sub-detection result; communicating the pixel points with the maximum gray value in the image boundary strength result to obtain a second sub-detection result; and determining the first sub-detection result and the second sub-detection result as the target farmland contour detection result.
In a second aspect, an embodiment of the present invention further provides a farmland contour detection apparatus based on a generation countermeasure network, including: the system comprises an acquisition unit, a training unit, an input unit, a first processing unit and a second processing unit, wherein the acquisition unit is used for acquiring a sample remote sensing image, marking a target pixel in the sample remote sensing image to obtain a target remote sensing image, and the target pixel is a pixel which is used for representing a farmland outline in the sample remote sensing image; the training unit is used for training the generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model; the input unit is used for inputting the remote sensing image to be detected into the target generation confrontation network model after the remote sensing image to be detected is obtained, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected; the first processing unit is used for processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected; and the second processing unit is used for determining a target farmland contour detection result based on the initial farmland contour detection result and the image boundary strength result.
Further, the generating the antagonistic network model comprises: a generator and a discriminator, the training unit for performing the steps of: a first input step of inputting the target remote sensing image into the generator to obtain edge information of the target remote sensing image; a second input step of inputting the edge information into the discriminator to obtain a sub-farmland contour detection result; calculating the antagonism loss between the generator and the discriminator based on the edge information, the sub-farmland contour detection result and a preset loss function; if the antagonistic loss does not converge in a preset range, updating the generator and the discriminator based on the antagonistic loss to obtain an intermediate generator and an intermediate discriminator, determining the intermediate generator as the generator, determining the intermediate discriminator as the discriminator, repeatedly executing the first input step, the second input step and the calculation step until the antagonistic loss converges in the preset range, and constructing the target generation antagonistic network model based on the corresponding intermediate generator and intermediate discriminator when the antagonistic loss converges in the preset range.
Further, the first processing unit is configured to: classifying pixels in the remote sensing image to be detected by using the watershed transformation algorithm to obtain a classification result; and determining the classification result as an image boundary strength result of the remote sensing image to be detected.
Further, the second processing unit is configured to: connecting the farmland contours in the initial farmland contour detection result to obtain a first sub-detection result; communicating the pixel points with the maximum gray value in the image boundary strength result to obtain a second sub-detection result; and determining the first sub-detection result and the second sub-detection result as the target farmland contour detection result.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, where the memory is used to store a program that supports the processor to execute the method in the first aspect, and the processor is configured to execute the program stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored.
In the embodiment of the invention, a target remote sensing image is obtained by obtaining a sample remote sensing image and marking a target pixel in the sample remote sensing image, wherein the target pixel is a pixel which is used for representing a farmland contour in the sample remote sensing image; training a generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model; after a remote sensing image to be detected is obtained, inputting the remote sensing image to be detected into the target to generate a confrontation network model, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected; processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected; based on the initial farmland contour detection result and the image boundary strength result, a target farmland contour detection result is determined, the aim of accurately and efficiently detecting the farmland contour is fulfilled, and the technical problems of low detection efficiency and low accuracy of the conventional farmland contour detection method are solved, so that the technical effects of improving the detection efficiency and accuracy of the farmland contour detection method are achieved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of a farmland contour detection method based on generation of a confrontation network according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a generator provided by an embodiment of the invention;
FIG. 3 is a diagram of an arbiter provided in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a farmland contour detection device based on a generation countermeasure network provided by an embodiment of the invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
in accordance with an embodiment of the present invention, there is provided an embodiment of a field contour detection method based on generation of a confrontation network, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a farmland contour detection method based on generation of a confrontation network according to an embodiment of the invention, as shown in fig. 1, the method comprises the following steps:
step S102, obtaining a sample remote sensing image, labeling a target pixel in the sample remote sensing image to obtain a target remote sensing image, wherein the target pixel is a pixel which is used for representing a farmland contour in the sample remote sensing image;
specifically, after a sample remote sensing image is acquired, a farmland contour is manually marked, the marking result is a binary image, a representative farmland contour pixel in the sample remote sensing image is marked as 1, and a non-contour pixel in a representative farmland region is marked as 0, so that a target remote sensing image is obtained.
Step S104, training a generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model;
step S106, after a remote sensing image to be detected is obtained, inputting the remote sensing image to be detected into the target to generate a confrontation network model, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected;
step S108, processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected;
and step S110, determining a target farmland contour detection result based on the initial farmland contour detection result and the image boundary strength result.
In the embodiment of the invention, a target remote sensing image is obtained by obtaining a sample remote sensing image and marking a target pixel in the sample remote sensing image, wherein the target pixel is a pixel which is used for representing a farmland contour in the sample remote sensing image; training a generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model; after a remote sensing image to be detected is obtained, inputting the remote sensing image to be detected into the target to generate a confrontation network model, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected; processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected; based on the initial farmland contour detection result and the image boundary strength result, a target farmland contour detection result is determined, the aim of accurately and efficiently detecting the farmland contour is fulfilled, and the technical problems of low detection efficiency and low accuracy of the conventional farmland contour detection method are solved, so that the technical effects of improving the detection efficiency and accuracy of the farmland contour detection method are achieved.
In the embodiment of the present invention, as shown in fig. 2 and 3, the generating the confrontation network model includes: a generator and a discriminator, and the step S104 includes the steps of:
a first input step of inputting the target remote sensing image into the generator to obtain edge information of the target remote sensing image;
a second input step of inputting the edge information into the discriminator to obtain a sub-farmland contour detection result;
calculating the antagonism loss between the generator and the discriminator based on the edge information, the sub-farmland contour detection result and a preset loss function;
if the antagonistic loss does not converge in a preset range, updating the generator and the discriminator based on the antagonistic loss to obtain an intermediate generator and an intermediate discriminator, determining the intermediate generator as the generator, determining the intermediate discriminator as the discriminator, repeatedly executing the first input step, the second input step and the calculation step until the antagonistic loss converges in the preset range, and constructing the target generation antagonistic network model based on the corresponding intermediate generator and intermediate discriminator when the antagonistic loss converges in the preset range.
In the embodiment of the invention, a specific generation countermeasure network structure is designed, the generator is a codec model aiming at extracting contour information from input, the discriminator is a classification neural network for calculating the loss of contour results based on the real values of samples, and a loss function is used for restricting the error between the generator and the recognizer in the training process.
The structure of the generator is shown in fig. 2, the generator (encoder-decoder model) for extracting edge information of an input image.
The encoder is a series of convolutional networks. The network consists of a convolutional layer, a pooling layer, and a BatchNormalization layer. The convolution layer is responsible for acquiring local features of the image through convolution calculation, specifically a feature matrix corresponding to a specific convolution kernel, the pooling layer samples the image and transmits the scale-invariant features to the next layer, and the Batchnormalization layer is mainly used for normalizing the distribution of the training image and accelerating learning.
The decoder performs upstream sampling on the characteristic image and then performs convolution processing on the sampled image, so as to improve the geometric shape of the object and make up for detail loss caused by shrinkage of the object by a pooling layer in the encoder.
The encoder performs downstream sampling on an input image through a max-firing layer, and the decoder performs upstream sampling on a feature map calculated by the last layer of the encoder. The convolutional layers are transposed to obtain a mapping to ensure consistency with the input size, each convolutional layer in the encoder is connected to a corresponding convolutional layer in the decoder.
The structure of the discriminator is shown in fig. 3, and the discriminator (classification neural network) is used for distinguishing the generated contour from the ground truth:
the discriminator includes a classification network to distinguish between predicted contours and ground truth, consisting of 9 convolutional layers, with a kernel of 3 x 3 and channel depth increased from 64 by a factor of 2 to 512. Each layer is followed by a batch standard layer and is activated by the ReLU. The last layer is followed by two fully connected layers, and the last layer is activated by the sigmoid function, retrieving the probability of classification.
After the generator and the arbiter are obtained, a target method and a loss function need to be designed for constraining the training process of the generator and the arbiter:
the target method is that after the training image I is input into the generator, the result is input into the discriminator to calculate the loss of the confrontation training process, and the network training is continuously and alternately updated, and the termination condition of the training process of the generator and the discriminator is that the loss function gradually converges in a certain range along with the training process of the model.
Figure BDA0003369589320000091
Where I and C represent the original input image and label, respectively, D and G represent the network of discriminators and generators for solving the problem of countermeasure minimization, GθGAnd DθDThe generator and the arbiter are shown continuously updated during the training process.
The entire loss function consists of content loss, counter loss and regularization:
Figure BDA0003369589320000092
the content loss value is a pixel-by-pixel value that computes positive and negative pixel (edge and non-edge) weights, and the classification loss is implemented using binary cross entropy.
Figure BDA0003369589320000093
Wherein C and
Figure BDA0003369589320000094
respectively representing the monitoring results of the original contour and the detected contour of the generator, and respectively representing the weights of non-edge pixels and edge pixels.
The antagonistic loss estimates the similarity between the predicted profile and the available profile information, and therefore, if the discriminator can distinguish between the predicted profile and the ground truth value, the antagonistic loss will increase continuously as can be seen from the following formula.
Figure BDA0003369589320000101
Where oc represents the weight to resistance loss, which can be modified by different data sets.
The generator and the discriminator are trained through the target remote sensing image until the antagonism loss between the generator and the discriminator is converged in a preset range, so that an object generation antagonism network model is achieved.
In the embodiment of the present invention, step S108 includes the following steps:
classifying pixels in the remote sensing image to be detected by using the watershed transformation algorithm to obtain a classification result;
and determining the classification result as an image boundary strength result of the remote sensing image to be detected.
In the embodiment of the invention, firstly, all pixels in the remote sensing image to be detected are classified according to the gray value, and a distance threshold value is set.
And determining the pixel point with the minimum gray value (the default mark is the lowest point of the value), and increasing the distance threshold from the minimum value by taking the pixel point with the minimum gray value as a starting point.
In the process of growth, if the distance from the neighborhood pixels around the pixel point with the minimum gray value to the starting point (the lowest gray value) is smaller than a set threshold, the pixels are set to be of the same type, otherwise, new types are set on the pixels, and therefore the classification of the neighborhood pixels is completed.
With the classification, more new classes are set until all the regions meet on the watershed line until the maximum gray value is reached, so that the whole remote sensing image to be detected is classified to obtain a classification result, and the classification result is determined as an image boundary intensity result of the remote sensing image to be detected.
Compared with the traditional boundary detection method, the segmentation result of the confrontation network to-be-detected remote sensing image is generated by combining watershed transformation, the recognition result of the confrontation network is optimized, and the usability and the final recognition precision of the result are improved.
In the embodiment of the present invention, step S110 includes the following steps:
connecting the farmland contours in the initial farmland contour detection result to obtain a first sub-detection result;
communicating the pixel points with the maximum gray value in the image boundary strength result to obtain a second sub-detection result;
and determining the first sub-detection result and the second sub-detection result as the target farmland contour detection result.
In the embodiment of the invention, the initial farmland contour detection results are connected, the pixel with the maximum value of the image boundary intensity gray scale is used as a boundary pixel for communication, and finally, the target farmland contour detection result is output.
Example two:
the embodiment of the invention also provides a farmland contour detection device based on the generation countermeasure network, which is used for executing the farmland contour detection method based on the generation countermeasure network provided by the embodiment of the invention.
As shown in fig. 4, fig. 4 is a schematic diagram of the farmland contour detection device based on the generation of the countermeasure network, and the farmland contour detection device based on the generation of the countermeasure network comprises: an acquisition unit 10, a training unit 20, an input unit 30, a first processing unit 40 and a second processing unit 50.
The acquisition unit is used for acquiring a sample remote sensing image, labeling a target pixel in the sample remote sensing image to obtain a target remote sensing image, wherein the target pixel is a pixel which represents a farmland contour in the sample remote sensing image;
the training unit is used for training the generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model;
the input unit is used for inputting the remote sensing image to be detected into the target generation confrontation network model after the remote sensing image to be detected is obtained, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected;
the first processing unit is used for processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected;
and the second processing unit is used for determining a target farmland contour detection result based on the initial farmland contour detection result and the image boundary strength result.
In the embodiment of the invention, a target remote sensing image is obtained by obtaining a sample remote sensing image and marking a target pixel in the sample remote sensing image, wherein the target pixel is a pixel which is used for representing a farmland contour in the sample remote sensing image; training a generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model; after a remote sensing image to be detected is obtained, inputting the remote sensing image to be detected into the target to generate a confrontation network model, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected; processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected; based on the initial farmland contour detection result and the image boundary strength result, a target farmland contour detection result is determined, the aim of accurately and efficiently detecting the farmland contour is fulfilled, and the technical problems of low detection efficiency and low accuracy of the conventional farmland contour detection method are solved, so that the technical effects of improving the detection efficiency and accuracy of the farmland contour detection method are achieved.
Further, the generating the antagonistic network model comprises: a generator and a discriminator, the training unit for performing the steps of: a first input step of inputting the target remote sensing image into the generator to obtain edge information of the target remote sensing image; a second input step of inputting the edge information into the discriminator to obtain a sub-farmland contour detection result; calculating the antagonism loss between the generator and the discriminator based on the edge information, the sub-farmland contour detection result and a preset loss function; if the antagonistic loss does not converge in a preset range, updating the generator and the discriminator based on the antagonistic loss to obtain an intermediate generator and an intermediate discriminator, determining the intermediate generator as the generator, determining the intermediate discriminator as the discriminator, repeatedly executing the first input step, the second input step and the calculation step until the antagonistic loss converges in the preset range, and constructing the target generation antagonistic network model based on the corresponding intermediate generator and intermediate discriminator when the antagonistic loss converges in the preset range.
Further, the first processing unit is configured to: classifying pixels in the remote sensing image to be detected by using the watershed transformation algorithm to obtain a classification result; and determining the classification result as an image boundary strength result of the remote sensing image to be detected.
Further, the second processing unit is configured to: connecting the farmland contours in the initial farmland contour detection result to obtain a first sub-detection result; communicating the pixel points with the maximum gray value in the image boundary strength result to obtain a second sub-detection result; and determining the first sub-detection result and the second sub-detection result as the target farmland contour detection result.
Example three:
an embodiment of the present invention further provides an electronic device, including a memory and a processor, where the memory is used to store a program that supports the processor to execute the method described in the first embodiment, and the processor is configured to execute the program stored in the memory.
Referring to fig. 5, an embodiment of the present invention further provides an electronic device 100, including: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected through the bus 62; the processor 60 is arranged to execute executable modules, such as computer programs, stored in the memory 61.
The Memory 61 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 62 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The memory 61 is used for storing a program, the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 60, or implemented by the processor 60.
The processor 60 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 60. The Processor 60 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 61, and the processor 60 reads the information in the memory 61 and, in combination with its hardware, performs the steps of the above method.
Example four:
the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the method in the first embodiment.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A farmland contour detection method based on a generation countermeasure network is characterized by comprising the following steps:
obtaining a sample remote sensing image, and labeling a target pixel in the sample remote sensing image to obtain a target remote sensing image, wherein the target pixel is a pixel which represents a farmland contour in the sample remote sensing image;
training a generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model;
after a remote sensing image to be detected is obtained, inputting the remote sensing image to be detected into the target to generate a confrontation network model, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected;
processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected;
and determining a target farmland contour detection result based on the initial farmland contour detection result and the image boundary strength result.
2. The method of claim 1, wherein generating the antagonistic network model comprises: the generator and the discriminator are used for training the generation countermeasure network model by utilizing the target remote sensing image to obtain a target generation countermeasure network model, and the generator and the discriminator comprise:
a first input step of inputting the target remote sensing image into the generator to obtain edge information of the target remote sensing image;
a second input step of inputting the edge information into the discriminator to obtain a sub-farmland contour detection result;
calculating the antagonism loss between the generator and the discriminator based on the edge information, the sub-farmland contour detection result and a preset loss function;
if the antagonistic loss does not converge in a preset range, updating the generator and the discriminator based on the antagonistic loss to obtain an intermediate generator and an intermediate discriminator, determining the intermediate generator as the generator, determining the intermediate discriminator as the discriminator, repeatedly executing the first input step, the second input step and the calculation step until the antagonistic loss converges in the preset range, and constructing the target generation antagonistic network model based on the corresponding intermediate generator and intermediate discriminator when the antagonistic loss converges in the preset range.
3. The method according to claim 1, wherein the processing the remote sensing image to be detected by using a watershed transform algorithm to obtain an image boundary intensity result of the remote sensing image to be detected comprises:
classifying pixels in the remote sensing image to be detected by using the watershed transformation algorithm to obtain a classification result;
and determining the classification result as an image boundary strength result of the remote sensing image to be detected.
4. The method of claim 1, wherein determining a target field contour detection result based on the initial field contour detection result and the image boundary strength result comprises:
connecting the farmland contours in the initial farmland contour detection result to obtain a first sub-detection result;
communicating the pixel points with the maximum gray value in the image boundary strength result to obtain a second sub-detection result;
and determining the first sub-detection result and the second sub-detection result as the target farmland contour detection result.
5. A farmland contour detection device based on a generation countermeasure network is characterized by comprising: an acquisition unit, a training unit, an input unit, a first processing unit and a second processing unit, wherein,
the acquisition unit is used for acquiring a sample remote sensing image, labeling a target pixel in the sample remote sensing image to obtain a target remote sensing image, wherein the target pixel is a pixel which represents a farmland contour in the sample remote sensing image;
the training unit is used for training the generation countermeasure network model by using the target remote sensing image to obtain a target generation countermeasure network model;
the input unit is used for inputting the remote sensing image to be detected into the target generation confrontation network model after the remote sensing image to be detected is obtained, and obtaining an initial farmland contour detection result, wherein the initial farmland contour detection result is used for distinguishing a farmland contour and a ground true phase in the remote sensing image to be detected;
the first processing unit is used for processing the remote sensing image to be detected by using a watershed transformation algorithm to obtain an image boundary intensity result of the remote sensing image to be detected;
and the second processing unit is used for determining a target farmland contour detection result based on the initial farmland contour detection result and the image boundary strength result.
6. The apparatus of claim 5, wherein the generating the antagonistic network model comprises: a generator and a discriminator, the training unit for performing the steps of:
a first input step of inputting the target remote sensing image into the generator to obtain edge information of the target remote sensing image;
a second input step of inputting the edge information into the discriminator to obtain a sub-farmland contour detection result;
calculating the antagonism loss between the generator and the discriminator based on the edge information, the sub-farmland contour detection result and a preset loss function;
if the antagonistic loss does not converge in a preset range, updating the generator and the discriminator based on the antagonistic loss to obtain an intermediate generator and an intermediate discriminator, determining the intermediate generator as the generator, determining the intermediate discriminator as the discriminator, repeatedly executing the first input step, the second input step and the calculation step until the antagonistic loss converges in the preset range, and constructing the target generation antagonistic network model based on the corresponding intermediate generator and intermediate discriminator when the antagonistic loss converges in the preset range.
7. The apparatus of claim 5, wherein the first processing unit is configured to:
classifying pixels in the remote sensing image to be detected by using the watershed transformation algorithm to obtain a classification result;
and determining the classification result as an image boundary strength result of the remote sensing image to be detected.
8. The apparatus of claim 5, wherein the second processing unit is configured to:
connecting the farmland contours in the initial farmland contour detection result to obtain a first sub-detection result;
communicating the pixel points with the maximum gray value in the image boundary strength result to obtain a second sub-detection result;
and determining the first sub-detection result and the second sub-detection result as the target farmland contour detection result.
9. An electronic device comprising a memory for storing a program that enables a processor to perform the method of any of claims 1 to 4 and a processor configured to execute the program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of the claims 1 to 4.
CN202111393495.5A 2021-11-23 2021-11-23 Farmland contour detection method and device based on generation of confrontation network Pending CN114078213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111393495.5A CN114078213A (en) 2021-11-23 2021-11-23 Farmland contour detection method and device based on generation of confrontation network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111393495.5A CN114078213A (en) 2021-11-23 2021-11-23 Farmland contour detection method and device based on generation of confrontation network

Publications (1)

Publication Number Publication Date
CN114078213A true CN114078213A (en) 2022-02-22

Family

ID=80284056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111393495.5A Pending CN114078213A (en) 2021-11-23 2021-11-23 Farmland contour detection method and device based on generation of confrontation network

Country Status (1)

Country Link
CN (1) CN114078213A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115205692A (en) * 2022-09-16 2022-10-18 成都戎星科技有限公司 Typical feature intelligent identification and extraction method based on generation of countermeasure network
CN115272667A (en) * 2022-06-24 2022-11-01 中科星睿科技(北京)有限公司 Farmland image segmentation model training method and device, electronic equipment and medium
CN115860975A (en) * 2023-02-15 2023-03-28 南京航天宏图信息技术有限公司 Salt lake lithium ore project productivity monitoring method and device based on satellite remote sensing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115272667A (en) * 2022-06-24 2022-11-01 中科星睿科技(北京)有限公司 Farmland image segmentation model training method and device, electronic equipment and medium
CN115272667B (en) * 2022-06-24 2023-08-29 中科星睿科技(北京)有限公司 Farmland image segmentation model training method and device, electronic equipment and medium
CN115205692A (en) * 2022-09-16 2022-10-18 成都戎星科技有限公司 Typical feature intelligent identification and extraction method based on generation of countermeasure network
CN115860975A (en) * 2023-02-15 2023-03-28 南京航天宏图信息技术有限公司 Salt lake lithium ore project productivity monitoring method and device based on satellite remote sensing

Similar Documents

Publication Publication Date Title
CN114078213A (en) Farmland contour detection method and device based on generation of confrontation network
CN109815770B (en) Two-dimensional code detection method, device and system
CN110781756A (en) Urban road extraction method and device based on remote sensing image
CN109740606B (en) Image identification method and device
CN109522908A (en) Image significance detection method based on area label fusion
CN112001374B (en) Cloud detection method and device for hyperspectral image
CN107871316B (en) Automatic X-ray film hand bone interest area extraction method based on deep neural network
CN114972191A (en) Method and device for detecting farmland change
CN113095418B (en) Target detection method and system
CN111242925B (en) Target detection method and device for CT image data and electronic equipment
CN110689060B (en) Heterogeneous image matching method based on aggregation feature difference learning network
CN112669323A (en) Image processing method and related equipment
CN114022774A (en) Radar image-based marine mesoscale vortex monitoring method and device
CN114240940B (en) Cloud and cloud shadow detection method and device based on remote sensing image
CN110659637A (en) Electric energy meter number and label automatic identification method combining deep neural network and SIFT features
CN115526801A (en) Automatic color homogenizing method and device for remote sensing image based on conditional antagonistic neural network
CN116030237A (en) Industrial defect detection method and device, electronic equipment and storage medium
CN115861823A (en) Remote sensing change detection method and device based on self-supervision deep learning
CN113392455A (en) House type graph scale detection method and device based on deep learning and electronic equipment
CN112784494A (en) Training method of false positive recognition model, target recognition method and device
US20230386023A1 (en) Method for detecting medical images, electronic device, and storage medium
CN113537158B (en) Image target detection method, device, equipment and storage medium
CN110852300A (en) Ground feature classification method, map drawing device and electronic equipment
CN115439864A (en) Water meter reading identification method and system, computer equipment and storage medium
CN113255667A (en) Text image similarity evaluation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination