Rice identification and counting method and system based on multispectral remote sensing image
By combining the methods of supervising classification and optimizing the YOLOv8 model, the missed and missed detection problems in the identification of rice single plants are solved, efficient rice identification and counting is achieved, the utilization of multi-spectral data and scenario adaptability are improved, and the agricultural informatization process is promoted.
Patent Information
- Application Number
- CN202510202795.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art is difficult to achieve accurate identification of single-plant-level in rice identification, especially in high-density planting scenarios that are susceptible to interference from blurred boundaries of single-plant targets or overlapping targets, resulting in missed or missed detection. At the same time, multi-spectral data is insufficiently utilized and poor scene adaptability.
Combined with the supervised classification model and the optimized YOLOv8 object detection model, pre-processed through multi-spectral remote sensing images, a random forest classifier was used to extract rice areas and generate classification mask maps. Combined with the optimized YOLOv8 model, a single rice plant detection was performed, and non-maximum suppression was performed to improve detection accuracy.
It realizes accurate identification and counting of rice plants, especially in small targets and fuzzy boundary scenarios, improves detection performance and applicability, is suitable for large-area remote sensing scenarios, and promotes the development of agricultural informatization and intelligence.
Smart Images

Figure CN120259871A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of multispectral image detection, and particularly relates to a rice recognition and counting method and system based on multispectral remote sensing images. Background Art
[0002] In the prior art, multispectral image classification is usually used for crop recognition and area estimation in the agricultural field. By analyzing the information of different spectral bands through machine learning algorithms (such as support vector machines, random forests or convolutional neural networks), crop and non-crop areas are distinguished. However, this method mainly focuses on regional classification and it is difficult to achieve accurate single-plant-level recognition. Deep learning object detection algorithms (such as the YOLO series) have been widely used in the recognition and counting of single plants in recent years. With their efficient detection capabilities, they can directly locate and count targets in images. However, in high-density planting scenarios, they are vulnerable to interference from blurred single-plant target boundaries or target overlaps, resulting in missed detections or false detections.
[0003] When detecting and recognizing rice within a region, the prior art mainly focuses on regional classification, making it difficult to achieve accurate single-plant-level recognition. Moreover, in high-density planting scenarios, it is vulnerable to interference from blurred single-plant target boundaries or target overlaps, resulting in missed detections or false detections. In addition, the prior art also has problems such as the separation between classification and detection, the difficulty of detecting small targets, insufficient utilization of multispectral data, and poor scene adaptability. More specifically, the detection methods in the prior art also have the following defects:
[0004] (1) Separation between classification and detection:
[0005] Most methods only focus on regional classification or pixel-level segmentation, making it difficult to achieve the recognition and counting of single-plant targets.
[0006] (2) Difficulty in detecting small targets:
[0007] Traditional object detection algorithms have limited detection performance for dense small targets, especially in special crop scenarios such as rice.
[0008] (3) Insufficient utilization of multispectral data:
[0009] Many existing methods only target RGB images and fail to fully exploit the potential of multispectral remote sensing data.
[0010] (4) Poor scene adaptability:
[0011] Most methods are targeted at close-range or specific crops and have poor applicability in large-area remote sensing scenarios. Summary of the Invention
[0012] The object of the present invention is to provide a rice recognition and counting method and system based on multi-spectral remote sensing images. By combining a supervised classification model and an optimized YOLOv8 object detection model, accurate recognition and counting of individual rice plants are achieved.
[0013] The present invention realizes the above object through the following technical solutions:
[0014] In a first aspect, the present invention proposes a rice recognition and counting method based on multi-spectral remote sensing images, and the method includes:
[0015] Input the pre-collected multi-spectral remote sensing image and perform preprocessing to obtain data to be analyzed;
[0016] Use a supervised classification model to classify the data to be analyzed to extract the rice area and generate a classification mask image;
[0017] Based on the optimized YOLOv8 object detection model, detect the rice area in the classification mask image, identify and locate the position and bounding box of each rice plant, perform non-maximum suppression processing, and obtain the target rice area;
[0018] Count the number of individual rice plants in the target rice area, and mark them on the multi-spectral remote sensing image to display the total counting result.
[0019] Further, the input of the pre-collected multi-spectral remote sensing image and the preprocessing include:
[0020] Input the multi-spectral remote sensing image into the host computer;
[0021] Perform radiometric correction and geometric correction on the multi-spectral remote sensing image in the host computer, and remove noise to obtain multi-spectral data;
[0022] After processing the multi-spectral data, generate spectral feature data for each pixel.
[0023] Further, the use of the supervised classification model to classify the spectral feature data, extract the rice area, and generate a classification mask image includes:
[0024] Load the multi-spectral remote sensing image and its corresponding sample point file;
[0025] According to the coordinates of the sample points, extract the spectral feature values of the corresponding pixels in the image as training features, and form a training data set together with the sample labels;
[0026] Input the training data set into a random forest classifier;
[0027] Use the trained random forest classifier to predict the data to be analyzed and generate a classification mask image, where each pixel in the classification mask image is classified as a "rice area" or a "non-rice area".
[0028] Further, the optimized YOLOv8 object detection model includes:
[0029] Expand the input image format support to be compatible with remote sensing images in TIFF format;
[0030] Upgrade the feature extraction module and adopt a strengthened feature extraction strategy;
[0031] Introduce a bidirectional feature fusion mechanism to fuse feature information at different levels;
[0032] Adjust the size and ratio of the anchor boxes to match the characteristics of individual rice plants;
[0033] Determine and optimize the loss function as the generalized intersection over union.
[0034] Further, before performing non-maximum suppression processing to obtain the target rice area, it also includes: excluding the non-rice areas in the classification mask image and retaining the detection results of the rice areas.
[0035] In a second aspect, the present invention proposes a rice recognition and counting system based on multi-spectral remote sensing images, and the system includes:
[0036] An image input and preprocessing module, configured to input a pre-collected multi-spectral remote sensing image and perform preprocessing to obtain data to be analyzed;
[0037] A supervised classification module, configured to use a supervised classification model to classify the data to be analyzed to extract the rice area and generate a classification mask image;
[0038] An object detection module, configured to detect the rice area in the classification mask image based on the optimized YOLOv8 object detection model, identify and locate the position and bounding box of each rice plant, and perform non-maximum suppression processing to obtain the target rice area;
[0039] A result processing and display module, configured to count the number of individual rice plants in the target rice area, annotate on the multi-spectral remote sensing image, and display the total count result.
[0040] Further, the supervised classification module includes:
[0041] A sample preparation unit: configured to load a multi-spectral remote sensing image and its corresponding sample point file, and the sample point file contains the coordinate and label information of the known rice area and non-rice area;
[0042] Feature extraction unit: According to the coordinate information in the sample point file, extract the spectral feature values of the corresponding pixels from the preprocessed multi-spectral data, and construct a training feature set;
[0043] Model training unit: Adopt the random forest algorithm, and use the training feature set and label information to train the supervised classification model until the model converges;
[0044] Classification and prediction unit: Input the preprocessed multi-spectral data into the trained supervised classification model, perform classification prediction on each pixel, and generate a classification mask map representing the rice area and non-rice area.
[0045] Furthermore, the target detection module includes:
[0046] Image preprocessing unit: Crop or extract the rice area in the classification mask map to adjust it to a format and size suitable for input to the YOLOv8 model;
[0047] Model optimization unit: Optimize the YOLOv8 target detection model, including expanding the support for input image formats to be compatible with the TIFF remote sensing image format, upgrading the feature extraction network to enhance the feature representation ability, introducing a bidirectional feature fusion mechanism, adjusting the anchor box size and ratio, and optimizing the loss function to generalized intersection over union;
[0048] Target detection unit: Use the optimized YOLOv8 model to detect the preprocessed rice area image, and identify and locate the position and bounding box of each rice plant;
[0049] Detection box processing unit: Perform non-maximum suppression on the detected rice bounding boxes to eliminate overlapping detection boxes and obtain the target rice area.
[0050] The beneficial effects of the present invention are as follows:
[0051] 1. By using the supervised classification model to accurately extract the rice area, the present invention effectively reduces the target detection range. Combining with the specifically optimized YOLOv8 target detection model, it realizes the accurate positioning and counting of single rice plants, especially showing excellent performance in small target and boundary fuzzy scenarios. In addition, by excluding non-rice areas, introducing bidirectional feature fusion, adjusting the anchor box size ratio, and optimizing the loss function and other measures, the detection performance and applicability of the system are further enhanced.
[0052] 2. The present invention not only provides an efficient and accurate solution for rice planting monitoring in large-area remote sensing scenarios, but also optimizes resource allocation, ensuring high-quality analysis of key areas. It has broad application prospects and important practical value in the fields of precision agriculture, crop yield estimation, and farmland management, effectively promoting the development process of agricultural informatization and intelligentization. Description of the Drawings
[0053] Figure 1 It is a schematic flow chart of a rice recognition and counting method based on multi-spectral remote sensing images in the present invention;
[0054] Figure 2 It is a schematic diagram of the optimized Yolov8 model structure in the present invention;
[0055] Figure 3 It is another schematic flow chart of a rice recognition and counting method based on multi-spectral remote sensing images in the present invention;
[0056] Figure 4 It is a remote sensing schematic diagram after rice image enhancement in the present invention;
[0057] Figure 5 It is a schematic diagram after excluding non-rice areas in the classification mask map of the present invention;
[0058] Figure 6 It is a schematic diagram of outputting labeled single plants and quantities in the present invention;
[0059] Figure 7 It is a rice reflectance curve graph in the present invention. Detailed implementation manners
[0060] The following further describes the present application in detail with reference to the accompanying drawings. It is necessary to point out here that the following specific implementation manners are only used to further illustrate the present application and cannot be construed as limiting the protection scope of the present application. Those skilled in the art can make some non-essential improvements and adjustments to the present application according to the above application content.
[0061] Example 1
[0062] As Figure 1-7 shown, this embodiment proposes a rice recognition and counting method based on multi-spectral remote sensing images. The method includes the following steps:
[0063] S1. Input the pre-collected multi-spectral remote sensing images and perform preprocessing to obtain the data to be analyzed;
[0064] S2. Use a supervised classification model to classify the data to be analyzed to extract the rice area and generate a classification mask map;
[0065] S3. Based on the optimized YOLOv8 object detection model, detect the rice area in the classification mask map, identify and locate the positions and bounding boxes of each rice plant, and perform non-maximum suppression processing to obtain the target rice area;
[0066] S4. Count the number of single rice plants in the target rice area and mark them on the multi-spectral remote sensing image to display the total counting result.
[0067] It can be understood that in this embodiment, by combining supervised classification and YOLOv8 object detection, the traditional rice recognition process is simplified into an efficient hierarchical processing mode, significantly improving the data processing efficiency. Additionally, in this embodiment, the rice area is first determined through supervised classification, and then YOLOv8 is used to finely identify individual rice plants, effectively reducing the phenomena of false detection and missed detection. Moreover, the optimized YOLOv8 has higher detection accuracy for small targets such as individual rice plants, especially suitable for dense crop areas.
[0068] In this embodiment, in step S1, the pre-collected multispectral remote sensing image is input and preprocessed, including: inputting the multispectral remote sensing image into the host computer; performing radiometric correction and geometric correction on the multispectral remote sensing image in the host computer, and obtaining multispectral data after removing noise; after processing the multispectral data, generating spectral feature data for each pixel.
[0069] In step S2, a supervised classification model is used to classify the spectral feature data, extract the rice area, and generate a classification mask image, including: loading the multispectral remote sensing image and its corresponding sample point file; according to the coordinates of the sample points, extracting the spectral feature values of the corresponding pixels in the image as training features, and forming a training data set together with the sample labels; inputting the training data set into a random forest classifier; using the trained random forest classifier to predict the data to be analyzed, and generating a classification mask image, where each pixel in the classification mask image is classified as "rice area" or "non-rice area".
[0070] Combined Figure 2 As shown, the optimized YOLOv8 object detection model includes: expanding the support for input image formats to be compatible with remote sensing images in TIFF format; upgrading the feature extraction module and adopting an enhanced feature extraction strategy to improve the model's recognition ability for rice features; introducing a bidirectional feature fusion mechanism to fuse feature information at different levels to enhance the accuracy and robustness of the model for rice object detection; adjusting the size and ratio of the anchor box to match the features of individual rice plants and improving the accuracy of target localization; determining and optimizing the loss function as Generalized Intersection over Union (GIoU) to more accurately evaluate the overlap degree between the predicted bounding box and the actual target bounding box, thereby improving the detection performance of the model.
[0071] It can be understood that the recognition and counting method proposed in this embodiment has the following two core steps:
[0072] (1)Combination of Classification and Object Detection: By using a supervised classification model to extract the rice region (segmentation mask image), and then combining with the YOLOv8 object detection model to accurately detect individual rice plants within the masked region, the linkage between region extraction and target recognition is achieved, effectively reducing false detections and interference in non-target regions.
[0073] (2)YOLOv8 Model Optimized for Small Targets: The YOLOv8 model has been systematically improved, including expanding the input image to support the TIFF format, upgrading the Backbone (feature extraction) to ResNet (enhanced feature extraction), introducing BiFPN (bidirectional feature fusion), adjusting the Anchor Box, and optimizing the loss function to GIoU, in order to improve the detection accuracy of small targets.
[0074] It should be noted that in the rice recognition and counting method and system based on multi-spectral remote sensing images, in order to further improve the accuracy and efficiency of object detection, this embodiment adopts a key step: before performing non-maximum suppression (NMS) processing to obtain the target rice region, first exclude the non-rice regions in the classification mask image and only retain the detection results of the rice regions. The implementation of this step has the following remarkable effects:
[0075] Reducing the false detection rate: The classification mask image has initially distinguished the rice region and the non-rice region. However, in the actual detection process, due to factors such as image noise and light changes, some false detections may still occur outside the rice region. By first excluding the non-rice regions, the impact of these false detections on the final counting result can be significantly reduced, improving the detection accuracy.
[0076] Improving the detection efficiency: Non-maximum suppression processing consumes a certain amount of computing resources, especially in the case of densely distributed targets. By first excluding the non-rice regions, the number of detection boxes that need to be processed by NMS is reduced, thereby reducing the computational complexity and improving the detection efficiency.
[0077] Optimizing resource allocation: When processing large-scale remote sensing images, both computing resources and storage resources are limited. By first excluding the non-rice regions, these resources can be more reasonably allocated to ensure high-quality detection and analysis in the key regions (i.e., the rice regions).
[0078] In some alternative embodiments, the above-mentioned recognition and counting method in the solution is also applicable to various remote sensing data, including but not limited to satellite images and drone images, and can be widely applied to different agricultural scenarios.
[0079] According to the above embodiments, when the solution is specifically implemented, it includes the following steps:
[0080] (1) Input the multi-spectral image
[0081] Input the collected multi-spectral image into the host computer.
[0082] (2) Preprocessing: Radiometric correction and geometric correction
[0083] Perform radiometric correction and geometric correction on the image, remove irrelevant noises such as cloud shadows, obtain clean multi-spectral data, and generate spectral feature data for each pixel.
[0084] (3) Multi-spectral classification
[0085] Input: Sample point file (CSV) and remote sensing image (GeoTIFF).
[0086] The detailed process includes:
[0087] 1. Load the data and extract training features.
[0088] 2. Use random forest to train the classification model.
[0089] According to the coordinates of the sample points, extract the matrix values of the corresponding pixels in the image as features (such as B1, B2,..., B6). The features and labels form the training data set.
[0090] 3. Save the classification result as a GeoTIFF file.
[0091] Input the queue value into the trained random forest classifier to predict whether each pixel belongs to the "rice area" or the "non-rice area":
[0092] 4. Browse the pixels and predict the classification result pixel by pixel. Output: The picture is classified as "rice area" (1) and "non-rice area" (0).
[0093] (4) YOLOv8 object detection: Detect single rice plants
[0094] Use the trained YOLOv8 model to detect single rice plants and locate the position and bounding box of each rice plant.
[0095] (5) Result fusion: Classification mask and detection result
[0096] Combine Figure 4 and Figure 5 As shown, exclude the non-rice areas in the classification mask and only retain the detection results of the rice areas. Perform non-maximum suppression (NMS) on the detection results to eliminate duplicate detection boxes and count the number of single rice plants in the detection results.
[0097] (6) Output result: Label single plants and count the total number
[0098] CombineFigure 6 As shown, each rice plant is marked on the original remote sensing image (using a rectangular box). The total count result is displayed as the final output of the analysis.
[0099] Combined with Figure 7 As shown, it shows the reflectance curves of rice at different spectral bands (different wavelengths). The data is based on the acquisition results of multi-spectral remote sensing images. The reflectance curves reflect the reflection characteristics of rice at different bands (such as near-infrared and short-wave infrared, etc.), which is one of the key technical bases for the rice detection and classification method in the present invention.
[0100] (1) Band selection basis: The reflectance curve of rice has obvious band characteristics. Especially in the near-infrared band, the reflectance of rice is relatively high. Based on this characteristic, the present invention improves the detection accuracy of rice by selecting appropriate bands (such as the near-infrared band). In the classification model, the characteristics of specific bands can effectively distinguish rice from the background area, thus realizing efficient and accurate identification of the rice area.
[0101] (2) Rice area identification: The reflectance curve provides a theoretical basis for distinguishing rice from other crops and background ground objects. In the method of the present invention, by extracting the reflectance data of rice at different bands, the rice area can be accurately identified for effective classification and target detection.
[0102] (3) Multi-spectral image optimization: Through the analysis of the rice reflectance curve, the data extraction and processing methods in the multi-spectral image can be further optimized to ensure the classification accuracy and target detection effect. The present invention utilizes this technical feature to achieve a low false detection rate and missed detection rate during the rice area detection.
[0103] Such as for Figure 4 image enhancement and Figure 5 the classification mask of
[0104] Based on the same inventive concept, this embodiment also proposes a rice identification and counting system based on multi-spectral remote sensing images. The system includes:
[0105] An image input and preprocessing module, used to input the pre-collected multi-spectral remote sensing image and perform preprocessing to obtain the data to be analyzed;
[0106] A supervised classification module, used to classify the data to be analyzed using a supervised classification model to extract the rice area and generate a classification mask map;
[0107] The target detection module is used to detect the rice regions in the classification mask image based on the optimized YOLOv8 target detection model, identify and locate the positions and bounding boxes of each rice plant, perform non-maximum suppression processing, and obtain the target rice regions;
[0108] The result processing and display module is used to count the number of individual rice plants in the target rice regions and mark them on the multi-spectral remote sensing image to display the total count result.
[0109] It should be noted here that each module in the above recognition and counting system corresponds to steps S1 to S4 in implementing the above recognition and counting method. The examples and application scenarios implemented by multiple modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 1.
[0110] Further preferably, the supervised classification module includes:
[0111] The sample preparation unit: used to load the multi-spectral remote sensing image and its corresponding sample point file, and the sample point file contains the coordinate and label information of the known rice regions and non-rice regions;
[0112] The feature extraction unit: according to the coordinate information of the sample point file, extract the spectral feature values of the corresponding pixels from the preprocessed multi-spectral data to construct a training feature set;
[0113] The model training unit: adopts the random forest algorithm to train the supervised classification model using the training feature set and label information until the model converges;
[0114] The classification prediction unit: inputs the preprocessed multi-spectral data into the trained supervised classification model, performs classification prediction on each pixel, and generates a classification mask image representing the rice regions and non-rice regions.
[0115] Further preferably, the target detection module includes:
[0116] The image preprocessing unit: crops or extracts the rice regions in the classification mask image to adjust it to a format and size suitable for input to the YOLOv8 model;
[0117] The model optimization unit: optimizes the YOLOv8 target detection model, including expanding the support for input image formats to be compatible with the TIFF remote sensing image format, upgrading the feature extraction network to enhance the feature representation ability, introducing a bidirectional feature fusion mechanism, adjusting the anchor box sizes and ratios, and optimizing the loss function to generalized intersection over union;
[0118] The target detection unit: uses the optimized YOLOv8 model to detect the preprocessed rice region image, and identifies and locates the positions and bounding boxes of each rice plant;
[0119] Detection box processing unit: performs non-maximum suppression on the detected rice bounding boxes, eliminates overlapping detection boxes, and obtains the target rice region.
[0120] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0121] In addition, the functional modules in each embodiment of this application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0122] The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of this application.
Claims
1. A rice recognition and counting method based on multi-spectral remote sensing images, characterized in that, The method includes: Input the pre-collected multi-spectral remote sensing image and perform preprocessing to obtain the data to be analyzed; Use a supervised classification model to classify the data to be analyzed to extract the rice area and generate a classification mask map; Based on the optimized YOLOv8 object detection model, detect the rice area in the classification mask map, identify and locate the position and bounding box of each rice plant, and perform non-maximum suppression processing to obtain the target rice area; Count the number of individual rice plants in the target rice area and annotate it on the multi-spectral remote sensing image to display the total count result.
2. The rice recognition and counting method based on multi-spectral remote sensing images according to claim 1, characterized in that, The input of the pre-collected multi-spectral remote sensing image and preprocessing includes: Input the multi-spectral remote sensing image into the host computer; Perform radiometric correction and geometric correction on the multi-spectral remote sensing image in the host computer, and remove noise to obtain multi-spectral data; After processing the multi-spectral data, generate spectral feature data for each pixel.
3. The rice recognition and counting method based on multi-spectral remote sensing images according to claim 1, characterized in that The use of the supervised classification model to classify the spectral feature data, extract the rice area, and generate a classification mask map includes: Load the multi-spectral remote sensing image and its corresponding sample point file; According to the coordinates of the sample points, extract the spectral feature values of the corresponding pixels in the image as training features, and form a training data set together with the sample labels; Input the training data set into a random forest classifier; Use the trained random forest classifier to predict the data to be analyzed and generate a classification mask map, where each pixel in the classification mask map is classified as "rice area" or "non-rice area".
4. The rice recognition and counting method based on multi-spectral remote sensing images according to claim 1, wherein The optimized YOLOv8 object detection model includes: Expand the support for input image formats to be compatible with remote sensing images in TIFF format; Upgrade the feature extraction module and adopt an enhanced feature extraction strategy; Introduce a bidirectional feature fusion mechanism to fuse feature information at different levels; Adjust the size and ratio of the anchor boxes to match the characteristics of individual rice plants; Determine and optimize the loss function as the generalized intersection over union.
5. The rice recognition and counting method based on multi-spectral remote sensing images according to claim 3, characterized in that, Before performing non-maximum suppression processing to obtain the target rice area, it also includes: excluding the non-rice area in the classification mask map and retaining the detection results of the rice area.
6. A rice recognition and counting system based on multi-spectral remote sensing images, characterized in that, The system includes: An image input and preprocessing module for inputting the pre-collected multi-spectral remote sensing image and performing preprocessing to obtain the data to be analyzed; A supervised classification module for using a supervised classification model to classify the data to be analyzed to extract the rice area and generate a classification mask map; An object detection module for detecting the rice area in the classification mask map based on the optimized YOLOv8 object detection model, identifying and locating the position and bounding box of each rice plant, and performing non-maximum suppression processing to obtain the target rice area; A result processing and display module for counting the number of individual rice plants in the target rice area and annotating it on the multi-spectral remote sensing image to display the total count result.
7. The rice recognition and counting system based on multi-spectral remote sensing images according to claim 6, wherein The supervised classification module includes: A sample preparation unit for loading the multi-spectral remote sensing image and its corresponding sample point file, and the sample point file contains the coordinate and label information of the known rice area and non-rice area; Feature extraction unit: According to the coordinate information in the sample point file, extract the spectral feature values of the corresponding pixels from the preprocessed multi-spectral data, and construct a training feature set; Model training unit: Adopt the random forest algorithm to train a supervised classification model using the training feature set and label information until the model converges; Classification prediction unit: Input the preprocessed multi-spectral data into the trained supervised classification model, perform classification prediction on each pixel, and generate a classification mask map representing the rice area and the non-rice area.
8. The rice recognition and counting system based on multi-spectral remote sensing images according to claim 6, characterized in that, The target detection module includes: Image preprocessing unit: Crop or extract the rice area in the classification mask map to adjust it to a format and size suitable for input to the YOLOv8 model; Model optimization unit: Optimize the YOLOv8 target detection model, including expanding the input image format support to be compatible with the TIFF remote sensing image format, upgrading the feature extraction network to enhance the feature representation ability, introducing a bidirectional feature fusion mechanism, adjusting the anchor box size and ratio, and optimizing the loss function to generalized intersection over union; Target detection unit: Use the optimized YOLOv8 model to detect the preprocessed rice area image, and identify and locate the position and bounding box of each rice plant; Detection box processing unit: Perform non-maximum suppression processing on the detected rice bounding boxes to eliminate overlapping detection boxes and obtain the target rice area.