Cultivated land non-grain non-agricultural detection method, device and equipment and storage medium
Through the improved Deeplabv3+ model and YOLOv11 model, combined with the normalized attention module and feature fusion module, the accuracy and inefficiency of non-grain and non-agricultural detection of cultivated land in the existing technology are solved, and more efficient land use monitoring is achieved.
Patent Information
- Application Number
- CN202510094929.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-30
AI Technical Summary
The existing non-grain and non-agricultural testing technology of cultivated land has problems such as low image segmentation accuracy, insufficient target detection capability, low classification accuracy and poor adaptability, resulting in low accuracy and efficiency of land use monitoring.
The improved Deeplabv3+ model and the improved YOLOv11 model are adopted to improve the accuracy of image segmentation and object detection through technical means such as normalized attention module and feature fusion module.
It effectively improves the accuracy and efficiency of land use monitoring, enhances the identification ability of multi-scale targets, and improves the target distinction in complex backgrounds.
Smart Images

Figure CN120071133A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method, device, equipment and storage medium for detecting non-grain and non-agricultural uses of cultivated land. Background Art
[0003] Existing technologies for detecting non-grain and non-agricultural uses of cultivated land have problems such as low image segmentation accuracy, insufficient target detection ability, low classification accuracy, and poor adaptability, which in turn lead to low accuracy and efficiency of land use monitoring.
[0004] Therefore, there is an urgent need for a method for detecting non-grain and non-agricultural uses of cultivated land that can improve the accuracy and efficiency of land use monitoring. Summary of the Invention
[0005] The main purpose of the present invention is to provide a method, device, equipment and storage medium for detecting non-grain and non-agricultural uses of cultivated land, aiming to solve the technical problem of low accuracy and efficiency of land use monitoring in the prior art.
[0006] To achieve the above object, the present invention provides a method for detecting non-grain and non-agricultural uses of cultivated land, the method comprising the following steps:
[0007] Obtain a cultivated land image of a scene to be detected;
[0008] Input the cultivated land image into an improved Deeplabv3+ model and an improved YOLOv11 model respectively to obtain a region segmentation result and a class detection result, the improved Deeplabv3+ model includes an attention module based on normalization, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module;
[0009] Based on the region segmentation result and the class detection result, determine the non-grain and non-agricultural detection result of the scene to be detected.
[0010] Optionally, the step of determining the non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the class detection result includes:
[0011] Determine the green area and the bare area in the cultivated land image according to the region segmentation result;
[0012] Determine the woods and crops in the cultivated land image according to the class detection result;
[0013] When the length or width of the woods in the cultivated land image is not less than a first preset threshold, determine whether the woods with a length or width not less than the first preset threshold are in the green area;
[0014] If in the green area, then use non-grain as the non-grain and non-agricultural detection result of the to-be-detected scene.
[0015] Optionally, after the step of determining the green area and the bare area in the cultivated land image according to the area segmentation result, the method further includes:
[0016] Compare the length or width of the bare area with a second preset threshold to obtain a comparison result;
[0017] If the comparison result indicates that the length or width of the bare area is greater than the second preset threshold, then use non-agricultural as the non-grain and non-agricultural detection result of the to-be-detected scene.
[0018] Optionally, the step of obtaining the cultivated land image of the to-be-detected scene includes:
[0019] Obtain video stream data of the to-be-detected scene through a high-point camera, and decode the video stream data to obtain decoded image data;
[0020] Preprocess the decoded image data to obtain the cultivated land image of the to-be-detected scene.
[0021] Optionally, before the step of obtaining the cultivated land image of the to-be-detected scene, the method further includes:
[0022] Construct an initial Deeplabv3+ model based on the Deeplabv3+ model, and the initial Deeplabv3+ model includes a normalized attention module;
[0023] Construct an initial YOLOv11 model based on the YOLOv11 model, and the initial YOLOv11 model includes a feature fusion module and a spatial context awareness module;
[0024] Obtain a cultivated land image dataset, and annotate the cultivated land image dataset to obtain a training dataset;
[0025] Train the initial Deeplabv3+ model and the initial YOLOv11 model respectively through the training dataset to obtain an improved Deeplabv3+ model and an improved YOLOv11 model.
[0026] Optionally, the step of training the initial Deeplabv3+ model and the initial YOLOv11 model respectively through the training dataset to obtain an improved Deeplabv3+ model and an improved YOLOv11 model includes:
[0027] Train the initial Deeplabv3+ model and the initial YOLOv11 model respectively based on the training dataset to obtain the first model training result and the second model training result;
[0028] Optimize the model parameters in the initial Deeplabv3+ model according to the first model training result to obtain an improved Deeplabv3+ model;
[0029] Optimize the model parameters in the initial YOLOv11 model according to the second model training result to obtain an improved YOLOv11 model.
[0030] Optionally, after the step of determining the non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the category detection result, the method further includes:
[0031] Determine whether there is a detection result of non-grain and / or non-agricultural in the non-grain and non-agricultural detection result;
[0032] If there is a detection result of non-grain and / or non-agricultural, generate a corresponding warning instruction according to the non-grain and non-agricultural detection result;
[0033] Perform warning display of non-grain and non-agricultural detection according to the warning instruction.
[0034] In addition, to achieve the above object, the present invention also proposes a device for detecting non-grain and non-agricultural in cultivated land, the device includes:
[0035] An image acquisition module, configured to acquire a cultivated land image of the scene to be detected;
[0036] A cultivated land detection module, configured to input the cultivated land image into the improved Deeplabv3+ model and the improved YOLOv11 model respectively to obtain a region segmentation result and a category detection result, the improved Deeplabv3+ model includes a normalization-based attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module;
[0037] A result output module, configured to determine the non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the category detection result.
[0038] In addition, to achieve the above object, the present invention also proposes a device for detecting non-grain and non-agricultural in cultivated land, the device includes: a memory, a processor, and a cultivated land non-grain and non-agricultural detection program stored on the memory and executable on the processor, and the cultivated land non-grain and non-agricultural detection program is configured to implement the steps of the cultivated land non-grain and non-agricultural detection method as described above.
[0039] In addition, to achieve the above object, the present invention also provides a storage medium, on which a cultivated land non-grain and non-agricultural detection program is stored. When the cultivated land non-grain and non-agricultural detection program is executed by a processor, the steps of the cultivated land non-grain and non-agricultural detection method described above are implemented.
[0040] The present invention discloses obtaining a cultivated land image of a scene to be detected; inputting the cultivated land image into an improved Deeplabv3+ model and an improved YOLOv11 model respectively to obtain a region segmentation result and a category detection result. The improved Deeplabv3+ model includes a normalization-based attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module; based on the region segmentation result and the category detection result, determining the non-grain and non-agricultural detection result of the scene to be detected. Since the improved Deeplabv3+ model of the present invention includes a normalization-based attention module, the segmentation accuracy is effectively improved. The improved YOLOv11 model includes a feature fusion module and a spatial context awareness module, which effectively improve the target detection accuracy and enhance the recognition ability of multi-scale targets. Compared with the prior art, the present invention uses the improved Deeplabv3+ model and the improved YOLOv11 model to determine the non-grain and non-agricultural detection result of the scene to be detected, effectively improving the accuracy and efficiency of land use monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of the first embodiment of the cultivated land non-grain and non-agricultural detection method of the present invention;
[0042] Figure 2 It is a framework diagram of the improved Deeplabv3+ model in the cultivated land non-grain and non-agricultural detection method of the present invention;
[0043] Figure 3 It is a framework diagram of the improved YOLOv11 model in the cultivated land non-grain and non-agricultural detection method of the present invention;
[0044] Figure 4 It is a specific implementation process example diagram of the cultivated land non-grain and non-agricultural detection method of the present invention;
[0045] Figure 5 It is a flowchart of the second embodiment of the cultivated land non-grain and non-agricultural detection method of the present invention;
[0046] Figure 6 It is a flowchart of the third embodiment of the cultivated land non-grain and non-agricultural detection method of the present invention;
[0047] Figure 7 It is a structural block diagram of the first embodiment of the cultivated land non-grain and non-agricultural detection device of the present invention;
[0048] Figure 8It is a schematic structural diagram of a cultivated land non - grain and non - agricultural detection device in the hardware operating environment involved in the solution of the embodiment of the present invention.
[0049] The realization of the purpose, functional characteristics and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0051] The embodiment of the present invention provides a cultivated land non - grain and non - agricultural detection method, referring to Figure 1 , Figure 1 It is a schematic flowchart of the first embodiment of the cultivated land non - grain and non - agricultural detection method of the present invention.
[0052] In this embodiment, the cultivated land non - grain and non - agricultural detection method includes steps S10 - S30:
[0053] Step S10: Obtain the cultivated land image of the scene to be detected.
[0054] It should be noted that the execution subject of this embodiment can be a computer server device with data processing, network communication and program running functions, such as a server, a tablet computer, a personal computer, etc., or an electronic device, a cultivated land non - grain and non - agricultural detection device that can implement the above functions. Hereinafter, a system including a cultivated land non - grain and non - agricultural detection device (hereinafter referred to as the system) will be taken as an example to illustrate this embodiment and the following embodiments.
[0055] It should be explained that in this embodiment, the video stream data of the scene to be detected can be obtained through a high - point camera, and the video stream data is decoded to obtain the decoded image data; then the decoded image data is pre - processed to obtain the cultivated land image of the scene to be detected.
[0056] It can be understood that the high - point camera can refer to a monitoring camera installed at a relatively high position (such as the top of a building, the top of a mountain or a high - altitude pole tower).
[0057] Step S20: Input the cultivated land image into the improved Deeplabv3 + model and the improved YOLOv11 model respectively to obtain the region segmentation result and the category detection result. The improved Deeplabv3 + model includes a normalization - based attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module.
[0058] It should be noted that the segmentation effect of the Deeplabv3+ model has a good segmentation effect on the categories of green space and bare soil, but there is a phenomenon that the target edges are not clearly segmented. This is due to the "inattentiveness" of the Deeplabv3+ model's attention to less prominent features. To optimize this phenomenon, as Figure 2 shown, based on the basic architecture of the Deeplabv3+ model, a normalization-based attention module (NAM) is added. NAM integrates channel attention and spatial attention and uses the scaling factor of batch normalization (BN). As shown in formula (1), the scaling factor measures the variance of the channel and indicates its importance. γ is the scaling factor for each channel, and the weights of the channel attention sub-module are as shown in formula (2), measuring the variance of the channel (weight normalization); then the scaling factor of BN is applied to the spatial dimension for pixel normalization. λ is the scaling factor of the spatial attention sub-module, and the weights of the spatial attention sub-module are as shown in formula (3), applied to the spatial dimension to measure the importance of pixels; to suppress less prominent weights, a regularization term f is added to the loss function, as shown in formula (4).
[0059]
[0060] In the formula, B out is the output of BN, B in is the input of BN, ∈ is a very small constant that can effectively avoid division-by-zero errors or numerical instability, μ β and σ β are the mean and standard deviation of the mini-batch B out respectively, and γ and β are trainable affine transformation parameters (scaling and shifting).
[0061] W γ = γ i / ∑ j=0 γ j (2)
[0062] W λ = λ i / Σ j=0 λ j (3)
[0063] LOSS = ∑ (x,y) l(f(x, W), y) (4)
[0064] In the formula, j represents from 0 to i, γ j represents the scaling factor of the j-th channel, λ j represents the scaling factor of the j-th spatial attention sub-module, W γ and W λThey respectively represent the weights of the channel attention sub-module and the spatial attention sub-module, l represents the loss function, x is the input, i.e., B out , y represents the output of the loss function, and W represents the network weights.
[0065] It should be noted that based on the Normalized Attention Module (NAM), the variance measurement of the training model weights can be utilized to emphasize the adjustment of weights from training and suppress less prominent weights, thereby improving the computational efficiency. It can reduce the weights of less significant features and apply sparse weight penalties to keep the weights computationally well-performing and efficient.
[0066] It should be understood that the scene images captured by high-point cameras are complex and diverse. Especially in such a scene, false detections with similar features are prone to occur in small object detection tasks. Moreover, the semantic information and receptive fields contained in the features extracted by the YOLOv11 backbone network are limited, making it difficult to distinguish small objects from the background in object detection.
[0067] Therefore, the improved YOLOv11 model in this embodiment includes a feature fusion module and a spatial context awareness module. As Figure 3 shown, based on the YOLOv11 model, the FEM (Feature Fusion Module) is used to enhance the sensitivity of the model's small object features from the perspectives of rich semantics and increased receptive fields. 1). For rich semantics, a multi-branch convolutional structure is adopted to extract multiple discriminative semantic information; 2). For increased receptive fields, dilated convolutions are used to obtain richer local context information. The overall structure of the FEM includes: two branches with dilated convolutions, and each branch performs a 1×1 convolution operation on the input feature map to preliminarily adjust the number of channels for subsequent processing. The first branch is a residual structure that forms an equivalent mapping to retain the key feature information of small objects. The other three branches perform cascaded standard convolution operations with kernel sizes of 1×3, 3×1, and 3×3 respectively. Additional dilated convolution layers are added to the middle two branches so that the extracted feature maps can retain more context information.
[0068] It should be understood that the FEM structure is lightweight, enabling the model to learn richer local context features through multi-branch dilated convolutions and improving the feature representation ability of small objects.
[0069] After FEM, the feature map has considered the local context information and has a good representation of small object features. At this stage, it is more effective to model the global relationship between small objects and the background than to model the backbone relationship. The global context information can be used to represent the relationship between pixel cross spaces, which suppresses the useless background and enhances the discrimination ability between objects and the background. The SCAM (Spatial Context Awareness Module) is adopted, which consists of three branches. The first branch uses GAP and GMP to integrate global information. The second branch uses 1×1 convolution to generate the linear transformation result of the feature map, named value. The third branch uses 1×1 convolution to simplify the multiples of query and key. This convolution is named QK. Then, the first branch and the third branch are respectively multiplied by the second branch in matrix form, and the two resulting branches respectively represent the cross-channel and spatial context information. Finally, the broadcast Hadamard product is used on these two branches to obtain the output of SCAM.
[0070] Step S30: Based on the region segmentation result and the category detection result, determine the non-grain and non-agricultural detection result of the scene to be detected.
[0071] For example, referring to Figure 4 , Figure 4 is a specific implementation process example diagram of the cultivated land non-grain and non-agricultural detection method of the present invention. In the figure, after decoding the video stream data of the scene to be detected obtained by the high-point camera, the obtained cultivated land images are respectively input into the improved Deeplabv3+ model and the improved YOLOv11 model. The former performs segmentation of two categories, green land and bare soil, and the latter performs detection of two categories, crops and woods. The logical processing is performed on the green area output result of the improved Deeplabv3+ model and the woods output result of the improved YOLOv11 model. If the detected length or width of the woods is greater than or equal to 5 meters, it is judged whether the woods with a length or width greater than or equal to 5 meters are within the green area. If so, the algorithm post-processing outputs a "non-grain" alarm instruction to the system, and the operator platform or hardware device performs a "non-grain" alarm display. Otherwise, no alarm is issued. The size of the bare soil area segmented by the improved Deeplabv3+ model is judged. If the length or width is greater than 3 meters, an alarm instruction is output to the system, and the operator platform or hardware device performs a "non-agricultural" alarm display. Otherwise, no alarm is issued.
[0072] In a specific implementation, the green area and the bare area in the cultivated land image can be determined according to the region segmentation result; the woods and crops in the cultivated land image can be determined according to the category detection result; when the length or width of the woods in the cultivated land image is not less than a first preset threshold, it is determined whether the woods with a length or width not less than the first preset threshold are in the green area; if they are in the green area, non-grain is used as the non-grain and non-agricultural detection result of the to-be-detected scene.
[0073] It should be added that after the step of determining the green area and the bare area in the cultivated land image according to the region segmentation result, the following steps are further included: comparing the length or width of the bare area with a second preset threshold to obtain a comparison result; if the comparison result indicates that the length or width of the bare area is greater than the second preset threshold, non-agricultural is used as the non-grain and non-agricultural detection result of the to-be-detected scene.
[0074] It should be understood that the above first preset threshold can be set customarily, and in this embodiment and the following embodiments, it is illustrated by taking 5 meters as an example. The above second preset threshold can also be set customarily, and in this embodiment and the following embodiments, it is illustrated by taking 3 meters as an example.
[0075] This embodiment discloses obtaining a cultivated land image of a to-be-detected scene; inputting the cultivated land image into an improved Deeplabv3+ model and an improved YOLOv11 model respectively to obtain a region segmentation result and a category detection result, where the improved Deeplabv3+ model includes a normalization-based attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module; based on the region segmentation result and the category detection result, determining the non-grain and non-agricultural detection result of the to-be-detected scene. Since the improved Deeplabv3+ model in this embodiment includes a normalization-based attention module, the segmentation accuracy is effectively improved. The improved YOLOv11 model includes a feature fusion module and a spatial context awareness module, which effectively improves the target detection accuracy and enhances the recognition ability of multi-scale targets. Compared with the prior art, in this embodiment, the improved Deeplabv3+ model and the improved YOLOv11 model are used to determine the non-grain and non-agricultural detection result of the to-be-detected scene, effectively improving the accuracy and efficiency of land use monitoring.
[0076] Reference Figure 5 , Figure 5 is a schematic flowchart of the second embodiment of the cultivated land non-grain and non-agricultural detection method of the present invention.
[0077] Based on the above first embodiment, in this embodiment, before the step S10, the steps S01 to S04 are further included:
[0078] Step S01: Construct an initial Deeplabv3+ model based on the Deeplabv3+ model, and the initial Deeplabv3+ model includes a normalization-based attention module.
[0079] Step S02: Construct an initial YOLOv11 model based on the YOLOv11 model, and the initial YOLOv11 model includes a feature fusion module and a spatial context awareness module.
[0080] Step S03: Obtain a cultivated land image dataset, and annotate the cultivated land image dataset to obtain a training dataset.
[0081] Step S04: Train the initial Deeplabv3+ model and the initial YOLOv11 model respectively through the training dataset to obtain an improved Deeplabv3+ model and an improved YOLOv11 model.
[0082] It should be noted that in this embodiment, by adding a normalization-based attention module (NAM) to the Deeplabv3+ model, the segmentation accuracy of the original algorithm is improved, especially in the edge part, the processing ability for targets of different scales is enhanced, and the computational complexity is reduced. By combining the FEM (feature fusion module) and the SCAM (spatial context awareness module) to improve the YOLOv11 detection algorithm, the detection accuracy of small targets is significantly improved, the recognition ability of multi-scale targets is enhanced, and the target discrimination in complex backgrounds is improved.
[0083] In a specific implementation, the initial Deeplabv3+ model and the initial YOLOv11 model can be trained respectively based on the training dataset to obtain a first model training result and a second model training result; the model parameters in the initial Deeplabv3+ model are optimized according to the first model training result to obtain an improved Deeplabv3+ model; the model parameters in the initial YOLOv11 model are optimized according to the second model training result to obtain an improved YOLOv11 model.
[0084] This embodiment discloses the construction of an initial Deeplabv3+ model based on the Deeplabv3+ model, where the initial Deeplabv3+ model includes a normalization-based attention module; an initial YOLOv11 model is constructed based on the YOLOv11 model, and the initial YOLOv11 model includes a feature fusion module and a spatial context awareness module; a cultivated land image dataset is obtained, and the cultivated land image dataset is labeled to obtain a training dataset; the initial Deeplabv3+ model and the initial YOLOv11 model are respectively trained through the training dataset to obtain an improved Deeplabv3+ model and an improved YOLOv11 model. Compared with the prior art, in this embodiment, by adding a normalization-based attention module to the Deeplabv3+ model, the segmentation accuracy of the original algorithm is improved. Combining the feature fusion module and the spatial context awareness module to improve the YOLOv11 detection algorithm improves the detection accuracy of small targets and the recognition ability of multi-scale targets, further ensuring the accuracy and reliability of land use monitoring.
[0085] Reference Figure 6 , Figure 6 is a schematic flowchart of the third embodiment of the cultivated land non-grain and non-agricultural detection method of the present invention.
[0086] Based on the above embodiments, in this embodiment, after step S30, steps S40 to S60 are further included:
[0087] Step S40: Determine whether there are non-grain and / or non-agricultural detection results in the non-grain and non-agricultural detection results.
[0088] Step S50: If there are non-grain and / or non-agricultural detection results, generate corresponding alarm instructions according to the non-grain and non-agricultural detection results.
[0089] Step S60: Perform alarm display for non-grain and non-agricultural detection according to the alarm instructions.
[0090] It should be understood that performing alarm display for non-grain and non-agricultural detection according to the alarm instructions may include, but is not limited to, sending alarm pictures or videos to relevant departments, sending text messages and emails, and sounding the alarm lights and sirens of hardware devices.
[0091] This embodiment discloses obtaining a cultivated land image of a scene to be detected; inputting the cultivated land image into an improved Deeplabv3+ model and an improved YOLOv11 model respectively to obtain a region segmentation result and a class detection result, where the improved Deeplabv3+ model includes a normalization-based attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module; determining a non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the class detection result; determining whether there is a non-grain and / or non-agricultural detection result in the non-grain and non-agricultural detection result; if there is a non-grain and / or non-agricultural detection result, generating a corresponding alarm instruction according to the non-grain and non-agricultural detection result; and performing an alarm display for non-grain and non-agricultural detection according to the alarm instruction. Since this embodiment generates a corresponding alarm instruction according to the non-grain and non-agricultural detection result and then performs an alarm display for non-grain and non-agricultural detection according to the alarm instruction, compared with the prior art, this embodiment responds and prevents in a timely manner, thereby promoting the intelligent and modern development of land resource management.
[0092] In addition, an embodiment of the present invention further provides a storage medium, on which a cultivated land non-grain and non-agricultural detection program is stored, and when the cultivated land non-grain and non-agricultural detection program is executed by a processor, the steps of the cultivated land non-grain and non-agricultural detection method as described above are implemented.
[0093] Referring to Figure 7 , Figure 7 is a structural block diagram of the first embodiment of the cultivated land non-grain and non-agricultural detection device of the present invention.
[0094] As Figure 7 shown, the cultivated land non-grain and non-agricultural detection device proposed by the embodiment of the present invention includes: an image acquisition module 701, a cultivated land detection module 702, and a result output module 703.
[0095] The image acquisition module 701 is used to acquire a cultivated land image of a scene to be detected.
[0096] The cultivated land detection module 702 is used to input the cultivated land image into an improved Deeplabv3+ model and an improved YOLOv11 model respectively to obtain a region segmentation result and a class detection result, where the improved Deeplabv3+ model includes a normalization-based attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module.
[0097] The result output module 703 is used to determine a non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the class detection result.
[0098] The result output module 703 is further configured to determine the green area and the bare area in the cultivated land image according to the region segmentation result; determine the woods and crops in the cultivated land image according to the category detection result; when the length or width of the woods in the cultivated land image is not less than a first preset threshold, determine whether the woods with a length or width not less than the first preset threshold are in the green area; if so, use non-grain as the non-grain and non-agricultural detection result of the to-be-detected scene.
[0099] The result output module 703 is further configured to compare the length or width of the bare area with a second preset threshold to obtain a comparison result; if the comparison result indicates that the length or width of the bare area is greater than the second preset threshold, use non-agricultural as the non-grain and non-agricultural detection result of the to-be-detected scene.
[0100] The image acquisition module 701 is further configured to acquire video stream data of a to-be-detected scene through a high-point camera, decode the video stream data to obtain decoded image data; and preprocess the decoded image data to obtain a cultivated land image of the to-be-detected scene.
[0101] The embodiment of the present device discloses acquiring a cultivated land image of a to-be-detected scene; inputting the cultivated land image into an improved Deeplabv3+ model and an improved YOLOv11 model respectively to obtain a region segmentation result and a category detection result, where the improved Deeplabv3+ model includes a normalization-based attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context awareness module; determining the non-grain and non-agricultural detection result of the to-be-detected scene based on the region segmentation result and the category detection result. Since the improved Deeplabv3+ model in the embodiment of the present device includes a normalization-based attention module, the segmentation accuracy is effectively improved. The improved YOLOv11 model includes a feature fusion module and a spatial context awareness module, which effectively improve the target detection accuracy and enhance the recognition ability of multi-scale targets. Compared with the prior art, the embodiment of the present device uses the improved Deeplabv3+ model and the improved YOLOv11 model to determine the non-grain and non-agricultural detection result of the to-be-detected scene, effectively improving the accuracy and efficiency of land use monitoring.
[0102] Based on the first embodiment of the cultivated land non-grain and non-agricultural detection device of the present invention, a second embodiment of the cultivated land non-grain and non-agricultural detection device of the present invention is proposed.
[0103] In this embodiment, the image acquisition module 701 is further configured to construct an initial Deeplabv3+ model based on the Deeplabv3+ model, where the initial Deeplabv3+ model includes a normalized attention module; construct an initial YOLOv11 model based on the YOLOv11 model, where the initial YOLOv11 model includes a feature fusion module and a spatial context awareness module; acquire a cultivated land image dataset, and label the cultivated land image dataset to obtain a training dataset; and train the initial Deeplabv3+ model and the initial YOLOv11 model respectively through the training dataset to obtain an improved Deeplabv3+ model and an improved YOLOv11 model.
[0104] The image acquisition module 701 is further configured to train the initial Deeplabv3+ model and the initial YOLOv11 model respectively through the training dataset to obtain a first model training result and a second model training result; optimize the model parameters in the initial Deeplabv3+ model according to the first model training result to obtain an improved Deeplabv3+ model; and optimize the model parameters in the initial YOLOv11 model according to the second model training result to obtain an improved YOLOv11 model.
[0105] For other embodiments or specific implementation manners of the cultivated land non-grain and non-agricultural detection device of the present invention, reference may be made to the above method embodiments, which will not be elaborated herein.
[0106] This application provides a cultivated land non-grain and non-agricultural detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the cultivated land non-grain and non-agricultural detection method in the first embodiment above.
[0107] The following refers to Figure 8 , which shows a schematic structural diagram of a cultivated land non-grain and non-agricultural detection device suitable for implementing the embodiments of the present application. The cultivated land non-grain and non-agricultural detection device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8The shown cultivated land non - grain and non - agricultural detection device is merely an example and should not impose any limitations on the functions and application scope of the embodiments of this application.
[0108] As Figure 8 shown, the cultivated land non - grain and non - agricultural detection device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read - only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the cultivated land non - grain and non - agricultural detection device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the cultivated land non - grain and non - agricultural detection device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a cultivated land non - grain and non - agricultural detection device with various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems can be implemented or had.
[0109] Specifically, according to the embodiments disclosed in this application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in this application include a computer program product, which includes a computer program carried on a computer - readable medium, and the computer program contains program codes for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above - defined functions in the method of the embodiments disclosed in this application are executed.
[0110] The cultivated land non-grain and non-agricultural detection device provided by this application adopts the cultivated land non-grain and non-agricultural detection method in the above-mentioned embodiment, which can solve the technical problems of low accuracy and efficiency in land use monitoring in the prior art. Compared with the prior art, the beneficial effects of the cultivated land non-grain and non-agricultural detection device provided by this application are the same as those of the cultivated land non-grain and non-agricultural detection method provided by the above-mentioned embodiment, and other technical features in this cultivated land non-grain and non-agricultural detection device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0111] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware or a combination of them. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0112] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claimed rights.
[0113] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or system including that element.
[0114] The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0115] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory / random access memory, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0116] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.
Claims
1. A method for detecting non-food and non-agricultural cultivated land, characterized in that: The method comprises: Acquire a farmland image of the scene to be detected; The cultivated land image is respectively input into an improved Deeplabv3+ model and an improved YOLOv11 model to obtain a region segmentation result and a category detection result, wherein the improved Deeplabv3+ model includes a normalized attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context perception module; Based on the region segmentation result and the category detection result, a non-grain and non-agricultural detection result of the scene to be detected is determined.
2. The method for detecting non-food and non-agricultural cultivated land according to claim 1, characterized in that: The step of determining the non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the category detection result comprises: Determine the green land area and the bare land area in the cultivated land image according to the region segmentation result; Determine the woods and crops in the cultivated land image according to the category detection result; When the length or width of the woods in the cultivated land image is not less than a first preset threshold, determining whether the woods whose length or width is not less than the first preset threshold are in the green area; If it is in the green area, non-grain food will be taken as the non-grain and non-agricultural detection result of the scene to be detected.
3. The method for detecting non-food and non-agricultural cultivated land according to claim 2, characterized in that: After the step of determining the green land area and the bare land area in the cultivated land image according to the region segmentation result, the method further includes: Comparing the length or width of the bare land area with a second preset threshold to obtain a comparison result; If the comparison result indicates that the length or width of the bare land area is greater than the second preset threshold, non-agricultural is taken as the non-grain and non-agricultural detection result of the scene to be detected.
4. The method for detecting non-food and non-agricultural cultivated land according to claim 1, characterized in that: The step of acquiring the cultivated land image of the scene to be detected includes: Acquire video stream data of the scene to be detected through a high-point camera, and decode the video stream data to obtain decoded image data; The decoded image data is preprocessed to obtain a cultivated land image of the scene to be detected.
5. The method for detecting non-food and non-agricultural cultivated land according to claim 1, characterized in that: Before the step of acquiring the cultivated land image of the scene to be detected, the method further includes: Building an initial Deeplabv3+ model based on the Deeplabv3+ model, wherein the initial Deeplabv3+ model includes a normalized-based attention module; Building an initial YOLOv11 model based on the YOLOv11 model, wherein the initial YOLOv11 model includes a feature fusion module and a spatial context perception module; Acquire a cultivated land image dataset, and annotate the cultivated land image dataset to obtain a training dataset; The initial Deeplabv3+ model and the initial YOLOv11 model are trained respectively using the training data set to obtain an improved Deeplabv3+ model and an improved YOLOv11 model.
6. The method for detecting non-food and non-agricultural cultivated land according to claim 5, characterized in that: The step of respectively training the initial Deeplabv3+ model and the initial YOLOv11 model through the training data set to obtain an improved Deeplabv3+ model and an improved YOLOv11 model comprises: Based on the training data set, the initial Deeplabv3+ model and the initial YOLOv11 model are trained respectively to obtain a first model training result and a second model training result; Optimizing model parameters in the initial Deeplabv3+ model according to the first model training result to obtain an improved Deeplabv3+ model; The model parameters in the initial YOLOv11 model are optimized according to the second model training result to obtain an improved YOLOv11 model.
7. The method for detecting non-food and non-agricultural cultivated land according to claim 1, characterized in that: After the step of determining the non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the category detection result, the method further includes: Determining whether there are non-grain and / or non-agricultural test results in the non-grain and non-agricultural test results; If there are non-grain and / or non-agricultural detection results, a corresponding alarm instruction is generated according to the non-grain and non-agricultural detection results; An alarm display of non-grain and non-agricultural detection is performed according to the alarm instruction.
8. A device for detecting non-grain and non-agricultural cultivated land, characterized in that: The device comprises: An image acquisition module, used to acquire a cultivated land image of a scene to be detected; A cultivated land detection module, used for inputting the cultivated land image into an improved Deeplabv3+ model and an improved YOLOv11 model respectively, to obtain a region segmentation result and a category detection result, wherein the improved Deeplabv3+ model includes a normalized attention module, and the improved YOLOv11 model includes a feature fusion module and a spatial context perception module; A result output module is used to determine the non-grain and non-agricultural detection result of the scene to be detected based on the region segmentation result and the category detection result.
9. A non-grain and non-agricultural detection device for cultivated land, characterized in that: The device includes: a memory, a processor, and a cultivated land non-food and non-agricultural detection program stored in the memory and executable on the processor, wherein the cultivated land non-food and non-agricultural detection program is configured to implement the steps of the cultivated land non-food and non-agricultural detection method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a cultivated land non-grain and non-agricultural detection program, and when the cultivated land non-grain and non-agricultural detection program is executed by the processor, the steps of the cultivated land non-grain and non-agricultural detection method according to any one of claims 1 to 7 are implemented.