Improved YOLOv5 cultivated land tree planting detection method, system and equipment based on region segmentation and medium

By combining the improved YOLOv5 method of target detection and image segmentation in arable land tree planting detection, the problems of tree identification and area division in arable land tree planting detection are solved, and high-precision and high-automation detection effects are achieved.

CN119417783APending Publication Date: 2025-02-11CRSC COMM & INFORMATION GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411466684.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The existing arable land tree planting detection technology has problems such as difficulty in identifying trees, poor adaptability of regional division, insufficient data sets, aggregation of small and medium-sized targets, and insufficient network structure optimization, resulting in low detection accuracy and automation.

Method used

The improved YOLOv5 method based on area segmentation is adopted to combine object detection with image segmentation. Through the pre-constructed cultivated land segmentation model and object detection model, area division and tree detection are adaptively completed, improving detection accuracy and automation.

Benefits of technology

It realizes adaptive area division under scene changes, improves the accuracy and automation of tree planting detection in cultivated land, reduces the false detection rate, and is suitable for intelligent algorithms and neural network fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417783A_ABST
    Figure CN119417783A_ABST
Patent Text Reader

Abstract

The invention relates to an improved YOLOv5 cultivated land tree planting detection method, system and device based on region segmentation, and a medium, and the method comprises the steps: carrying out the cultivated land region segmentation of a to-be-detected region through a pre-constructed YOLOv8-based cultivated land segmentation model, and obtaining a cultivated land region; performing tree detection on the to-be-detected area by using a pre-constructed target detection model based on the improved YOLOv5; and judging whether the detected tree is in the cultivated land area and whether a preset scene alarm interval is met, if so, considering that a cultivated land tree planting condition exists, and feeding back alarm information. The method can be widely applied to the technical fields of intelligent algorithms, neural networks, target detection and region segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an improved YOLOv5 cultivated land tree planting detection method, system, equipment and medium based on region segmentation, belonging to the technical fields of intelligent algorithms, neural networks, target detection and region segmentation. Background Art

[0002] With the growing demand for agricultural modernization and ecological environmental protection, the monitoring of cultivated land protection has become particularly important. Traditional monitoring methods rely on manual field surveys, which have problems such as low efficiency, high cost, and susceptibility to subjective factors. Although the monitoring method based on remote sensing technology has the advantages of wide coverage and rapid data acquisition, it still needs to be improved in terms of target detection accuracy and automation. Under current conditions, more user units tend to use drone inspections or high-point ball machine video inspections to monitor nearby farmland in order to identify the situation of trees occupying farmland within the scope of cultivated land.

[0003] At present, the detection of tree planting on cultivated land has the following problems: (1) Tree recognition problem: From a bird’s-eye view, small targets among trees have lower resolution and less information than general targets, and it is necessary to extract discriminative features. Common obfuscators include electric poles, lamp posts, medium and high crops, etc.

[0004] (2) The problem of dividing the area for detecting tree planting in cultivated land: In actual scenarios, how to distinguish between regular urban planning trees and illegal tree planting in fields? In addition to manual division of the areas where trees appear, we should have a certain adaptive identification ability.

[0005] (3) Insufficient existing data sets: In the current environment, user demand in this direction is gradually increasing, but there are almost no actual open source data sets. Sampling and collection are needed to expand the number of training data sets.

[0006] (4) Aggregation of small and medium-sized targets: In addition to single trees in farmland, there may be other forms of tree planting, such as densely planted trees in rows. These situations are usually quite different from single trees in appearance, and the reasonable implementation of all necessary inspections is also a problem that needs to be solved.

[0007] (5) Network structure: Currently, there are few algorithms that are optimized for the characteristics of small and medium-sized targets. In addition, due to the difficulties brought by the characteristics of small targets themselves, the existing algorithms generally perform poorly in small target detection. Summary of the invention

[0008] In view of the above problems, the purpose of the present invention is to provide an improved YOLOv5 farmland tree planting detection method, system, equipment and medium based on region segmentation, which combines target detection with image segmentation, solves the problem of detection area changes caused by scene changes in farmland tree planting tasks, and can adaptively complete regional division tasks.

[0009] To achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides an improved YOLOv5 method for detecting cultivated land trees based on region segmentation, comprising the following steps: Use the pre-built YOLOv8-based farmland segmentation model to segment the farmland area of ​​the area to be detected and obtain the farmland area; Use the pre-built object detection model based on improved YOLOv5 to detect trees in the area to be detected; Determine whether the detected trees are within the cultivated land area and whether the preset scenario alarm interval is met. If both conditions are met, it is considered that there is a cultivated land tree planting situation and an alarm information feedback is performed.

[0010] Furthermore, the method of using the pre-built YOLOv8-based farmland segmentation model to segment the to-be-detected area into farmland regions to obtain the farmland regions includes: Obtain the data set and preprocess it to obtain a training sample set; Train the pre-built YOLOv8-based farmland segmentation model based on the training sample set; The trained farmland segmentation model is used to segment the farmland area in the area to be detected to obtain the farmland area.

[0011] Furthermore, the data set includes two parts: the first part is the project real-time image data accumulated in actual engineering projects, and the second part is the network self-collected image data, which comes from network pictures or network video frames.

[0012] Furthermore, the target detection model based on improved YOLOv5 includes: The backbone network is used to extract features from the input image and obtain a feature map; Feature pyramid network, used to fuse and upsample the extracted feature maps; The detection head is used to process the output of the feature pyramid network and output the target detection results.

[0013] Further, the backbone network includes a convolution module, a first to a fourth downsampling module, a PSAModule module and an SPPF module connected in sequence; The convolution module is used to perform a first feature extraction on the input image; The first to fourth downsampling modules are respectively used to extract features of different scales and dimensions from the first feature extraction result; The PSAModule module is used to perform channel compression and long-range dependency construction on the output of the fourth downsampling module; The SPPF module is used to splice the output of the PSAModule module.

[0014] Furthermore, the first to fourth down-sampling modules have the same structure, and all include a Down_wt submodule and a C3 submodule, and the Down_wt submodule uses Haar wavelet transform for down-sampling.

[0015] Furthermore, the PSAModule module includes a feature map segmentation submodule, a multi-scale convolution processing submodule, a feature splicing submodule, an attention weight recalibration submodule, and a feature fusion and output submodule; The feature map segmentation submodule is used to segment the input feature map into multiple sub-feature maps in the channel dimension; The multi-scale convolution processing submodule is used to perform a convolution operation on each sub-feature map using convolution kernels of different sizes to extract features of different scales; The feature splicing submodule is used to splice multiple sub-feature maps after convolution processing in the channel dimension to form a single feature map that integrates multi-scale information; The attention weight recalibration submodule is used to recalibrate the channel attention weights of the spliced ​​single feature map through a Softmax operation to establish a long-range channel dependency relationship; The feature fusion and output submodule is used to perform element-wise multiplication operation on the recalibrated attention weights and the corresponding feature maps to obtain a multi-scale feature map weighted by attention.

[0016] In a second aspect, the present invention provides an improved YOLOv5 farmland tree planting detection system based on region segmentation, comprising: The farmland segmentation module is used to segment the farmland area of ​​the to-be-detected area using the pre-built farmland segmentation model based on YOLOv8 to obtain the farmland area; The tree detection module is used to detect trees in the detection area using a pre-built object detection model based on improved YOLOv5; The cultivated land tree planting detection module is used to determine whether the detected trees are within the cultivated land area and whether the scene alarm interval is met. If both conditions are met, it is considered that there is cultivated land tree planting and alarm information feedback is performed.

[0017] In a third aspect, the present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any method.

[0018] In a fourth aspect, the present invention provides a computing device, comprising: one or more processors and a memory, wherein the memory stores one or more programs and is configured to be executed by the one or more processors, and the one or more programs include instructions for executing any method.

[0019] The present invention adopts the above technical solution, which has the following advantages: 1. The present invention integrates image segmentation technology on the basis of target detection, determines the cultivated land area through regional segmentation, further filters the detected tree targets, screens out the vegetation in the cultivated land area, solves the problem of detection area changes caused by scene changes in cultivated land tree planting tasks, and enables the algorithm to adaptively complete the regional division task; 2. The present invention adopts Haar wavelet transform for downsampling based on the YOLOv5 model, which can retain more target features, improve the model target detection accuracy, and reduce the false detection rate; 3. The present invention adds an efficient pyramid compression attention module to enhance the multi-scale spatial information processing capability of the model, obtain target features from multiple scales, and enhance reality usability.

[0020] Therefore, the present invention can be widely applied to the fields of intelligent algorithms, neural networks, target detection, and region segmentation technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings: Figure 1 It is a flow chart of an improved YOLOv5 cultivated land tree planting detection method based on region segmentation provided by an embodiment of the present invention; Figure 2 Schematic diagram of the network structure of YOLOv5 based on wavelet downsampling and pyramid compression attention module provided by an embodiment of the present invention; Figure 3a to Figure 3d is a schematic diagram of image processing results of four downsampling methods provided by an embodiment of the present invention, wherein: Figure 3a is the strided convolution method, Figure 3b is the wavelet downsampling method, Figure 3c is the average pooling method, Figure 3d It is the maximum pooling method; Figure 4 This is a rendering of the cultivated land tree planting detection algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.

[0023] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0024] YOLO is the abbreviation of "You Only Look Once", which is an algorithm for target detection using convolutional neural networks. As a real-time target detection algorithm based on deep learning, it was proposed by Joseph Redmon et al. in 2015. Compared with traditional target detection methods, YOLO, as a regression-based algorithm, has the advantages of fast and real-time performance, and can accurately identify and locate multiple target objects in images or videos.

[0025] In some embodiments of the present invention, an improved YOLOv5 method for detecting cultivated land tree planting based on regional segmentation is provided. In order to make the model more suitable for engineering projects on the basis of optimizing the small target detection capability, the present invention selects YOLOv8 for cultivated land segmentation in image segmentation by combining image segmentation and target detection, and the target detection part uses the currently more mature lightweight model YOLOv5 model structure as the basic structure for improvement. The present invention integrates image segmentation technology on the basis of target detection, solves the problem of detection area changes caused by scene changes in cultivated land tree planting tasks, and can adaptively complete regional division tasks.

[0026] Correspondingly, in some other embodiments of the present invention, an improved YOLOv5 farmland tree planting detection system, device and medium based on region segmentation are provided.

[0027] Example 1 like Figure 1As shown, this embodiment provides an improved YOLOv5 cultivated land tree planting detection method based on region segmentation, which includes the following steps: 1) Use the pre-built YOLOv8-based farmland segmentation model to segment the farmland area in the area to be detected and obtain the farmland area; 2) Use the pre-built object detection model based on improved YOLOv5 to detect trees in the area to be detected; 3) Determine whether the detected trees are within the cultivated land area and whether the preset scenario alarm interval is met. If both conditions are met, it is considered that there is a cultivated land tree planting situation and an alarm information feedback is performed.

[0028] Furthermore, the above step 1) includes the following steps: 1.1) Obtain the data set and preprocess it to obtain the training sample set; 1.2) Train the pre-built YOLOv8-based farmland segmentation model based on the training sample set; 1.3) Use the trained farmland segmentation model to segment the detected area into farmland areas and obtain the farmland areas.

[0029] Furthermore, in the above step 1.1), in this embodiment, when obtaining the data set, the data mainly includes two parts: one part is the project real-time image data accumulated in the actual engineering project; the other part is the network self-collected image data, which comes from network pictures or network video frames, and all data are manually labeled. In addition, the image is pre-processed in the initialization stage, including denoising, contrast enhancement and other operations to improve the image quality.

[0030] Furthermore, in the above step 2), if Figure 2 As shown, the target detection model based on improved YOLOv5 constructed in this embodiment includes: a backbone network (backbone), which is used to extract features of the input image to obtain a feature map; a feature pyramid network (neck), which is used to fuse and upsample the extracted feature map; a detection head (head), which is used to further process the output of the feature pyramid network and output the target detection result.

[0031] Furthermore, the backbone network includes a convolution module (Conv), the first to fourth downsampling modules, a PSAModule module and an SPPF module connected in sequence. Among them, the convolution module is used to perform the first feature extraction on the input image; the first to fourth downsampling modules have the same structure and include a Down_wt submodule and a C3 submodule, which are respectively used to extract features of different scales and dimensions from the first feature extraction results; the PSAModule module is used to perform channel compression and long-range dependency construction on the output of the fourth downsampling module to improve the shortcomings of the traditional model in capturing global information and key areas; the SPPF module is used to splice the output of the PSAModule module.

[0032] Furthermore, the Down_wt submodule uses Haar wavelet transform for downsampling. Haar wavelet transform is a wavelet-based signal processing method that decomposes the signal into two parts: low frequency and detail high frequency. In image processing, Haar wavelet is usually used for image compression and feature extraction. The discrete wavelet transform in the DWTForward module used in the code constructs a new feature map by selecting high frequency components in different directions. The original low frequency components are concatenated with the newly constructed high frequency components. Finally, the final feature map is processed through a sequence including convolution, batch normalization, and ReLU activation functions.

[0033] Furthermore, the PSAModule module includes a feature map segmentation sub-module, a multi-scale convolution processing sub-module, a feature splicing sub-module, an attention weight recalibration sub-module, and a feature fusion and output sub-module.

[0034] Among them, the feature map segmentation submodule is used to segment the input feature map into multiple sub-feature maps in the channel dimension. Each sub-feature map has a smaller number of channels but retains some information of the original feature map. The multi-scale convolution processing submodule is used to perform convolution operations on each sub-feature map using convolution kernels of different sizes to extract features of different scales. This multi-scale convolution processing strategy helps capture multi-scale spatial information in the input data; The feature splicing submodule is used to splice multiple sub-feature maps after convolution processing in the channel dimension to form a single feature map that integrates multi-scale information. Feature splicing realizes the fusion of features of different scales and enhances the representation ability of feature maps. The attention weight recalibration submodule is used to recalibrate the channel attention weights of the concatenated single feature map through the Softmax operation to establish long-range channel dependencies, which helps the model better understand and integrate global information, thereby improving the expressiveness of features; The feature fusion and output submodule is used to perform element-wise multiplication of the recalibrated attention weights with the corresponding feature maps to obtain an attention-weighted multi-scale feature map; this multi-scale feature map, as the output of the PSAModule module, contains rich multi-scale spatial information and enhanced feature representation.

[0035] Furthermore, the feature pyramid network has the same structure as the conventional YOLOv5 model, which will not be described in detail in the present invention.

[0036] Furthermore, the detection head includes a Detect submodule, which is used to perform multi-path aggregation on the outputs of each C3 submodule in the feature pyramid network to obtain a detection result.

[0037] like Figure 3a to Figure 3d As shown, this embodiment compares the Haar wavelet transform with three common downsampling methods (i.e., maximum pooling, average pooling, and strided convolution). The method uses two filters, an average filter and a difference filter, to process the input feature map. The average filter is used to retain the low-frequency information (i.e., overall structural information) in the feature map, while the difference filter is used to extract high-frequency information (i.e., edge and detail information). By combining the outputs of these two filters, a downsampled feature map can be obtained, which retains the important information of the original feature map and reduces the spatial resolution. The main idea is to apply the Haar wavelet transform to reduce the spatial resolution of the feature map while retaining as much information as possible.

[0038] like Figure 4 The following is the final detection result. The model detection includes two categories: single tree and patchy forest. Figure 4 As can be seen, since the algorithm combines regional judgment after image segmentation, the result will only warn about trees in the field, while tree targets in non-field areas are filtered out. This processing method makes the algorithm more suitable for non-fixed point cameras in real scenes, or low-altitude cruising drone shooting perspectives, and can effectively replace manual area screening.

[0039] Example 2 The above-mentioned embodiment 1 provides an improved YOLOv5 cultivated land tree planting detection method based on region segmentation. Correspondingly, this embodiment provides an improved YOLOv5 cultivated land tree planting detection system based on region segmentation. The system provided in this embodiment can implement the improved YOLOv5 cultivated land tree planting detection method based on region segmentation of embodiment 1, and the system can be implemented by software, hardware, or a combination of software and hardware. For example, the system may include integrated or separate functional modules or functional units to execute the corresponding steps in each method of embodiment 1. Since the system of this embodiment is basically similar to the method embodiment, the process described in this embodiment is relatively simple, and the relevant parts can refer to the partial description of embodiment 1. The embodiment of the system provided in this embodiment is only schematic.

[0040] The improved YOLOv5 cultivated land tree planting detection system based on region segmentation provided in this embodiment includes: The farmland segmentation module is used to segment the farmland area of ​​the to-be-detected area using the pre-built farmland segmentation model based on YOLOv8 to obtain the farmland area; The tree detection module is used to detect trees in the detection area using a pre-built object detection model based on improved YOLOv5; The cultivated land tree planting detection module is used to determine whether the detected trees are within the cultivated land area and whether the scene alarm interval is met. If both conditions are met, it is considered that there is cultivated land tree planting and alarm information feedback is performed.

[0041] Example 3 This embodiment provides a processing device corresponding to the improved YOLOv5 farmland tree planting detection method based on region segmentation provided in this embodiment 1. The processing device can be a processing device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of embodiment 1.

[0042] The processing device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The memory stores a computer program that can be run on the processor, and the processor executes the improved YOLOv5 cultivated land tree planting detection method based on region segmentation provided in this embodiment 1 when running the computer program.

[0043] Preferably, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.

[0044] Preferably, the processor may be a central processing unit (CPU), a digital signal processor (DSP) or other general-purpose processors of various types, which are not limited here.

[0045] Example 4 The improved YOLOv5 method for detecting planted trees on cultivated land based on region segmentation of this embodiment 1 can be specifically implemented as a computer program product, which may include a computer-readable storage medium carrying computer-readable program instructions for executing the improved YOLOv5 method for detecting planted trees on cultivated land based on region segmentation described in this embodiment 1.

[0046] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.

[0047] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks. These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 One or more processes and / or boxes Figure 1 A function specified in one or more boxes. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. An improved YOLOv5 method for detecting planted trees in cultivated land based on region segmentation, characterized in that: The following steps are involved: Use the pre-built YOLOv8-based farmland segmentation model to segment the detected area into farmland areas and obtain the farmland areas; Use the pre-built object detection model based on improved YOLOv5 to detect trees in the area to be detected; Determine whether the detected trees are within the cultivated land area and whether the preset scenario alarm interval is met. If both conditions are met, it is considered that there is a cultivated land tree planting situation and an alarm information feedback is performed.

2. The improved YOLOv5 method for detecting planted trees in cultivated land based on region segmentation as claimed in claim 1, characterized in that: The method uses the pre-built YOLOv8-based farmland segmentation model to segment the farmland area of ​​the to-be-detected area to obtain the farmland area, including: Obtain the data set and preprocess it to obtain a training sample set; Train the pre-built YOLOv8-based farmland segmentation model based on the training sample set; The trained farmland segmentation model is used to segment the farmland area in the area to be detected to obtain the farmland area.

3. The improved YOLOv5 method for detecting planted trees in cultivated land based on region segmentation as claimed in claim 2, characterized in that: The data set includes two parts: the first part is the project real-time image data accumulated in actual engineering projects, and the second part is the network self-collected image data, which comes from network pictures or network video frames.

4. The improved YOLOv5 method for detecting planted trees in cultivated land based on region segmentation according to claim 1, characterized in that: The target detection model based on improved YOLOv5 includes: The backbone network is used to extract features from the input image and obtain a feature map; Feature pyramid network, used to fuse and upsample the extracted feature maps; The detection head is used to process the output of the feature pyramid network and output the target detection results.

5. The improved YOLOv5 method for detecting cultivated land trees based on region segmentation as claimed in claim 4, characterized in that: The backbone network includes a convolution module, a first to a fourth downsampling module, a PSAModule module and an SPPF module connected in sequence; The convolution module is used to perform a first feature extraction on the input image; The first to fourth downsampling modules are respectively used to extract features of different scales and dimensions from the first feature extraction result; The PSAModule module is used to perform channel compression and long-range dependency construction on the output of the fourth downsampling module; The SPPF module is used to splice the output of the PSAModule module.

6. The improved YOLOv5 method for detecting planted trees in cultivated land based on region segmentation as claimed in claim 5, characterized in that: The first to fourth down-sampling modules have the same structure, and all include a Down_wt submodule and a C3 submodule, and the Down_wt submodule uses Haar wavelet transform for down-sampling.

7. The improved YOLOv5 method for detecting planted trees on cultivated land based on region segmentation as claimed in claim 5, characterized in that: The PSAModule module includes a feature map segmentation submodule, a multi-scale convolution processing submodule, a feature splicing submodule, an attention weight recalibration submodule, and a feature fusion and output submodule; The feature map segmentation submodule is used to segment the input feature map into multiple sub-feature maps in the channel dimension; The multi-scale convolution processing submodule is used to perform a convolution operation on each sub-feature map using convolution kernels of different sizes to extract features of different scales; The feature splicing submodule is used to splice multiple sub-feature maps after convolution processing in the channel dimension to form a single feature map that integrates multi-scale information; The attention weight recalibration submodule is used to recalibrate the channel attention weights of the spliced ​​single feature map through a Softmax operation to establish a long-range channel dependency relationship; The feature fusion and output submodule is used to perform element-wise multiplication operation on the recalibrated attention weights and the corresponding feature maps to obtain a multi-scale feature map weighted by attention.

8. An improved YOLOv5 farmland tree detection system based on region segmentation, characterized in that: include: The farmland segmentation module is used to segment the farmland area of ​​the to-be-detected area using the pre-built farmland segmentation model based on YOLOv8 to obtain the farmland area; The tree detection module is used to detect trees in the detection area using a pre-built object detection model based on improved YOLOv5; The cultivated land tree planting detection module is used to determine whether the detected trees are within the cultivated land area and whether the scene alarm interval is met. If both conditions are met, it is considered that there is cultivated land tree planting and alarm information feedback is performed.

9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7.

10. A computing device, characterized in that: include: One or more processors and a memory, wherein the memory stores one or more programs and is configured to be executed by the one or more processors, wherein the one or more programs include instructions for executing any one of the methods described in claims 1 to 7.