Digital Orchard Tree Positioning Methods, Devices, Equipment and Media

By updating the Mask R-CNN model to Swin-Transformer and combining it with a Hybrid Task Cascade detector, and utilizing UAV remote sensing images and GPS, the problem of obtaining fruit tree location information was solved, enabling high-efficiency tree location and management, and improving the accuracy and efficiency of orchard management.

CN117292278BActive Publication Date: 2026-03-17SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional orchard management suffers from difficulties in obtaining fruit tree location information, unclear information, and high costs of positioning devices, resulting in extensive and inefficient management.

Method used

The Mask R-CNN model was updated to a Swin-Transformer network and a Hybrid Task Cascade detector was embedded. Combined with the Global Positioning System, fruit tree segmentation and localization were performed using UAV remote sensing images, and the location of the fruit trees was determined using a matching algorithm.

Benefits of technology

It achieves high-precision, low-cost fruit tree positioning, provides high-resolution canopy information, improves the accuracy and efficiency of orchard management, and provides technical support for the development of smart orchards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117292278B_ABST
    Figure CN117292278B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, device, and medium for locating fruit trees in a digital orchard. The method includes: updating the backbone network of a Mask R-CNN model to a Swin-Transformer network and embedding a Hybrid Task Cascade detector into the Mask R-CNN model to construct a fruit tree image instance segmentation model; inputting remote sensing images of litchi trees into the trained fruit tree image instance segmentation model for instance segmentation, determining the fruit tree segmentation result; identifying the litchi tree remote sensing images of the segmented fruit trees based on a fruit tree recognition model, determining the number of litchi trees and their pixel coordinates in the litchi tree remote sensing images; determining the GPS coordinates of the fruit trees based on a digital topographic map; and matching the number of litchi trees and their pixel coordinates in the litchi tree remote sensing images with the GPS coordinates of the litchi trees in the orchard digital topographic map based on a matching algorithm to determine the location of the litchi trees. This application saves costs and eliminates the need for installing a positioning device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of agricultural production, and in particular to a digital orchard tree positioning method, corresponding device, electronic equipment and computer-readable storage medium. Background Technology

[0002] Lychee orchards are complex ecosystems, influenced by a multitude of factors affecting tree growth, including ecological environment, weather, topography, soil, pests and diseases, and cultivation techniques. Traditional orchard management relies heavily on experience, with human factors dominating, resulting in extensive and inefficient management. Traditional orchards rarely utilize information technology tools for precision management and do not collect necessary growth data to understand tree development. To increase yields, traditional orchards often employ improved varieties, enhanced soil fertility, and strengthened traditional pest and disease control, consuming significant human and agricultural resources, yet yields and lychee quality remain uncertain. The traditional orchard model can no longer meet the demands of modern orchard development; upgrading traditional orchards to smart orchards is essential. The fruit industry plays a vital role in my country's rural economic development, but the overall level of orchard production management still lags behind international advanced levels, especially in digital, information-based, and intelligent management technologies. Therefore, it is necessary to systematically summarize the progress made in digital orchard research, further clarify future development directions, and provide technical support for the development of information-based and intelligent orchards.

[0003] In recent years, with the development of deep learning technology, UAV remote sensing and computer vision technologies have been widely applied in agricultural production. Researchers are using remote sensing images to segment fruit trees. For example, traditional machine learning methods, such as the watershed algorithm and seed region growth algorithm, are used to segment fruit trees. Semantic segmentation methods, such as UNet, are used to separate fruit trees from the background. However, research on digital orchard maps is still relatively limited, and progress towards this goal is slow, with some problems that need further resolution. For example, due to issues such as feature matching errors and improper edge processing, trees in the stitched images are generally blurry, significantly affecting the subsequent extraction of relevant information from the tree canopy. Extracting canopy information from the original image, which does not contain the location information of the fruit trees, and installing positioning devices on each tree, is extremely costly.

[0004] In summary, due to issues such as feature matching errors and improper edge processing, the trees in the stitched images are generally blurry, which greatly affects the subsequent extraction of relevant information from the tree canopy. Furthermore, obtaining canopy information from the original image is problematic because the original image does not contain the location information of the fruit trees, and installing positioning devices on each tree would be extremely costly. Therefore, the applicant has explored solutions to these problems. Summary of the Invention

[0005] The purpose of this application is to solve the above-mentioned problems by providing a digital orchard tree positioning method, corresponding device, electronic device and computer-readable storage medium.

[0006] To achieve the various objectives of this application, the following technical solution is adopted:

[0007] A digital orchard tree positioning method proposed for one of the purposes of this application includes the following steps:

[0008] In response to the orchard tree positioning command, acquire remote sensing images of the lychee trees corresponding to each lychee tree in the orchard;

[0009] The backbone network in the Mask R-CNN model was updated to a Swing-Transformer network, and the Hybrid Task Cascade detector of the hybrid task cascade architecture was embedded into the Mask R-CNN model to construct an instance segmentation model for fruit tree images.

[0010] The remote sensing image of the litchi tree corresponding to the litchi tree is input into the trained fruit tree image instance segmentation model for instance segmentation, and the fruit tree segmentation result is determined. Based on the preset fruit tree recognition model, the remote sensing image of the litchi tree corresponding to the fruit tree segmentation result is identified, and the number of litchi trees and pixel coordinates in the remote sensing image of the litchi tree are determined.

[0011] Construct a digital topographic map of the orchard, and determine the corresponding GPS coordinates of each fruit tree based on the digital topographic map;

[0012] Based on a preset matching algorithm, the number of litchi trees and their pixel coordinates in the remote sensing image of litchi trees are matched with the GPS coordinates of each litchi tree in the digital topographic map of the orchard to determine the corresponding location of the litchi trees, thereby completing the location of litchi trees in the digital orchard.

[0013] Optionally, the steps for training the fruit tree image instance segmentation model include the following steps:

[0014] The litchi tree portion in the remote sensing image of the litchi tree and its corresponding image number are labeled to determine the training set and validation set of the fruit tree image instance segmentation model.

[0015] The fruit tree image instance segmentation model is backpropagated iteratively trained based on the training set and validation set, so that in each backpropagation iteration, the target loss function is calculated based on the error between the predicted bounding box result obtained by inputting the labeled litchi fruit tree remote sensing image corresponding to the fruit tree into the fruit tree image instance segmentation model and the actual labeled result.

[0016] The model parameters are updated according to the target loss function until the change in the target loss function is less than a preset threshold or the number of training iterations is greater than a preset number. Then, the model parameters are saved and the training of the fruit tree image instance segmentation model is completed.

[0017] Optionally, the step of inputting the remote sensing image of the litchi tree corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation and determining the fruit tree segmentation result includes the following steps:

[0018] The Swin-Transformer network in the fruit tree image instance segmentation model divides the input remote sensing image of the litchi fruit tree corresponding to the litchi fruit tree into several small blocks of equal size, and embeds each small block to determine the feature representation within each small block.

[0019] A multi-layered translation window is used to perform self-attention calculation on each small block in order to exchange information about the features of adjacent small blocks;

[0020] Feature extraction is performed based on multi-layer translation window self-attention and MLP layer, while multi-scale feature fusion is performed on the output of each block;

[0021] Features at multiple scales are processed using a feature pyramid operation, and global pooling and linear layers are used for classification output.

[0022] Optionally, the step of inputting the remote sensing image of the litchi tree corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation and determining the fruit tree segmentation result includes the following steps:

[0023] The Hybrid Task Cascade detector in the fruit tree image instance segmentation model uses a Swin-Transformer network as the backbone network to extract features from the input remote sensing image of the litchi fruit tree corresponding to the litchi fruit tree.

[0024] Anchor points are used to extract candidate target regions from the remote sensing image of litchi trees. The candidate target regions are then processed by a multi-level detection and segmentation head to detect and segment the target regions.

[0025] For each target region, perform bounding box regression and instance segmentation mask prediction;

[0026] The overlapping candidate target regions are deduplicated to determine the fruit tree segmentation result.

[0027] Optionally, the step of constructing a digital topographic map of the orchard and determining the corresponding GPS coordinates of each fruit tree based on the digital topographic map includes the following steps:

[0028] Construct a digital topographic map of the orchard and determine the GPS information and elevation information corresponding to each fruit tree in the digital topographic map of the orchard;

[0029] The digital topographic map of the orchard is divided into blocks, and a fruit tree recognition model is used to identify the sub-blocks of the digital topographic map to determine the identification results of the sub-blocks;

[0030] The data of the digital topographic map sub-block recognition results are stitched together to determine the corresponding pixel coordinates of each fruit tree in the orchard;

[0031] Convert the pixel coordinates of the fruit trees into the corresponding GPS coordinates for each fruit tree.

[0032] Optionally, the step of matching the number of litchi trees and their pixel coordinates in the remote sensing image of litchi trees with the GPS coordinates of each litchi tree in the orchard digital topographic map based on a preset matching algorithm to determine the corresponding location of the litchi trees includes the following steps:

[0033] Calculate the pixel distance from the pixel coordinates of the litchi tree in the remote sensing image of the litchi tree to the pixel distance of the point in the remote sensing image of the litchi tree, and sort them from near to far.

[0034] The pixel distance is converted into a GPS coordinate distance to determine the GPS coordinates of the same number of fruit trees in the remote sensing image of lychee fruit trees.

[0035] Based on the semi-sine function, the GPS coordinates are compared and filtered using vector angles to match the GPS coordinates of the litchi trees, thereby determining the corresponding position of the litchi trees in the digital orchard.

[0036] Optionally, the step of matching the number of litchi trees and their pixel coordinates in the remote sensing image of litchi trees with the GPS coordinates of each litchi tree in the orchard digital topographic map based on a preset matching algorithm to determine the corresponding location of the litchi trees includes the following steps:

[0037] In response to pesticide spraying instructions, the number of litchi trees and their pixel coordinates in the remote sensing image of litchi trees are matched with the GPS coordinates of each litchi tree in the digital topographic map of the orchard based on the semi-sine function to determine the corresponding location of the litchi tree.

[0038] Pesticides were sprayed on each litchi tree in the orchard according to its corresponding location to prevent pests from infesting the litchi trees.

[0039] A digital orchard tree positioning device provided for another purpose of this application includes:

[0040] The image acquisition module is configured to respond to orchard tree positioning commands and acquire remote sensing images of the corresponding litchi trees in the orchard.

[0041] The segmentation model construction module is configured to update the backbone network in the Mask R-CNN model to a Swin-Transformer network and embed the Hybrid Task Cascade detector of the hybrid task cascade architecture into the Mask R-CNN model to construct a fruit tree image instance segmentation model.

[0042] The pixel coordinate determination module is configured to input the remote sensing image of the litchi tree corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation, determine the fruit tree segmentation result, identify the remote sensing image of the litchi tree corresponding to the fruit tree segmentation result based on the preset fruit tree recognition model, and determine the number of litchi trees and their pixel coordinates in the remote sensing image of the litchi tree.

[0043] The global positioning coordinate determination module is configured to construct a digital topographic map of the orchard and determine the corresponding global positioning system coordinates of each fruit tree based on the digital topographic map.

[0044] The fruit tree positioning module is configured to match the number of litchi trees and their pixel coordinates in the litchi tree remote sensing image with the GPS coordinates of each litchi tree in the digital topographic map of the orchard based on a preset matching algorithm, so as to determine the corresponding position of the litchi tree and complete the positioning of litchi trees in the digital orchard.

[0045] An electronic device provided for another purpose of this application includes a central processing unit and a memory, the central processing unit being configured to invoke and run a computer program stored in the memory to perform the steps of the digital orchard tree positioning method of this application.

[0046] A computer-readable storage medium is provided for another purpose of this application, which stores, in the form of computer-readable instructions, a computer program implemented according to the digital orchard tree positioning method, which, when invoked by a computer, executes the steps included in the corresponding method.

[0047] Compared to existing technologies, this application addresses the problems of blurred trees in stitched images due to issues such as feature matching errors and improper edge processing, which significantly impacts the extraction of relevant information from the tree canopy; and the high cost of solutions that involve obtaining canopy information from the original image but not including the tree's location information, and installing positioning devices on each tree. This application offers the following advantages, including but not limited to:

[0048] Firstly, the matching algorithm proposed in this application matches fruit trees by acquiring GPS information from maps and UAV images, eliminating the need for a positioning device and saving costs.

[0049] Secondly, the Swin-CMN model proposed in this application has superior performance in litchi tree canopy segmentation, and has better performance indicators and segmentation results compared with other networks.

[0050] Thirdly, the digital orchard tree positioning method proposed in this application maps high-resolution canopy information from drone-captured images onto a map, providing high-resolution, accurate canopy information for litchi trees and greatly assisting subsequent processing. This method boasts high accuracy and repeatability, solving the problems of extensive and inefficient traditional orchard management, and providing effective technical support for the development of smart orchards. Attached Figure Description

[0051] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0052] Figure 1 This is a flowchart illustrating the implementation of the digital orchard tree positioning method in this application embodiment;

[0053] Figure 2 This is a flowchart illustrating the digital orchard tree positioning method in an embodiment of this application.

[0054] Figure 3 This is a network structure diagram of the Swin-CMN model in the embodiments of this application;

[0055] Figure 4 This is the recognition result of instance segmentation of the lychee remote sensing image in the embodiments of this application;

[0056] Figure 5 This is the recognition result of the orchard map in the embodiments of this application;

[0057] Figure 6 This is a diagram illustrating the implementation effect of determining the location of lychee trees based on a preset matching algorithm in an embodiment of this application.

[0058] Figure 7 This is a visualization of the digital map system in the embodiments of this application;

[0059] Figure 8 This is a schematic diagram of the digital orchard tree positioning device in the embodiments of this application;

[0060] Figure 9 This is a schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation

[0061] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0062] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0063] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0064] Those skilled in the art will understand that the terms "client," "terminal," and "terminal device" as used herein include both devices that receive wireless signals, devices that only possess wireless signal receiver capabilities without transmission capabilities, and devices with receiving and transmitting hardware, devices that have receiving and transmitting hardware capable of bidirectional communication over a bidirectional communication link. Such devices may include: cellular or other communication devices such as personal computers or tablets, having single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service) that can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant) that may include a radio frequency receiver, pager, internet / intranet access, web browser, notepad, calendar, and / or GPS (Global Positioning System) receiver; and conventional laptops and / or handheld computers or other devices that have and / or include radio frequency receivers. As used herein, "client," "terminal," and "terminal device" can be portable, transportable, installed in a means of transportation (air, sea, and / or land), or suitable and / or configured to operate locally and / or in a distributed manner, operating in any other location on Earth and / or in space. "Client," "terminal," and "terminal device" as used herein can also be a communication terminal, an internet access terminal, or a music / video playback terminal, such as a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a smart TV, set-top box, etc.

[0065] The hardware referred to by the names "server," "client," and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann architecture, such as a central processing unit (including an arithmetic logic unit and a control unit), memory, input devices, and output devices. The computer program is stored in its memory, and the central processing unit loads the program stored in the secondary storage into the main memory to run it, execute the instructions in the program, and interact with the input and output devices to complete specific functions.

[0066] It should be noted that the concept of "server" used in this application can also be extended to the case of server clusters. Based on the network deployment principles understood by those skilled in the art, the servers should be logically divided. Physically, these servers can be independent of each other but accessible through interfaces, or they can be integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method in this application.

[0067] One or more of the technical features of this application, unless explicitly specified herein, can be deployed on a server and accessed by a client remotely calling the online service interface provided by the server, or can be directly deployed and run on a client for access.

[0068] Unless otherwise specified, the neural network models referenced or potentially referenced in this application may be deployed on a remote server and invoked remotely on the client, or deployed on a client with the capability to invoke directly. In some embodiments, when running on the client, the corresponding intelligence may be acquired through transfer learning in order to reduce the requirements on the client's hardware resources and avoid excessive consumption of the client's hardware resources.

[0069] Unless otherwise specified, all data involved in this application may be stored remotely on a server or on a local terminal device, as long as it is suitable for use by the technical solution of this application.

[0070] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.

[0071] Unless otherwise expressly stated, the various embodiments disclosed in this application can be combined in a cross-cutting manner to flexibly construct new embodiments, as long as such combination does not depart from the inventive spirit of this application and can meet the needs of the prior art or solve a certain deficiency in the prior art. Those skilled in the art should be aware of such modifications.

[0072] Based on the above exemplary scenarios, please refer to Figure 1 as well as Figure 2 The digital orchard tree positioning method of this application, in one embodiment, includes the following steps:

[0073] Step S10: Respond to the orchard tree positioning command and obtain remote sensing images of the lychee trees corresponding to each lychee tree in the orchard;

[0074] The terminal device can respond to the orchard tree positioning command and acquire remote sensing images of the lychee trees corresponding to each lychee tree in the orchard. The acquisition of the lychee tree remote sensing images can be done using a DJI Phantom 4 RTK drone, which takes pictures of the lychee orchard at heights of 20m, 30m, and 50m, respectively, with a forward overlap of 80% and a lateral overlap of 60%. The lychee tree varieties photographed include Nuomici, Guiwei, and Xianjinfeng, etc.

[0075] In some embodiments, the original images are filtered to remove blurry, overexposed, or other invalid images. The images taken by the drone are imported into 3D modeling software to generate orthophotos. The orthophotos are then randomly cropped to sizes of 1024*1024 and 512*512, resulting in 800 images. Data enhancement techniques such as sharpening and blurring are applied to the original data, resulting in 4000 images. This increases the amount of training data, improves the model's generalization ability, and adds noisy data to enhance the model's robustness. Labellme can be used for data annotation, and the dataset is converted into a COCO format dataset.

[0076] Step S20: Update the backbone network in the Mask R-CNN model to a Swin-Transformer network, and embed the Hybrid Task Cascade detector of the hybrid task cascade architecture into the Mask R-CNN model to construct a fruit tree image instance segmentation model.

[0077] Please see Figure 3The backbone network of the Mask R-CNN model is updated to a Swin-Transformer network, and the Hybrid Task Cascade detector is embedded into the Mask R-CNN model to construct an instance segmentation model for fruit tree images. This model performs instance segmentation on the remote sensing images of lychee trees, embedding a Swin Transformer network as the backbone network. The input image (H×W×3) is divided into a non-overlapping set of patches using patch partitioning, where each patch is 4×4 in size. Therefore, the feature dimension of each patch is 4×4×3=48, and the number of patch blocks is H / 4×W / 4. Stage 1 first uses a linear embedding to transform the feature dimension of the partitioned patches into C, and then feeds them into the Swin Transformer Block for W-MSA and SW-MSA processing respectively. The operations for stages 2-4 are the same. First, a patch merging process is used to merge adjacent patches in a 2x2 pattern, which increases the number of patch blocks to H / 8×W / 8 and the feature dimension to 4C. Linear embedding is used to compress the 4C to 2C. Then, a fully connected layer is used to double the channel dimension, and the input is fed into the Swing Transformer Block for W-MSA and SW-MSA processing.

[0078] The main idea of ​​the Hybrid Task Cascade detector is to introduce a cascaded structure on top of Faster R-CNN, while utilizing multi-task learning to improve detection performance. The output of the RPN is concatenated with the feature map of the first layer, and then the feature maps of the second to fourth layers are sequentially concatenated with the feature map of the first layer, resulting in a cascaded feature pyramid. Based on the fused features, bounding box generation and classification are performed on each pyramid layer, using multi-task learning with two tasks: bounding box generation and class classification.

[0079] In some embodiments, an FBLoss loss function L is proposed based on the edge features of the litchi tree. FB The calculation method is as follows:

[0080] L FB =λ FL L FL +λ SM L SM +λ B L B

[0081] Among them, L FLThe focus loss function is calculated using the following formula:

[0082] L FL =-(1-p t ) γ log(p t )

[0083]

[0084] (1-p t ) γ It is an adjustment factor, and γ≥0 is an adjustable focusing parameter.

[0085] L SM The smoothing loss function is calculated using the following formula:

[0086]

[0087] x represents the numerical difference between the predicted bounding box and the ground truth bounding box.

[0088] L B The boundary loss function is calculated using the following formula:

[0089] L B =∫ Ω ΦG(q)s θ (q)dq

[0090]

[0091] ΦG is the level set representation of the boundary, s θ D represents the softmax probability output of the segmentation network. G It is a distance graph relative to the boundary.

[0092] In some embodiments, the litchi canopy training image dataset is divided into a training set, a test set, and a validation set. Hyperparameters such as the initial learning rate and training epochs are set to train the Swin-CMN model. After training, the inference weight file and segmentation model performance metrics of the Swin-CMN model are obtained.

[0093] Preferably, the dataset is divided into training, testing, and validation sets in an 8:1:1 ratio. The initial learning rate is set to 0.02, the gradient descent method to be SGD, the learning rate strategy to be warmup, the number of epochs (training rounds) to be 200, and the batch size to be 8. Training is performed on an RTX3090, and the model weight file is obtained after training.

[0094] Furthermore, model performance metrics can be obtained using the following steps, selecting the mean average precision (mAP) as the metric to evaluate the accuracy of the trained model. mAP (Mean Average Precision) is an evaluation metric obtained by arithmetically averaging the average precision across multiple object categories, used to assess the overall performance of the object detection algorithm. Typically, mAP values ​​are between 0 and 1; higher values ​​indicate better object detection performance. In image segmentation, curves can be plotted for each category based on precision (P) and recall (R), and the area under the curve (AUC) can be used to calculate the AP value. The calculation methods for multiple metrics are as follows:

[0095]

[0096]

[0097]

[0098] Where TP represents the number of samples that the model predicted as positive and which were actually positive; FP represents the number of samples that the model predicted as positive but were actually negative; FN represents the number of samples that were actually positive but the model predicted as negative; P is accuracy, which refers to the percentage of samples that were predicted as positive by the model and were actually positive; R is recall, which refers to the percentage of samples that were actually positive and were correctly predicted as positive by the model. High accuracy indicates a high percentage of actually positive samples among the predicted positive samples, indicating strong model recognition ability; high recall indicates a high percentage of actually positive samples that were correctly identified as positive by the model, indicating strong model coverage ability.

[0099] Step S30: Input the remote sensing image of the litchi tree corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation, determine the fruit tree segmentation result, identify the remote sensing image of the litchi tree corresponding to the fruit tree segmentation result based on the preset fruit tree recognition model, and determine the number of litchi trees and pixel coordinates in the remote sensing image of the litchi tree.

[0100] Before inputting the remote sensing image of the litchi tree corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation, the fruit tree image instance segmentation model is trained. The litchi tree portion in the remote sensing image of the litchi tree corresponding to the litchi tree and its corresponding image number are labeled to determine the training set and validation set of the fruit tree image instance segmentation model. Backpropagation iterative training is performed on the fruit tree image instance segmentation model based on the training set and validation set. In each backpropagation iteration, the error between the predicted bounding box result obtained from the labeled remote sensing image of the litchi tree corresponding to the litchi tree and the actual labeled result is calculated to obtain the target loss function. The model parameters are updated according to the target loss function until the change in the target loss function is less than a preset threshold or the number of training iterations is greater than a preset number. The model parameters are then saved, and the training of the fruit tree image instance segmentation model is completed.

[0101] Please see Figure 4 After training the fruit tree image instance segmentation model, the remote sensing image of the litchi fruit tree corresponding to the litchi fruit tree is input into the trained fruit tree image instance segmentation model for instance segmentation, the fruit tree segmentation result is determined, and the remote sensing image of the litchi fruit tree corresponding to the fruit tree segmentation result is identified based on the preset fruit tree recognition model, and the number of litchi fruit trees and their pixel coordinates in the remote sensing image of the litchi fruit tree are determined.

[0102] Step S40: Construct a digital topographic map of the orchard, and determine the corresponding GPS coordinates of each fruit tree based on the digital topographic map;

[0103] Please see Figure 5 A digital topographic map of the orchard is constructed, and the GPS coordinates and elevation information of each fruit tree in the digital topographic map are determined. The digital topographic map of the orchard is divided into blocks, and a fruit tree recognition model is used to identify the sub-blocks of the digital topographic map to determine the identification results of the sub-blocks. The identification results of the sub-blocks of the digital topographic map are stitched together to determine the pixel coordinates of each fruit tree in the orchard. The pixel coordinates of the fruit trees are converted into GPS coordinates of each fruit tree, and the GPS coordinate data of all litchi fruit trees in the orchard are stored.

[0104] Step S50: Based on a preset matching algorithm, the number of litchi trees and their pixel coordinates in the litchi tree remote sensing image are matched with the GPS coordinates of each litchi tree in the digital topographic map of the orchard to determine the corresponding location of the litchi tree, thereby completing the positioning of the litchi trees in the digital orchard.

[0105] Please see Figure 6The pixel distance from the pixel coordinates of the litchi trees in the remote sensing image to the pixel distance of a point in the image is calculated and sorted from near to far. The pixel distance is converted into a GPS coordinate distance, and GPS coordinates with the same number of trees in the remote sensing image are determined. The GPS coordinates are compared and filtered using vector angles based on the semi-sine function to match the GPS coordinates of the litchi trees, thus determining the corresponding position of the litchi trees in the digital orchard.

[0106] Specifically, the distances between the GPS coordinates of the midpoint of the litchi tree remote sensing image and the GPS coordinates of all the fruit trees in the orchard can be calculated based on the half-sine function (Haversine formula). These distances are then sorted from smallest to largest. The distances from the pixel coordinates of the fruit trees in the remote sensing image to the pixel coordinates of the midpoint of the image are then calculated and interchanged with the GPS coordinates. This process yields the GPS information of the fruit trees in the litchi tree remote sensing image.

[0107] Based on the vector relationship between the fruit trees in the remote sensing image of litchi trees and the fruit trees in the overall orchard, the angle between the fruit trees in two cases is calculated to improve the accuracy of fruit tree pairing. The specific steps of the matching algorithm are as follows:

[0108] For remote sensing images of litchi trees, n trees are identified. When n is less than or equal to 1, the GPS of the matched trees in the entire orchard is used directly. When n is greater than 1, the distances of the k-th tree and the (k+1)-th tree from the midpoint of the image are compared. If the distance is greater than 1 meter, the original pairing scheme is maintained (1... <k<=n)。

[0109] When the distance is less than 1 meter, we construct a vector triangle with the first fruit tree, the midpoint of the image, and the kth fruit tree, compare their pixel vector angles with the GPS vector angles, and calculate the difference p.

[0110] Construct a triangle using the first fruit tree, the midpoint of the image, and the (k+1)th fruit tree. Compare the GPS vector angle with the pixel vector angle of the kth fruit tree in step B2 and calculate the difference p1.

[0111] The calculation formula is as follows:

[0112]

[0113]

[0114] Among them, a, b, and c are the opposite sides of the pixel triangle formed by the point, the first fruit tree, and the k-th fruit tree in the image, respectively; a1, b, and c are the opposite sides of the pixel triangle formed by the point, the first fruit tree, and the (k + 1)-th fruit tree in the image, respectively; x, y, and z are the opposite sides of the GPS triangle formed by the point, the first fruit tree, and the k-th fruit tree in the image, respectively, and x1, y1, and z1 are the opposite sides of the GPS triangle formed by the point, the first fruit tree, and the k-th fruit tree in the image, respectively. x, y, z, x1, y1, and z1 are calculated from the longitude and latitude coordinates of the point, the first fruit tree, the k-th fruit tree, and the (k + 1)-th fruit tree in the image by the Haversine formula.

[0115] Compare the values of p and p1. If p < p1, then the GPS of the k-th fruit tree corresponds to the (k + 1)-th fruit tree, and the k-th fruit tree and the (k + 1)-th fruit tree are exchanged.

[0116] The calculated GPS is the GPS information of the fruit trees in the effective area of the drone-captured image.

[0117] In some embodiments, please refer to Figure 7 , a digital orchard system display interface can be built based on the Vue framework, the fruit tree information stored in the file can be read, and the position information corresponding to the litchi fruit trees can be visualized in the system.

[0118] As can be seen from the above embodiments, compared with the prior art, in the present application, due to problems such as feature matching errors and improper stitching edge processing, the trees in the stitched image are generally blurred, which has a great impact on the extraction of relevant information on the tree crown in the follow-up. Obtain the canopy information from the original image, but the original image does not contain the position information of the fruit trees, and the cost of installing positioning devices for each tree is huge. The present application includes, but is not limited to, the following beneficial effects:

[0119] First, the matching algorithm proposed in the present application matches by obtaining the GPS information of the fruit trees in the map and the drone image, without installing positioning devices, saving costs;

[0120] Second, the Swin-CMN model proposed in the present application has superiority in the segmentation of the litchi tree crown layer, and has better performance indicators and segmentation effects compared with other networks;

[0121] Third, the digital orchard fruit tree positioning method proposed in the present application can map the high-resolution canopy in the drone-captured image to the map, thereby providing high-resolution real canopy information of the litchi trees, which provides great help for subsequent processing. This method has high accuracy and strong repeatability, solves the problems of traditional orchard management being extensive and inefficient, and provides effective technical support for the effective development of smart orchards.

[0122] Based on any embodiment of this application, the steps for training the fruit tree image instance segmentation model include the following steps:

[0123] The litchi tree portion in the remote sensing image of the litchi tree and its corresponding image number are labeled to determine the training set and validation set of the fruit tree image instance segmentation model.

[0124] The fruit tree image instance segmentation model is backpropagated iteratively trained based on the training set and validation set, so that in each backpropagation iteration, the target loss function is calculated based on the error between the predicted bounding box result obtained by inputting the labeled litchi fruit tree remote sensing image corresponding to the fruit tree into the fruit tree image instance segmentation model and the actual labeled result.

[0125] The model parameters are updated according to the target loss function until the change in the target loss function is less than a preset threshold or the number of training iterations is greater than a preset number. Then, the model parameters are saved and the training of the fruit tree image instance segmentation model is completed.

[0126] Based on any embodiment of this application, the step of inputting the remote sensing image of the litchi tree corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation and determining the fruit tree segmentation result includes the following steps:

[0127] The Swin-Transformer network in the fruit tree image instance segmentation model divides the input remote sensing image of the litchi fruit tree corresponding to the litchi fruit tree into several small blocks of equal size, and embeds each small block to determine the feature representation within each small block.

[0128] A multi-layered translation window is used to perform self-attention calculation on each small block in order to exchange information about the features of adjacent small blocks;

[0129] Feature extraction is performed based on multi-layer translation window self-attention and MLP layer, while multi-scale feature fusion is performed on the output of each block;

[0130] Features at multiple scales are processed using a feature pyramid operation, and global pooling and linear layers are used for classification output.

[0131] Based on any embodiment of this application, the step of inputting the remote sensing image of the litchi tree corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation and determining the fruit tree segmentation result includes the following steps:

[0132] The Hybrid Task Cascade detector in the fruit tree image instance segmentation model uses a Swin-Transformer network as the backbone network to extract features from the input remote sensing image of the litchi fruit tree corresponding to the litchi fruit tree.

[0133] Anchor points are used to extract candidate target regions from the remote sensing image of litchi trees. The candidate target regions are then processed by a multi-level detection and segmentation head to detect and segment the target regions.

[0134] For each target region, perform bounding box regression and instance segmentation mask prediction;

[0135] The overlapping candidate target regions are deduplicated to determine the fruit tree segmentation result.

[0136] Based on any embodiment of this application, the steps of constructing a digital topographic map of an orchard and determining the corresponding GPS coordinates of each fruit tree based on the digital topographic map include the following steps:

[0137] Construct a digital topographic map of the orchard and determine the GPS information and elevation information corresponding to each fruit tree in the digital topographic map of the orchard;

[0138] The digital topographic map of the orchard is divided into blocks, and a fruit tree recognition model is used to identify the sub-blocks of the digital topographic map to determine the identification results of the sub-blocks;

[0139] The data of the digital topographic map sub-block recognition results are stitched together to determine the corresponding pixel coordinates of each fruit tree in the orchard;

[0140] Convert the pixel coordinates of the fruit trees into the corresponding GPS coordinates for each fruit tree.

[0141] Based on any embodiment of this application, the step of matching the number of litchi trees and their pixel coordinates in the litchi tree remote sensing image with the GPS coordinates of each litchi tree in the orchard digital topographic map based on a preset matching algorithm to determine the corresponding location of the litchi tree includes the following steps:

[0142] Calculate the pixel distance from the pixel coordinates of the litchi tree in the remote sensing image of the litchi tree to the pixel distance of the point in the remote sensing image of the litchi tree, and sort them from near to far.

[0143] The pixel distance is converted into a GPS coordinate distance to determine the GPS coordinates of the same number of fruit trees in the remote sensing image of lychee fruit trees.

[0144] Based on the semi-sine function, the GPS coordinates are compared and filtered using vector angles to match the GPS coordinates of the litchi trees, thereby determining the corresponding position of the litchi trees in the digital orchard.

[0145] Specifically, the distances between the GPS coordinates of the midpoint of the litchi tree remote sensing image and the GPS coordinates of all the fruit trees in the orchard can be calculated based on the half-sine function (Haversine formula). These distances are then sorted from smallest to largest. The distances from the pixel coordinates of the fruit trees in the remote sensing image to the pixel coordinates of the midpoint of the image are then calculated and interchanged with the GPS coordinates. This process yields the GPS information of the fruit trees in the litchi tree remote sensing image.

[0146] Based on the vector relationships between litchi trees in remote sensing images and the trees in the overall orchard, the angle between the trees in two scenarios is calculated to improve the accuracy of tree pairing. The algorithm is as follows:

[0147] For remote sensing images of litchi trees, n trees are identified. When n is less than or equal to 1, the GPS of the matched trees in the entire orchard is used directly. When n is greater than 1, the distances of the k-th tree and the (k+1)-th tree from the midpoint of the image are compared. If the distance is greater than 1 meter, the original pairing scheme is maintained (1... <k<=n)。

[0148] When the distance is less than 1 meter, we construct a vector triangle with the first fruit tree, the midpoint of the image, and the kth fruit tree, compare their pixel vector angles with the GPS vector angles, and calculate the difference p.

[0149] Construct a triangle using the first fruit tree, the midpoint of the image, and the (k+1)th fruit tree. Compare the GPS vector angle with the pixel vector angle of the kth fruit tree in step B2 and calculate the difference p1.

[0150] The calculation formula is as follows:

[0151]

[0152]

[0153] Where a, b, and c are the opposite sides of the pixel triangle formed by the midpoint of the image, the 1st fruit tree, and the kth fruit tree, respectively; a1, b, and c are the opposite sides of the pixel triangle formed by the midpoint of the image, the 1st fruit tree, and the (k+1)th fruit tree, respectively; x, y, and z are the opposite sides of the GPS triangle formed by the midpoint of the image, the 1st fruit tree, and the kth fruit tree, respectively; x1, y1, and z1 are the opposite sides of the GPS triangle formed by the midpoint of the image, the 1st fruit tree, and the kth fruit tree, respectively; and x, y, z, x1, y1, and z1 are calculated using the Haversine formula from the latitude and longitude coordinates of the midpoint of the image, the 1st fruit tree, the kth fruit tree, and the (k+1)th fruit tree.

[0154] Compare the values of p and p1. If p < p1, the GPS of the k-th fruit tree corresponds to the (k + 1)-th fruit tree. Exchange the k-th fruit tree and the (k + 1)-th fruit tree.

[0155] The calculated GPS is the GPS information of the fruit trees in the effective area of the drone-captured image.

[0156] Based on any embodiment of the present application, the step of pairing the number and pixel coordinates of the litchi fruit trees in the litchi fruit tree remote sensing image with the global positioning system coordinates of each litchi fruit tree in the orchard digital topographic map based on a preset matching algorithm to determine the corresponding positions of the litchi fruit trees includes the following steps:

[0157] In response to the pesticide spraying instruction, pair the number and pixel coordinates of the litchi fruit trees in the litchi fruit tree remote sensing image with the global positioning system coordinates of each litchi fruit tree in the orchard digital topographic map based on the haversine function to determine the corresponding positions of the litchi fruit trees;

[0158] Spray pesticides on each litchi fruit tree in the litchi orchard according to the corresponding positions of the litchi fruit trees to complete the pest prevention of the litchi fruit trees.

[0159] Please refer to Figure 8A digital orchard tree positioning device, provided to meet one of the purposes of this application, includes an image acquisition module 1100, a segmentation model construction module 1200, a pixel coordinate determination module 1300, a global positioning coordinate determination module 1400, and a tree positioning module 1500. The image acquisition module 1100 is configured to acquire remote sensing images of each litchi tree in the orchard in response to an orchard tree positioning command. The segmentation model construction module 1200 is configured to update the backbone network of the Mask R-CNN model to a Swin-Transformer network and embed a Hybrid Task Cascade detector of a hybrid task cascade architecture into the Mask R-CNN model. In the R-CNN model, an instance segmentation model for fruit tree images is constructed. A pixel coordinate determination module 1300 is configured to input the remote sensing image of the corresponding lychee tree into the trained instance segmentation model for instance segmentation, determine the segmentation result, and identify the corresponding remote sensing image of the lychee tree based on a preset fruit tree recognition model to determine the number of lychee trees and their pixel coordinates in the remote sensing image. A global positioning coordinate determination module 1400 is configured to construct a digital topographic map of the orchard and determine the corresponding global positioning system coordinates of each fruit tree based on the digital topographic map. A fruit tree positioning module 1500 is configured to match the number of lychee trees and their pixel coordinates in the remote sensing image with the global positioning system coordinates of each lychee tree in the digital topographic map of the orchard based on a preset matching algorithm to determine the corresponding location of the lychee trees, thus completing the positioning of the lychee trees in the digital orchard.

[0160] Based on any embodiment of this application, please refer to Figure 9 Another embodiment of this application also provides an electronic device, which can be implemented by a computer device, such as... Figure 9 The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, they enable the processor to implement a digital orchard tree positioning method. The processor of the computer device provides computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When these computer-readable instructions are executed by the processor, they enable the processor to execute the digital orchard tree positioning method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0161] In this embodiment, the processor is used to execute... Figure 8 The system defines the specific functions of each module and its sub-modules. The memory stores the program code and various data required to execute these modules or sub-modules. A network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the digital orchard tree positioning device of this application. The server can call the server's program code and data to execute the functions of all sub-modules.

[0162] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the digital orchard tree positioning method described in any embodiment of this application.

[0163] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the digital orchard tree positioning method described in any embodiment of this application.

[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0165] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

[0166] In summary, this method maps high-resolution canopy information from UAV-captured images onto a map, providing accurate and high-resolution canopy information for litchi trees, greatly aiding subsequent processing. This method is highly accurate and repeatable, solving the problems of extensive and inefficient traditional orchard management, and providing effective technical support for the development of smart orchards.

Claims

1. A method for locating fruit trees in a digital orchard, characterized in that, The method comprises the following steps: In response to orchard tree positioning instructions, obtain the litchi tree remote sensing image corresponding to each litchi tree in the orchard; The backbone network in the Mask R-CNN model is updated to a Swin-Transformer network, and a Hybrid Task Cascade detector of a hybrid task cascade architecture is embedded into the Mask R-CNN model to construct a fruit tree image instance segmentation model; The litchi tree remote sensing image corresponding to the litchi tree is input into the trained fruit tree image instance segmentation model for instance segmentation to determine the fruit tree segmentation result, and a preset fruit tree recognition model is used to recognize the litchi tree remote sensing image corresponding to the fruit tree segmentation result to determine the number and pixel coordinates of the litchi trees in the litchi tree remote sensing image; A digital orchard topographic map is constructed, and the global positioning system coordinates corresponding to each fruit tree are determined based on the digital topographic map; The number and pixel coordinates of the litchi trees in the litchi tree remote sensing image are matched with the global positioning system coordinates of each litchi tree in the digital orchard topographic map based on a preset matching algorithm to determine the positions corresponding to the litchi trees, which comprises: calculating the pixel distance from the pixel coordinates of the litchi trees in the litchi tree remote sensing image to the point in the litchi tree remote sensing image, and sorting from near to far; The pixel distance is converted into a global positioning system coordinate distance to determine the same number of global positioning system coordinates as the number of fruit trees in the litchi tree remote sensing image; the global positioning system coordinates are compared and screened based on a secant function using a vector angle to match the global positioning system coordinates of the litchi trees to determine the positions corresponding to the litchi trees in the digital orchard to complete the positioning of the litchi trees in the digital orchard.

2. The digital orchard fruit tree positioning method according to claim 1, characterized in that, The step of training the fruit tree image instance segmentation model comprises the following steps: Label the litchi tree part in the litchi tree remote sensing image corresponding to the litchi tree and the corresponding picture serial number to determine the training set and the verification set of the fruit tree image instance segmentation model; According to the training set and the verification set, the fruit tree image instance segmentation model is iteratively trained by back propagation, so that in each back propagation iteration, the error between the predicted box result obtained by inputting the labeled litchi tree remote sensing image corresponding to the litchi tree into the fruit tree image instance segmentation model and the actual labeling result is calculated as a target loss function; According to the target loss function, the model parameters are updated until the change value of the target loss function is less than a preset threshold or the training times are greater than a preset number, and then the model parameters are saved and the training of the fruit tree image instance segmentation model is completed.

3. The digital orchard fruit tree positioning method according to claim 1, characterized in that, The step of inputting the litchi tree remote sensing image corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation to determine the fruit tree segmentation result comprises the following steps: The Swin-Transformer network in the fruit tree image instance segmentation model divides the input litchi fruit tree corresponding litchi fruit tree remote sensing image into several small blocks of equal size, embeds each small block to determine the feature representation in each small block; Each small block is calculated by a multi-layer translation window for self-attention to interact the features of adjacent small blocks; Based on the multi-layer translation window self-attention and the MLP layer, the feature extraction is performed, and multi-scale feature fusion is performed on the output of each block; The features of multiple scales are subjected to feature pyramid operation, and global pooling and linear layer are used for classification output.

4. The digital orchard fruit tree positioning method according to claim 3, characterized in that, The step of inputting the litchi fruit tree corresponding litchi fruit tree remote sensing image into the trained fruit tree image instance segmentation model for instance segmentation to determine the fruit tree segmentation result, comprising the following steps: The Hybrid Task Cascade detector in the fruit tree image instance segmentation model uses a Swin-Transformer network as the backbone network to extract features from the input litchi fruit tree corresponding litchi fruit tree remote sensing image; An anchor box is used to extract candidate target regions in the litchi fruit tree remote sensing image, and the candidate target regions are subjected to multi-level detection and segmentation head for target region detection and segmentation; The boundary box regression and instance segmentation mask prediction are performed on each target region; The overlapping candidate target regions are de-duplicated to determine the fruit tree segmentation result.

5. The digital orchard fruit tree positioning method according to claim 4, characterized in that, Constructing a digital terrain map of the orchard, based on the digital terrain map, determining the global positioning system coordinates corresponding to each fruit tree, comprising the following steps: Constructing a digital terrain map of the orchard, determining the GPS information and elevation information corresponding to each fruit tree in the digital terrain map of the orchard; The digital terrain map of the orchard is divided into blocks, and a fruit tree recognition model is used to recognize the digital terrain map sub-block to determine the digital terrain map sub-block recognition result; The digital terrain map sub-block recognition result is spliced to determine the pixel coordinates corresponding to each fruit tree in the orchard; The fruit tree pixel coordinates are converted into global positioning system coordinates corresponding to each fruit tree.

6. The method according to any one of claims 1 to 5, wherein, Based on the preset matching algorithm, the number and pixel coordinates of litchi fruit trees in the litchi fruit tree remote sensing image are paired with the global positioning system coordinates of each litchi fruit tree in the digital terrain map of the orchard to determine the positions corresponding to the litchi fruit trees. In response to the pesticide spraying instruction, the number and pixel coordinates of litchi fruit trees in the litchi fruit tree remote sensing image are paired with the global positioning system coordinates of each litchi fruit tree in the digital terrain map of the orchard based on the secant function to determine the positions corresponding to the litchi fruit trees; According to the positions corresponding to the litchi fruit trees, pesticide spraying is performed on each litchi fruit tree in the litchi orchard to complete the pest prevention of the litchi fruit trees.

7. A digital orchard tree positioning device, characterized by, It comprises: An image acquisition module is arranged to acquire litchi fruit tree remote sensing images corresponding to each litchi fruit tree in the orchard in response to an orchard fruit tree positioning instruction. The segmentation model construction module is configured to update a backbone network in a Mask R-CNN model to a Swin-Transformer network, and embed a Hybrid Task Cascade detector of a hybrid task cascade architecture into the Mask R-CNN model, so as to construct a fruit tree image instance segmentation model. The pixel coordinate determination module is configured to input a litchi tree remote sensing image corresponding to the litchi tree into the trained fruit tree image instance segmentation model for instance segmentation, determine a fruit tree segmentation result, identify the litchi tree remote sensing image corresponding to the fruit tree segmentation result based on a preset fruit tree recognition model, and determine the number and pixel coordinates of the litchi trees in the litchi tree remote sensing image. The global positioning coordinate determination module is configured to construct a digital orchard topographic map, and determine global positioning system coordinates corresponding to each fruit tree based on the digital topographic map. The fruit tree positioning module is configured to pair the number and pixel coordinates of the litchi trees in the litchi tree remote sensing image with the global positioning system coordinates of each litchi tree in the digital orchard topographic map based on a preset matching algorithm, and determine the positions corresponding to the litchi trees, including: calculating pixel distances from the pixel coordinates of the litchi trees in the litchi tree remote sensing image to a point in the litchi tree remote sensing image, and sorting from near to far. The pixel distances are converted into global positioning system coordinate distances, and the same number of global positioning system coordinates as the number of the fruit trees in the litchi tree remote sensing image are determined. The global positioning system coordinates are compared and screened based on a secant function using a vector angle to pair the global positioning system coordinates of the litchi trees, and the positions corresponding to the litchi trees in the digital orchard are determined, so as to complete the positioning of the litchi trees in the digital orchard.

8. An electronic device comprising a central processing unit and a memory, characterized in that The central processing unit is configured to call and run a computer program stored in the memory to perform the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable instructions store a computer program implemented according to the method of any one of claims 1 to 6, and when the computer program is called and run by a computer, the steps included in the corresponding method are performed.