Citrus fruit picking positioning method, device, equipment and medium

Through the neural radiation field model and the improved RandLA-Net network, combined with the bilateral enhancement module, the problem of low accuracy in the three-dimensional reconstruction of fruit trees and fruit positioning in the existing technology is solved, and accurate three-dimensional reconstruction and semantic segmentation of fruit trees and fruits are achieved, supporting Automated harvesting.

CN118628913AActive Publication Date: 2024-09-10SOUTH CHINA AGRICULTURAL UNIVERSITY

Patent Information

Application Number
CN202410793818.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-10
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

The image-based modeling method in the existing technology is easily affected by factors such as lighting changes and occlusion, and it is difficult to accurately restore the complex structure of fruit trees. The point cloud-based modeling method has problems such as noise and sparse point clouds that may affect the accuracy of the modeling. Accuracy.

Method used

The neural radiation field model (NeRF) is combined with the colmap algorithm for 3D reconstruction, and the improved RandLA-Net network is introduced to perform semantic segmentation through the bilateral enhancement module to extract the 3D point cloud data and spatial coordinates of mature citrus fruits for precise positioning. pick.

Benefits of technology

It achieves accurate three-dimensional reconstruction of fruit trees and precise semantic segmentation of fruits, improves modeling accuracy and robustness, provides a solid theoretical foundation for automated picking, and saves manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628913A
    Figure CN118628913A
Patent Text Reader

Abstract

The invention relates to a citrus fruit picking and positioning method and device, equipment and a medium, and the method comprises the steps: calling a preset co lmap algorithm to extract feature points from citrus fruit tree images at all angles, and carrying out the matching, so as to generate camera pose data corresponding to the citrus fruit tree images; adopting a neural radiation field model trained to a convergence state to learn the implicit three-dimensional representation of the citrus fruit tree from the citrus fruit tree images from various angles according to the camera pose data, so as to generate three-dimensional point cloud data corresponding to the citrus fruit tree; performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on a semantic segmentation model trained to a convergence state so as to extract three-dimensional point cloud data and three-dimensional space coordinates corresponding to the mature citrus fruit; and the picking operation robot determines the picking position of the mature citrus fruits according to the three-dimensional point cloud data and the three-dimensional space coordinates corresponding to the mature citrus fruits. According to the application, the mature citrus fruits can be accurately and quickly positioned, and automatic picking is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional reconstruction, and in particular to a citrus fruit picking positioning method, a corresponding device, an electronic device and a computer-readable storage medium. Background Art

[0002] The 3D reconstruction of fruit trees is an important basis for fruit spatial positioning. By modeling the 3D structure of fruit trees, rich spatial information can be obtained to provide a reference for fruit positioning. Traditional 3D reconstruction methods of fruit trees mainly include image-based modeling and point cloud-based modeling.

[0003] Image-based modeling methods reconstruct the 3D model of fruit trees by taking multi-view images of fruit trees and using techniques such as structured motion (SfM) and multi-view stereo (MVS). Dong et al. [1] proposed a 3D reconstruction and information extraction method for orchards based on SfM and MVS, which achieved 3D visualization and parameter estimation of fruit trees. However, image-based modeling methods are easily affected by factors such as illumination changes and occlusion, making it difficult to accurately restore the complex structure of fruit trees.

[0004] The point cloud-based modeling method uses depth sensors such as laser radar to directly obtain the 3D point cloud data of fruit trees, and generates a 3D model of the fruit tree through point cloud registration, fusion, surface reconstruction and other steps. Gené-Mola et al. used a vehicle-mounted laser radar to scan the orchard to obtain high-precision point cloud data, and achieved 3D reconstruction of fruit trees and estimation of agronomic parameters. The point cloud-based modeling method has problems such as noise and sparseness of the point cloud that may affect the accuracy of the modeling, and a set of laser radar equipment is generally expensive.

[0005] To sum up, the image-based modeling method in the existing technology is easily affected by factors such as lighting changes and occlusion, and it is difficult to accurately restore the complex structure of fruit trees. The point cloud-based modeling method has problems such as noise and sparsity of the point cloud that may affect the accuracy of modeling. In order to solve this problem, the applicant has made corresponding explorations. Summary of the invention

[0006] The purpose of the present application is to solve the above-mentioned problems and to provide a citrus fruit picking positioning method, corresponding device, electronic device and computer-readable storage medium.

[0007] In order to meet the various objectives of this application, this application adopts the following technical solutions:

[0008] A citrus fruit picking positioning method proposed to meet one of the purposes of this application includes:

[0009] In response to the citrus fruit picking positioning instruction, the citrus fruit tree images at various angles are obtained, and the preset colmap algorithm is called to extract and match feature points from the citrus fruit tree images at various angles to generate camera pose data corresponding to the citrus fruit tree images;

[0010] Using the neural radiation field model that has been trained to a convergent state, based on the camera pose data, learn the implicit three-dimensional representation of the citrus tree from the citrus tree images at various angles to generate three-dimensional point cloud data corresponding to the citrus tree;

[0011] Based on the semantic segmentation model that has been trained to a convergent state, end-to-end semantic segmentation is performed on the three-dimensional point cloud data corresponding to the citrus fruit tree to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, wherein the basic network architecture of the semantic segmentation model is an improved RandLA-Net network, and the improved RandLA-Net network consists of an input layer, an output layer, 5 encoder layers, 5 decoder layers, a bilateral enhancement module and a bottleneck layer, and the bilateral enhancement module is between the encoder layer and the bottleneck layer;

[0012] The picking robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and three-dimensional spatial coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position to complete the picking positioning of the ripe citrus fruit.

[0013] Optionally, the step of using a neural radiation field model that has been trained to a convergent state to learn an implicit three-dimensional representation of the citrus tree from the citrus tree images at various angles according to the camera pose data to generate three-dimensional point cloud data corresponding to the citrus tree includes:

[0014] The citrus tree images at various angles and their corresponding camera pose data are input into a neural radiation field model that has been trained to convergence, the scene is densely sampled, and a multi-layer perceptron is used to predict the volume density and viewing angle-dependent radiance of each position to generate high-quality images.

[0015] Optionally, the step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes:

[0016] In the encoder layer, each layer in the encoder layer contains a dilated residual block, which processes the input features and downsamples the features by sharing a multi-layer perceptron, a local spatial encoding module, and an attention pooling module.

[0017] Optionally, the step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes:

[0018] In the dilated residual block, the input feature (N, d in ), where N is the number of points, d in is the feature dimension of each point. The input point feature is converted into (N, d in / 2);

[0019] Local spatial encoding: The features processed by the shared multilayer perceptron (N, d in / 2) Combined with the three-dimensional coordinates (N,3) of each point, the generated shape is (N,d in ) characteristics;

[0020] The features output by the local spatial encoding module (N,d in )Through the attention pooling module, the attention score is first calculated, and the calculated attention score is weighted on the feature to generate a new feature (N,d in );

[0021] The input features (N,d in ) is transformed into (N,d in / 2), as a shortcut path;

[0022] Residual connection and activation function: Add the features of the main path and the shortcut path, and output the final features (N, 2d in ).

[0023] Optionally, the step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes:

[0024] In the bilateral enhancement module, the relative position encoding module in the bilateral enhancement module calculates the relative position and distance between the point and its neighboring points, and uses the relative position and distance between the point and its neighboring points as features. The calculation formula includes:

[0025] relative xyz =xyz tile -neighbor xyz ,

[0026]

[0027] relative feature =concat(relative dis ,relative xyz ,xyz tile ,neighbor xyz ),

[0028] Among them, relative xyz Indicates the relative position of each point to its neighboring points, neighbor xyz Represents the coordinates of the neighborhood point, xyz tile is obtained by copying xyz and neighbor xyz Matrices of the same shape, xyz represents the three-dimensional coordinates of the point, relative dis is the Euclidean distance between each point and its neighboring points, relative feature It is a combination of relative distance, relative position, original coordinates and neighborhood point coordinates;

[0029] In the local feature aggregation module of the bilateral enhancement module, the relative position feature and the neighborhood point feature are combined to achieve feature fusion and enhancement. The calculation formula includes:

[0030] f concat1 =concat(f neighbours ,f xyz1 ),

[0031] f pcagg1 =attention pooling (f concat1 ),

[0032] f concat2 =concat(f neighbours ,f xyz2 ),

[0033] f pcagg2 =attention pooling (f concat2 ),

[0034] Among them, f concat1 is the neighborhood point feature f neighbours and relative position feature f xyz1 The splicing features, f pcagg1 It is through attention pooling pooling f concat1 Features after weighted aggregation;

[0035] In the attention pooling module of the bilateral enhancement module, the attention weight of each point to its neighboring points is calculated, and the features of the neighboring points are weighted averaged to further enhance the feature expression. The calculation formula includes:

[0036] att activation = dense(f reshaped ),

[0037] att scores =softmax(att activation ),

[0038] f agg =∑(f reshaped *att scores ),

[0039] Among them, att activation is the reshaped feature f reshaped The activation value obtained by performing the full connection operation, att scores is the attention activation value att activation The attention weight obtained by performing the softmax activation function operation, f agg is obtained by reshaping the feature f reshaped According to the attention weight att scores Aggregate features obtained by weighted averaging;

[0040] The dilated residual block combines the local feature aggregation module and the attention pooling module to achieve feature enhancement and transfer, and its calculation formula includes:

[0041] f pc1 =conv2d(feature),

[0042]

[0043] shortcut = conv2d(feature),

[0044] output = leaky relu (f pc2 + shortcut),

[0045] Among them, f pc1 It is the intermediate feature obtained by convolution operation on the input feature feature. It is built by local feature aggregation block f pc1 The features obtained by processing, shortcut is the shortcut connection feature obtained by convolution operation on the input feature feature, and the output is obtained by convolution operation on f pc2The final output feature is obtained by adding the shortcut and passing through the leakyReLU activation function.

[0046] Optionally, the step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes:

[0047] The improved RandLA-Net network is trained using a preset training set, wherein each point in the training set has been marked as a fruit or a non-fruit part. During the training process, the improved RandLA-Net network learns to identify and classify different fruit tree components from the local structural features of the point cloud through its random sampling and local feature aggregation mechanism;

[0048] After training, the preprocessed fruit tree point cloud data is input into the improved RandLA-Net network for semantic segmentation. The improved RandLA-Net network outputs the semantic label of each point to distinguish between ripe citrus fruits, unripe citrus fruits and citrus tree parts.

[0049] Optionally, after the picking operation robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and the three-dimensional space coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position, the step includes:

[0050] In response to a citrus tree pruning instruction, determine three-dimensional point cloud data corresponding to the citrus tree;

[0051] The corresponding positions of citrus branches and citrus trunks are determined based on the three-dimensional point cloud data corresponding to the citrus trees, and the citrus trees in the citrus trees are pruned based on the corresponding positions of the citrus branches to complete the picking positioning of the ripe citrus fruits.

[0052] A citrus fruit picking and positioning device provided for another purpose of the present application comprises:

[0053] The camera posture determination module is configured to respond to the citrus fruit picking positioning instruction, obtain citrus fruit tree images at various angles, call a preset colmap algorithm to extract feature points from the citrus fruit tree images at various angles and match them to generate camera posture data corresponding to the citrus fruit tree images;

[0054] A fruit tree point cloud determination module is configured to use a neural radiation field model that has been trained to a convergence state to learn an implicit three-dimensional representation of the citrus tree from the citrus tree images at various angles according to the camera pose data, so as to generate three-dimensional point cloud data corresponding to the citrus tree;

[0055] A semantic segmentation module, configured to perform end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on a semantic segmentation model that has been trained to a convergence state, so as to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, wherein the basic network architecture of the semantic segmentation model is an improved RandLA-Net network, and the improved RandLA-Net network is composed of an input layer, an output layer, 5 encoder layers, 5 decoder layers, a bilateral enhancement module and a bottleneck layer, and the bilateral enhancement module is between the encoder layer and the bottleneck layer;

[0056] The picking positioning module is configured so that a picking operation robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and three-dimensional spatial coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position to complete the picking positioning of the ripe citrus fruit.

[0057] An electronic device provided to meet another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the citrus fruit picking and positioning method described in the present application.

[0058] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the citrus fruit picking and positioning method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

[0059] Compared with the prior art, the present application aims at the problems that the image-based modeling method in the prior art is easily affected by factors such as illumination changes and occlusion, and it is difficult to accurately restore the complex structure of the fruit tree, and the point cloud-based modeling method, whose point cloud noise, sparseness and other problems may affect the accuracy of modeling. The present application includes but is not limited to the following beneficial effects:

[0060] First, the output of the NeRF model is used to construct detailed point cloud maps of fruit trees. These point cloud maps not only capture the geometric structure and color information of the fruit trees and fruits, but also reflect the complex texture and branch distribution of the tree, providing accurate three-dimensional data for subsequent agricultural applications such as fruit maturity judgment, automated fruit picking, automated pruning and health monitoring of fruit trees. By combining the colmap algorithm and the NeRF model, this application can achieve accurate three-dimensional reconstruction of fruit trees, and the effectiveness of this method has been verified by experimental results. In addition, this method provides a new technical approach for obtaining three-dimensional structural data of fruit trees using a non-invasive method, and has the potential to be extended to other plants or complex scenes.

[0061] Second, this application proposes an improved RandLA-Net network and applies it to the fruit semantic segmentation task. By introducing a bilateral enhancement module, the accurate semantic segmentation of ripe fruits, unripe fruits, and branches and leaves of fruit trees is achieved. The improved RandLA-Net network shows higher accuracy and robustness when processing fruit data.

[0062] Third, based on the original RandLA-Net network, this application introduces a bilateral enhancement module (BEM), which effectively improves the performance of the network in the fruit semantic segmentation task. The bilateral enhancement module (BEM) enhances the effect of feature processing through the local spatial encoding module (LoCSE) and the attention pooling module (Attentive Pooling);

[0063] Fourthly, the bilateral enhancement module combines the spatial proximity weight with the feature similarity weight to generate a comprehensive weight for feature enhancement. This fusion method can effectively highlight the features of small targets (i.e., fruits) while suppressing background noise; through the application of comprehensive weights, the bilateral enhancement module can enhance the local details of the fruit area and maintain the clarity of the fruit edges. This is crucial for accurate segmentation and subsequent agricultural operations (such as automated picking). Specifically, the bilateral enhancement module uses these weights to adjust the feature representation of each point, thereby enhancing target features and suppressing non-target features and noise. Application experiments of the bilateral enhancement module have shown that it helps to maintain the clarity of the fruit edges, which is very important for subsequent agricultural operations such as automated picking. By strengthening the distinction between fruits and other plant parts, the bilateral enhancement module enables the RandLA-Net network to more effectively learn and predict the exact location and range of ripe fruits, thereby optimizing the overall segmentation performance;

[0064] Furthermore, the citrus fruit picking and positioning method of the present application, through the accurate and rapid positioning of ripe fruits, lays a solid theoretical foundation for the automated picking of ripe fruits, thereby greatly saving manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0066] Figure 1 This is a flow chart of the citrus fruit picking and positioning method in the embodiment of the present application;

[0067] Figure 2 It is a schematic diagram of an RGB image of a citrus fruit tree and a three-dimensionally reconstructed point cloud image of the fruit tree in an embodiment of the present application;

[0068] Figure 3 A schematic diagram of the network structure of an improved RandLA-Net with a bilateral enhancement module added in an embodiment of the present application;

[0069] Figure 4 A schematic diagram of the change in training accuracy during the model training process in an embodiment of the present application;

[0070] Figure 5 A schematic diagram of the change in learning rate during model training in an embodiment of the present application;

[0071] Figure 6 A schematic diagram of the change in loss value during the model training process in an embodiment of the present application;

[0072] Figure 7 is a schematic diagram of an original input image in an embodiment of the present application;

[0073] Figure 8 A schematic diagram of a label for each point in an image in an embodiment of the present application;

[0074] Fig. 9 A schematic diagram of the segmentation effect of the original RandLA-Net network in an embodiment of the present application;

[0075] Fig.10 A schematic diagram of the segmentation effect of the improved RandLA-Net network in an embodiment of the present application;

[0076] Fig.11 This is a principle block diagram of the citrus fruit picking and positioning device in the embodiment of the present application;

[0077] Fig.12 It is a schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION

[0078] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0079] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the 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 refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0080] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0081] It will be understood by those skilled in the art that the "client", "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service, personal communication system), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant, personal digital assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System, global positioning system) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or suitable for and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, for example, a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.

[0082] The hardware referred to by the names such as "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 principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.

[0083] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.

[0084] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for access.

[0085] The neural network models referenced or may be referenced in this application, unless expressly specified, can be deployed on a remote server and remotely called on the client, or can be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence can be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.

[0086] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as it is suitable for being called by the technical solution of this application.

[0087] Those skilled in the art should be aware that, although the various methods of the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.

[0088] Unless the mutually exclusive relationship between the embodiments to be disclosed in this application is explicitly stated, the relevant technical features involved in each embodiment can be cross-combined to flexibly construct a new embodiment, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.

[0089] See also Figure 1 In one embodiment, the citrus fruit picking and positioning method of the present application includes:

[0090] Step S10, responding to the citrus fruit picking positioning instruction, obtaining citrus fruit tree images at various angles, calling a preset colmap algorithm to extract feature points from the citrus fruit tree images at various angles and matching them, so as to generate camera pose data corresponding to the citrus fruit tree images;

[0091] The picking robot can respond to citrus fruit picking positioning instructions to obtain images of citrus trees at various angles. The images of citrus trees at various angles can be obtained based on the binocular camera in the picking robot. After obtaining the images of citrus trees at various angles, the picking robot calls the preset colmap algorithm to extract feature points from the images of citrus trees at various angles and match them to generate camera pose data corresponding to the images of citrus trees.

[0092] Specifically, the colmap algorithm is used to generate the camera pose data corresponding to the citrus image, and the camera pose data includes the position and attitude information of the camera. The colmap algorithm is an efficient, image-based 3D reconstruction algorithm, which is widely used in the fields of computer vision and photogrammetry. It generates a dense 3D point cloud model by extracting feature points from images of multiple perspectives and matching them; the Colmap algorithm supports automated feature extraction, matching, incremental structure-from-motion (SfM) and dense reconstruction (Dense Reconstruction) and other functions, and can generate high-precision 3D models without relying on specific hardware. Therefore, this application uses the colmap algorithm to calculate the camera pose data of the citrus image, and the reconstructed part uses the neural radiance field model (NeRF).

[0093] Step S20, using the neural radiation field model that has been trained to a convergent state to learn the implicit three-dimensional representation of the citrus tree from the citrus tree images at various angles according to the camera pose data, so as to generate three-dimensional point cloud data corresponding to the citrus tree;

[0094] After generating the camera pose data corresponding to the citrus tree image, a neural radiance field model (NeRF) that has been trained to a convergent state is used to learn an implicit three-dimensional representation of the citrus tree from the citrus tree images at various angles according to the camera pose data to generate three-dimensional point cloud data corresponding to the citrus tree;

[0095] The steps of using a neural radiation field model that has been trained to a convergent state to learn an implicit three-dimensional representation of a citrus tree from the images of the citrus tree at various angles according to the camera pose data to generate three-dimensional point cloud data corresponding to the citrus tree include:

[0096] The citrus tree images at various angles and their corresponding camera pose data are input into a neural radiation field model that has been trained to convergence, the scene is densely sampled, and a multi-layer perceptron is used to predict the volume density and viewing angle-dependent radiance of each position to generate high-quality images.

[0097] Specifically, after obtaining the camera pose data corresponding to the citrus tree image, these camera pose data are input into the neural radiance field model (NeRF) together with the RGB image corresponding to the citrus tree image. The neural radiance field model (NeRF) densely samples the scene and uses a multi-layer perceptron (MLP) to predict the volume density and perspective-dependent radiance of each position, thereby achieving the ability to generate high-quality images from new perspectives.

[0098] See also Figure 2 In the final stage of NeRF processing, NeRF output is used to construct detailed point cloud maps of fruit trees. These point cloud maps not only capture the geometric structure and color information of fruit trees and fruits, but also reflect the complex texture and branch distribution of the tree, providing accurate three-dimensional data for subsequent agricultural applications such as fruit maturity judgment, automated fruit picking, automated pruning and health monitoring of fruit trees.

[0099] By combining the colmap algorithm and the Neural Radiance Field model (NeRF), this application can achieve accurate 3D reconstruction of fruit trees, and the effectiveness of this method has been verified by experimental results. In addition, this method provides a new technical approach for obtaining 3D structural data of fruit trees in a non-invasive way, and has the potential to be extended to other plants or complex scenes.

[0100] Step S30, performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergent state, so as to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, wherein the basic network architecture of the semantic segmentation model is an improved RandLA-Net network, and the improved RandLA-Net network consists of an input layer, an output layer, 5 encoder layers, 5 decoder layers, a bilateral enhancement module and a bottleneck layer, and the bilateral enhancement module is between the encoder layer and the bottleneck layer;

[0101] After generating the three-dimensional point cloud data corresponding to the citrus fruit tree, end-to-end semantic segmentation is performed on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergence state, so as to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, wherein the basic network architecture of the semantic segmentation model is an improved RandLA-Net network, and the improved RandLA-Net network is composed of an input layer, an output layer, 5 encoder layers, 5 decoder layers, a bilateral enhancement module and a bottleneck layer, and the bilateral enhancement module is between the encoder layer and the bottleneck layer;

[0102] Furthermore, the step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes:

[0103] In the encoder layer, each layer in the encoder layer contains a dilated residual block, which processes the input features and downsamples the features by sharing a multi-layer perceptron, a local spatial encoding module, and an attention pooling module.

[0104] Furthermore, the step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes:

[0105] Step S301: In the dilated residual block, obtain the input feature (N, d in ), where N is the number of points, d in is the feature dimension of each point. The input point feature is converted into (N, d in / 2);

[0106] Step S303, local space encoding: the features (N, d in / 2) Combined with the three-dimensional coordinates (N,3) of each point, the generated shape is (N,d in ) characteristics;

[0107] Step S305, attention pooling: the features (N, d in )Through the attention pooling module, the attention score is first calculated, and the calculated attention score is weighted on the feature to generate a new feature (N,d in );

[0108] Step S307, Shortcut path: the input feature (N, din ) is transformed into (N,d in / 2), as a shortcut path;

[0109] Step S309, residual connection and activation function: add the features of the main path and the shortcut path, and output the final features (N, 2d in ).

[0110] In this application, the improved RandLA-Net network (Random Local Point Cloud Feature Aggregation Network) is applied to citrus tree point cloud data generated by the Neural Radiance Field model (NeRF) to achieve accurate semantic segmentation of ripe fruits, unripe fruits and other parts of the citrus tree.

[0111] Compared with the original RandLA-Net network, the main improvement of this application is to add a bilateral enhancement module (BEM) between the original encoding layer (EncoderLayer) and the bottleneck layer (Bottleneck Layer). The main structure of the improved RandLA-Net consists of an input layer, an output layer, 5 encoder layers and 5 decoder layers, a BEM layer and a bottleneck layer.

[0112] See also Figure 3 , Figure 3 This is the improved RandLA-Net network structure diagram with the addition of bilateral enhancement modules.

[0113] Among them, the dilated residual block (Dilated Res Block) belongs to the encoder layer (EncoderLayer) in the network structure. In the encoder part, each layer uses the dilated residual block to process the input features. These residual blocks are responsible for local feature aggregation and feature pyramid construction in the encoder layer.

[0114] Specifically, the structure of the encoder layer is as follows: Encoder Layer 1 to Encoder Layer 5, each layer contains a dilated residual block. The dilated residual block processes the input features through a shared multi-layer perceptron (Shared MLP), a local spatial encoding module (LoCSE) and an attention pooling module (Attentive Pooling), and performs feature downsampling.

[0115] Furthermore, the processing steps of the dilated residual block include:

[0116] Get input features (N, d in), where N is the number of points, d in is the feature dimension of each point; the input feature first passes through a shared multi-layer perceptron (MLP) to convert the feature dimension into (N, d in / 2);

[0117] Local spatial encoding: Features (N, d in / 2) Combined with the three-dimensional coordinates (N,3) of each point, the generated shape is (N,d in ), which is done by computing the relative position encoding of each point relative to its nearest neighbor and then concatenating it with the input feature;

[0118] Attention pooling: The features output by the local spatial encoding module (N, d in )Through the attention pooling mechanism, the attention score is first calculated. The calculated attention score weights the features to generate new features (N,d in );

[0119] Shortcut path (skip connection): the initial features of the input (N, d in ) is directly transformed into (N,2d in ), as a shortcut path. This part implements the residual connection, so that the input feature can jump directly to the output, retaining the original feature information.

[0120] Residual connection and activation function: add the features of the main path and the shortcut path, and output the final features (N, 2d in ), the output of this step is (N,2d in ) combines the high-level features extracted and aggregated by the shortcut path (N,2d in ) and the retained input feature information (features on the shortcut path). This residual connection method helps alleviate the gradient vanishing problem in deep networks and improves the expressiveness of the network.

[0121] In some embodiments, the shortcut path directly passes the input data to the next few layers of the network without going through complex transformations in the middle. This design allows the network to learn the residual of the input (i.e., the difference between the original input and the expected output), thereby improving the training effect and stability of the model.

[0122] Furthermore, the segmentation of citrus fruit point cloud data requires highly accurate distinction between the fruit and its surroundings, which is particularly challenging in dense vegetation. Fruits are usually small in size and closely connected to other plant parts in space, making it difficult for ordinary point cloud processing networks to accurately segment them. The bilateral enhancement module can effectively enhance the feature expression of citrus fruit by considering the spatial and feature similarities between points and their neighborhoods. Specifically, the bilateral enhancement module uses spatial proximity and feature similarity weights to maintain local details of the fruit region while suppressing noise and non-target features, thereby improving the accuracy and robustness of segmentation.

[0123] The bilateral enhancement module (BEM) achieves feature enhancement through the following steps, including:

[0124] In the bilateral enhancement module, the relative position encoding module in the bilateral enhancement module calculates the relative position and distance between the point and its neighboring points, and uses the relative position and distance between the point and its neighboring points as features. The calculation formula includes:

[0125] relative xyz =xyz tile -neighbor xyz ,

[0126]

[0127] relative feature =concat(relative dis ,relative xyz ,xyz tile ,neighbor xyz ),

[0128] Among them, relative xyz Indicates the relative position of each point to its neighboring points, neighbor xyz Represents the coordinates of the neighborhood point, xyz tile is obtained by copying xyz and neighbor xyz Matrices of the same shape, xyz represents the three-dimensional coordinates of the point, relative dis is the Euclidean distance between each point and its neighboring points, relative feature It is a combination of relative distance, relative position, original coordinates and neighborhood point coordinates;

[0129] In the local feature aggregation module of the bilateral enhancement module, the relative position feature and the neighborhood point feature are combined to achieve feature fusion and enhancement. The calculation formula includes:

[0130] f concat1=concat(f neighbours ,f xyz1 ),

[0131] f pcagg1 =attention pooling (f concat1 ),

[0132] f concat2 =concat(f neighbours ,f xyz2 ),

[0133] f pcagg2 =attention pooling (f concat2 ),

[0134] Among them, f concat1 is the neighborhood point feature f neighbours and relative position feature f xyz1 The splicing features, f pcagg1 It is through attention pooling pooling f concat1 Features after weighted aggregation;

[0135] In the attention pooling module of the bilateral enhancement module, the attention weight of each point to its neighboring points is calculated, and the features of the neighboring points are weighted averaged to further enhance the feature expression. The calculation formula includes:

[0136] att activation = dense(f reshaped ),

[0137] att scores =softmax(att activation ),

[0138] f agg =∑(f reshaped *att scores ),

[0139] Among them, att activation is the reshaped feature f reshaped The activation value obtained by performing the full connection operation, att scores is the attention activation value att activation The attention weight obtained by performing the softmax activation function operation, f agg is obtained by reshaping the feature f reshaped According to the attention weight att scores Aggregate features obtained by weighted averaging;

[0140] The dilated residual block combines the local feature aggregation module and the attention pooling module to achieve feature enhancement and transfer, and its calculation formula includes:

[0141] f pc1 =conv2d(feature),

[0142]

[0143] shortcut = conv2d(feature),

[0144] output = leaky relu (f pc2 + shortcut),

[0145] Among them, f pc1 It is the intermediate feature obtained by convolution operation on the input feature feature. It is built by local feature aggregation block f pc1 The shortcut is the shortcut connection feature obtained by convolution operation on the input feature feature. The output is obtained by processing f pc2 The final output feature is obtained by adding the shortcut and passing through the leakyReLU activation function.

[0146] From the above embodiment, it can be seen that the bilateral enhancement module generates a comprehensive weight for feature enhancement by combining the spatial proximity weight with the feature similarity weight. This fusion method can effectively highlight the features of small targets (i.e., fruits) while suppressing background noise;

[0147] By applying comprehensive weights, the bilateral enhancement module is able to enhance local details in the fruit area and maintain the clarity of the fruit edges. This is critical for accurate segmentation and subsequent agricultural operations such as automated harvesting. Specifically, the bilateral enhancement module uses these weights to adjust the feature representation of each point, thereby enhancing target features and suppressing non-target features and noise. Application experiments of the bilateral enhancement module have shown that it helps maintain the clarity of the fruit edges, which is very important for subsequent agricultural operations such as automated harvesting. By strengthening the distinction between fruits and other plant parts, the bilateral enhancement module enables RandLA-Net to more effectively learn and predict the exact location and range of the fruit, thereby optimizing the overall segmentation performance.

[0148] The step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes:

[0149] Step S3001, using a preset training set to train the improved RandLA-Net network, wherein each point in the training set has been marked as a fruit or a non-fruit part. During the training process, the improved RandLA-Net network learns to identify and classify different fruit tree components from the local structural features of the point cloud through its random sampling and local feature aggregation mechanism;

[0150] Step S3003: After the training is completed, the preprocessed fruit tree point cloud data is input into the improved RandLA-Net network for semantic segmentation. The improved RandLA-Net network outputs a semantic label for each point to distinguish between ripe citrus fruits, unripe citrus fruits, and citrus tree parts.

[0151] Specifically, the citrus tree point cloud data generated by the neural radiance field model (NeRF) is subjected to necessary preprocessing steps, including filtering and normalization, to standardize the citrus tree point cloud data and eliminate noise and outliers. These steps ensure the quality of the input data and lay a solid foundation for subsequent efficient segmentation.

[0152] The specific steps for preprocessing citrus tree point cloud data are as follows:

[0153] Convert citrus tree point cloud data into PLY files: The original point cloud data file is converted into a PLY format file, each line contains information such as position, color, and label, and all points of each instance are aggregated to generate point cloud data containing fruit and background labels.

[0154] Grid sampling and KDTree generation: Use the grid sampling method to downsample the citrus tree point cloud data, perform mean processing on the points in each 0.04m cube, and count the number of categories in each cube, taking the category with the largest proportion as the sampled category. Save the sampled point cloud data as a PLY file, and generate a KDTree for efficient spatial query, saving the projection information for verification.

[0155] Furthermore, the improved RandLA-Net network is trained using a detailed annotated training set, in which each point has been labeled as a ripe citrus fruit, an unripe citrus fruit, and a citrus tree part;

[0156] During the training process, the improved RandLA-Net network learns to identify and classify different fruit tree components from the local structural features of the point cloud through its random sampling and local feature aggregation mechanism;

[0157] After training, the preprocessed fruit tree point cloud data is input into the improved RandLA-Net network for semantic segmentation. The network outputs the semantic label of each point to distinguish between ripe citrus fruits, unripe citrus fruits and citrus tree parts. This process focuses on accurately identifying and segmenting the point cloud data corresponding to ripe citrus fruits and unripe citrus fruits from the complex tree structure.

[0158] Furthermore, the segmentation results are evaluated to verify the performance of the improved RandLA-Net network in the fruit tree point cloud semantic segmentation task. Common evaluation indicators such as recognition accuracy, intersection over union (IOU) of a single target and mean IOU are used to measure the accuracy and effectiveness of the model in identifying and segmenting fruits.

[0159] Through these steps, this application demonstrates the effectiveness and accuracy of the improved RandLA-Net in processing complex fruit tree point cloud data generated by an advanced neural radiance field model (NeRF), thereby providing support for automated fruit tree management and decision-making.

[0160] Step S40: The picking robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position to complete the picking positioning of the ripe citrus fruit.

[0161] After extracting the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, the picking robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and the three-dimensional space coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position to complete the picking positioning of the ripe citrus fruit.

[0162] In some embodiments, after the picking operation robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and the three-dimensional space coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position, the method includes:

[0163] Step S401: The pruning robot responds to a citrus tree pruning instruction and determines three-dimensional point cloud data corresponding to the citrus tree;

[0164] Step S403, determining the corresponding positions of citrus branches and citrus trunks based on the three-dimensional point cloud data corresponding to the citrus trees, and pruning the citrus trees in the citrus trees based on the corresponding positions of the citrus branches to complete the picking positioning of the ripe citrus fruits.

[0165] In some embodiments, in order to verify the effectiveness and robustness of the BEM module, the present application applies the RandLA-Net network containing the BEM module to the large public dataset S3DIS and the self-made fruit point cloud dataset, and uses the three indicators of overall classification accuracy (eval accuracy), mean intersection over union (mIoU) and mean classification accuracy (mAcc) to evaluate the performance of the model on these datasets. The calculation formulas of each indicator are as follows:

[0166]

[0167] Among them, Accuracy i Represents the accuracy of the i-th category, N is the total number of categories, TP is true positive, FP is false positive, and FN is false negative. In some embodiments, in the training setting, we performed 100 epochs of training on a single GeForce RTX 3090 GPU, and each epoch contained 500 gradient updates. The batch size during training was set to 6, and the initial learning rate was 1e-2. Our project RandLA-Net-BEM is implemented using the Linux system and the TensorFlow 2.60 framework.

[0168] See also Figures 4 to 6 ,in, Figure 4 A schematic diagram showing the change in training accuracy during model training; Figure 5 A schematic diagram showing the changes in learning rate during model training; Figure 6 Schematic diagram showing the change of loss value during model training; by analyzing these charts, we can draw the following conclusions: The training accuracy (Training AccuracyOver Steps) rises rapidly to a high level (about 90% or more) within the first 5000 steps, and then the rate of improvement slows down, but still maintains a steady growth, indicating that the model can effectively learn and maintain high accuracy. The learning rate (Training Learning RateOver Steps) gradually decreases at first, which is the result of the learning rate decay strategy. After each training, the learning rate is multiplied by a fixed factor (0.95) until it reaches a stable value. Gradually reducing the learning rate helps the model improve performance quickly in the early stages of training and avoid excessive oscillations through more subtle adjustments in the later stages. The loss value (Training Loss Over Steps) decreases rapidly at the beginning, indicating that the model can quickly reduce the error in the early stages. As the number of training steps increases, the rate of loss decreases slowly, but the overall trend remains downward, indicating that the model continues to optimize its parameters.

[0169] In some embodiments, in order to more intuitively demonstrate the actual function of the bilateral enhancement module (BEM), the present application compares the effect of the BEM module from the following four perspectives: original input data, label of each point in the image, segmentation effect of the original RandLA-Net network, and segmentation effect of the improved RandLA-Net network; please refer to Figures 7 to 10 ,in, Figure 7 A schematic diagram representing the original input image; Figure 8 A diagram showing the labels for each point in the image; Fig. 9 Schematic diagram showing the segmentation effect of the original RandLA-Net network; Fig.10 Schematic diagram showing the segmentation effect of the improved RandLA-Net network; through the test and visualization result analysis of the bilateral enhancement module (BEM), it can be clearly seen that the module is effective in the segmentation task. By comparing the segmentation effects of four perspectives, the results show that the original RandLA-Net network works well in identifying fruits that are not blocked by branches and leaves, but the effect is significantly reduced when processing fruits that are partially blocked by branches and leaves in the canopy of fruit trees. When processing the S3DIS data set, the improved model has a significantly higher success rate in identifying the target boundary than the original RandLA-NET network. From the processing performance of the two data sets, it is not difficult to see that the RandLA-Net network (Ours) with integrated BEM module is superior to the original network in both detail processing and overall segmentation effect. Therefore, it can be concluded that the bilateral enhancement module proposed in this application plays a significant role in enhancing the point cloud segmentation task and significantly improves the accuracy and reliability of the model.

[0170] It can be seen from the above embodiments that the present application proposes an improved RandLA-Net network and applies it to the fruit semantic segmentation task. By introducing a bilateral enhancement module, accurate semantic segmentation of ripe fruits, unripe fruits, and branches and leaves of fruit trees is achieved. Experimental results show that the improved RandLA-Net network exhibits higher accuracy and robustness when processing fruit data.

[0171] Based on the original RandLA-Net network, this application introduces a bilateral enhancement module (BEM), which effectively improves the performance of the network in the fruit semantic segmentation task. The bilateral enhancement module (BEM) enhances the effect of feature processing through the local spatial encoding module (LoCSE) and the attention pooling module (Attentive Pooling);

[0172] Through experiments on a self-made fruit point cloud dataset, the improved RandLA-Net network outperforms the original network in multiple evaluation indicators, including average classification accuracy (mAcc), overall classification accuracy (eval accuracy) and mean intersection over union (mIoU). These results show that adding a bilateral enhancement module can significantly improve the accuracy of fruit semantic segmentation.

[0173] By visualizing the experimental results, we can intuitively see the actual effect of the bilateral enhancement module in the segmentation task. The improved network shows better segmentation effect in processing the boundaries between fruits and branches and leaves, especially in better identifying ripe fruits in complex backgrounds.

[0174] It can be seen from the above embodiments that, compared with the prior art, the present application aims at the problems that the image-based modeling method in the prior art is easily affected by factors such as illumination changes and occlusion, and it is difficult to accurately restore the complex structure of the fruit tree, and the point cloud-based modeling method, whose point cloud noise, sparseness and other problems may affect the accuracy of modeling. The present application includes but is not limited to the following beneficial effects:

[0175] First, the output of the NeRF model is used to construct detailed point cloud maps of fruit trees. These point cloud maps not only capture the geometric structure and color information of the fruit trees and fruits, but also reflect the complex texture and branch distribution of the tree, providing accurate three-dimensional data for subsequent agricultural applications such as fruit maturity judgment, automated fruit picking, automated pruning and health monitoring of fruit trees. By combining the colmap algorithm and the NeRF model, this application can achieve accurate three-dimensional reconstruction of fruit trees, and the effectiveness of this method has been verified by experimental results. In addition, this method provides a new technical approach for obtaining three-dimensional structural data of fruit trees using a non-invasive method, and has the potential to be extended to other plants or complex scenes.

[0176] Second, this application proposes an improved RandLA-Net network and applies it to the fruit semantic segmentation task. By introducing a bilateral enhancement module, the accurate semantic segmentation of ripe fruits, unripe fruits, and branches and leaves of fruit trees is achieved. The improved RandLA-Net network shows higher accuracy and robustness when processing fruit data.

[0177] Third, based on the original RandLA-Net network, this application introduces a bilateral enhancement module (BEM), which effectively improves the performance of the network in the fruit semantic segmentation task. The bilateral enhancement module (BEM) enhances the effect of feature processing through the local spatial encoding module (LoCSE) and the attention pooling module (Attentive Pooling);

[0178] Fourthly, the bilateral enhancement module combines the spatial proximity weight with the feature similarity weight to generate a comprehensive weight for feature enhancement. This fusion method can effectively highlight the features of small targets (i.e., fruits) while suppressing background noise; through the application of comprehensive weights, the bilateral enhancement module can enhance the local details of the fruit area and maintain the clarity of the fruit edges. This is crucial for accurate segmentation and subsequent agricultural operations (such as automated picking). Specifically, the bilateral enhancement module uses these weights to adjust the feature representation of each point, thereby enhancing target features and suppressing non-target features and noise. Application experiments of the bilateral enhancement module have shown that it helps to maintain the clarity of the fruit edges, which is very important for subsequent agricultural operations such as automated picking. By strengthening the distinction between fruits and other plant parts, the bilateral enhancement module enables the RandLA-Net network to more effectively learn and predict the exact location and range of ripe fruits, thereby optimizing the overall segmentation performance;

[0179] Furthermore, the citrus fruit picking and positioning method of the present application, through the accurate and rapid positioning of ripe fruits, lays a solid theoretical foundation for the automated picking of ripe fruits, thereby greatly saving manpower and material resources.

[0180] See also Fig.11, a citrus fruit picking and positioning device provided to meet one of the purposes of the present application, includes a camera pose determination module 1100, a fruit tree point cloud determination module 1200, a semantic segmentation module 1300 and a picking and positioning module 1400. Among them, the camera pose determination module 1100 is configured to respond to citrus fruit picking and positioning instructions, obtain citrus fruit tree images at various angles, call the preset colmap algorithm to extract feature points from the citrus fruit tree images at various angles and match them to generate camera pose data corresponding to the citrus fruit tree images; the fruit tree point cloud determination module 1200 is configured to use a neural radiation field model that has been trained to a convergent state to learn an implicit three-dimensional representation of the citrus fruit tree from the citrus fruit tree images at various angles according to the camera pose data to generate three-dimensional point cloud data corresponding to the citrus fruit tree; the semantic segmentation module 1300 is configured to perform end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergent state. Cut to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, wherein the basic network architecture of the semantic segmentation model is an improved RandLA-Net network, and the improved RandLA-Net network consists of an input layer, an output layer, 5 encoder layers, 5 decoder layers, a bilateral enhancement module and a bottleneck layer, and the bilateral enhancement module is between the encoder layer and the bottleneck layer; a picking positioning module 1400 is configured for a picking operation robot to determine the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and the three-dimensional space coordinates corresponding to the ripe citrus fruit, and drive its manipulator to pick the ripe citrus fruit according to the picking position to complete the picking positioning of the ripe citrus fruit.

[0181] Based on any embodiment of this application, please refer to Fig.12 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Fig.12 As shown, a schematic diagram of 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. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a citrus fruit picking and positioning method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the citrus fruit picking and positioning method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Fig.12The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0182] In this embodiment, the processor is used to execute Fig.11 The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the citrus fruit picking and positioning device of the present application, and the server can call the program code and data of the server to execute the functions of all submodules.

[0183] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the citrus fruit picking and positioning method described in any embodiment of the present application.

[0184] The present application also provides a computer program product, including a computer program / instruction, which, when executed by one or more processors, implements the steps of the citrus fruit picking and positioning method described in any embodiment of the present application.

[0185] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0186] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

[0187] In summary, the citrus fruit picking and positioning method of the present application, by accurately and quickly positioning the ripe fruits, lays a solid theoretical foundation for the automated picking of ripe fruits, greatly saving manpower and material resources.

Claims

1. A citrus fruit picking and positioning method, characterized in that: include: In response to the citrus fruit picking positioning instruction, the citrus fruit tree images at various angles are obtained, and the preset colmap algorithm is called to extract and match feature points from the citrus fruit tree images at various angles to generate camera pose data corresponding to the citrus fruit tree images; Using the neural radiation field model that has been trained to a convergent state, based on the camera pose data, learn the implicit three-dimensional representation of the citrus tree from the citrus tree images at various angles to generate three-dimensional point cloud data corresponding to the citrus tree; Based on the semantic segmentation model that has been trained to a convergent state, end-to-end semantic segmentation is performed on the three-dimensional point cloud data corresponding to the citrus fruit tree to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, wherein the basic network architecture of the semantic segmentation model is an improved RandLA-Net network, and the improved RandLA-Net network consists of an input layer, an output layer, 5 encoder layers, 5 decoder layers, a bilateral enhancement module and a bottleneck layer, and the bilateral enhancement module is between the encoder layer and the bottleneck layer; The picking robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and three-dimensional spatial coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position to complete the picking positioning of the ripe citrus fruit.

2. The citrus fruit picking and positioning method according to claim 1, characterized in that: The steps of using a neural radiation field model that has been trained to a convergent state to learn an implicit three-dimensional representation of a citrus tree from the citrus tree images at various angles according to the camera pose data to generate three-dimensional point cloud data corresponding to the citrus tree include: The citrus tree images at various angles and their corresponding camera pose data are input into a neural radiation field model that has been trained to convergence, the scene is densely sampled, and a multi-layer perceptron is used to predict the volume density and viewing angle-dependent radiance of each position to generate high-quality images.

3. The citrus fruit picking and positioning method according to claim 1, characterized in that: The step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes: In the encoder layer, each layer in the encoder layer contains a dilated residual block, which processes the input features and downsamples the features by sharing a multi-layer perceptron, a local spatial encoding module, and an attention pooling module.

4. The citrus fruit picking and positioning method according to claim 3, characterized in that: The step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes: In the dilated residual block, the input feature (N,d in ), where N is the number of points, d in is the feature dimension of each point. The input point feature is converted into (N, d in / 2); Local spatial encoding: The features (N, d in / 2) Combined with the three-dimensional coordinates (N,3) of each point, the generated shape is (N,d in ) characteristics; The features output by the local spatial encoding module (N,d in )Through the attention pooling module, the attention score is first calculated, and the calculated attention score is weighted on the feature to generate a new feature (N,d in ); The input features (N,d in ) is transformed into (N,d in / 2), as a shortcut path; Residual connection and activation function: Add the features of the main path and the shortcut path, and output the final features (N, 2d in ).

5. The citrus fruit picking and positioning method according to claim 1, characterized in that: The step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes: In the bilateral enhancement module, the relative position encoding module in the bilateral enhancement module calculates the relative position and distance between the point and its neighboring points, and uses the relative position and distance between the point and its neighboring points as features. The calculation formula includes: relative xyz =xyz tile -neighbor xyz , relative feature =concat(relative dis ,relative xyz ,xyz tile ,neighbor xyz ), Among them, relative xyz Indicates the relative position of each point to its neighboring points, neighbor xyz Represents the coordinates of the neighborhood point, xyz tile is obtained by copying xyz and neighbor xyz Matrices of the same shape, xyz represents the three-dimensional coordinates of the point, relative dis is the Euclidean distance between each point and its neighboring points, relative feature It is a combination of relative distance, relative position, original coordinates and neighborhood point coordinates; In the local feature aggregation module of the bilateral enhancement module, the relative position feature and the neighborhood point feature are combined to achieve feature fusion and enhancement. The calculation formula includes: f concat1 =concat(f neighbours ,f xyz1 ), f pcagg1 =attention pooling (f concat1 ), f concat2 =concat(f neighbours ,f xyz2 ), f pcagg2 =attention pooling (f concat2 ), Among them, f concat1 is the neighborhood point feature f neighbours and relative position feature f xyz1 The splicing features, f pcagg1 It is through attention pooling pooling f concat1 Features after weighted aggregation; In the attention pooling module of the bilateral enhancement module, the attention weight of each point to its neighboring points is calculated, and the features of the neighboring points are weighted averaged to further enhance the feature expression. The calculation formula includes: to activation =dense(f reshaped ), to scores =softmax(to activation ), f agg =∑(f reshaped *to scores ), Among them, att activation is the reshaped feature f reshaped The activation value obtained by performing the full connection operation, att scores is the attention activation value att activation The attention weight obtained by performing the softmax activation function operation, f agg is obtained by reshaping the feature f reshaped According to the attention weight att scores Aggregate features obtained by weighted averaging; The dilated residual block combines the local feature aggregation module and the attention pooling module to achieve feature enhancement and transfer, and its calculation formula includes: f pc1 =conv2d(feature), shortcut = conv2d(feature), output=leaky relu (f pc2 +shortcut), Among them, f pc1 It is the intermediate feature obtained by convolution operation on the input feature feature. It is built by local feature aggregation block f pc1 The features obtained by processing, shortcut is the shortcut connection feature obtained by convolution operation on the input feature feature, and the output is obtained by convolution operation on f pc2 The final output feature is obtained by adding the shortcut and passing through the leaky ReLU activation function.

6. The citrus fruit picking and positioning method according to claim 1, characterized in that: The step of performing end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on the semantic segmentation model that has been trained to a convergent state to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit includes: The improved RandLA-Net network is trained using a preset training set, wherein each point in the training set has been marked as a fruit or a non-fruit part. During the training process, the improved RandLA-Net network learns to identify and classify different fruit tree components from the local structural features of the point cloud through its random sampling and local feature aggregation mechanism; After training, the preprocessed fruit tree point cloud data is input into the improved RandLA-Net network for semantic segmentation. The improved RandLA-Net network outputs the semantic label of each point to distinguish between ripe citrus fruits, unripe citrus fruits and citrus tree parts.

7. The citrus fruit picking and positioning method according to claim 6, characterized in that: The picking operation robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and the three-dimensional space coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position, and then comprises: In response to a citrus tree pruning instruction, determine three-dimensional point cloud data corresponding to the citrus tree; The corresponding positions of citrus branches and citrus trunks are determined based on the three-dimensional point cloud data corresponding to the citrus trees, and the citrus trees in the citrus trees are pruned based on the corresponding positions of the citrus branches to complete the picking positioning of the ripe citrus fruits.

8. A citrus fruit picking and positioning device, characterized in that: include: The camera posture determination module is configured to respond to the citrus fruit picking positioning instruction, obtain citrus fruit tree images at various angles, call a preset colmap algorithm to extract feature points from the citrus fruit tree images at various angles and match them to generate camera posture data corresponding to the citrus fruit tree images; A fruit tree point cloud determination module is configured to use a neural radiation field model that has been trained to a convergence state to learn an implicit three-dimensional representation of the citrus tree from the citrus tree images at various angles according to the camera pose data, so as to generate three-dimensional point cloud data corresponding to the citrus tree; A semantic segmentation module, configured to perform end-to-end semantic segmentation on the three-dimensional point cloud data corresponding to the citrus fruit tree based on a semantic segmentation model that has been trained to a convergence state, so as to extract the three-dimensional point cloud data and three-dimensional space coordinates corresponding to the ripe citrus fruit, wherein the basic network architecture of the semantic segmentation model is an improved RandLA-Net network, and the improved RandLA-Net network is composed of an input layer, an output layer, 5 encoder layers, 5 decoder layers, a bilateral enhancement module and a bottleneck layer, and the bilateral enhancement module is between the encoder layer and the bottleneck layer; The picking positioning module is configured so that a picking operation robot determines the picking position of the ripe citrus fruit according to the three-dimensional point cloud data and three-dimensional spatial coordinates corresponding to the ripe citrus fruit, and drives its manipulator to pick the ripe citrus fruit according to the picking position to complete the picking positioning of the ripe citrus fruit.

9. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

Citation Information

Patent Citations

  • Picking point positioning method

    CN110223349A

  • Three-dimensional point cloud semi-automatic labeling method and system, electronic equipment and storage medium

    CN114299285A

  • Litchi three-dimensional phenotype measurement method based on neural radiation field

    CN117746421A

  • 3D rendering networks based on refractive neural radiance fields

    WO2023086398A1

Cited By

  • Neural radiation field-based phenotype acquisition method and device

    CN119273838A

  • Fruit ripening detection method and electronic equipment

    CN121027436A