Method, device and equipment for identifying crop planting areas along transmission lines
By training the crop planting area identification model, combined with optical remote sensing and synthetic aperture radar images, the crop planting areas along the transmission lines are identified, which solves the problems of low identification efficiency and high cost caused by unreasonable transmission line design, and achieves accurate and fast identification results.
Patent Information
- Application Number
- CN202410512436.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-04-26
AI Technical Summary
Unreasonable design of transmission lines results in low identification efficiency, high cost, and lack of intelligent identification methods.
By obtaining sample images of crop planting areas, the initial crop planting area recognition model is trained, and the distribution position of the transmission lines is combined to identify whether there are crop planting areas in the images along the transmission lines, using the feature extraction and attention mechanism of optical remote sensing images and synthetic aperture radar images. , achieving accurate and rapid identification.
It improves the efficiency and accuracy of identifying whether transmission lines encroach on basic farmland, and reduces the identification cost.
Smart Images

Figure CN118115883B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing technology, and in particular to a method, device and equipment for identifying crop planting areas along a power transmission line. Background Art
[0002] Transmission towers and transmission lines are important power infrastructure. However, in rural areas, there are cases of unreasonable transmission line design, mainly manifested in the construction of transmission towers encroaching on basic farmland. At present, there is no intelligent way to identify unreasonable transmission lines, which makes the identification of unreasonable transmission line design low-efficiency and high-cost. Summary of the invention
[0003] In view of this, the present invention provides a method, device and equipment for identifying crop planting areas along a transmission line, which can solve the technical problems of low identification efficiency and high cost due to unreasonable transmission line design.
[0004] According to a first aspect of the present invention, a method for identifying crop planting areas along a power transmission line is provided, the method comprising:
[0005] Acquire sample images including crop-growing areas;
[0006] Training an initial crop planting area recognition model according to the sample images to obtain a trained crop planting area recognition model;
[0007] Acquire images along the transmission lines within a preset range based on the distribution positions of the transmission lines, and identify whether the images along the transmission lines include crop planting areas according to the crop planting area recognition model; if so, determine that the transmission lines in the images along the transmission lines encroach on basic farmland.
[0008] Preferably, before training the initial crop planting area recognition model according to the sample image, the method further comprises:
[0009] Constructing n+1 encoding modules for extracting features and n decoding modules for fusing features that are connected in sequence, wherein the last encoding module includes a convolution layer and a linear correction unit, and the non-last encoding module includes a convolution layer, a linear correction unit, and a maximum pooling layer, so as to gradually increase the number of feature channels through each encoding module, and each decoding module includes a convolution layer and a linear correction unit, so as to gradually reduce the number of feature channels through each decoding module, and the i-th encoding module corresponds to the n+1-i-th decoding module;
[0010] Constructing a jump connection module corresponding to each decoding module one by one, wherein each jump connection module includes an attention mechanism node and a connection layer, the jump connection module corresponding to any decoding module is located between any decoding module and the upper layer module of any decoding module, the jump connection module corresponding to any decoding module is used to fuse the upper layer module output data of the upper layer module with the encoding module output data corresponding to any decoding module, and then input them into any decoding module, the attention mechanism node is used to perform attention calculation on the upper layer module output data and the encoding module output data corresponding to any decoding module, and fuse the calculation result with the encoding module output data, and the connection layer is used to transfer the fusion result of the attention mechanism node to any decoding module;
[0011] Based on the encoding module, the decoding module and the jump connection module, an initial crop planting area recognition model is obtained.
[0012] Preferably, the attention mechanism node is specifically used to convert the output data of the previous layer module and the output data of the encoding module corresponding to any decoding module into the same size and then add them together, perform activation function and resampling operations on the added data to obtain an attention coefficient; and calculate the product of the attention coefficient and the output data of the encoding module.
[0013] Preferably, the sample images include optical remote sensing images at different phases and synthetic aperture radar images at different phases, and the initial crop planting area recognition model is trained according to the sample images, including:
[0014] Performing corresponding image preprocessing on the optical remote sensing image and the synthetic aperture radar image;
[0015] Image coordinate registration is performed on the optical remote sensing images after image preprocessing and the synthetic aperture radar images after image preprocessing of the same phase;
[0016] Marking the actual types of crop planting areas in the optical remote sensing images that have been registered and the synthetic aperture radar images that have been registered, and obtaining the corresponding optical remote sensing images and synthetic aperture radar images to be trained;
[0017] The optical remote sensing image to be trained and the synthetic aperture radar image to be trained are used to train an initial crop planting area recognition model.
[0018] Preferably, the using the optical remote sensing image to be trained and the synthetic aperture radar image to be trained to train the initial crop planting area recognition model to obtain the trained crop planting area recognition model includes:
[0019] Respectively extracting the spectral reflection features of the optical remote sensing images to be trained at different phases, and the polarization scattering features of the synthetic aperture radar images to be trained at different phases, and determining the training input data according to the spectral reflection features and the polarization scattering features;
[0020] Inputting the training input data into the initial crop planting area identification model to determine the predicted type of crop planting area;
[0021] A loss function is calculated based on the actual types of the crop planting areas and the predicted types of the crop planting areas, and the parameters of the initial crop planting area recognition model are adjusted until the loss function converges to obtain a trained crop planting area recognition model.
[0022] Preferably, the acquisition of images along the transmission lines within a preset range based on the distribution positions of the transmission lines includes:
[0023] Acquire images along the transmission line within a preset range based on the distribution position of the transmission line, wherein the images along the transmission line include optical remote sensing images along the transmission line and synthetic aperture radar images along the transmission line.
[0024] Preferably, the identifying whether the image along the power transmission line includes a crop planting area according to the crop planting area identification model comprises:
[0025] Performing corresponding image preprocessing on the optical remote sensing images along the transmission line and the synthetic aperture radar images along the transmission line;
[0026] Perform image coordinate registration on the optical remote sensing images along the transmission line after image preprocessing and the synthetic aperture radar images along the transmission line after image preprocessing in the same phase;
[0027] Extract features from the registered optical remote sensing image along the transmission line and the registered synthetic aperture radar image along the transmission line to obtain spectral reflection features to be identified and polarization scattering features to be identified, respectively, and generate features to be identified based on the spectral reflection features to be identified and the polarization scattering features to be identified, and input them into the crop planting area identification model to determine the type of target crop planting area;
[0028] Determine whether the image along the power transmission line includes a crop planting area according to the type of the target crop planting area.
[0029] According to a second aspect of the present invention, a device for identifying crop planting areas along a power transmission line is provided, the device comprising:
[0030] An acquisition module, used for acquiring sample images including crop planting areas;
[0031] A training module, used for training an initial crop planting area recognition model according to the sample image to obtain a trained crop planting area recognition model;
[0032] The identification module is used to obtain images along the transmission lines within a preset range based on the distribution positions of the transmission lines, and to identify whether the images along the transmission lines include crop planting areas according to the crop planting area identification model. If so, it is determined that the transmission lines in the images along the transmission lines encroach on basic farmland.
[0033] According to the third aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method for identifying crop planting areas along the transmission line is implemented.
[0034] According to the fourth aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned method for identifying crop planting areas along a transmission line when executing the program.
[0035] By means of the above technical scheme, the present invention provides a method, device and equipment for identifying crop planting areas along a transmission line. The present invention can first obtain a sample image including a crop planting area; then train an initial crop planting area recognition model based on the sample image to obtain a trained crop planting area recognition model; finally, obtain an image along the transmission line within a preset range based on the distribution position of the transmission line, and identify whether the image along the transmission line includes a crop planting area according to the crop planting area recognition model. If so, it is determined that the transmission line in the image along the transmission line encroaches on basic farmland. By means of the technical scheme of the present invention, the crop planting area can be accurately and quickly identified using the trained crop planting area recognition model. Since the determination of whether the transmission line encroaches on basic farmland is based on the combination of the distribution position of the transmission line and the crop planting area, the efficiency and accuracy of determining whether the transmission line encroaches on basic farmland, that is, whether the design of the transmission line is reasonable, is improved.
[0036] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation on the local application. In the drawings:
[0038] Figure 1 A schematic diagram of a process for identifying crop planting areas along a power transmission line provided by an embodiment of the present invention is shown;
[0039] Figure 2 A schematic flow chart of another method for identifying crop planting areas along a power transmission line provided by an embodiment of the present invention is shown;
[0040] Figure 3 A schematic diagram showing the structure of a device for identifying crop planting areas along a power transmission line provided by an embodiment of the present invention is shown;
[0041] Figure 4 A schematic diagram showing the structure of another device for identifying crop planting areas along a power transmission line provided by an embodiment of the present invention;
[0042] Figure 5 A structural example diagram of an initial crop planting area identification model provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0043] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0044] This embodiment provides a method for identifying crop planting areas along a transmission line. Figure 1 As shown, the method includes:
[0045] 101. Obtain sample images including crop-growing areas.
[0046] For this embodiment, as an implementation method, a plurality of sample images including crop planting areas in different geographical regions may be acquired, wherein the crop planting areas included in the sample images may be a variety of crops.
[0047] 102. Train an initial crop planting area recognition model according to the sample image to obtain a trained crop planting area recognition model.
[0048] For this embodiment, as an implementation method, before training the initial crop planting area recognition model based on the sample image, it is necessary to mark the range of the crop planting area in the sample image, input the marked sample image into the initial crop planting area recognition model, and use the initial crop planting area recognition model to predict the range of the crop planting area in the sample image, calculate the loss function based on the predicted crop planting area range and the marked crop planting area range, adjust the model parameters of the initial crop planting area recognition model until the loss function converges, and obtain the trained crop planting area recognition model, wherein the initial crop planting area recognition model can be constructed based on the u-net model, and the trained crop planting area recognition model can be used to identify the range of the crop planting area in the image to be identified.
[0049] 103. Obtain images along the transmission lines within a preset range based on the distribution positions of the transmission lines, and identify whether the images along the transmission lines include crop planting areas according to the crop planting area identification model; if so, determine that the transmission lines in the images along the transmission lines encroach on basic farmland.
[0050] For this embodiment, if the image along the transmission line includes a crop planting area, then the transmission line in the image along the transmission line encroaches on basic farmland. Therefore, the image along the transmission line is used as the image to be identified, and the crop planting area recognition model identifies the crop planting area therein. Since the crop planting area recognition model has high accuracy and efficiency in identifying the crop planting area in the image, it can quickly and accurately identify whether the image along the transmission line includes a crop planting area, thereby making the identification efficiency and accuracy of whether the transmission line encroaches on basic farmland, that is, whether the transmission line design is reasonable, high.
[0051] The present invention provides a method, device and equipment for identifying crop planting areas along a transmission line. The present invention can first obtain a sample image including a crop planting area; then train an initial crop planting area identification model based on the sample image to obtain a trained crop planting area identification model; finally, obtain an image along the transmission line within a preset range based on the distribution position of the transmission line, and identify whether the image along the transmission line includes a crop planting area according to the crop planting area identification model. If so, it is determined that the transmission line in the image along the transmission line occupies basic farmland. Through the technical solution of the present invention, the crop planting area can be accurately and quickly identified using the trained crop planting area identification model. Since whether the transmission line occupies basic farmland is determined based on the combination of the distribution position of the transmission line and the crop planting area, the efficiency and accuracy of determining whether the transmission line occupies basic farmland, that is, whether the design of the transmission line is reasonable, is improved.
[0052] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for identifying crop planting areas along the transmission line is provided, such as Figure 2 As shown, the method includes:
[0053] 201. Acquire sample images including a crop planting area, wherein the sample images include optical remote sensing images at different phases and synthetic aperture radar images at different phases.
[0054] It should be noted that in the prior art, sample images are obtained based on a sensor, such as optical remote sensing or synthetic aperture radar. However, optical remote sensing images obtained based on optical remote sensing are subject to cloudy and rainy weather conditions. For example, cloud cover will seriously affect the quality and availability of the image, and night observations cannot be carried out, limiting the accuracy and availability of monitoring. Synthetic aperture radar images obtained based on synthetic aperture radar have a longer wavelength and can penetrate clouds for surface monitoring. Therefore, they have the advantages of not being affected by weather and being able to form images during the day and at night. However, synthetic aperture radar images have problems such as severe speckle noise, complex imaging mechanism, and poor expression of surface features. Therefore, for this embodiment, in order to overcome the problem that the feature information of the images acquired by a single sensor itself is not rich and accurate enough, resulting in the problem that the trained recognition model is not accurate enough, the sample images are obtained based on two sensors, such as optical remote sensing and synthetic aperture radar, so that high-resolution spectral reflection features can be extracted from the optical remote sensing images, and polarization scattering features that are not affected by weather and day and night can be extracted from the synthetic aperture radar images, thereby improving the reliability and accuracy of the data under complex environmental conditions, so that the initial crop planting area recognition model can learn richer and more accurate features, thereby improving the recognition efficiency and accuracy of the crop planting area recognition model.
[0055] It should be noted that most existing studies use single-phase images to train models and perform crop identification, but single-phase data often cannot fully reflect the entire growth cycle and change trend of crops. For example, single-phase images often have the same object with different spectra (the same substance has different spectral reflectance characteristics under different conditions) and the same spectrum with different objects (different substances have the same spectral reflectance characteristics under the same conditions), which may lead to incomplete information or even misjudgment. Therefore, for this embodiment, the sample images are acquired at different phases, so that the initial crop planting area identification model can learn different feature information from different phases of crops (i.e., learn different spectral reflectance characteristics from optical remote sensing images of different phases, and learn different polarization scattering characteristics from synthetic aperture radar images of different phases), thereby improving the recognition efficiency and accuracy of the crop planting area identification model. As an implementation method, the phases can be divided according to the crop growth cycle, such as four different phases of spring, summer, autumn and winter, which are not limited here.
[0056] In summary, for this embodiment, the acquired sample images include optical remote sensing images at different phases and synthetic aperture radar images at different phases.
[0057] 202. Perform corresponding image preprocessing on the optical remote sensing image and the synthetic aperture radar image, perform image coordinate registration on the preprocessed optical remote sensing image and the preprocessed synthetic aperture radar image of the same phase, mark the real types of crop planting areas in the registered optical remote sensing image and the registered synthetic aperture radar image, and obtain the corresponding optical remote sensing image to be trained and the synthetic aperture radar image to be trained.
[0058] Wherein, the optical remote sensing image and the synthetic aperture radar image are subjected to corresponding image preprocessing, including: performing image preprocessing such as radiation calibration, atmospheric correction, orthorectification, etc. on the optical remote sensing image; performing image preprocessing such as orbit correction, radiation calibration, multi-view processing, terrain correction, etc. on the synthetic aperture radar image.
[0059] Among them, the image coordinate registration is performed on the optical remote sensing image after image preprocessing and the synthetic aperture radar image after image preprocessing in the same phase in order to achieve the unification of the corresponding pixel coordinate information of the two.
[0060] Among them, the planting areas of rice, wheat, soybeans, corn, etc. are selected from the registered images through visual interpretation, and labels a, b, c, d, etc. are assigned to each category of the above crops.
[0061] 203. Train an initial crop planting area recognition model using the optical remote sensing image to be trained and the synthetic aperture radar image to be trained to obtain a trained crop planting area recognition model.
[0062] For this embodiment, before training the initial crop planting area recognition model, it is necessary to construct an initial crop recognition model. As an implementation method, sequentially connected n+1 encoding modules for extracting features and n decoding modules for fusing features are constructed, wherein the last encoding module includes a convolutional layer and a linear correction unit, and the non-last encoding module includes a convolutional layer, a linear correction unit and a maximum pooling layer, so as to gradually increase the number of feature channels (i.e., downsampling) through each encoding module, and each decoding module includes a convolutional layer and a linear correction unit, so as to gradually reduce the number of feature channels (i.e., upsampling) through each decoding module, and the i-th encoding module corresponds to the n+1-i-th decoding module; a jump connection module corresponding to each decoding module is constructed, wherein each jump connection module includes an attention layer. The attention mechanism node and the connection layer, the jump connection module corresponding to any decoding module is located between any decoding module and the upper layer module of any decoding module, the jump connection module corresponding to any decoding module is used to fuse the upper layer module output data of the upper layer module with the encoding module output data corresponding to any decoding module and input them into any decoding module, the attention mechanism node is used to perform attention calculation on the upper layer module output data and the encoding module output data corresponding to any decoding module, and fuse the calculation result with the encoding module output data, the connection layer is used to pass the fusion result of the attention mechanism node to any decoding module; based on the encoding module, the decoding module and the jump connection module, the initial crop planting area recognition model is obtained. Figure 5 As shown, taking n=2 as an example.
[0063] The attention mechanism node is specifically used to convert the output data of the upper layer module and the output data of the encoding module corresponding to any decoding module into the same size and then add them, perform activation function and resampling operations on the added data to obtain the attention coefficient; calculate the product of the attention coefficient and the output data of the encoding module. Through the attention mechanism node, the output data of the encoding module is screened to enhance the ability to focus on salient areas and extract features.
[0064] For this embodiment, as an implementation method, the optical remote sensing image to be trained and the synthetic aperture radar image to be trained are used to train an initial crop planting area recognition model to obtain a trained crop planting area recognition model, including: extracting the spectral reflection characteristics of the optical remote sensing image to be trained at different phases and the polarization scattering characteristics of the synthetic aperture radar image to be trained at different phases, respectively, and determining the training input data according to the spectral reflection characteristics and the polarization scattering characteristics; inputting the training input data into the initial crop planting area recognition model to determine the predicted type of the crop planting area; calculating the loss function according to the actual type of the crop planting area and the predicted type of the crop planting area, adjusting the parameters of the initial crop planting area recognition model until the loss function converges, and obtaining the trained crop planting area recognition model.
[0065] Among them, as an implementation method, for determining training input data according to the spectral reflection characteristics and the polarization scattering characteristics; inputting the training input data into the initial crop planting area identification model to determine the predicted type of the crop planting area; calculating the loss function according to the actual type of the crop planting area and the predicted type of the crop planting area, adjusting the parameters of the initial crop planting area identification model until the loss function converges, and obtaining the trained crop planting area identification model includes: using the spectral reflection characteristics and the polarization scattering characteristics as training input data, and inputting them into the initial crop planting area identification model. In the area recognition model, the initial crop planting area recognition model is trained successively according to the spectral reflectance characteristics corresponding to each optical remote sensing image, and the initial crop planting area recognition model is trained successively according to the polarization scattering characteristics corresponding to each synthetic aperture radar image. After each preset number of trainings, the predicted type of the crop planting area is determined once, and the loss function is calculated according to the actual type of the crop planting area and the predicted type of the crop planting area. If the loss function has not converged, the parameters of the initial crop planting area recognition model are adjusted, and the training is continued until the loss function converges to obtain a trained crop planting area recognition model.
[0066] 204. Obtain images along the transmission lines within a preset range based on the distribution locations of the transmission lines.
[0067] For this embodiment, as an implementation method, the distribution location of the transmission line can be the vector distribution data of the transmission tower and the transmission line, based on which a buffer zone of a preset range (the preset range is, for example, 500m) is generated, and the image where the vector distribution data is located is obtained based on optical remote sensing technology, and the buffer zone is used to clip it to obtain an image along the transmission line within the preset range based on the distribution location of the transmission line, and this image along the transmission line is an optical remote sensing image along the transmission line. The image where the vector distribution data is located is obtained based on synthetic aperture radar technology, and the buffer zone is used to clip it to obtain an image along the transmission line within the preset range based on the distribution location of the transmission line, and this image along the transmission line is a synthetic aperture radar image along the transmission line.
[0068] 205. According to the crop planting area identification model, identify whether the image along the transmission line includes a crop planting area, and if so, determine that the transmission line in the image along the transmission line encroaches on basic farmland.
[0069] For this embodiment, the method of identifying whether the image along the transmission line includes a crop planting area according to the crop planting area identification model includes: performing corresponding image preprocessing on the optical remote sensing image along the transmission line and the synthetic aperture radar image along the transmission line; performing image coordinate registration on the optical remote sensing image along the transmission line after image preprocessing and the synthetic aperture radar image along the transmission line after image preprocessing in the same phase; performing feature extraction on the registered optical remote sensing image along the transmission line and the registered synthetic aperture radar image along the transmission line to obtain spectral reflection features to be identified and polarization scattering features to be identified, respectively, and generating features to be identified based on the spectral reflection features to be identified and the polarization scattering features to be identified and inputting them into the crop planting area identification model to determine the type of target crop planting area; and determining whether the image along the transmission line includes a crop planting area according to the type of target crop planting area.
[0070] The features to be identified may be spectral reflection features to be identified and polarization scattering features to be identified.
[0071] Since the images along the transmission lines are composed of pixel points, if the scope and type of crop planting areas in the images along the transmission lines can be identified, then the images along the transmission lines include crop planting areas, which means that the transmission lines encroach on basic farmland and the transmission lines are not designed reasonably.
[0072] The present invention provides a method, device and equipment for identifying crop planting areas along a transmission line. The present invention can first obtain a sample image including a crop planting area; then train an initial crop planting area identification model based on the sample image to obtain a trained crop planting area identification model; finally, obtain an image along the transmission line within a preset range based on the distribution position of the transmission line, and identify whether the image along the transmission line includes a crop planting area according to the crop planting area identification model. If so, it is determined that the transmission line in the image along the transmission line occupies basic farmland. Through the technical solution of the present invention, the crop planting area can be accurately and quickly identified using the trained crop planting area identification model. Since whether the transmission line occupies basic farmland is determined based on the combination of the distribution position of the transmission line and the crop planting area, the efficiency and accuracy of determining whether the transmission line occupies basic farmland, that is, whether the design of the transmission line is reasonable, is improved.
[0073] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in the figure, the embodiment of the present invention provides a device for identifying crop planting areas along a transmission line, such as Figure 3 As shown, the device includes: an acquisition module 31, a training module 32, and a recognition module 33;
[0074] An acquisition module 31 is used to acquire sample images including crop planting areas;
[0075] A training module 32, used for training an initial crop planting area recognition model according to the sample image to obtain a trained crop planting area recognition model;
[0076] The identification module 33 is used to obtain images along the transmission lines within a preset range based on the distribution positions of the transmission lines, and to identify whether the images along the transmission lines include crop planting areas according to the crop planting area identification model. If so, it is determined that the transmission lines in the images along the transmission lines encroach on basic farmland.
[0077] In specific application scenarios, such as Figure 4As shown, a device for identifying crop planting areas along a power transmission line, the device also includes: a construction module 34, which can be specifically used to construct n+1 encoding modules for extracting features and n decoding modules for fusing features, which are connected in sequence, wherein the last encoding module includes a convolution layer and a linear correction unit, and the non-last encoding module includes a convolution layer, a linear correction unit and a maximum pooling layer, so as to gradually increase the number of feature channels through each encoding module, and each decoding module includes a convolution layer and a linear correction unit, so as to gradually reduce the number of feature channels through each decoding module, and the i-th encoding module corresponds to the n+1-i-th decoding module; construct a jump connection module corresponding to each decoding module one by one, wherein each jump connection module includes an attention mechanism node and a connection layer , the jump connection module corresponding to any decoding module is located between any decoding module and the upper layer module of any decoding module, the jump connection module corresponding to any decoding module is used to fuse the upper layer module output data of the upper layer module with the encoding module output data corresponding to any decoding module and input them into any decoding module, the attention mechanism node is used to perform attention calculation on the upper layer module output data and the encoding module output data corresponding to any decoding module, and fuse the calculation result with the encoding module output data, and the connection layer is used to transfer the fusion result of the attention mechanism node to any decoding module; based on the encoding module, the decoding module and the jump connection module, an initial crop planting area recognition model is obtained.
[0078] Correspondingly, the construction module 34 can also be used for the attention mechanism node to convert the output data of the previous layer module and the output data of the encoding module corresponding to any decoding module into the same size and then add them, perform activation function and resampling operations on the added data to obtain the attention coefficient; calculate the product of the attention coefficient and the output data of the encoding module.
[0079] Correspondingly, the sample images include optical remote sensing images of different phases and synthetic aperture radar images of different phases. In order to train the initial crop planting area recognition model according to the sample images, the training module 32 can be specifically used to perform corresponding image preprocessing on the optical remote sensing images and the synthetic aperture radar images; perform image coordinate registration on the optical remote sensing images after image preprocessing and the synthetic aperture radar images after image preprocessing of the same phase; mark the real types of crop planting areas in the registered optical remote sensing images and the registered synthetic aperture radar images, and obtain the corresponding optical remote sensing images to be trained and the synthetic aperture radar images to be trained; and use the optical remote sensing images to be trained and the synthetic aperture radar images to be trained to train the initial crop planting area recognition model.
[0080] Accordingly, in order to use the optical remote sensing image to be trained and the synthetic aperture radar image to be trained to train the initial crop planting area identification model and obtain a trained crop planting area identification model, the training module 32 can also be used to extract the spectral reflection characteristics of the optical remote sensing image to be trained at different phases and the polarization scattering characteristics of the synthetic aperture radar image to be trained at different phases, respectively, and determine the training input data according to the spectral reflection characteristics and the polarization scattering characteristics; input the training input data into the initial crop planting area identification model to determine the predicted type of the crop planting area; calculate the loss function according to the actual type of the crop planting area and the predicted type of the crop planting area, adjust the parameters of the initial crop planting area identification model until the loss function converges, and obtain the trained crop planting area identification model.
[0081] Correspondingly, in order to obtain images along the transmission line within a preset range based on the distribution position of the transmission line, the identification module 33 can be specifically used to obtain images along the transmission line within a preset range based on the distribution position of the transmission line, wherein the images along the transmission line include optical remote sensing images along the transmission line and synthetic aperture radar images along the transmission line.
[0082] Correspondingly, in order to identify whether the image along the transmission line includes a crop planting area according to the crop planting area identification model, the identification module 33 can also be used to perform corresponding image preprocessing on the optical remote sensing image along the transmission line and the synthetic aperture radar image along the transmission line; perform image coordinate registration on the optical remote sensing image along the transmission line after image preprocessing and the synthetic aperture radar image along the transmission line after image preprocessing in the same phase; perform feature extraction on the registered optical remote sensing image along the transmission line and the registered synthetic aperture radar image along the transmission line to obtain spectral reflection features to be identified and polarization scattering features to be identified, respectively; generate features to be identified based on the spectral reflection features to be identified and the polarization scattering features to be identified and input them into the crop planting area identification model to determine the type of target crop planting area; determine whether the image along the transmission line includes a crop planting area according to the type of target crop planting area.
[0083] It should be noted that for other corresponding descriptions of the functional units involved in the device for identifying crop planting areas along a transmission line provided in this embodiment, reference can be made to Figure 1 to Figure 2 The corresponding description will not be repeated here.
[0084] Based on the above Figure 1 to Figure 2The method shown in the embodiment, accordingly, also provides a storage medium, which can be volatile or non-volatile, and stores a computer program, which is executed by a processor to implement the above-mentioned Figure 1 to Figure 2 The method for identifying crop planting areas along transmission lines is shown.
[0085] Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various implementation scenarios of the present invention.
[0086] Based on the above Figure 1 to Figure 2 The method shown and Figure 3 , Figure 4 In order to achieve the above-mentioned purpose, the present embodiment further provides a computer device, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 to Figure 2 The method for identifying crop planting areas along transmission lines is shown.
[0087] Optionally, the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0088] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0089] The storage medium may also include an operating network communication module. The operating is a program that manages the hardware and software resources of the above-mentioned computer device, supporting the operation of the information processing program and other software and / or programs. The network communication module is used to communicate between the components inside the storage medium, and to communicate with other hardware and software in the information processing entity device.
[0090] Through the description of the above implementation modes, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform, or by hardware.
[0091] The present invention provides a method, device and equipment for identifying crop planting areas along a transmission line. The present invention can first obtain a sample image including a crop planting area; then train an initial crop planting area identification model based on the sample image to obtain a trained crop planting area identification model; finally, obtain an image along the transmission line within a preset range based on the distribution position of the transmission line, and identify whether the image along the transmission line includes a crop planting area according to the crop planting area identification model. If so, it is determined that the transmission line in the image along the transmission line occupies basic farmland. Through the technical solution of the present invention, the crop planting area can be accurately and quickly identified using the trained crop planting area identification model. Since whether the transmission line occupies basic farmland is determined based on the combination of the distribution position of the transmission line and the crop planting area, the efficiency and accuracy of determining whether the transmission line occupies basic farmland, that is, whether the design of the transmission line is reasonable, is improved.
[0092] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present invention. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple modules.
[0093] The above serial numbers of the present invention are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present invention, but the present invention is not limited thereto, and any changes that can be thought of by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A method for identifying crop planting areas along a power transmission line, characterized in that: The method comprises: Acquire sample images including crop-growing areas; Training an initial crop planting area recognition model according to the sample images to obtain a trained crop planting area recognition model; Acquire an image along the transmission line within a preset range based on the distribution position of the transmission line, and identify whether the image along the transmission line includes a crop planting area according to the crop planting area recognition model, and if so, determine that the transmission line in the image along the transmission line encroaches on basic farmland; Before training the initial crop planting area recognition model according to the sample image, the method further includes: constructing n+1 encoding modules for extracting features and n decoding modules for fusing features, which are connected in sequence, wherein the last encoding module includes a convolution layer and a linear correction unit, and the non-last encoding module includes a convolution layer, a linear correction unit and a maximum pooling layer, so as to gradually increase the number of feature channels through each encoding module, and each decoding module includes a convolution layer and a linear correction unit, so as to gradually reduce the number of feature channels through each decoding module, and the i-th encoding module corresponds to the n+1-i-th decoding module; Constructing a jump connection module corresponding to each decoding module one by one, wherein each jump connection module includes an attention mechanism node and a connection layer, the jump connection module corresponding to any decoding module is located between any decoding module and the upper layer module of any decoding module, the jump connection module corresponding to any decoding module is used to fuse the upper layer module output data of the upper layer module with the encoding module output data corresponding to any decoding module, and then input them into any decoding module, the attention mechanism node is used to perform attention calculation on the upper layer module output data and the encoding module output data corresponding to any decoding module, and fuse the calculation result with the encoding module output data, and the connection layer is used to transfer the fusion result of the attention mechanism node to any decoding module; Based on the encoding module, the decoding module and the jump connection module, an initial crop planting area recognition model is obtained.
2. The method according to claim 1, characterized in that The attention mechanism node is specifically used to convert the output data of the upper layer module and the output data of the encoding module corresponding to any decoding module into the same size and then add them, perform activation function and resampling operations on the added data, and obtain an attention coefficient; Calculate the product of the attention coefficient and the output data of the encoding module.
3. The method according to any one of claims 1 to 2, characterized in that The sample images include optical remote sensing images at different phases and synthetic aperture radar images at different phases. The initial crop planting area recognition model is trained according to the sample images, including: Performing corresponding image preprocessing on the optical remote sensing image and the synthetic aperture radar image; Image coordinate registration is performed on the optical remote sensing images after image preprocessing and the synthetic aperture radar images after image preprocessing of the same phase; Marking the actual types of crop planting areas in the optical remote sensing images that have been registered and the synthetic aperture radar images that have been registered, and obtaining the corresponding optical remote sensing images and synthetic aperture radar images to be trained; The optical remote sensing image to be trained and the synthetic aperture radar image to be trained are used to train an initial crop planting area recognition model.
4. The method according to claim 3, characterized in that: The method of training the initial crop planting area recognition model by using the optical remote sensing image to be trained and the synthetic aperture radar image to be trained to obtain the trained crop planting area recognition model includes: Respectively extracting the spectral reflection features of the optical remote sensing images to be trained at different phases, and the polarization scattering features of the synthetic aperture radar images to be trained at different phases, and determining the training input data according to the spectral reflection features and the polarization scattering features; Inputting the training input data into the initial crop planting area identification model to determine the predicted type of crop planting area; A loss function is calculated based on the actual types of the crop planting areas and the predicted types of the crop planting areas, and the parameters of the initial crop planting area recognition model are adjusted until the loss function converges to obtain a trained crop planting area recognition model.
5. The method according to claim 3, characterized in that: The acquisition of images along the transmission lines within a preset range based on the distribution positions of the transmission lines includes: Acquire images along the transmission line within a preset range based on the distribution position of the transmission line, wherein the images along the transmission line include optical remote sensing images along the transmission line and synthetic aperture radar images along the transmission line.
6. The method according to claim 5, characterized in that The step of identifying whether the image along the power transmission line includes a crop planting area according to the crop planting area identification model comprises: Performing corresponding image preprocessing on the optical remote sensing images along the transmission line and the synthetic aperture radar images along the transmission line; Perform image coordinate registration on the optical remote sensing images along the transmission line after image preprocessing and the synthetic aperture radar images along the transmission line after image preprocessing in the same phase; Extract features from the registered optical remote sensing image along the transmission line and the registered synthetic aperture radar image along the transmission line to obtain spectral reflection features to be identified and polarization scattering features to be identified, respectively, and generate features to be identified based on the spectral reflection features to be identified and the polarization scattering features to be identified, and input them into the crop planting area identification model to determine the type of target crop planting area; Determine whether the image along the power transmission line includes a crop planting area according to the type of the target crop planting area.
7. A device for identifying crop planting areas along a power transmission line, characterized in that: The device comprises: An acquisition module, used for acquiring sample images including crop planting areas; A training module, used for training an initial crop planting area recognition model according to the sample image to obtain a trained crop planting area recognition model; an identification module, for obtaining an image along the transmission line within a preset range based on the distribution position of the transmission line, and identifying whether the image along the transmission line includes a crop planting area according to the crop planting area identification model, and if so, determining that the transmission line in the image along the transmission line encroaches on basic farmland; The device further includes: a construction module, the construction module is used to construct n+1 encoding modules for extracting features and n decoding modules for fusing features, which are connected in sequence, wherein the last encoding module includes a convolution layer and a linear correction unit, and the non-last encoding module includes a convolution layer, a linear correction unit and a maximum pooling layer, so that the number of feature channels is gradually increased through each encoding module, and each decoding module includes a convolution layer and a linear correction unit, so that the number of feature channels is gradually reduced through each decoding module, and the i-th encoding module corresponds to the n+1-i-th decoding module; Constructing a jump connection module corresponding to each decoding module one by one, wherein each jump connection module includes an attention mechanism node and a connection layer, the jump connection module corresponding to any decoding module is located between any decoding module and the upper layer module of any decoding module, the jump connection module corresponding to any decoding module is used to fuse the upper layer module output data of the upper layer module with the encoding module output data corresponding to any decoding module, and then input them into any decoding module, the attention mechanism node is used to perform attention calculation on the upper layer module output data and the encoding module output data corresponding to any decoding module, and fuse the calculation result with the encoding module output data, and the connection layer is used to transfer the fusion result of the attention mechanism node to any decoding module; Based on the encoding module, the decoding module and the jump connection module, an initial crop planting area recognition model is obtained.
8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying crop planting areas along a transmission line as described in any one of claims 1 to 6 is implemented.
9. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method for identifying crop planting areas along a transmission line as described in any one of claims 1 to 6 is implemented.
