Cultivated land identification method, system, equipment and medium
By acquiring and splicing edge fence data, combining target detection and regional segmentation technology, calculating the proportion of cultivated land, the problem of time-consuming and low accuracy of traditional cultivated land identification methods is solved, and fast and efficient cultivated land identification is achieved.
Patent Information
- Application Number
- CN202411982960.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
AI Technical Summary
Traditional farmland recognition methods rely on remote sensing image analysis and manual labeling of experts, which is time-consuming and labor-intensive, making it difficult to quickly identify farmland types and have low accuracy.
By obtaining edge fence data and corresponding fence scaling levels, we can stitch together to obtain the land image to be identified, perform target detection and area segmentation, calculate the proportion of cultivated land, and then identify the land type to achieve rapid identification of cultivated land.
It improves the efficiency and accuracy of land identification, can quickly identify cultivated land and provide land analysis.
Smart Images

Figure CN119904690A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of land resource management, and in particular to a method, system, equipment and medium for identifying cultivated land. Background Art
[0002] In agricultural applications, by determining the production potential of different types of arable land, we can not only promote the sustainability of agriculture and ensure the long-term healthy development of agriculture through the rational use and protection of arable land resources, but also better match land resources with agricultural activities, so that limited land resources can be used most effectively, thereby improving the output efficiency per unit area and maximizing economic benefits.
[0003] Currently, traditional cultivated land identification relies on remote sensing image analysis and manual annotation by experts, which is time-consuming and labor-intensive, making it difficult to identify the type of cultivated land, and thus difficult to quickly give an explanation for the reasons for non-cultivated land, and the accuracy of cultivated land identification is low. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The main purpose of the embodiments of the present disclosure is to propose a method, system, device and storage medium for identifying cultivated land, which can effectively improve the efficiency and accuracy of land identification.
[0006] A first aspect of an embodiment of the present application provides a method for identifying cultivated land, which is used in a central controller. The method includes:
[0007] Get edge fence data and corresponding fence zoom level;
[0008] Perform stitching according to the edge fence data and the fence zoom level to obtain a land image to be identified;
[0009] Performing target detection on the land image to be identified to obtain a detection result of at least one land type;
[0010] Performing regional segmentation on the land image to be identified according to the detection result of the at least one land type to obtain a land image of at least one land type;
[0011] Calculating the proportion of cultivated land in the land image to be identified based on the land image of the at least one land type;
[0012] The land type of the land image to be identified is identified according to the cultivated land proportion to obtain the land type within the edge fence data range.
[0013] An embodiment of the present application provides a method for identifying cultivated land, which obtains edge fence data and a corresponding fence zoom level; performs splicing based on the edge fence data and the fence zoom level to obtain a land image to be identified; performs target detection on the land image to be identified to obtain a detection result of at least one land type; performs regional segmentation on the land image to be identified based on the detection result of at least one land type to obtain a land image of at least one land type; calculates the proportion of cultivated land in the land image to be identified based on the land image of at least one land type; identifies the land type of the land image to be identified based on the proportion of cultivated land, so as to obtain the land type within the range of the edge fence data, thereby enabling rapid identification of cultivated land and providing land analysis information, thereby effectively improving the efficiency and accuracy of cultivated land identification.
[0014] In some embodiments of the present application, the step of performing stitching according to the edge fence data and the fence zoom level to obtain the land image to be identified includes:
[0015] determining an initial land image corresponding to the edge fence data according to the fence zoom level;
[0016] Calculating the land coordinate range of the initial land image corresponding to the edge fence data according to the edge fence data;
[0017] The image areas within the corresponding land coordinate range in the initial land image are spliced to obtain the land image to be identified.
[0018] In some embodiments of the present application, the performing target detection on the land image to be identified to obtain a detection result of at least one land type includes:
[0019] Performing target detection on the land image to be identified by using the YOLO target detection algorithm to obtain a detection result of at least one land type;
[0020] The land image to be identified is segmented into regions according to the detection result of the at least one land type to obtain a land image of at least one land type, including:
[0021] According to the detection result of the at least one land type, the land image to be identified is segmented by a U-Net region segmentation algorithm to obtain a land image of at least one land type.
[0022] In some embodiments of the present application, the calculating the proportion of cultivated land in the land image to be identified based on the land image of the at least one land type includes:
[0023] Marking a land image of the at least one land type according to the detection result of the at least one land type to obtain a marked land image, wherein the land type of the marked land image is a cultivated land type;
[0024] According to the marked land image and the land image of the at least one land type, the proportion of the marked land image in the land image of the at least one land type is calculated to obtain the proportion of cultivated land in the land image to be identified.
[0025] In some embodiments of the present application, after identifying the land type of the land image to be identified according to the cultivated land proportion to obtain the land type within the edge fence data range, the method further includes:
[0026] When the land type within the edge fence data range is a cultivated land type, generating a recognition result of the edge fence data, the recognition result including the proportion of cultivated land in the land image to be recognized;
[0027] When the land type within the edge fence data range is not the cultivated land type, an identification reason for the edge fence data is generated according to the land type within the edge fence data range, and the identification reason includes the land type within the edge fence data range.
[0028] In some embodiments of the present application, before obtaining edge fence data and corresponding fence zoom level, the method further includes:
[0029] Acquire initial fence data, where the initial fence data is data representing boundary coordinates;
[0030] The initial fence data is converted into a unified coordinate format using a geographic information system to obtain the edge fence data.
[0031] To achieve the above object, a second aspect of an embodiment of the present invention provides a farmland identification system, the system comprising:
[0032] The acquisition module is used to obtain edge fence data and the corresponding fence zoom level;
[0033] A stitching module, used for performing stitching according to the edge fence data and the fence zoom level to obtain a land image to be identified;
[0034] A detection module, used to perform target detection on the land image to be identified, and obtain a detection result of at least one land type;
[0035] A segmentation module, configured to perform regional segmentation on the land image to be identified according to the detection result of the at least one land type, to obtain a land image of at least one land type;
[0036] A calculation module, used for calculating the proportion of cultivated land in the land image to be identified according to the land image of the at least one land type;
[0037] The identification module is used to identify the land type of the land image to be identified according to the cultivated land proportion, so as to obtain the land type within the edge fence data range.
[0038] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present invention provides an electronic device, comprising: at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the above-mentioned method for identifying cultivated land.
[0039] To achieve the above-mentioned purpose, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned method for identifying cultivated land.
[0040] To achieve the above-mentioned purpose, a fifth aspect of an embodiment of the present invention provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the above-mentioned method for identifying cultivated land.
[0041] It can be understood that the beneficial effects of the second to fifth aspects compared with the related art are the same as the beneficial effects of the first aspect compared with the related art. Please refer to the relevant description in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0043] Figure 1 It is a flowchart of a method for identifying cultivated land provided in an embodiment of the present application;
[0044] Figure 2 is an exemplary schematic diagram of a method for identifying cultivated land provided in an embodiment of the present application;
[0045] Figure 3 It is a structural schematic diagram of a farmland identification training system provided in an embodiment of the present application;
[0046] Figure 4 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0047] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0048] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0049] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0050] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.
[0051] In agricultural applications, by determining the production potential of different types of arable land, we can not only promote the sustainability of agriculture and ensure the long-term healthy development of agriculture through the rational use and protection of arable land resources, but also better match land resources with agricultural activities, so that limited land resources can be used most effectively, thereby improving the output efficiency per unit area and maximizing economic benefits. Therefore, arable land identification plays a key role in realizing precision agriculture and improving agricultural production efficiency and sustainability.
[0052] Currently, traditional cultivated land identification relies on remote sensing image analysis and manual annotation by experts, which is time-consuming and labor-intensive, making it difficult to identify the type of cultivated land, and thus difficult to quickly give an explanation for the reasons for non-cultivated land, and the accuracy of cultivated land identification is low.
[0053] Based on this, the embodiments of the present application provide a method, system, electronic device and medium for identifying cultivated land, aiming to improve the efficiency and accuracy of land identification.
[0054] The cultivated land identification method, system, electronic device and medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the cultivated land identification method in the embodiments of the present application is described.
[0055] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0056] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0057] The cultivated land identification method provided in the embodiment of the present application relates to the field of land resource management technology. The cultivated land identification method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the cultivated land identification method, etc., but is not limited to the above forms.
[0058] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0059] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0060] For this purpose, refer to Figure 1 The embodiment of the present application provides a method for identifying cultivated land. The method is applied to a central controller. The controller can be a server, an electronic device, or a mobile terminal, etc., which is not specifically limited here. The method includes the following steps S110 to S160.
[0061] Step S110: Obtain edge fence data and the corresponding fence zoom level.
[0062] In this step, edge fence data for subsequent stitching of images is obtained, wherein the edge fence data is used to represent the boundary coordinates of the geographic range selected by the user, and the fence zoom level represents the concept used to represent the map scale in the digital map of the geographic range selected by the user and the land map subsequently used for stitching, which can reflect the level of detail of the map display.
[0063] In one embodiment, the map is preferably provided in the form of tiles. Each zoom level has a corresponding set of tiles, and these tiles are combined together to form a complete map image. Tiles are usually small pictures of 256x256 pixels, named and stored according to a specific coordinate system (such as longitude and latitude or a plane coordinate system). When a user browses the map, the browser loads the corresponding tiles according to the current zoom level to construct the displayed map.
[0064] Furthermore, by receiving edge fence data and a zoom level input by a user, tile images can be downloaded from a satellite image service and stitched together to generate a complete satellite image within the edge fence data range.
[0065] Step S120: stitching is performed according to the edge fence data and the fence zoom level to obtain the land image to be identified.
[0066] In this step, the initial land image corresponding to the edge fence data is first determined according to the fence zoom level, wherein the initial land image is preferably constructed based on a tile-based map, and then the land coordinate range of the edge fence data corresponding to the initial land image is calculated according to the edge fence data, and then the image area within the corresponding land coordinate range in the initial land image is spliced to obtain the land image to be identified, and each zoom level corresponds to a map tile with a different resolution.
[0067] Specifically, a map tile of a resolution corresponding to the edge fence data is determined according to the fence zoom level, and the corresponding map tile is cropped to obtain an initial land image corresponding to the edge fence data.
[0068] Furthermore, according to the edge fence data and the zoom level, the land coordinate range required for subsequent stitching is calculated, and then a fence graphic corresponding to the edge fence data is generated on the initial land image according to the land coordinate range.
[0069] In an implementation manner in one embodiment, an image processing library, such as OpenCV (Open Source Computer Vision Library) or Pillow, may be used to draw graphics, thereby ensuring that the accuracy of the fence coordinates matches the resolution of the image to avoid graphic overlap or misalignment.
[0070] Furthermore, the land image to be identified is obtained by splicing and drawing the graphics, which provides high-quality basic data for subsequent land analysis, wherein the land image to be identified represents the tile area corresponding to the edge fence data on the tile land.
[0071] Specifically, when the fence graphic is a rectangular area, it is directly drawn with a rectangular frame, the drawing process is simple and the drawing graphic is clear; when the fence graphic is an irregular polygon, multiple coordinate points are connected according to the coordinates of the land coordinate range to draw a complete polygon outline.
[0072] Step S130: performing target detection on the land image to be identified to obtain a detection result of at least one land type.
[0073] In this step, it is preferred to perform target detection on the land image to be identified using a YOLO (You Only Look Once) target detection algorithm to obtain a detection result of at least one land type, wherein the YOLO target detection algorithm uses a separate CNN model to achieve end-to-end target detection.
[0074] Specifically, a trained YOLO model or other suitable target detection model is used to identify the land type of the land image to be identified, which is then used to subsequently calculate the proportion of cultivated land and determine whether it belongs to the category of cultivated land, where land types include cultivated land, buildings, roads or vegetation.
[0075] In one embodiment, the land image to be identified is first normalized to unify the data range.
[0076] Specifically, the pixel values of the input land map image to be identified are normalized to [0,1], and then the YOLO target detection algorithm is used for target detection to identify the land type contained in the land image to be identified, such as cultivated land, buildings, roads, etc. The recognition result may be one land type or may contain multiple land types. By identifying the land type contained in the land image to be identified, it is convenient to determine whether the land area corresponding to the land image to be identified is a cultivated land type, thereby helping users to better understand and manage land resources.
[0077] Step S140: performing regional segmentation on the land image to be identified according to the detection result of at least one land type to obtain a land image of at least one land type.
[0078] In this step, it is preferred that, based on the detection result of at least one land type, the land image to be identified is segmented by a U-Net region segmentation algorithm to obtain a land image of at least one land type.
[0079] Specifically, when the detection result is a type of land, it is determined that the current land image to be identified does not need to be segmented, and the land image to be identified of the current land type is directly obtained. When the detection result contains multiple land types, the U-Net regional segmentation algorithm is used to refine the detection results detected by the YOLO target detection algorithm, and then accurately determine the land type of each pixel.
[0080] Furthermore, the land image to be identified is segmented based on the detection result to obtain land images of different land types.
[0081] In one embodiment, the bounding box detected by YOLO can be fine-tuned by the U-Net region segmentation algorithm (such as using the output of the segmentation model for post-processing to accurately identify the boundaries of different types of land images), and then the conditional random field (CRF) is used to further optimize the boundary and reduce pixel-level noise and discontinuity.
[0082] Among them, the U-Net region segmentation algorithm is a convolutional neural network architecture designed specifically for biomedical image segmentation tasks, but due to its excellent performance and flexibility, it has been widely used in image segmentation problems in other fields, including farmland identification in agriculture. U-Net performs well in processing complex image data due to its unique encoder-decoder structure and skip connections.
[0083] Step S150: Calculate the proportion of cultivated land in the land image to be identified based on the land image of at least one land type.
[0084] In this step, first, the land type in the land image is marked as cultivated land type based on the detection result of at least one land type to obtain a marked land image, and then based on the marked land image and all land images, the proportion of the marked land image in all land images is calculated, and then the proportion of cultivated land in the land image to be identified is obtained, so as to determine whether the land image to be identified is cultivated land.
[0085] Step S160: Identify the land type of the land image to be identified according to the proportion of cultivated land to obtain the land type within the edge fence data range.
[0086] In this step, the land type of the land image to be identified can be identified based on the preset cultivated land judgment ratio and the calculated cultivated land ratio in the land image to be identified, and then the land type within the edge fence data range can be obtained.
[0087] In some embodiments, in step S120, stitching is performed according to the edge fence data and the fence zoom level to obtain the land image to be identified, including the following steps:
[0088] Determine an initial land image corresponding to the edge fence data according to the fence zoom level;
[0089] Calculate the land coordinate range of the initial land image corresponding to the edge fence data according to the edge fence data;
[0090] The image areas within the corresponding land coordinate range in the initial land image are stitched together to obtain the land image to be identified.
[0091] In this embodiment, the required tile coordinate range (land coordinate range) is calculated based on the edge fence data and the corresponding zoom level, each zoom level corresponds to map tiles of different resolutions, and then the tile coordinate range of the initial land image corresponding to the calculated edge fence data is calculated.
[0092] In some embodiments, these tile images are downloaded from a pre-stored map tile server. If some tiles are not in the local cache, they need to be downloaded from the remote server through a network request. Then all downloaded tiles are spliced into a complete satellite image according to their coordinate positions to ensure seamless connection between tiles and avoid overlap or gaps.
[0093] Furthermore, the image area within the tile coordinate range is spliced according to the tile coordinate range of the initial land image corresponding to the edge fence data to obtain the land image to be identified.
[0094] Specifically, on the stitched image, a geo-fence graphic corresponding to the edge fence data is generated according to the tile coordinate range. If it is a rectangular fence, it is directly drawn with a rectangular frame; if it is a polygonal fence, multiple coordinate points are connected to draw a complete polygonal outline. Then, according to the drawn geo-fence graphic, the image is cropped to obtain the land image to be identified. According to the needs of subsequent identification, the land image to be identified can be saved as a new file, supporting multiple formats (such as PNG, JPEG, TIFF). At the same time, the land image to be identified can also be saved to cloud storage or other specified locations, and a download link is provided to the user for subsequent comparison and analysis.
[0095] In some embodiments, performing target detection on the land image to be identified in step S130 to obtain a detection result of at least one land type includes the following steps:
[0096] The YOLO target detection algorithm is used to perform target detection on the land image to be identified, and a detection result of at least one land type is obtained.
[0097] In this embodiment, it is preferred to perform target detection on the land image to be identified using the YOLO target detection algorithm or a pre-trained target detection model to obtain a detection result of at least one land type, wherein the land types include cultivated land, buildings, roads, and the like.
[0098] In one embodiment, a YOLO target detection model for target detection may be trained, and the specific training process includes: firstly performing transfer learning by loading YOLO pre-trained weights (eg, ImageNet pre-trained weights), and then fine-tuning on an agricultural image dataset.
[0099] Furthermore, images containing labeled data such as cultivated land, buildings, roads, and vegetation are prepared as training data sets to ensure that each type of sample is balanced, and then the object categories are labeled according to the YOLO format (each plot is labeled with a rectangular box and a class label) to achieve label and grid configuration.
[0100] Furthermore, the weights of the first few layers are frozen, and only the last few layers (convolutional layers, fully connected layers) are fine-tuned, and then the weights of the classification loss and the bounding box regression loss in the loss function are adjusted to optimize the precision and recall rate, so as to set a reasonable learning rate (such as 1e-4 or 1e-5) for training to avoid overfitting.
[0101] Finally, we get the trained YOLO target detection model. For each detected object, the YOLO target detection model returns its corresponding bounding box position (boxes), confidence score (confidences) and corresponding category ID (class_ids). Then, we can detect the category ID of the object and find the corresponding land type name from the preset classes list.
[0102] In addition, a confidence threshold can be set to filter out uncertain detection results and non-maximum suppression (NMS) can be applied to remove duplicate bounding boxes to ensure that each object has only one optimal bounding box, thereby improving the accuracy of the boundaries of cultivated land and other land types.
[0103] In some embodiments, in step S140, the land image to be identified is segmented into regions according to the detection result of at least one land type to obtain a land image of at least one land type, including the following steps:
[0104] According to the detection result of at least one land type, the land image to be identified is segmented into regions using a U-Net region segmentation algorithm to obtain a land image of at least one land type.
[0105] In this embodiment, it is preferred to use a U-Net region segmentation algorithm or a pre-trained U-Net region segmentation model to perform region segmentation on the land image to be identified according to the detection results of at least one land type, and then generate a land map of at least one land type, which not only helps users intuitively understand the distribution of different land types, but also provides important data support for subsequent land management decisions.
[0106] In one embodiment, a U-Net region segmentation model can be trained for region segmentation. The specific training process includes: first determining a training data set for training the U-Net region segmentation model, which should include a label for each pixel (such as "farmed land", "building", "road", etc.) to ensure segmentation accuracy.
[0107] Furthermore, the training dataset is adjusted to a size and format suitable for the input of the U-Net region segmentation model, and then the detection results of the YOLO target detection are used as the guiding information for the U-Net region segmentation to help more accurately locate and classify specific areas, and then the U-Net region segmentation model is used to classify the image at the pixel level.
[0108] Furthermore, the segmentation results are post-processed to extract image regions of at least one land type. In the model training process, the cross entropy loss function and the Dice coefficient (IoU) can also be used to optimize the segmentation performance, ensure the classification accuracy, improve the accuracy of the segmentation boundary, and better deal with the class imbalance problem in the data set.
[0109] Specifically, the cross entropy loss function is a method to measure the difference between two probability distributions. For binary classification problems, the binary cross entropy loss function is used; for multi-category classification problems, the multi-category cross entropy loss function is used.
[0110] The Dice coefficient is a statistical measure used to evaluate the similarity between two sets. It is used in image segmentation tasks and can measure the degree of overlap between the predicted results and the actual labeled areas.
[0111] In some embodiments, in step S150, calculating the proportion of cultivated land in the land image to be identified based on the land image of at least one land type includes the following steps:
[0112] Marking a land image of at least one land type according to a detection result of at least one land type to obtain a marked land image, wherein the land type of the marked land image is a cultivated land type;
[0113] According to the marked land image and the land image of at least one land type, the proportion of the marked land image in the land image of at least one land type is calculated to obtain the proportion of cultivated land in the land image to be identified.
[0114] In this embodiment, the detection results are used to locate potential cultivated land areas, and the cultivated land areas are marked. Then, by performing regional segmentation, the image is classified at the pixel level to generate a land image of at least one land type, especially for cultivated land types. Then, based on the regional segmentation results, the cultivated land proportion is calculated by comparing the area of the marked image with the area of the entire image to be identified.
[0115] In some embodiments, after identifying the land type of the land image to be identified according to the cultivated land proportion in step S160 to obtain the land type within the edge fence data range, the following steps are also included:
[0116] When the land type within the edge fence data range is the cultivated land type, a recognition result of the edge fence data is generated, and the recognition result includes the proportion of cultivated land in the land image to be recognized;
[0117] When the land type within the edge fence data range is not the cultivated land type, an identification reason for the edge fence data is generated according to the land type within the edge fence data range, and the identification reason includes the land type within the edge fence data range.
[0118] In this embodiment, after identifying the land type of the land image to be identified, when the identification result within the edge fence data range is the cultivated land type, the identification result including the proportion of cultivated land in the land image to be identified is directly generated; when the identification result within the edge fence data range is not the cultivated land type, the identification reason including the land type within the edge fence data range is generated according to the land type within the edge fence data range, which is convenient for users to understand the land utilization in a specific area and is conducive to land resource management.
[0119] In some embodiments, before step S110 of acquiring edge fence data and corresponding fence zoom level, the following steps are also included:
[0120] Obtaining initial fence data, where the initial fence data is data representing boundary coordinates;
[0121] Using the geographic information system, the initial fence data is converted into a unified coordinate format to obtain the edge fence data.
[0122] In this embodiment, initial fence data (usually longitude and latitude coordinates) representing boundary coordinates uploaded by the user or stored in the cloud is obtained, and the validity of the data can be verified according to the identification needs, specifically including checking whether the obtained initial fence data is complete and valid, ensuring that the number of coordinate points is sufficient, and the fence geometry is reasonable (such as non-self-intersection, closed, etc.).
[0123] The initial fence data is preferably a file containing boundary coordinates or directly input coordinate points. The coordinates of the fence can be longitude and latitude (WGS84 coordinate system), pixel coordinates, or other coordinate systems (such as UTM).
[0124] Specific supported data formats include: longitude and latitude coordinates: usually a set of longitude and latitude (e.g. longitude, latitude) describing the four corners of a geographic fence or multiple boundary points of a polygon; and other formats: such as GeoJSON, KML, etc. that can provide coordinate data and additional geographic information.
[0125] Further, GIS (Geographic Information System) tools or algorithms are used to complete coordinate conversion, and GDAL (Geographic Data Abstraction Library) or Proj.4 library is used to implement coordinate system conversion, converting the acquired initial fence data from longitude and latitude to tile coordinate format for subsequent data processing.
[0126] Specifically, this can be done using map projections such as EPSG:3857 and other GIS tools such as GDAL or the Proj.4 library.
[0127] Among them, GDAL (Geospatial Data Abstraction Library) is an open source library for reading, writing and processing raster and vector geospatial data formats. It provides a unified interface to access a variety of different geospatial data sources and supports a wide range of data conversion and processing operations. GDAL is mainly used for geographic information system (GIS) development and application.
[0128] Proj.4 (also known as PROJ) is an open source geospatial coordinate transformation library that provides support for various coordinate reference systems (CRS), including geographic coordinate systems (such as latitude and longitude) and projected coordinate systems (such as UTM, Lambert, etc.), and can perform accurate conversion from one coordinate system to another.
[0129] In one embodiment, cultivated land identification is performed using a pre-trained cultivated land identification model, wherein the cultivated land identification model includes: a map stitching module, a large model workflow module, an image processing module and a user interface module. Cultivated land identification refers to determining whether a specific area is cultivated land through image analysis technology.
[0130] Specifically, the map stitching module receives the geo-fence coordinate range and zoom level input by the user, downloads tile images from the satellite image service and stitches them to generate a complete satellite image within the geo-fence range. In the map application, in order to display a large-scale map, the map is divided into multiple small images, each of which is called a tile, which is usually uniquely located by x and y coordinates and zoom level zoom.
[0131] Large model workflow module: Use the large language model platform (Define&Modify, dify) to analyze the spliced images, output the proportion of cultivated land, cultivated land judgment results and explanations of non-cultivated land reasons. Preferably, the large language model platform dify references the trained YOLO target detection model and U-Net region segmentation model for analysis and processing.
[0132] Image processing module: supports coordinate calculation and stitching of map tiles, generates stitched images, and ensures that the stitched images are consistent with the geographic fence range defined by the user.
[0133] User interface module: receives the geo-fence coordinates input by the user and displays the analysis results output by the large language model platform, including the proportion of cultivated land, cultivated land judgment and explanation information.
[0134] Specifically, the coordinate range and zoom level of the geo-fence defined by the user are first received, where the zoom level refers to the zoom level of the tile map. Since the map used for subsequent splicing is a tile map, different levels display different contents. For example, a level 15 tile may display a yard, while a level 16 tile displays a corner of the yard. According to different zoom levels and the size of the geo-fence defined by the user, determine which level of tile to use for subsequent splicing.
[0135] Furthermore, the tile images within the geographic fence are downloaded through the map stitching module, and stitched to generate a complete satellite image. In this embodiment, since the national map tiles have been stored, there is no need to download them from other places. Map stitching refers to combining multiple tile images in a specific order to generate a complete map image of a large range. Specifically, map stitching is used to generate a complete satellite image within the geographic fence defined by the user.
[0136] Furthermore, the spliced map image is passed to the large model workflow module, and the YOLO target detection model and U-Net regional segmentation model in the large language model platform dify are called for analysis. Then, the large model workflow module detects cultivated land in the image within the geographic fence, outputs the cultivated land ratio, and determines whether it is cultivated land. If it is judged to be non-cultivated land, the large language model platform outputs the explanation of the reason why the area is non-cultivated land, such as buildings, forests, etc.
[0137] Finally, the final results, including the proportion of cultivated land, judgment results and explanations of reasons, are fed back to users.
[0138] Furthermore, in this embodiment, the YOLO target detection model and the U-Net region segmentation model in the large language model platform dify are used to perform cultivated land proportion analysis and cultivated land judgment, wherein the input is a complete satellite image within the geographic fence, and the output is the cultivated land proportion, cultivated land judgment, and non-cultivated land reasons.
[0139] The following is a detailed explanation of the data structure of the cultivated land identification model:
[0140] Tile coordinate data structure: stores the downloaded tile image data and the corresponding tile coordinate range (x, y coordinates and zoom level).
[0141] Large model workflow data: Contains the stitched map images and the intermediate data structure of the analysis results, recording the proportion of cultivated land and the interpretation information output by the large language model platform dify.
[0142] Furthermore, the farmland recognition model was evaluated by using AP (average precision) to evaluate the YOLO detection accuracy. Then, the IoU (intersection over union) and Dice coefficient were used to evaluate the regional segmentation effect, and the precision-recall curve analysis of the detection and segmentation results was performed to ensure efficient recognition. Finally, the hyperparameters of the YOLO and segmentation models (such as learning rate, batch size, etc.) were adjusted according to the evaluation results, and then according to the imbalance of the target categories, sample resampling or adjustment of the weights in the loss function were used to optimize the model performance.
[0143] like Figure 2 As shown, in this embodiment, the user uploads a satellite image. The geographic fence marked with a white frame in the image has a corresponding image text: "Please determine whether the type of land in the geographic fence is cultivated land." The satellite image uploaded by the user is then identified and analyzed through the cultivated land identification model, where the geographic fence is a specific geographic range circled by the user on the map, usually expressed in latitude and longitude coordinates, and the area within the geographic fence is the cultivated land identification range that the user is concerned about.
[0144] When the identification result is the cultivated land type, the cultivated land accounts for the <proportion> of the geo-fence size, and the output is:
[0145] {"check":true,
[0146] "per":<percentage>}.
[0147] If the identification result is not the cultivated land type, the cultivated land identification model is used to identify the type of land enclosed by the geo-fence and output:
[0148] {"check":false,
[0149] "type":<plot type>}.
[0150] Among them, the output of the farmland identification model is a text:
[0151] {"check":true,
[0152] "per":<percentage>}.
[0153] In this embodiment, the map stitching module quickly obtains and stitches complete satellite images within the geographic fence, and the large language workflow module analyzes the proportion of cultivated land and the judgment results in real time, providing an efficient and fast method for identifying cultivated land. The large language workflow module can output the reasons for non-cultivated land areas, such as buildings, roads, forests, etc., to provide users with detailed information on land use, which is convenient for land resource management and planning.
[0154] Furthermore, the farmland identification model is highly flexible and can be used for geo-fences of different sizes and types by adjusting the map stitching range and large model workflow. At the same time, more classification tasks, such as crop type identification, can be easily integrated.
[0155] In this embodiment, edge fence data and the corresponding fence zoom level are obtained; the land image to be identified is obtained by splicing according to the edge fence data and the fence zoom level; target detection is performed on the land image to be identified to obtain a detection result of at least one land type; the land image to be identified is segmented into regions according to the detection result of at least one land type to obtain a land image of at least one land type; the proportion of cultivated land in the land image to be identified is calculated according to the land image of at least one land type; the land type of the land image to be identified according to the cultivated land proportion, so as to obtain the land type within the edge fence data range, so as to quickly identify the cultivated land and provide land analysis information, thereby effectively improving the efficiency and accuracy of cultivated land identification.
[0156] like Figure 3 As shown, some embodiments of the present application provide a farmland identification system, the system includes an acquisition module 310, a splicing module 320, a detection module 330, a segmentation module 340, a calculation module 350, and an identification module 360. Specifically:
[0157] The acquisition module 310 is used to acquire edge fence data and corresponding fence zoom level;
[0158] The stitching module 320 is used to stitch according to the edge fence data and the fence zoom level to obtain the land image to be identified;
[0159] The detection module 330 is used to perform target detection on the land image to be identified and obtain a detection result of at least one land type;
[0160] The segmentation module 340 is used to perform regional segmentation on the land image to be identified according to the detection result of at least one land type, so as to obtain a land image of at least one land type;
[0161] The calculation module 350 is used to calculate the proportion of cultivated land in the land image to be identified based on the land image of at least one land type;
[0162] The identification module 360 is used to identify the land type of the land image to be identified according to the proportion of cultivated land, so as to obtain the land type within the edge fence data range.
[0163] In some implementations, the stitching module 320 may include: determining an initial land image corresponding to the edge fence data according to a fence zoom level.
[0164] In some implementations, the stitching module 320 may include: calculating a land coordinate range of the edge fence data corresponding to the initial land image according to the edge fence data.
[0165] In some implementations, the stitching module 320 may include stitching image regions within a corresponding land coordinate range in the initial land image to obtain a land image to be identified.
[0166] In some implementations, the detection module 330 may include: performing target detection on the land image to be identified by using a YOLO target detection algorithm to obtain a detection result of at least one land type.
[0167] In some embodiments, the segmentation module 340 may include: performing region segmentation on the land image to be identified by using a U-Net region segmentation algorithm according to the detection result of at least one land type, to obtain a land image of at least one land type.
[0168] In some embodiments, the calculation module 350 may include: marking a land image of the at least one land type according to the detection result of the at least one land type to obtain a marked land image, wherein the land type of the marked land image is a cultivated land type;
[0169] In some embodiments, the calculation module 350 may include: calculating the proportion of the marked land image in the land image of the at least one land type based on the marked land image and the land image of the at least one land type, so as to obtain the proportion of cultivated land in the land image to be identified.
[0170] In some embodiments, the identification module 360 may include: when the land type within the edge fence data range is a cultivated land type, generating an identification result of the edge fence data, the identification result including the proportion of cultivated land in the land image to be identified.
[0171] In some embodiments, the identification module 360 may include: when the land type within the edge fence data range is not the cultivated land type, generating an identification reason for the edge fence data based on the land type within the edge fence data range, the identification reason including the land type within the edge fence data range.
[0172] In some implementations, the acquisition module 310 may include: acquiring initial fence data, where the initial fence data is data representing boundary coordinates.
[0173] In some implementations, the acquisition module 310 may include: using a geographic information system to convert the initial fence data into a unified coordinate format to obtain the edge fence data.
[0174] It should be noted that the farmland identification system provided in this embodiment and the above-mentioned farmland identification method are based on the same inventive concept, so the relevant contents of the above-mentioned farmland identification method are also applicable to the contents of the farmland identification system, and therefore, they will not be repeated here.
[0175] In order to solve the technical problems that the existing technology is difficult to identify the type of cultivated land, and thus it is difficult to quickly explain the reasons for non-cultivated land, and the accuracy of cultivated land identification is low, the system obtains edge fence data and the corresponding fence zoom level; splices according to the edge fence data and the fence zoom level to obtain the land image to be identified; performs target detection on the land image to be identified to obtain at least one land type detection result; performs regional segmentation on the land image to be identified according to the detection result of at least one land type to obtain a land image of at least one land type; calculates the proportion of cultivated land in the land image to be identified according to the land image of at least one land type; identifies the land type of the land image to be identified according to the proportion of cultivated land, so as to obtain the land type within the range of the edge fence data. In this way, it is possible to quickly identify cultivated land and provide land analysis, thereby effectively improving the efficiency and accuracy of cultivated land identification.
[0176] An embodiment of the present application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above-mentioned cultivated land identification method when executing the computer program.
[0177] like Figure 4 , Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application, wherein the electronic device includes:
[0178] At least one battery;
[0179] at least one memory;
[0180] at least one processor;
[0181] at least one program;
[0182] The program is stored in the memory, and the processor executes at least one program to implement the above-mentioned method for identifying cultivated land in the present disclosure.
[0183] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.
[0184] The electronic device according to the embodiment of the present application is described in detail below.
[0185] The processor 1600 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present disclosure;
[0186] The memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1700, and the processor 1600 is called to execute a method for identifying cultivated land in the embodiment of the present disclosure.
[0187] Input / output interface 1800, used to implement information input and output;
[0188] The communication interface 1900 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0189] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );
[0190] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .
[0191] The embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned method for identifying cultivated land.
[0192] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0193] The embodiments of the present disclosure also provide a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is used to execute the above-mentioned cultivated land identification method.
[0194] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0195] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present disclosure and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0196] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0197] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0198] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0199] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0200] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0201] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0202] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0203] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs.
[0204] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.
[0205] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present application.
Claims
1. A method for identifying cultivated land, characterized in that: The method comprises: Get edge fence data and corresponding fence zoom level; Perform stitching according to the edge fence data and the fence zoom level to obtain a land image to be identified; Performing target detection on the land image to be identified to obtain a detection result of at least one land type; Performing regional segmentation on the land image to be identified according to the detection result of the at least one land type to obtain a land image of at least one land type; Calculating the proportion of cultivated land in the land image to be identified based on the land image of the at least one land type; The land type of the land image to be identified is identified according to the cultivated land proportion to obtain the land type within the edge fence data range.
2. The method for identifying cultivated land according to claim 1, characterized in that: The step of performing stitching according to the edge fence data and the fence zoom level to obtain the land image to be identified includes: determining an initial land image corresponding to the edge fence data according to the fence zoom level; Calculating the land coordinate range of the initial land image corresponding to the edge fence data according to the edge fence data; The image areas within the corresponding land coordinate range in the initial land image are spliced to obtain the land image to be identified.
3. The method for identifying cultivated land according to claim 1, characterized in that: The performing target detection on the land image to be identified to obtain a detection result of at least one land type includes: Performing target detection on the land image to be identified by using the YOLO target detection algorithm to obtain a detection result of at least one land type; The land image to be identified is segmented into regions according to the detection result of the at least one land type to obtain a land image of at least one land type, including: According to the detection result of the at least one land type, the land image to be identified is segmented by a U-Net region segmentation algorithm to obtain a land image of at least one land type.
4. The method for identifying cultivated land according to claim 3, characterized in that: The calculating the proportion of cultivated land in the land image to be identified according to the land image of the at least one land type includes: Marking a land image of the at least one land type according to the detection result of the at least one land type to obtain a marked land image, wherein the land type of the marked land image is a cultivated land type; According to the marked land image and the land image of the at least one land type, the proportion of the marked land image in the land image of the at least one land type is calculated to obtain the proportion of cultivated land in the land image to be identified.
5. The method for identifying cultivated land according to claim 4, characterized in that: After identifying the land type of the land image to be identified according to the cultivated land proportion to obtain the land type within the edge fence data range, the method further includes: When the land type within the edge fence data range is a cultivated land type, generating a recognition result of the edge fence data, the recognition result including the proportion of cultivated land in the land image to be recognized; When the land type within the edge fence data range is not the cultivated land type, an identification reason for the edge fence data is generated according to the land type within the edge fence data range, and the identification reason includes the land type within the edge fence data range.
6. The method for identifying cultivated land according to claim 1, characterized in that: Before obtaining edge fence data and corresponding fence zoom levels, the method further includes: Acquire initial fence data, where the initial fence data is data representing boundary coordinates; The initial fence data is converted into a unified coordinate format using a geographic information system to obtain the edge fence data.
7. A farmland identification system, characterized in that: The system comprises: The acquisition module is used to obtain edge fence data and the corresponding fence zoom level; A stitching module, used for performing stitching according to the edge fence data and the fence zoom level to obtain a land image to be identified; A detection module, used to perform target detection on the land image to be identified, and obtain a detection result of at least one land type; A segmentation module, configured to perform regional segmentation on the land image to be identified according to the detection result of the at least one land type, to obtain a land image of at least one land type; A calculation module, used for calculating the proportion of cultivated land in the land image to be identified according to the land image of the at least one land type; The identification module is used to identify the land type of the land image to be identified according to the cultivated land proportion, so as to obtain the land type within the edge fence data range.
8. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a method for identifying cultivated land as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method for identifying cultivated land according to any one of claims 1 to 6.
10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a method for identifying cultivated land as described in any one of claims 1 to 6.
Citation Information
Cited By
Supplementary cultivated land recovery evaluation method and system and medium
CN120339286A
Recognition control method, physical fence, mower and control system
CN120677911A