Fruit detection method and device fusing multi-modal information

Through the RGB-D dual-branch feature fusion network model, combined with RGB and depth information, the problem of low detection accuracy of traditional RGB single-mode deep learning algorithms under severe occlusion is solved, and the efficiency and accuracy of fruit detection is achieved, which promotes the The automation process of fruit cultivation.

CN119048887APending Publication Date: 2024-11-29ANHUI AGRICULTURAL UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411142530.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

When traditional RGB single-modal deep learning algorithm encounters severe occlusion in fruit recognition detection, the detection accuracy is low, and it cannot effectively solve the problem of branch and leaf occlusion and fruit overlap occlusion, which affects the automation process of fruit planting and production.

Method used

The RGB-D dual-branch feature fusion network model is adopted, combined with RGB images and depth images, and preliminary feature extraction is performed through the bneck structure of the MobileNet-v3 Large network, and the weighted splicing and fusion features are used for the deep encoder and RGB encoder, and the ASPP module is used. and pyramid pooling to enhance feature extraction, and finally upsample in the decoder to output the predicted segmented image of the fruit area.

Benefits of technology

The accuracy of fruit detection is improved, especially in severe occlusion, and rapid and effective fruit detection is achieved, which promotes the automation process of fruit planting and production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048887A_ABST
    Figure CN119048887A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-modal information fused fruit detection method and device. The method comprises the following steps: acquiring an RGB image containing a to-be-detected fruit and a corresponding depth image; the RGB image and the depth image are preprocessed respectively; and inputting the preprocessed RGB image and the depth image into a pre-trained RGB-D double-branch feature fusion network model, and outputting a prediction segmentation image of the fruit region, the network model comprising an RGB-D double-branch encoder, a reinforced feature extraction structure and a decoder. According to the embodiment of the invention, the method can effectively solve a problem that the fruit recognition detection of a conventional RGB single-mode deep learning algorithm is lower in precision under severe shielding, achieves the quick and effective detection of fruits, and promotes the automation process of fruit planting and production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision recognition, and in particular to a fruit detection method and device integrating multimodal information. Background Art

[0002] The fruit industry is an important part of agricultural and rural economic development. At present, the daily management and picking of fruit planting still rely on manual labor, which is not only labor-intensive and inefficient, but also highly subjective. With the development of artificial intelligence technology, it is possible to use agricultural robots to replace manual labor for intelligent orchard management and picking, which can not only reduce labor costs and improve production efficiency, but also promote the large-scale development of the fruit industry. Fruit visual recognition belongs to the field of computer vision, which aims to achieve fruit detection, positioning and segmentation with the help of computer technology. It is an important prerequisite for realizing intelligent orchard management and mechanized picking.

[0003] In recent years, domestic and foreign scholars have conducted a lot of research on the visual recognition and segmentation of fruits and vegetables. Afonso et al. used the Mask R-CNN model with ResNext101 as the main body to detect ripe and unripe tomato fruits. The experiment proved that the detection accuracy of the model reached 95%, but the experiment did not consider the influence of factors such as branch and leaf occlusion and fruit overlap occlusion, and it was impossible to determine the working level of the model in the actual production environment (Frontiers in Plant Science, 2020, 11: 571299-571310). Zhang et al. proposed a visual detection and posture classification algorithm based on improved YOLOv5 (Computers and Electronics in Agriculture, 2024, 216: 108519). However, when the fruit overlaps or the occlusion area is high in actual picking, this type of algorithm only relies on the color or texture features in the RGB image, lacks sufficient spatial information, and inevitably leads to the problem of reduced detection accuracy. Summary of the invention

[0004] The purpose of the present invention is to provide a fruit detection method and device that integrates multimodal information to address the deficiencies in the prior art, effectively solve the problem of low accuracy of fruit recognition detection under severe occlusion using a traditional RGB single-modal deep learning algorithm, achieve fast and effective fruit detection, and promote the automation of fruit planting and production.

[0005] An embodiment of the present application provides a fruit detection method integrating multimodal information, the method comprising:

[0006] Obtain an RGB image containing the fruit to be detected and a corresponding depth image;

[0007] Preprocessing the RGB image and the depth image respectively;

[0008] The preprocessed RGB image and depth image are input into a pre-trained RGB-D dual-branch feature fusion network model to output a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

[0009] Optionally, the preprocessing the RGB image and the depth image separately includes:

[0010] Performing data enhancement on the RGB image, wherein the data enhancement includes: performing rotation, mirroring, increasing brightness, decreasing brightness, and adding noise operations;

[0011] Rotation and mirroring operations are performed on the depth image accordingly.

[0012] Optionally, the RGB-D dual-branch encoder includes: a depth encoder, an RGB encoder and an RGB-D feature fusion module; wherein,

[0013] The bneck structure of the MobileNet-v3 Large network is used to build an RGB-D dual-branch encoder for preliminary feature extraction;

[0014] The output feature layer of each layer of the depth encoder is weightedly concatenated and fused with the output feature layer of each layer of the RGB encoder. The fused feature layer is enhanced by the CA attention mechanism and used as the input feature of the next layer in the RGB encoder.

[0015] Optionally, an ASPP module and pyramid pooling are used to construct an enhanced feature extraction structure, and the enhanced feature extraction structure is used to further extract features from preliminary features obtained after feature extraction by the RGB-D dual-branch encoder.

[0016] Optionally, the decoder first performs a convolution operation on the feature layer after the second fusion in the encoder, and then stacks it with the up-sampled result after feature extraction by the enhanced feature extraction structure, and then performs a depth-separable convolution, and finally performs up-sampling, so that the network outputs a predicted segmentation result of the same size as the network input image.

[0017] Another embodiment of the present application provides a fruit detection device integrating multimodal information, the device comprising:

[0018] An acquisition module, used to acquire an RGB image containing the fruit to be detected and a corresponding depth image;

[0019] A processing module, used for preprocessing the RGB image and the depth image respectively;

[0020] The output module is used to input the preprocessed RGB image and depth image into a pre-trained RGB-D dual-branch feature fusion network model, and output a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

[0021] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.

[0022] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.

[0023] Compared with the prior art, the present invention provides a fruit detection method integrating multimodal information, which obtains an RGB image and a corresponding depth image containing a fruit to be detected; preprocesses the RGB image and the depth image respectively; inputs the preprocessed RGB image and the depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputs a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder, thereby effectively solving the problem of low accuracy of fruit recognition detection of a traditional RGB single-modal deep learning algorithm under severe occlusion, realizing fast and effective fruit detection, and promoting the automation process of fruit planting and production. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A hardware structure block diagram of a computer terminal for a fruit detection method integrating multimodal information provided by an embodiment of the present invention;

[0025] Figure 2 A schematic diagram of a flow chart of a fruit detection method integrating multimodal information provided by an embodiment of the present invention;

[0026] Figure 3 A schematic diagram of a fruit RGB image and a corresponding depth image provided by an embodiment of the present invention;

[0027] Figure 4 An effect diagram obtained after data enhancement of an RGB image provided by an embodiment of the present invention;

[0028] Figure 5 A fruit labeling schematic diagram and a converted mask diagram using labelme software provided in an embodiment of the present invention;

[0029] Figure 6 A schematic diagram of the structure of an RGB-D dual-branch feature fusion network provided by an embodiment of the present invention;

[0030] Figure 7 A schematic diagram of the detection effect of an RGB-D dual-branch feature fusion network provided in an embodiment of the present invention;

[0031] Figure 8 A schematic diagram of the structure of a fruit detection device integrating multimodal information provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0033] In view of the problem that the existing fruit visual detection algorithm is difficult to maintain high recognition accuracy when branches and leaves are occluded or fruits are overlapped and occluded seriously, the present invention introduces visible light and deep multimodal information, designs a lightweight network based on RGB-D dual-branch feature fusion, effectively solves the problem of low accuracy of fruit recognition detection of traditional RGB single-modal deep learning algorithm under severe occlusion, realizes fast and effective fruit detection, and promotes the automation process of fruit planting and production.

[0034] The embodiment of the present invention firstly provides a fruit detection method integrating multimodal information, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, etc.

[0035] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a fruit detection method integrating multimodal information provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0036] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the fruit detection method for integrating multimodal information in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0037] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0038] See also Figure 2-Figure 7 , an embodiment of the present invention provides a fruit detection method integrating multimodal information, the method may include the following steps:

[0039] S201, obtaining an RGB image and a corresponding depth image containing a fruit to be detected;

[0040] Specifically, a portable RGB-D camera may be used to obtain an RGB-D image of the fruit, wherein the RGB image and the depth image are in one-to-one correspondence.

[0041] S202, preprocessing the RGB image and the depth image respectively;

[0042] Specifically, data enhancement may be performed on the RGB image, wherein the data enhancement includes: performing rotation, mirroring, increasing brightness, reducing brightness, and adding noise operations; and performing corresponding rotation and mirroring operations on the depth image.

[0043] S203, inputting the preprocessed RGB image and depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputting a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

[0044] Specifically, the RGB-D dual-branch encoder includes: a depth encoder, an RGB encoder and an RGB-D feature fusion module;

[0045] Among them, the bneck structure of the MobileNet-v3 Large network can be used to build an RGB-D dual-branch encoder for preliminary feature extraction;

[0046] The output feature layer of each layer of the depth encoder is weightedly concatenated and fused with the output feature layer of each layer of the RGB encoder. The fused feature layer is enhanced by the CA attention mechanism and used as the input feature of the next layer in the RGB encoder.

[0047] Among them, the ASPP module and pyramid pooling can be used to construct an enhanced feature extraction structure, and the enhanced feature extraction structure is used to further extract features from the preliminary features obtained after feature extraction by the RGB-D dual-branch encoder.

[0048] Among them, the decoder first performs a convolution operation on the feature layer after the second fusion in the encoder, and then stacks it with the up-sampled result after feature extraction by the enhanced feature extraction structure, and then performs a depth-separable convolution, and finally up-samples, so that the network outputs a predicted segmentation result of the same size as the network input image.

[0049] In practical application, the specific steps of the technical solution of the present invention are:

[0050] Step S1: First, use a portable RGB-D camera to obtain an RGB-D image of the fruit, where the RGB image and the depth image are one-to-one corresponding. To facilitate subsequent network calculations, based on the PyCharm operating platform, a Python script is used to normalize the size of the collected RGB-D image data and convert the image size into 512×512 pixels. Taking tomato fruit as an example, the obtained RGB-D image data is as follows: Figure 3 As shown, including: RGB image and depth image;

[0051] Step S2: using data enhancement technology to expand the number of image samples and increase the complexity of training samples to better train the model;

[0052] Furthermore, the data enhancement operation in step S2 includes rotating, mirroring, increasing brightness, decreasing brightness, and adding noise to the RGB input image, wherein the rotation is The image rotates and the brightness changes to The value of each pixel in the image is increased or decreased within the range to change the brightness of the image. Salt and pepper noise is used for noise addition. Examples of data enhancement processing are as follows Figure 4As shown in the figure. During data enhancement, the number of images is increased by rotating, mirroring, increasing brightness, decreasing brightness, and adding noise to the original image. The number of images will increase, and the expanded image will contain the original image and the expanded image after the data enhancement operation, thereby increasing the number of samples. Among them, when the RGB image is rotated and mirrored, the corresponding depth image is transformed in the same way. When the brightness is increased, decreased, and noise is added, the depth image corresponding to the RGB image remains unchanged and is simply copied to ensure a one-to-one correspondence between the RGB image and the depth image.

[0053] Step S3: Label the dataset using Labelme and generate json labels, and use Python scripts to convert json labels into mask images so that the pixel information of tomato fruits can be read during network training. At the same time, the dataset is randomly divided into a validation set (val) and a training set (train) with a ratio of 1:9. The generated training set and validation set files will contain RGB images and the corresponding depth images and path indexes of mask images;

[0054] Furthermore, in the data labeling process of step S3, a labeling method is adopted in which the target object is labeled point by point along the target contour until the target object is completely wrapped, and ripe fruits, green fruits and fruits in the color change period are labeled as "ripe", "unripe" and "veraison" respectively. Figure 5 As shown in (a), after using Python script to convert the annotated json label file into a mask map, we can get the following Figure 5 (b) shows the effect, where different pixel values ​​represent different classes.

[0055] Step S4: Build the dataloader.py file in the code base and define the dataset loading function;

[0056] Furthermore, in the construction of the data set loading function of step S4, first create empty lists for training and verification of RGB images, depth images, and mask images, respectively, and then read the indexes of the RGB images, depth images, and mask images in the training set and verification set generated in step S3, and store them in the corresponding lists respectively. Use the if statement to determine the stage of the network to load the corresponding data: in the network training stage, load the index corresponding to the training list for training; in the network verification stage, use the index corresponding to the verification list for verification.

[0057] Step S5: Build the model.py file in the code base and build a dual-branch feature fusion network;

[0058] Furthermore, the structure diagram of the dual-branch feature fusion network in step S5 is as follows: Figure 6 shown. Figure 6In the figure, CBH represents the convolution normalization activation module, including: Conv2d (two-dimensional convolution operation), BatchNorm2d (batch normalization operation), h-swish activation function, ⊕ represents the weighted fusion operation of RGB feature layer and depth feature layer, Dropout represents the random drop layer, and Upsample represents upsampling.

[0059] Considering the demand for real-time network performance in fruit visual inspection, the present invention intends to use the bneck structure of the MobileNet-v3 Large network to construct an RGB-D dual-branch encoder for preliminary feature extraction. The bneck module of MobileNet-v3 retains the depth-separable convolution of MobileNet-v1 and the inverse residual structure of the linear bottleneck of MobileNet-v2, introduces a lightweight attention module SE (squeeze and excitation), and replaces the swish activation function with the h-swish activation function, which saves calculation time and improves the network calculation speed while ensuring accuracy. The activation function calculation formula is:

[0060]

[0061]

[0062] Where x represents the input value. Through the stacking of the bneck structure, the features of each layer are derived from the outputs of all previous layers. This method provides sufficient nonlinear representation capabilities while keeping the model lightweight, achieving a good balance between computational efficiency and accuracy to cope with fast learning of small samples.

[0063] Furthermore, the present invention proposes to design an RGB-D feature fusion module, which uses the weighted splicing fusion of each layer of the output feature of the depth encoder and each layer of the output feature of the RGB encoder, and then uses the fused feature layer as the input feature of the next layer in the RGB encoder after an enhanced expression of the Coordinate attention (CA) attention mechanism. and RGB features The features obtained after the feature fusion module The expression is:

[0064]

[0065] in:

[0066]

[0067] In the formula, express Convolution operation, , Represents the weight coefficients of the depth feature layer and the RGB feature layer, which will be adaptively updated with the network iteration. , represents the attention weights in the width and height directions obtained from CA, Indicates width, represents height, SiLU represents SiLU activation function, represents the Sigmoid activation function, c represents the number of layers involved in the feature fusion module, , i and j represent pixel indexes.

[0068] Furthermore, in order to further capture contextual information at the same scale and better understand the semantic information in the image, the present invention intends to use the ASPP module (Atrous Spatial Pyramid Pooling) and pyramid pooling to construct an enhanced feature extraction structure, and further process the preliminary features obtained after feature extraction by the RGB-D dual-branch encoder to improve the performance of semantic segmentation, so that the network can more accurately segment the boundaries and details of objects. Features output by the enhanced feature extraction structure It can be expressed as:

[0069]

[0070] In the formula, represents the input feature layer, express Convolution operation, , , represents the dilated convolution operation, where 3 represents the convolution kernel. , 6, 12, 18 are void ratios, Indicates the Concat operation. Represents a global pooling operation.

[0071] Furthermore, the decoder part of the network first performs a feature extraction on the feature layer after the second RGB-D feature fusion in the encoder. The convolution operation adjusts the number of channels, and then stacks the up-sampled results after the enhanced feature extraction structure, and then performs depth-wise separable convolution to obtain the final effective feature layer. Finally, upsampling is performed to make the network output a prediction result of the same size as the network input image.

[0072] Step S6: Build the loss.py file in the code base and use the DiceLoss loss function to optimize the network training parameters;

[0073] Furthermore, the DiceLoss loss function in step S6 can be expressed as:

[0074]

[0075]

[0076]

[0077]

[0078] in, is the Dice coefficient of a metric function used to evaluate the similarity between two samples. is the pixel label of the real segmented image, Predict pixel labels for the segmented image for the model; Approximate the dot product between the pixels of the predicted image and the true label image, and add the dot product results; and They are approximated as the sum of the pixels in their respective corresponding images; and Represents pixels The label value and predicted value of is the total number of pixels, is the pixel value of a single image, is the batchsize.

[0079] Step S7: Build the train.py file in the code base, set the batch-size to 4, the maximum number of iterations to 300, the initial learning rate to 0.004, the minimum learning rate to 0.00001, and the learning rate decay coefficient to 0.1;

[0080] Step S8: training the network model using the constructed fruit data set, stopping the training after the training is completed and obtaining the optimal weight of the network training;

[0081] Step S9: Define the predict.py file in the code base, and use the best weight best.pth obtained after training to segment the fruit image. The network predicts the segmentation effect as follows: Figure 7 shown.

[0082] The technical solution of the present invention designs an RGB-D dual-branch feature fusion semantic segmentation network based on the deep learning of traditional RGB images. In the encoder stage of the network, the present invention first uses the bneck structure of MobileNetV3-Large to respectively construct a lightweight RGB encoder and a deep encoder to extract RGB-D features, so as to obtain preliminary features of image width and height compressed twice and width and height compressed five times, and then uses parallel hole convolutions of different magnifications to extract features for the preliminary features compressed five times, and then merges them to further mine deep information; in the decoder part, the preliminary features compressed twice are first adjusted to the number of channels by 1×1 convolution, and then stacked with the sampling results of the effective feature layer after the hole convolution, and finally two depth separable convolutions are used to obtain the final effective feature layer. The feature layer can realize the segmentation prediction result of the network for the fruit. The RGB-D dual-branch feature fusion network designed by the present invention can use depth information to provide effective geometric information guidance for the feature extraction of the network, and further enhance the network's learning ability for target features. This method can effectively solve the problem of low accuracy of traditional fruit detection network based on RGB single-modal data under severe occlusion, realize fast and effective fruit visual detection, improve fruit detection accuracy, and promote the automation process of fruit planting production.

[0083] It can be seen that by obtaining an RGB image and a corresponding depth image containing the fruit to be detected; preprocessing the RGB image and the depth image respectively; inputting the preprocessed RGB image and the depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputting a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder, thereby effectively solving the problem of low accuracy of fruit recognition detection of traditional RGB single-modal deep learning algorithms under severe occlusion, achieving fast and effective fruit detection, and promoting the automation of fruit planting and production.

[0084] Another embodiment of the present invention provides a fruit detection device integrating multimodal information, see Figure 8 , the device may include:

[0085] An acquisition module 801 is used to acquire an RGB image containing a fruit to be detected and a corresponding depth image;

[0086] A processing module 802 is used to pre-process the RGB image and the depth image respectively;

[0087] The output module 803 is used to input the preprocessed RGB image and depth image into a pre-trained RGB-D dual-branch feature fusion network model, and output a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

[0088] It can be seen that by obtaining an RGB image and a corresponding depth image containing the fruit to be detected; preprocessing the RGB image and the depth image respectively; inputting the preprocessed RGB image and the depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputting a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder, thereby effectively solving the problem of low accuracy of fruit recognition detection of traditional RGB single-modal deep learning algorithms under severe occlusion, achieving fast and effective fruit detection, and promoting the automation of fruit planting and production.

[0089] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0090] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:

[0091] S201, obtaining an RGB image and a corresponding depth image containing a fruit to be detected;

[0092] S202, preprocessing the RGB image and the depth image respectively;

[0093] S203, inputting the preprocessed RGB image and depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputting a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

[0094] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0095] It can be seen that by obtaining an RGB image and a corresponding depth image containing the fruit to be detected; preprocessing the RGB image and the depth image respectively; inputting the preprocessed RGB image and the depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputting a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder, thereby effectively solving the problem of low accuracy of fruit recognition detection of traditional RGB single-modal deep learning algorithms under severe occlusion, achieving fast and effective fruit detection, and promoting the automation of fruit planting and production.

[0096] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0097] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0098] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0099] S201, obtaining an RGB image and a corresponding depth image containing a fruit to be detected;

[0100] S202, preprocessing the RGB image and the depth image respectively;

[0101] S203, inputting the preprocessed RGB image and depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputting a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

[0102] Specifically, the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0103] It can be seen that by obtaining an RGB image and a corresponding depth image containing the fruit to be detected; preprocessing the RGB image and the depth image respectively; inputting the preprocessed RGB image and the depth image into a pre-trained RGB-D dual-branch feature fusion network model, and outputting a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder, thereby effectively solving the problem of low accuracy of fruit recognition detection of traditional RGB single-modal deep learning algorithms under severe occlusion, achieving fast and effective fruit detection, and promoting the automation of fruit planting and production.

[0104] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.

Claims

1. A fruit detection method integrating multimodal information, characterized in that: The method comprises: Obtain an RGB image containing the fruit to be detected and a corresponding depth image; Preprocessing the RGB image and the depth image respectively; The preprocessed RGB image and depth image are input into a pre-trained RGB-D dual-branch feature fusion network model to output a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

2. The method according to claim 1, characterized in that: The preprocessing of the RGB image and the depth image respectively includes: Performing data enhancement on the RGB image, wherein the data enhancement includes: performing rotation, mirroring, increasing brightness, decreasing brightness, and adding noise operations; Rotation and mirroring operations are performed on the depth image accordingly.

3. The method according to claim 1, characterized in that The RGB-D dual-branch encoder includes: a depth encoder, an RGB encoder and an RGB-D feature fusion module; wherein, The bneck structure of the MobileNet-v3 Large network is used to build an RGB-D dual-branch encoder for preliminary feature extraction; The output feature layer of each layer of the depth encoder is weightedly concatenated and fused with the output feature layer of each layer of the RGB encoder. The fused feature layer is enhanced by the CA attention mechanism and used as the input feature of the next layer in the RGB encoder.

4. The method according to claim 3, characterized in that in, The ASPP module and pyramid pooling are used to construct an enhanced feature extraction structure, which is used to further extract features from the preliminary features obtained after feature extraction by the RGB-D dual-branch encoder.

5. The method according to claim 4, characterized in that in, The decoder first performs a convolution operation on the feature layer after the second fusion in the encoder, and then stacks it with the up-sampled result after feature extraction by the enhanced feature extraction structure, and then performs a depth-separable convolution, and finally up-samples, so that the network outputs a predicted segmentation result of the same size as the network input image.

6. A fruit detection device integrating multimodal information, characterized in that: The device comprises: An acquisition module, used to acquire an RGB image containing the fruit to be detected and a corresponding depth image; A processing module, used for preprocessing the RGB image and the depth image respectively; The output module is used to input the preprocessed RGB image and depth image into a pre-trained RGB-D dual-branch feature fusion network model, and output a predicted segmentation image of the fruit area, wherein the network model includes: an RGB-D dual-branch encoder, an enhanced feature extraction structure and a decoder.

7. The system according to claim 6, characterized in that The processing module is specifically used for: Performing data enhancement on the RGB image, wherein the data enhancement includes: performing rotation, mirroring, increasing brightness, decreasing brightness, and adding noise operations; Rotation and mirroring operations are performed on the depth image accordingly.

8. The system according to claim 7, characterized in that The RGB-D dual-branch encoder includes: a depth encoder, an RGB encoder and an RGB-D feature fusion module; wherein, The bneck structure of the MobileNet-v3 Large network is used to build an RGB-D dual-branch encoder for preliminary feature extraction; The output feature layer of each layer of the depth encoder is weightedly concatenated and fused with the output feature layer of each layer of the RGB encoder. The fused feature layer is enhanced by the CA attention mechanism and used as the input feature of the next layer in the RGB encoder.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 5 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Seismic attribute fusion method and device based on deep learning, and program product

    CN119377896A

  • Mask R-CNN-based tunnel face joint information identification method and identification system

    CN119904617A

  • Intelligent tomato maturity identification system and method based on olfaction and vision bimodal fusion

    CN121505598A