A method and system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5

Through the improved CBoTs-yolov5 algorithm model and system, the intelligence of mushroom growth period identification and number statistics is realized, the complex problems of manual statistics are solved, the accuracy and efficiency are improved, and labor costs are reduced.

CN115690780BActive Publication Date: 2025-08-08HUAZHONG AGRI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211515062.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2025-08-08
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

In the prior art, the identification and number of mushroom growth periods mainly rely on manual labor, resulting in complex and waste of human resources, lacking intelligence and efficiency.

Method used

The improved CBoTs-yolov5 algorithm model is adopted, combined with the mushroom information edge acquisition device and cloud platform, and pictures are obtained through the camera module, and the edge intelligent gateway transmits data. The cloud platform identifies the mushroom maturity and molding period number, and stores the data in the database and provides the mobile terminal to users.

Benefits of technology

It improves the accuracy of shiitake mushroom maturity and number statistics, reduces labor waste, improves production efficiency and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690780B_ABST
    Figure CN115690780B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5. The system comprises a shiitake mushroom information edge acquisition device, a cloud platform, and a mobile terminal. The shiitake mushroom information edge acquisition device includes a camera module, a control module, and an edge intelligent gateway. The camera module is used to capture images of shiitake mushrooms on a mushroom rack and transmit the images to the edge intelligent gateway in the form of data frames. The control module is used to adjust the ambient brightness during the camera module's capture. The cloud platform is used to receive the image information sent by the edge intelligent gateway and use the CBoTs-yolov5 algorithm to identify the maturity period and the number of shiitake mushrooms in the image information. This invention not only improves the accuracy of identifying the maturity and number of shiitake mushrooms, thereby increasing production efficiency, but also reduces labor waste.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of shiitake mushroom cultivation, and in particular to a method and system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5. Background Art

[0002] Shiitake mushrooms have a long history of cultivation in China. By improving mushroom production methods and incorporating technology into production, industrialized edible mushroom production can increase efficiency and yield, while reducing production costs and the risks associated with labor uncertainty. The YOLO family of algorithms uses a single neural network to complete all stages of object detection, increasing model speed.

[0003] In addition, it has good generalization ability and can be easily trained to detect different objects. Many scholars have applied yolov5 in various fields and achieved good application results.

[0004] At present, the identification of the growth period and the number statistics of shiitake mushrooms are mainly completed manually. This statistical method is complicated and does not require too much judgment in the statistical process, which causes a lot of waste of human resources. The yolov5 algorithm has not been applied to the field of shiitake mushroom growth period identification and number statistics. How to improve the intelligence and efficiency of shiitake mushroom cultivation technology has become a problem that we urgently need to solve. Summary of the Invention

[0005] In view of the above problems, the present invention provides a method and system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5, which not only improves the accuracy of identifying the maturity and number statistics of shiitake mushrooms, improves production efficiency, but also reduces manpower waste.

[0006] In order to achieve the above-mentioned and other related purposes, the present invention provides the following technical solutions:

[0007] A shiitake mushroom number and growth period identification system based on CBoTs-yolov5, the system comprising a shiitake mushroom information edge collection device, a cloud platform and a mobile terminal;

[0008] The mushroom information edge collection device includes a camera module, a control module and an edge intelligent gateway. The camera module is used to obtain mushroom pictures on the mushroom rack and send the mushroom pictures to the edge intelligent gateway in the form of data frames. The control module is used to adjust the ambient brightness when the camera module is shooting.

[0009] The cloud platform is used to receive the image information sent by the edge intelligent gateway, and use the CBoTs-yolov5 algorithm to identify the maturity period of the mushrooms and the number of mushrooms in the forming period in the image information. After identification, the cloud platform stores the data in a database;

[0010] The mobile terminal is used to receive the data information on the number and growth period of shiitake mushrooms sent by the cloud platform and provide it to the user.

[0011] Furthermore, the cloud platform includes a CBoTs-yolov5 algorithm model and a database. The CBoTs-yolov5 algorithm model is an algorithm model with higher recognition accuracy obtained by improving the yolov5 algorithm model. The database includes an image storage table, a recognition result table and a greenhouse device table.

[0012] Furthermore, the CBoTs-yolov5 algorithm model includes:

[0013] M1: Obtain several sets of mushroom growth pictures and construct a mushroom growth period dataset;

[0014] M2: Use a graphic annotation tool to annotate the shiitake mushroom growth period dataset, and after annotation, randomly divide the shiitake mushroom growth period dataset into a shiitake mushroom growth period training set, a shiitake mushroom growth period test set, and a shiitake mushroom growth period validation set in a ratio of 6:2:2;

[0015] M3: Replace the C3 module in the BackBone structure of the original yolov5 network model with the CBoT module, add a small target detection layer to the original yolov5 network model, add the CBAM module to the neck structure of the original yolov5 network model, and build the CBoTs-yolov5 model;

[0016] M4: using the shiitake mushroom growth period training set, the shiitake mushroom growth period test set, and the shiitake mushroom growth period validation set to train the CBoTs-yolov5 model to obtain the optimal model weight;

[0017] M5: Deploy the CBoTs-yolov5 model with the optimal model weights to the cloud platform.

[0018] Furthermore, in step M3, it includes:

[0019] M31: Add Multi-Head Self-Attention to the BottleNeck of the 8th layer C3 module in the BackBone structure of the original yolov5 network model to obtain the CBoT module;

[0020] M32: Add another layer of upsampling and other processing to the neck structure in the network model formed in step M31, and output a feature map of size P / 4;

[0021] M33: Add a CBAM module before outputting the characteristic size map of the neck structure in the network model formed in step M32.

[0022] Furthermore, in step M31, the Multi-Head Self-Attention input is the height, width, and dimension of the feature matrix. After that, three convolutional layers with a convolution kernel size of 1 are used to obtain the query matrix, key matrix, and value matrix. The key matrix is matrix multiplied by the query matrix to obtain part of the attention. At the same time, two parameter vectors are initialized to represent the position encoding of different positions of height and width respectively. The two position encodings of the same dimension are added and then matrix multiplied with the query matrix to obtain another part of the attention. The two attentions are added and then normalized with the softmax function to obtain the total attention. The attention is matrix multiplied with the value matrix to obtain the output of the Multi-Head Self-Attention.

[0023] Furthermore, the upsampling process in step M31 is to continue to add a convolution layer with a convolution kernel size of one after the 17th layer of the original yolov5 network structure, and then add a layer of Upsample upsampling, and then connect the P / 4 size feature map in the BackBone structure with the upsampling result, and then pass through a layer of C3 structure to output the P / 4 size feature map to the Prediction layer, and then construct the corresponding downward fusion, and add a convolution layer with a convolution kernel size of 3 and a step size of 2 after the C3 structure, and then connect the P / 8 size feature map in the BackBone structure with the convolution result, and then add a layer of C3 structure, and then the original structure is moved backward in sequence.

[0024] Furthermore, in step M33, the CBAM module is a module that combines the channel attention module and the spatial attention module, and the CBAM module is placed after the C3 module that outputs the feature map.

[0025] Furthermore, P is the image input size in the CBoTs-yolov5 network model.

[0026] In order to achieve the above-mentioned and other related purposes, the present invention also provides a method for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5, comprising the following steps:

[0027] Q1: Based on the edge collection device of mushroom information, the camera module is initialized to determine whether the current time is the hour. If yes, go to step Q2; otherwise, go to step Q1.

[0028] Q2: The camera module takes pictures of the mushrooms on the corresponding mushroom rack and sends them to the edge intelligent gateway. After receiving the pictures, the edge intelligent gateway sends the pictures to the cloud platform in the format of data frames via WiFi.

[0029] Q3: The cloud platform uses the CBoTs-yolov5 algorithm model to identify the number of mature shiitake mushrooms, the number of formed shiitake mushrooms, and the total number in the image, and stores the number of mature shiitake mushrooms, the number of formed shiitake mushrooms, and the total number in the recognition result table in the database;

[0030] Q4: The cloud platform determines whether the current time is ten minutes past the hour. If yes, it goes to step Q5; otherwise, it goes to step Q4.

[0031] Q5: The cloud platform counts the number of mature shiitake mushrooms, the number of mature shiitake mushrooms, and the total number of shiitake mushrooms on different mushroom racks in the same mushroom shed, and stores the number of mature shiitake mushrooms, the number of mature shiitake mushrooms, and the total number of shiitake mushrooms identified on different mushroom racks in the same mushroom shed into a database;

[0032] Q6: The cloud platform transmits the number of mature shiitake mushrooms, the number of formed shiitake mushrooms and the total number identified by different mushroom racks in the same mushroom shed to the mobile terminal through the 4G or 5G network for display.

[0033] Furthermore, the mobile terminal includes one or more of a computer and a mobile phone.

[0034] The present invention has the following positive effects:

[0035] 1. The present invention uses the camera module, control module and edge intelligent gateway in the mushroom information edge acquisition device to obtain image data information of the mushroom growth period in real time, and adopts intelligent control to improve the accuracy of image acquisition.

[0036] 2. The present invention processes the acquired shiitake mushroom image data information by adopting the CBoTs-yolov5 algorithm model, and the obtained shiitake mushroom statistical data is accurate, thereby improving the production efficiency of shiitake mushrooms.

[0037] 3. The present invention statistically processes the mushroom data information through the cloud platform and sends it to the mobile terminal, reducing the manual statistics of the mushroom data, thereby reducing the labor cost in the production process. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is an overall block diagram of the system of the present invention;

[0039] Figure 2 This is a flow chart for implementing the CBoTs-yolov5 algorithm model of the present invention;

[0040] Figure 3 It is a schematic diagram of the process flow of the method of the present invention;

[0041] Figure 4 This is a diagram of the Multi-Head Self-Attention structure of the present invention;

[0042] Figure 5 This is a comparison chart of the CBoTs-yolov5 algorithm model of the present invention and the yolov5 training results;

[0043] Figure 6 This is the result diagram of the CBoTs-yolov5 algorithm model of the present invention in identifying the growth period of shiitake mushrooms. DETAILED DESCRIPTION

[0044] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0045] Example 1: Figure 1 As shown, a shiitake mushroom number and growth period identification system based on CBoTs-yolov5, the system includes a shiitake mushroom information edge collection device, a cloud platform and a mobile terminal;

[0046] The mushroom information edge collection device includes a camera module, a control module and an edge intelligent gateway. The camera module is used to obtain mushroom pictures on the mushroom rack and send the mushroom pictures to the edge intelligent gateway in the form of data frames. The control module is used to adjust the ambient brightness when the camera module is shooting.

[0047] The cloud platform is used to receive the image information sent by the edge intelligent gateway, and use the CBoTs-yolov5 algorithm to identify the maturity period of the mushrooms and the number of mushrooms in the forming period in the image information. After identification, the cloud platform stores the data in a database;

[0048] The mobile terminal is used to receive the data information on the number and growth period of shiitake mushrooms sent by the cloud platform and provide it to the user.

[0049] In this embodiment, the cloud platform includes a CBoTs-yolov5 algorithm model and a database. The CBoTs-yolov5 algorithm model is an algorithm model with higher recognition accuracy obtained by improving the yolov5 algorithm model. The database includes an image storage table, a recognition result table, and a greenhouse device table.

[0050] Specifically, the database includes an image table, a recognition result table, a mushroom shed table, and a device table. The image table includes fields for image name, image size, image storage path, mushroom shed ID, mushroom rack ID, and mushroom information edge collection device ID. The recognition result table consists of two tables: a mushroom rack recognition result table and a mushroom shed recognition result table. The mushroom rack recognition result table includes fields for the number of shiitake mushrooms in the forming period, the number of shiitake mushrooms in the forming period, and the total number of shiitake mushrooms, a mushroom shed ID, a mushroom rack ID, and a mushroom information edge collection device ID. The mushroom shed recognition result table includes fields for the total number of shiitake mushrooms in the shed during the forming period, the total number of shiitake mushrooms in the shed during the forming period, and the total number of shiitake mushrooms in the shed, a mushroom shed ID, and a mushroom information edge collection device ID. The mushroom shed table includes fields for the mushroom shed ID, mushroom rack ID, mushroom shed location, and person in charge phone number. The device table includes fields for the information edge collection device ID, mushroom shed ID, mushroom rack ID, and device status.

[0051] In this embodiment, the mobile terminal includes a visualization interface and a control center. The visualization interface includes a line graph of the number of mushrooms in the mushroom shed, a pie chart of the distribution of mushroom growth periods, a carousel showing pictures taken by the mushroom information edge collection device, and a carousel showing pictures recognized by the cloud platform and a mushroom shed distribution map. The control center includes a user who can modify the timed photo taking time of the camera module in the mushroom information edge collection device, add, delete, modify, and search for mushroom sheds in the system, add, delete, modify, and search for mushroom information edge collection devices in the mushroom shed, bind and unbind the relationship between the mushroom information edge collection device and the mushroom rack in the mushroom shed, and bind and unbind the relationship between the mushroom rack and the mushroom shed.

[0052] In this embodiment, the edge intelligent gateway in the mushroom information edge collection device includes one of Raspberry Pi, esp32, and 32 microcontrollers, the camera module in the mushroom information edge collection device includes one of OV2640 module, OV5640 module, and OV7670 module, and the control module in the mushroom information edge collection device is composed of an adjustable light bulb.

[0053] In this embodiment, the cloud platform includes Alibaba Cloud server 1 core 2GB shared computing type n4 series III.

[0054] like Figure 2 As shown, in this embodiment, the CBoTs-yolov5 algorithm model includes:

[0055] M1: Obtain several sets of mushroom growth pictures and construct a mushroom growth period dataset;

[0056] M2: Use a graphic annotation tool to annotate the shiitake mushroom growth period dataset, and after annotation, randomly divide the shiitake mushroom growth period dataset into a shiitake mushroom growth period training set, a shiitake mushroom growth period test set, and a shiitake mushroom growth period validation set in a ratio of 6:2:2;

[0057] M3: Replace the C3 module in the BackBone structure of the original yolov5 network model with the CBoT module, add a small target detection layer to the original yolov5 network model, add the CBAM module to the neck structure of the original yolov5 network model, and build the CBoTs-yolov5 model;

[0058] M4: using the shiitake mushroom growth period training set, the shiitake mushroom growth period test set, and the shiitake mushroom growth period validation set to train the CBoTs-yolov5 model to obtain the optimal model weight;

[0059] M5: Deploy the CBoTs-yolov5 model with the optimal model weights to the cloud platform.

[0060] Wherein, in step M3, it includes:

[0061] M31: Add Multi-Head Self-Attention to the BottleNeck of the 8th layer C3 module in the BackBone structure of the original yolov5 network model to obtain the CBoT module;

[0062] M32: Add another layer of upsampling and other processing to the neck structure in the network model formed in step M31, and output a feature map of size P / 4;

[0063] M33: Add a CBAM module before outputting the characteristic size map of the neck structure in the network model formed in step M32.

[0064] Among them, in step M31, the input of Multi-Head Self-Attention is the height, width and dimension of the feature matrix. Then, three convolution layers with a convolution kernel size of 1 are used to obtain the query matrix, key matrix and value matrix. The key matrix is matrix multiplied by the query matrix to obtain part of the attention. At the same time, two parameter vectors are initialized to represent the position encoding of different positions of height and width respectively. The two position encodings of the same dimension are added and then matrix multiplied with the query matrix to obtain another part of the attention. The two attentions are added and then normalized with the softmax function to obtain the total attention. The attention is matrix multiplied with the value matrix to obtain the output of Multi-Head Self-Attention.

[0065] Among them, the upsampling processing in the step M31 is to continue to add a convolution layer with a convolution kernel size of 1 after the 17th layer of the original yolov5 network structure, and then add a layer of Upsample upsampling, and then connect the P / 4 size feature map in the BackBone structure with the upsampling result, and then pass through a layer of C3 structure to output the P / 4 size feature map to the Prediction layer, and then construct the corresponding downward fusion, and add a convolution layer with a convolution kernel size of 3 and a step size of 2 after the C3 structure, and then connect the P / 8 size feature map in the BackBone structure with the convolution result, and then add a layer of C3 structure, and then the original structure is moved backward in sequence.

[0066] In this embodiment, the CBAM module in step M33 is a module that combines the channel attention module and the spatial attention module. The CBAM module is placed after the C3 module that outputs the feature map, and P is the image input size in the CBoTs-yolov5 network model.

[0067] Example 2: Based on the CBoTs-yolov5-based shiitake mushroom number and growth period identification system in Example 1, the present invention is further described below.

[0068] like Figure 3 As shown, the present invention also provides a method for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5, comprising the following steps:

[0069] Q1: Based on the edge collection device of mushroom information, the camera module is initialized to determine whether the current time is the hour. If yes, go to step Q2; otherwise, go to step Q1.

[0070] Q2: The camera module takes pictures of the mushrooms on the corresponding mushroom rack and sends them to the edge intelligent gateway. After receiving the pictures, the edge intelligent gateway sends the pictures to the cloud platform in the format of data frames via WiFi.

[0071] Q3: The cloud platform uses the CBoTs-yolov5 algorithm model to identify the number of mature shiitake mushrooms, the number of formed shiitake mushrooms, and the total number in the image, and stores the number of mature shiitake mushrooms, the number of formed shiitake mushrooms, and the total number in the recognition result table in the database;

[0072] Q4: The cloud platform determines whether the current time is ten minutes past the hour. If yes, it goes to step Q5; otherwise, it goes to step Q4.

[0073] Q5: The cloud platform counts the number of mature shiitake mushrooms, the number of mature shiitake mushrooms, and the total number of shiitake mushrooms on different mushroom racks in the same mushroom shed, and stores the number of mature shiitake mushrooms, the number of mature shiitake mushrooms, and the total number of shiitake mushrooms identified on different mushroom racks in the same mushroom shed into a database;

[0074] Q6: The cloud platform transmits the number of mature shiitake mushrooms, the number of formed shiitake mushrooms and the total number identified by different mushroom racks in the same mushroom shed to the mobile terminal through the 4G or 5G network for display.

[0075] In this embodiment, the mobile terminal includes one or more of a computer and a mobile phone.

[0076] In this embodiment, if Figure 4 The figure shows the structure of Multi-Head Self-Attention. The input of Multi-Head Self-Attention is the height, width, and dimension of the feature matrix. After that, the query matrix, key matrix, and value matrix are obtained through three convolution layers with a convolution kernel size of 1. The key matrix and the query matrix are matrix multiplied to obtain part of the attention. At the same time, two parameter vectors are initialized to represent the position encoding of different positions of height and width respectively. The two position encodings of the same dimension are added and then matrix multiplied with the query matrix to obtain another part of the attention. The two attentions are added and then normalized with the softmax function to obtain the total attention. The attention is matrix multiplied with the value matrix to obtain the output of Multi-Head Self-Attention.

[0077] In this embodiment, it is a CBoTs-yolov5 model structure diagram. On the basis of the original yolov5 model, the C3 module of the eighth layer is replaced by the CBoT module. After the 17th layer, a convolution layer with a convolution kernel size of one is added, and then a layer of Upsample is added. The feature map of P / 4 size in the BackBone structure is connected with the upsampling result. After that, after a layer of C3 structure, the feature map of P / 4 size is output to the Prediction layer, and then the corresponding downward fusion is constructed. After the C3 structure, a convolution layer with a convolution kernel size of 3 and a step size of 2 is added. The feature map of P / 8 size in the BackBone structure is connected with the convolution result, and then a layer of C3 structure is added. After that, the original structure is shifted backward in sequence, and the CBAM module is placed after the C3 module that outputs the feature map.

[0078] In this embodiment, the deep learning environment built is the Windows 10 operating system, the PyTorch framework, the Pycharm integrated development environment, the CPU is the Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz, the Python 3.8 language, and the CBoTs-yolov5 model is combined with the Django framework and deployed on the cloud platform. The cloud platform is the Alibaba Cloud server 1 core 2GB shared computing type n4 series III.

[0079] In this embodiment, if Figure 5 As shown, by comparing the CBoTs-yolov5 algorithm model provided by the present invention with the yolov5 training results, it can be seen that the CBoTs-yolov5 algorithm model provided by the present invention processes data more accurately, which can provide great technical support for the subsequent picking and statistics of shiitake mushrooms.

[0080] In this embodiment, if Figure 6 The figure shows the results of the CBoTs-yolov5 algorithm model of the present invention in identifying the growth period of shiitake mushrooms. From the figure, we can see that the image recognition accuracy is high and it can fully extract each picture in the growth cycle of shiitake mushrooms, providing us with important information support. There is no need for manual photography and statistics one by one, which greatly reduces the labor cost in the production process.

[0081] In summary, the present invention not only improves the accuracy of identifying the maturity of shiitake mushrooms and counting their numbers, thereby increasing production efficiency, but also reduces manpower waste.

[0082] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5, characterized in that: The system includes a mushroom information edge collection device, a cloud platform and a mobile terminal; The mushroom information edge collection device includes a camera module, a control module and an edge intelligent gateway. The camera module is used to obtain mushroom pictures on the mushroom rack and send the mushroom pictures to the edge intelligent gateway in the form of data frames. The control module is used to adjust the ambient brightness when the camera module is shooting. The cloud platform is used to receive the image information sent by the edge intelligent gateway, and use the CBoTs-yolov5 algorithm to identify the maturity period of the mushrooms and the number of mushrooms in the forming period in the image information. After identification, the cloud platform stores the data in a database; The mobile terminal is used to receive data information on the number and growth period of shiitake mushrooms sent by the cloud platform and provide it to the user; the cloud platform includes a CBoTs-yolov5 algorithm model and a database, the CBoTs-yolov5 algorithm model is an algorithm model with higher recognition accuracy obtained by improving the yolov5 algorithm model, and the database includes an image storage table, a recognition result table, and a greenhouse device table; the CBoTs-yolov5 algorithm model includes: M1. Obtain several sets of mushroom growth images and construct a mushroom growth period dataset; M2. Annotate the shiitake mushroom growth period dataset using a graphic annotation tool, and after annotation, randomly divide the shiitake mushroom growth period dataset into a shiitake mushroom growth period training set, a shiitake mushroom growth period test set, and a shiitake mushroom growth period validation set in a ratio of 6:2:2; M3. Replace the C3 module in the BackBone structure of the original yolov5 network model with the CBoT module, add a small target detection layer to the original yolov5 network model, add the CBAM module to the neck structure of the original yolov5 network model, and build the CBoTs-yolov5 model; M4. Train the CBoTs-yolov5 model using the shiitake mushroom growth period training set, the shiitake mushroom growth period test set, and the shiitake mushroom growth period validation set to obtain the optimal model weight; M5. Deploy the CBoTs-yolov5 model with the optimal model weights to the cloud platform; in step M3, including: M31. Add Multi-Head Self-Attention to the BottleNeck of the 8th layer C3 module in the BackBone structure of the original yolov5 network model to obtain the CBoT module; M32. Add another layer of upsampling and other processing to the neck structure of the network model formed in step M31, and output a feature map of size P / 4; M33. Add a CBAM module before the neck structure is about to output the feature size map in the network model formed in step M32; in step M31, the input of Multi-Head Self-Attention is the height, width and dimension of the feature matrix of the mushroom picture information, and then pass through three convolution layers with a convolution kernel size of 1 to obtain the query matrix, key matrix and value matrix, and then perform matrix multiplication on the key matrix and the query matrix to obtain part of the attention. At the same time, initialize two parameter vectors to represent the position encoding of different positions of height and width respectively, add the two position encodings of the same dimension and then perform matrix multiplication with the query matrix to obtain another part of the attention, add the two attentions and then perform normalized softmax function to obtain the total attention, and perform matrix multiplication on the attention and the value matrix to obtain the output of Multi-Head Self-Attention.

2. The system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5 according to claim 1, characterized in that: The upsampling process in step M31 is to continue to add a convolution layer with a convolution kernel size of 1 after the 17th layer of the original yolov5 network structure, and then add a layer of Upsample upsampling, and then connect the P / 4 size feature map in the BackBone structure with the upsampling result, and then pass through a layer of C3 structure, output the P / 4 size feature map to the Prediction layer, and then construct the corresponding downward fusion, add a convolution layer with a convolution kernel size of 3 and a step size of 2 after the C3 structure, and then connect the P / 8 size feature map in the BackBone structure with the convolution result, and then add a layer of C3 structure, and then the original structure is moved backward in sequence.

3. The system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5 according to claim 1, characterized in that: In step M33, the CBAM module is a module that combines the channel attention module and the spatial attention module, and the CBAM module is placed after the C3 module of the output feature map.

4. The system for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5 according to claim 1, characterized in that: The P is the image input size in the CBoTs-yolov5 network model.

5. A method for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5, characterized in that: The CBoT-yolov5-based shiitake mushroom number and growth period identification system applied to any one of claims 1 to 4 comprises the following steps: Q1. Based on the edge of the mushroom information acquisition device, the camera module is initialized to determine whether the current time is the hour, if so, go to step Q2, if not, go to step Q1; Q2. The camera module captures the corresponding mushroom rack on the mushroom picture and sends it to the edge smart gateway. After receiving the picture, the edge smart gateway sends the picture to the cloud platform in the format of a data frame via WiFi; Q3. The cloud platform calls the CBoTs-yolov5 algorithm model to identify the number of mature mushrooms, the number of formed mushrooms, and the total number in the image, and stores the number of mature mushrooms, the number of formed mushrooms, and the total number in the recognition result table in the database; Q4. The cloud platform determines whether the current time is ten minutes past the hour. If so, go to step Q5; otherwise, go to step Q4. Q5. The cloud platform counts the number of mature mushrooms, the number of shaped mushrooms, and the total number of mushrooms in different mushroom racks in the same mushroom shed, and stores the number of mature mushrooms, the number of shaped mushrooms, and the total number of mushrooms identified in different mushroom racks in the same mushroom shed in the database; Q6. The cloud platform transmits the number of mature shiitake mushrooms, the number of formed shiitake mushrooms, and the total number identified by different mushroom racks in the same mushroom shed to the mobile terminal via the 4G or 5G network for display.

6. The method for identifying the number and growth period of shiitake mushrooms based on CBoTs-yolov5 according to claim 5, characterized in that: The mobile terminal includes one or more of a computer and a mobile phone.

Citation Information

Patent Citations

  • Real-time detection and counting method for solanaceous vegetables and fruits in plant factory

    CN114581816A

  • Banana growth period identification method and system based on deep learning

    CN114972292A